public SparkleAbout() : base() { SetFrame (new RectangleF (0, 0, 360, 288), true); Center (); Delegate = new SparkleAboutDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF (360, 288); MinSize = new SizeF (360, 288); HasShadow = true; BackingType = NSBackingStore.Buffered; CreateAbout (); MakeKeyAndOrderFront (this); SparkleShare.Controller.NewVersionAvailable += delegate (string new_version) { InvokeOnMainThread (delegate { UpdatesTextField.StringValue = "A newer version (" + new_version + ") is available!"; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba (0.96f, 0.47f, 0.0f, 1.0f); // Tango Orange #2 }); }; SparkleShare.Controller.VersionUpToDate += delegate { InvokeOnMainThread (delegate { UpdatesTextField.StringValue = "You are running the latest version."; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba (0.31f, 0.60f, 0.02f, 1.0f); // Tango Chameleon #3 }); }; CheckForNewVersion (); }
public SparkleAbout() : base() { SetFrame (new RectangleF (0, 0, 640, 281), true); Center (); Delegate = new SparkleAboutDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF (640, 281); MinSize = new SizeF (640, 281); HasShadow = true; BackingType = NSBackingStore.Buffered; CreateAbout (); Controller.HideWindowEvent += delegate { InvokeOnMainThread (delegate { PerformClose (this); }); }; Controller.ShowWindowEvent += delegate { InvokeOnMainThread (delegate { OrderFrontRegardless (); }); }; Controller.NewVersionEvent += delegate (string new_version) { InvokeOnMainThread (delegate { UpdatesTextField.StringValue = "A newer version (" + new_version + ") is available!"; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); }); }; Controller.VersionUpToDateEvent += delegate { InvokeOnMainThread (delegate { UpdatesTextField.StringValue = "You are running the latest version."; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); }); }; Controller.CheckingForNewVersionEvent += delegate { InvokeOnMainThread (delegate { UpdatesTextField.StringValue = "Checking for updates..."; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); // Tango Sky Blue #1 }); }; }
public SparkleAbout() : base() { SetFrame(new RectangleF(0, 0, 640, 281), true); Center(); Delegate = new SparkleAboutDelegate(); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF(640, 281); MinSize = new SizeF(640, 281); HasShadow = true; BackingType = NSBackingStore.Buffered; CreateAbout(); OrderFrontRegardless(); MakeKeyAndOrderFront(this); Program.UI.UpdateDockIconVisibility(); Controller.NewVersionEvent += delegate(string new_version) { InvokeOnMainThread(delegate { UpdatesTextField.StringValue = "A newer version (" + new_version + ") is available!"; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba(0.96f, 0.47f, 0.0f, 1.0f); // Tango Orange #2 }); }; Controller.VersionUpToDateEvent += delegate { InvokeOnMainThread(delegate { UpdatesTextField.StringValue = "You are running the latest version."; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f); // Tango Sky Blue #1 }); }; Controller.CheckingForNewVersionEvent += delegate { InvokeOnMainThread(delegate { UpdatesTextField.StringValue = "Checking for updates..."; UpdatesTextField.TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f); // Tango Sky Blue #1 }); }; }
public About() : base() { SetFrame(new RectangleF(0, 0, 640, 281), true); Center(); Delegate = new SparkleAboutDelegate(); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF(640, 281); MinSize = new SizeF(640, 281); HasShadow = true; IsOpaque = false; BackingType = NSBackingStore.Buffered; Level = NSWindowLevel.Floating; this.hidden_close_button = new NSButton() { Frame = new RectangleF(0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; CreateAbout(); this.hidden_close_button.Activated += delegate { Controller.WindowClosed(); }; Controller.HideWindowEvent += delegate { SparkleShare.Controller.Invoke(() => PerformClose(this)); }; Controller.ShowWindowEvent += delegate { SparkleShare.Controller.Invoke(() => OrderFrontRegardless()); }; Controller.UpdateLabelEvent += delegate(string text) { SparkleShare.Controller.Invoke(() => { this.updates_text_field.StringValue = text; }); }; ContentView.AddSubview(this.hidden_close_button); }
public SparkleAbout() : base() { SetFrame(new RectangleF(0, 0, 640, 281), true); Center(); Delegate = new SparkleAboutDelegate(); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF(640, 281); MinSize = new SizeF(640, 281); HasShadow = true; BackingType = NSBackingStore.Buffered; CreateAbout(); Controller.HideWindowEvent += delegate { Program.Controller.Invoke(() => PerformClose(this)); }; Controller.ShowWindowEvent += delegate { Program.Controller.Invoke(() => OrderFrontRegardless()); }; Controller.NewVersionEvent += delegate(string new_version) { Program.Controller.Invoke(() => { this.updates_text_field.StringValue = "A newer version (" + new_version + ") is available!"; }); }; Controller.VersionUpToDateEvent += delegate { Program.Controller.Invoke(() => { this.updates_text_field.StringValue = "You are running the latest version."; }); }; Controller.CheckingForNewVersionEvent += delegate { Program.Controller.Invoke(() => { this.updates_text_field.StringValue = "Checking for updates..."; }); }; }
public About() : base() { SetFrame (new RectangleF (0, 0, 640, 281), true); Center (); Delegate = new SparkleAboutDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF (640, 281); MinSize = new SizeF (640, 281); HasShadow = true; IsOpaque = false; BackingType = NSBackingStore.Buffered; Level = NSWindowLevel.Floating; this.hidden_close_button = new NSButton () { Frame = new RectangleF (0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; CreateAbout (); this.hidden_close_button.Activated += delegate { Controller.WindowClosed (); }; Controller.HideWindowEvent += delegate { SparkleShare.Controller.Invoke (() => PerformClose (this)); }; Controller.ShowWindowEvent += delegate { SparkleShare.Controller.Invoke (() => OrderFrontRegardless ()); }; Controller.UpdateLabelEvent += delegate (string text) { SparkleShare.Controller.Invoke (() => { this.updates_text_field.StringValue = text; }); }; ContentView.AddSubview (this.hidden_close_button); }
public SparkleAbout() : base() { using (var a = new NSAutoreleasePool()) { SetFrame(new RectangleF(0, 0, 640, 281), true); Center(); Delegate = new SparkleAboutDelegate(); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF(640, 281); MinSize = new SizeF(640, 281); HasShadow = true; BackingType = NSBackingStore.Buffered; this.website_link = new SparkleLink("Website", Controller.WebsiteLinkAddress); this.website_link.Frame = new RectangleF(new PointF(295, 25), this.website_link.Frame.Size); this.credits_link = new SparkleLink("Credits", Controller.CreditsLinkAddress); this.credits_link.Frame = new RectangleF( new PointF(this.website_link.Frame.X + this.website_link.Frame.Width + 10, 25), this.credits_link.Frame.Size); this.report_problem_link = new SparkleLink("Report a problem", Controller.ReportProblemLinkAddress); this.report_problem_link.Frame = new RectangleF( new PointF(this.credits_link.Frame.X + this.credits_link.Frame.Width + 10, 25), this.report_problem_link.Frame.Size); this.hidden_close_button = new NSButton() { Frame = new RectangleF(0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; this.hidden_close_button.Activated += delegate { Controller.WindowClosed(); }; ContentView.AddSubview(this.hidden_close_button); CreateAbout(); ContentView.AddSubview(this.website_link); ContentView.AddSubview(this.credits_link); ContentView.AddSubview(this.report_problem_link); } Controller.HideWindowEvent += delegate { using (var a = new NSAutoreleasePool()) { InvokeOnMainThread(delegate { PerformClose(this); }); } }; Controller.ShowWindowEvent += delegate { using (var a = new NSAutoreleasePool()) { InvokeOnMainThread(delegate { OrderFrontRegardless(); }); } }; Controller.NewVersionEvent += delegate(string new_version) { using (var a = new NSAutoreleasePool()) { InvokeOnMainThread(delegate { this.updates_text_field.StringValue = "A newer version (" + new_version + ") is available!"; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f); }); } }; Controller.VersionUpToDateEvent += delegate { using (var a = new NSAutoreleasePool()) { InvokeOnMainThread(delegate { this.updates_text_field.StringValue = "You are running the latest version."; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f); }); } }; Controller.CheckingForNewVersionEvent += delegate { using (var a = new NSAutoreleasePool()) { InvokeOnMainThread(delegate { this.updates_text_field.StringValue = "Checking for updates..."; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f); }); } }; }
public SparkleAbout() : base() { using (var a = new NSAutoreleasePool ()) { SetFrame (new RectangleF (0, 0, 640, 281), true); Center (); Delegate = new SparkleAboutDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; MaxSize = new SizeF (640, 281); MinSize = new SizeF (640, 281); HasShadow = true; BackingType = NSBackingStore.Buffered; this.hidden_close_button = new NSButton () { Frame = new RectangleF (0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; this.hidden_close_button.Activated += delegate { Controller.WindowClosed (); }; ContentView.AddSubview (this.hidden_close_button); CreateAbout (); } Controller.HideWindowEvent += delegate { using (var a = new NSAutoreleasePool ()) { InvokeOnMainThread (delegate { PerformClose (this); }); } }; Controller.ShowWindowEvent += delegate { using (var a = new NSAutoreleasePool ()) { InvokeOnMainThread (delegate { OrderFrontRegardless (); }); } }; Controller.NewVersionEvent += delegate (string new_version) { using (var a = new NSAutoreleasePool ()) { InvokeOnMainThread (delegate { this.updates_text_field.StringValue = "A newer version (" + new_version + ") is available!"; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); }); } }; Controller.VersionUpToDateEvent += delegate { using (var a = new NSAutoreleasePool ()) { InvokeOnMainThread (delegate { this.updates_text_field.StringValue = "You are running the latest version."; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); }); } }; Controller.CheckingForNewVersionEvent += delegate { using (var a = new NSAutoreleasePool ()) { InvokeOnMainThread (delegate { this.updates_text_field.StringValue = "Checking for updates..."; this.updates_text_field.TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f); // Tango Sky Blue #1 }); } }; }