windows: fix some exceptions

This commit is contained in:
Hylke Bons 2012-03-03 23:22:35 +00:00
parent e801d17a83
commit 6ddcc7e16c
3 changed files with 14 additions and 11 deletions

View file

@ -53,28 +53,29 @@ namespace SparkleShare {
MaximizeBox = false;
MinimizeBox = false;
BackgroundImage = Icons.about;
ClientSize = BackgroundImage.Size;
AutoScaleDimensions = new SizeF (6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size (640, 260);
MaximumSize = Size;
MinimumSize = Size;
BackgroundImage = Icons.about;
FormBorderStyle = FormBorderStyle.FixedDialog;
SizeGripStyle = SizeGripStyle.Hide;
StartPosition = FormStartPosition.CenterScreen;
FormClosing += Close;
CreateHandle ();
CreateAbout ();
Controller.ShowWindowEvent += delegate {
Invoke ((Action) delegate {
this.version.Invoke ((Action) delegate {
Show ();
Activate ();
BringToFront ();
});
};
@ -146,6 +147,7 @@ namespace SparkleShare {
ResumeLayout (false);
PerformLayout ();
}

View file

@ -231,11 +231,12 @@ namespace SparkleShare {
ToolStripMenuItem about_item = new ToolStripMenuItem (_("About SparkleShare"));
about_item.Click += delegate {
if (SparkleUI.About == null)
SparkleUI.About = new SparkleAbout ();
//if (SparkleUI.About == null)
// SparkleUI.About = new SparkleAbout ();
SparkleUI.About.Show ();
SparkleUI.About.BringToFront ();
//SparkleUI.About.Show ();
//SparkleUI.About.BringToFront ();
Controller.AboutClicked ();
};
Menu.Items.Add (about_item);

View file

@ -64,8 +64,8 @@ namespace SparkleShare {
#endif
Setup = new SparkleSetup ();
EventLog = new SparkleEventLog ();
//About = new SparkleAbout ();
//EventLog = new SparkleEventLog ();
About = new SparkleAbout ();
Bubbles = new SparkleBubbles ();
StatusIcon = new SparkleStatusIcon ();