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

View file

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

View file

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