Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ExitOrHidden1 = ((天蘩工具箱.ExitOrHidden)(target));
                return;

            case 2:
                this.btnCancel = ((System.Windows.Controls.Button)(target));

            #line 21 "..\..\ExitOrHidden.xaml"
                this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.btnConfirm = ((System.Windows.Controls.Button)(target));

            #line 22 "..\..\ExitOrHidden.xaml"
                this.btnConfirm.Click += new System.Windows.RoutedEventHandler(this.btnConfirm_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.btnHidden = ((System.Windows.Controls.Button)(target));

            #line 23 "..\..\ExitOrHidden.xaml"
                this.btnHidden.Click += new System.Windows.RoutedEventHandler(this.btnHidden_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.label = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #2
0
        //退出事件
        private void TF_ToolBox_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (cancelExit)
            {
                ExitOrHidden eoh = new ExitOrHidden();
                eoh.Owner = this;//设置父窗体
                eoh.ShowDialog();
                bool?bl = eoh.bl;
                switch (bl)
                {
                case null:
                    break;

                case true:
                    Visibility = Visibility.Hidden;
                    break;

                case false:
                    cancelExit = false;
                    break;
                }
            }
            e.Cancel = cancelExit;
        }