WindowClosed() public method

public WindowClosed ( ) : void
return void
示例#1
0
        public About() : base("About SparkleShare")
        {
            SetWmclass("SparkleShare", "SparkleShare");

            IconName       = "org.sparkleshare.SparkleShare";
            Resizable      = false;
            WindowPosition = WindowPosition.CenterAlways;
            TypeHint       = Gdk.WindowTypeHint.Dialog;

            SetSizeRequest(640, 260);


            DeleteEvent += delegate(object o, DeleteEventArgs args) {
                Controller.WindowClosed();
                args.RetVal = true;
            };

            KeyPressEvent += delegate(object o, KeyPressEventArgs args) {
                if (args.Event.Key == Gdk.Key.Escape ||
                    (args.Event.State == Gdk.ModifierType.ControlMask && args.Event.Key == Gdk.Key.w))
                {
                    Controller.WindowClosed();
                }
            };

            Controller.HideWindowEvent += delegate {
                Application.Invoke(delegate { Hide(); });
            };

            Controller.ShowWindowEvent += delegate {
                Application.Invoke(delegate {
                    ShowAll();
                    Present();
                });
            };

            Controller.UpdateLabelEvent += delegate(string text) {
                Application.Invoke(delegate {
                    updates.Text = text;
                    updates.ShowAll();
                });
            };


            CreateAbout();
        }
示例#2
0
 private void Close(object sender, CancelEventArgs args)
 {
     Controller.WindowClosed();
     args.Cancel = true;
 }