コード例 #1
0
ファイル: MainWindow.cs プロジェクト: ogu83/CloudWalletGTK
    protected void OnDeleteEvent(object sender, DeleteEventArgs a)
    {
        if (!_myVM.CloseCommand())
        {
            return;
        }

        Application.Quit();
        a.RetVal = true;
    }
コード例 #2
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            if (!_myVM.CloseCommand())
            {
                e.Cancel = true;
                return;
            }

            Properties.Settings.Default.LastWidth  = (int)this.Width;
            Properties.Settings.Default.LastHeight = (int)this.Height;
            Properties.Settings.Default.LastLeft   = (int)this.Left;
            Properties.Settings.Default.LastTop    = (int)this.Top;
            Properties.Settings.Default.Save();

            base.OnClosing(e);
        }