コード例 #1
0
        private void BtnBackupsType_Click(object sender, RoutedEventArgs e)
        {
            ButtonM button = (ButtonM)sender;

            ((AddNewDeviceVM)this.DataContext).Model.AddNewBackupAtList((string)button.Content);
            ((AddNewDeviceVM)this.DataContext).IsSelectionNewDevice = false;
        }
コード例 #2
0
        public ConverterDigits()
        {
            TBLayout.SuspendLayout();
            Controls.Add(TBLayout);
            Controls.Add(TextArea);
            Controls.Add(TextLine);
            Name = "ConverterDigits";

            Button7.AddColor1(); Button7.Click += new EventHandler(InsertText);
            Button8.AddColor1(); Button8.Click += new EventHandler(InsertText);
            Button9.AddColor1(); Button9.Click += new EventHandler(InsertText);
            ButtonBackspace.AddColor1(); ButtonBackspace.Click += new EventHandler(Backspace);
            ButtonC.AddColor1(); ButtonC.Click           += new EventHandler(InsertText);
            ButtonD.AddColor1(); ButtonD.Click           += new EventHandler(InsertText);
            ButtonDelete.AddColor1(); ButtonDelete.Click += new EventHandler(Delete);
            ButtonEnter.AddColor1(); ButtonEnter.Click   += new EventHandler(GetAnswer);
            ButtonI.AddColor1(); ButtonI.Click           += new EventHandler(InsertText);
            ButtonL.AddColor1(); ButtonL.Click           += new EventHandler(InsertText);
            ButtonM.AddColor1(); ButtonM.Click           += new EventHandler(InsertText);
            ButtonV.AddColor1(); ButtonV.Click           += new EventHandler(InsertText);
            ButtonX.AddColor1(); ButtonX.Click           += new EventHandler(InsertText);
            Button0.AddColor1(); Button0.Click           += new EventHandler(InsertText);
            Button1.AddColor1(); Button1.Click           += new EventHandler(InsertText);
            Button2.AddColor1(); Button2.Click           += new EventHandler(InsertText);
            Button3.AddColor1(); Button3.Click           += new EventHandler(InsertText);
            Button4.AddColor1(); Button4.Click           += new EventHandler(InsertText);
            Button5.AddColor1(); Button5.Click           += new EventHandler(InsertText);
            Button6.AddColor1(); Button6.Click           += new EventHandler(InsertText);
            TextArea.AddColor1();
            TextLine.AddColor1();

            TBLayout.Controls.AddRange(new Control[] {
                Button7, Button8, Button9, ButtonD, ButtonEnter,
                Button4, Button5, Button6, ButtonC, ButtonBackspace,
                Button1, Button2, Button3, ButtonL, ButtonDelete,
                Button0, ButtonI, ButtonV, ButtonX, ButtonM
            });
            ResumeLayout(false);
            PerformLayout();
            TBLayout.ResumeLayout(false);
        }