Exemple #1
0
        void App_Startup(object sender, StartupEventArgs e)
        {
            MainWindow window = new MainWindow();

            CalculatorModel calculator = new CalculatorModel();
            CalculatorViewModel viewModel = new CalculatorViewModel(calculator);
            window.DataContext = viewModel;

            window.Show();
        }
Exemple #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.MainWin = ((Calculator.MainWindow)(target));
         return;
     }
     this._contentLoaded = true;
 }
Exemple #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Calc = ((Calculator.MainWindow)(target));
                return;

            case 2:
                this.textBoxExpression = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.textBoxResult = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.label_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.groupBoxEditing = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 7:
                this.button_LeftBracket = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\MainWindow.xaml"
                this.button_LeftBracket.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.button_RightBracket = ((System.Windows.Controls.Button)(target));

            #line 25 "..\..\MainWindow.xaml"
                this.button_RightBracket.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.button_Backspace = ((System.Windows.Controls.Button)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.button_Backspace.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.button_Clear = ((System.Windows.Controls.Button)(target));

            #line 27 "..\..\MainWindow.xaml"
                this.button_Clear.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.button_1 = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\MainWindow.xaml"
                this.button_1.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.button_2 = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\MainWindow.xaml"
                this.button_2.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.button_3 = ((System.Windows.Controls.Button)(target));

            #line 45 "..\..\MainWindow.xaml"
                this.button_3.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.button_4 = ((System.Windows.Controls.Button)(target));

            #line 46 "..\..\MainWindow.xaml"
                this.button_4.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.button_5 = ((System.Windows.Controls.Button)(target));

            #line 48 "..\..\MainWindow.xaml"
                this.button_5.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.button_6 = ((System.Windows.Controls.Button)(target));

            #line 49 "..\..\MainWindow.xaml"
                this.button_6.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.button_7 = ((System.Windows.Controls.Button)(target));

            #line 50 "..\..\MainWindow.xaml"
                this.button_7.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.button_8 = ((System.Windows.Controls.Button)(target));

            #line 51 "..\..\MainWindow.xaml"
                this.button_8.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.button_9 = ((System.Windows.Controls.Button)(target));

            #line 53 "..\..\MainWindow.xaml"
                this.button_9.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.button_10 = ((System.Windows.Controls.Button)(target));

            #line 54 "..\..\MainWindow.xaml"
                this.button_10.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.button_11 = ((System.Windows.Controls.Button)(target));

            #line 55 "..\..\MainWindow.xaml"
                this.button_11.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.button_12 = ((System.Windows.Controls.Button)(target));

            #line 56 "..\..\MainWindow.xaml"
                this.button_12.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.button_13 = ((System.Windows.Controls.Button)(target));

            #line 58 "..\..\MainWindow.xaml"
                this.button_13.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.button_14 = ((System.Windows.Controls.Button)(target));

            #line 59 "..\..\MainWindow.xaml"
                this.button_14.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.button_15 = ((System.Windows.Controls.Button)(target));

            #line 60 "..\..\MainWindow.xaml"
                this.button_15.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.button_16 = ((System.Windows.Controls.Button)(target));

            #line 61 "..\..\MainWindow.xaml"
                this.button_16.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.button_17 = ((System.Windows.Controls.Button)(target));

            #line 74 "..\..\MainWindow.xaml"
                this.button_17.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 28:
                this.button_18 = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.button_18.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.button_19 = ((System.Windows.Controls.Button)(target));

            #line 76 "..\..\MainWindow.xaml"
                this.button_19.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.button_20 = ((System.Windows.Controls.Button)(target));

            #line 77 "..\..\MainWindow.xaml"
                this.button_20.Click += new System.Windows.RoutedEventHandler(this.btn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.calcWindow = ((Calculator.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.calcWindow.SizeChanged += new System.Windows.SizeChangedEventHandler(this.WindowSizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.historyColumn = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 3:
                this.historyColumnTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.menu = ((System.Windows.Controls.Menu)(target));
                return;

            case 5:
                this.historyBtn = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\MainWindow.xaml"
                this.historyBtn.Click += new System.Windows.RoutedEventHandler(this.ShowHistory);

            #line default
            #line hidden
                return;

            case 6:
                this.screen = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.historyQuickView = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.screenCanvas = ((System.Windows.Controls.Canvas)(target));

            #line 28 "..\..\MainWindow.xaml"
                this.screenCanvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.HistoryClickOff);

            #line default
            #line hidden
                return;

            case 9:
                this.buttonsGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 10:

            #line 48 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Seven);

            #line default
            #line hidden
                return;

            case 11:

            #line 49 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Eight);

            #line default
            #line hidden
                return;

            case 12:

            #line 50 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Nine);

            #line default
            #line hidden
                return;

            case 13:

            #line 51 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Four);

            #line default
            #line hidden
                return;

            case 14:

            #line 52 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Five);

            #line default
            #line hidden
                return;

            case 15:

            #line 53 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Six);

            #line default
            #line hidden
                return;

            case 16:

            #line 54 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.One);

            #line default
            #line hidden
                return;

            case 17:

            #line 55 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Two);

            #line default
            #line hidden
                return;

            case 18:

            #line 56 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Three);

            #line default
            #line hidden
                return;

            case 19:

            #line 57 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Sign);

            #line default
            #line hidden
                return;

            case 20:

            #line 58 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Zero);

            #line default
            #line hidden
                return;

            case 21:

            #line 59 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Dot);

            #line default
            #line hidden
                return;

            case 22:

            #line 62 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Percent);

            #line default
            #line hidden
                return;

            case 23:

            #line 63 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OneOver);

            #line default
            #line hidden
                return;

            case 24:

            #line 64 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CE);

            #line default
            #line hidden
                return;

            case 25:

            #line 65 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Square);

            #line default
            #line hidden
                return;

            case 26:

            #line 66 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.C);

            #line default
            #line hidden
                return;

            case 27:

            #line 67 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Root);

            #line default
            #line hidden
                return;

            case 28:

            #line 68 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Delete);

            #line default
            #line hidden
                return;

            case 29:

            #line 69 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Divide);

            #line default
            #line hidden
                return;

            case 30:

            #line 70 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Multiply);

            #line default
            #line hidden
                return;

            case 31:

            #line 71 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Subtract);

            #line default
            #line hidden
                return;

            case 32:

            #line 72 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Add);

            #line default
            #line hidden
                return;

            case 33:

            #line 73 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Equals);

            #line default
            #line hidden
                return;

            case 34:
                this.historyGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 35:
                this.historyTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 36:

            #line 78 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DeleteHistory);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.defaultWindow = ((Calculator.MainWindow)(target));

            #line 9 "..\..\MainWindow.xaml"
                this.defaultWindow.KeyDown += new System.Windows.Input.KeyEventHandler(this.btnNumber_KeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.lblTitle = ((System.Windows.Controls.Label)(target));

            #line 18 "..\..\MainWindow.xaml"
                this.lblTitle.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Label_MouseDown);

            #line default
            #line hidden
                return;

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

            #line 23 "..\..\MainWindow.xaml"
                this.btnCloseButton.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

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

            #line 28 "..\..\MainWindow.xaml"
                this.btnTopMost.Click += new System.Windows.RoutedEventHandler(this.btnTopMost_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnStandard = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\MainWindow.xaml"
                this.btnStandard.Click += new System.Windows.RoutedEventHandler(this.btnStandard_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnMinimize = ((System.Windows.Controls.Button)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.btnMinimize.Click += new System.Windows.RoutedEventHandler(this.btnMinimize_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.btnSmall = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\MainWindow.xaml"
                this.btnSmall.Click += new System.Windows.RoutedEventHandler(this.btnSmall_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.gridButtons = ((System.Windows.Controls.Grid)(target));
                return;

            case 9:
                this.lblOperation = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.lblResult = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.btnOtherAC = ((System.Windows.Controls.Button)(target));

            #line 67 "..\..\MainWindow.xaml"
                this.btnOtherAC.Click += new System.Windows.RoutedEventHandler(this.btnAC_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.btnOtherCE = ((System.Windows.Controls.Button)(target));

            #line 69 "..\..\MainWindow.xaml"
                this.btnOtherCE.Click += new System.Windows.RoutedEventHandler(this.btnCE_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.btnOtherPercent = ((System.Windows.Controls.Button)(target));

            #line 72 "..\..\MainWindow.xaml"
                this.btnOtherPercent.Click += new System.Windows.RoutedEventHandler(this.btnPercent_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.btnOperatorDevide = ((System.Windows.Controls.Button)(target));

            #line 73 "..\..\MainWindow.xaml"
                this.btnOperatorDevide.Click += new System.Windows.RoutedEventHandler(this.btnDevide_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.btnNumber7 = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.btnNumber7.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.btnNumber8 = ((System.Windows.Controls.Button)(target));

            #line 77 "..\..\MainWindow.xaml"
                this.btnNumber8.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.btnNumber9 = ((System.Windows.Controls.Button)(target));

            #line 79 "..\..\MainWindow.xaml"
                this.btnNumber9.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.btnOperatorMultiplication = ((System.Windows.Controls.Button)(target));

            #line 81 "..\..\MainWindow.xaml"
                this.btnOperatorMultiplication.Click += new System.Windows.RoutedEventHandler(this.btnMultiplication_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.btnNumber4 = ((System.Windows.Controls.Button)(target));

            #line 83 "..\..\MainWindow.xaml"
                this.btnNumber4.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.btnNumber5 = ((System.Windows.Controls.Button)(target));

            #line 85 "..\..\MainWindow.xaml"
                this.btnNumber5.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.btnNumber6 = ((System.Windows.Controls.Button)(target));

            #line 87 "..\..\MainWindow.xaml"
                this.btnNumber6.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.btnOperatorMinus = ((System.Windows.Controls.Button)(target));

            #line 89 "..\..\MainWindow.xaml"
                this.btnOperatorMinus.Click += new System.Windows.RoutedEventHandler(this.btnMinus_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.btnNumber1 = ((System.Windows.Controls.Button)(target));

            #line 91 "..\..\MainWindow.xaml"
                this.btnNumber1.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.btnNumber2 = ((System.Windows.Controls.Button)(target));

            #line 93 "..\..\MainWindow.xaml"
                this.btnNumber2.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.btnNumber3 = ((System.Windows.Controls.Button)(target));

            #line 95 "..\..\MainWindow.xaml"
                this.btnNumber3.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.btnOperatorPlus = ((System.Windows.Controls.Button)(target));

            #line 97 "..\..\MainWindow.xaml"
                this.btnOperatorPlus.Click += new System.Windows.RoutedEventHandler(this.btnPlus_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.btnNumber0 = ((System.Windows.Controls.Button)(target));

            #line 99 "..\..\MainWindow.xaml"
                this.btnNumber0.Click += new System.Windows.RoutedEventHandler(this.NumberButton_Click);

            #line default
            #line hidden
                return;

            case 28:
                this.btnNumberDecimalPoint = ((System.Windows.Controls.Button)(target));

            #line 101 "..\..\MainWindow.xaml"
                this.btnNumberDecimalPoint.Click += new System.Windows.RoutedEventHandler(this.btnDecimalPoint_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.btnOperatorEqual = ((System.Windows.Controls.Button)(target));

            #line 103 "..\..\MainWindow.xaml"
                this.btnOperatorEqual.Click += new System.Windows.RoutedEventHandler(this.btnEqual_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Calculator = ((Calculator.MainWindow)(target));
                return;

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

            #line 10 "..\..\Calculator.xaml"
                this.one.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

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

            #line 11 "..\..\Calculator.xaml"
                this.two.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

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

            #line 12 "..\..\Calculator.xaml"
                this.three.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 5:
                this.four = ((System.Windows.Controls.Button)(target));

            #line 13 "..\..\Calculator.xaml"
                this.four.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 6:
                this.five = ((System.Windows.Controls.Button)(target));

            #line 14 "..\..\Calculator.xaml"
                this.five.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 7:
                this.six = ((System.Windows.Controls.Button)(target));

            #line 15 "..\..\Calculator.xaml"
                this.six.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 8:
                this.seven = ((System.Windows.Controls.Button)(target));

            #line 16 "..\..\Calculator.xaml"
                this.seven.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 9:
                this.eight = ((System.Windows.Controls.Button)(target));

            #line 17 "..\..\Calculator.xaml"
                this.eight.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 10:
                this.nine = ((System.Windows.Controls.Button)(target));

            #line 18 "..\..\Calculator.xaml"
                this.nine.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 11:
                this.zero = ((System.Windows.Controls.Button)(target));

            #line 19 "..\..\Calculator.xaml"
                this.zero.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 12:

            #line 20 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Operation);

            #line default
            #line hidden
                return;

            case 13:
                this.point = ((System.Windows.Controls.Button)(target));

            #line 21 "..\..\Calculator.xaml"
                this.point.Click += new System.Windows.RoutedEventHandler(this.OnClick);

            #line default
            #line hidden
                return;

            case 14:

            #line 22 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Equals);

            #line default
            #line hidden
                return;

            case 15:

            #line 23 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Operation);

            #line default
            #line hidden
                return;

            case 16:

            #line 24 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Operation);

            #line default
            #line hidden
                return;

            case 17:

            #line 25 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Operation);

            #line default
            #line hidden
                return;

            case 18:
                this.tb = ((System.Windows.Controls.TextBox)(target));
                return;

            case 19:

            #line 27 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Clear_Text);

            #line default
            #line hidden
                return;

            case 20:

            #line 28 "..\..\Calculator.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Clear_Element);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindowForm = ((Calculator.MainWindow)(target));

            #line 11 "..\..\MainWindow.xaml"
                this.MainWindowForm.KeyDown += new System.Windows.Input.KeyEventHandler(this.MainWindow_KeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.lblCalculation = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.lblCurrentNumber = ((System.Windows.Controls.Label)(target));
                return;

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

            #line 60 "..\..\MainWindow.xaml"
                this.btnDB.Click += new System.Windows.RoutedEventHandler(this.BtnDB_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnSqrt = ((System.Windows.Controls.Button)(target));

            #line 68 "..\..\MainWindow.xaml"
                this.btnSqrt.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnDivide = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\MainWindow.xaml"
                this.btnDivide.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.btnMultiply = ((System.Windows.Controls.Button)(target));

            #line 82 "..\..\MainWindow.xaml"
                this.btnMultiply.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.btnSubtract = ((System.Windows.Controls.Button)(target));

            #line 89 "..\..\MainWindow.xaml"
                this.btnSubtract.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.btnPow = ((System.Windows.Controls.Button)(target));

            #line 97 "..\..\MainWindow.xaml"
                this.btnPow.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.btn7 = ((System.Windows.Controls.Button)(target));

            #line 104 "..\..\MainWindow.xaml"
                this.btn7.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.btn8 = ((System.Windows.Controls.Button)(target));

            #line 111 "..\..\MainWindow.xaml"
                this.btn8.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.btn9 = ((System.Windows.Controls.Button)(target));

            #line 118 "..\..\MainWindow.xaml"
                this.btn9.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.btnPercent = ((System.Windows.Controls.Button)(target));

            #line 126 "..\..\MainWindow.xaml"
                this.btnPercent.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.btnAdd = ((System.Windows.Controls.Button)(target));

            #line 133 "..\..\MainWindow.xaml"
                this.btnAdd.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.btnCE = ((System.Windows.Controls.Button)(target));

            #line 140 "..\..\MainWindow.xaml"
                this.btnCE.Click += new System.Windows.RoutedEventHandler(this.BtnClear_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.btnBackspace = ((System.Windows.Controls.Button)(target));

            #line 147 "..\..\MainWindow.xaml"
                this.btnBackspace.Click += new System.Windows.RoutedEventHandler(this.BtnClear_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.btn4 = ((System.Windows.Controls.Button)(target));

            #line 154 "..\..\MainWindow.xaml"
                this.btn4.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.btn5 = ((System.Windows.Controls.Button)(target));

            #line 161 "..\..\MainWindow.xaml"
                this.btn5.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.btn6 = ((System.Windows.Controls.Button)(target));

            #line 168 "..\..\MainWindow.xaml"
                this.btn6.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.btnEquals = ((System.Windows.Controls.Button)(target));

            #line 175 "..\..\MainWindow.xaml"
                this.btnEquals.Click += new System.Windows.RoutedEventHandler(this.BtnEquals_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.btn3 = ((System.Windows.Controls.Button)(target));

            #line 182 "..\..\MainWindow.xaml"
                this.btn3.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.btn2 = ((System.Windows.Controls.Button)(target));

            #line 189 "..\..\MainWindow.xaml"
                this.btn2.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.btn1 = ((System.Windows.Controls.Button)(target));

            #line 196 "..\..\MainWindow.xaml"
                this.btn1.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.btn0 = ((System.Windows.Controls.Button)(target));

            #line 203 "..\..\MainWindow.xaml"
                this.btn0.Click += new System.Windows.RoutedEventHandler(this.ButtonNumbers_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.btnDecimalSeparator = ((System.Windows.Controls.Button)(target));

            #line 210 "..\..\MainWindow.xaml"
                this.btnDecimalSeparator.Click += new System.Windows.RoutedEventHandler(this.OperationsButton_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.btnClear = ((System.Windows.Controls.Button)(target));

            #line 217 "..\..\MainWindow.xaml"
                this.btnClear.Click += new System.Windows.RoutedEventHandler(this.BtnClear_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Calculator = ((Calculator.MainWindow)(target));
                return;

            case 4:
                this.UI = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.result = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.input = ((System.Windows.Controls.Label)(target));
                return;

            case 7:

            #line 62 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CE_Click);

            #line default
            #line hidden
                return;

            case 8:

            #line 63 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.C_Click);

            #line default
            #line hidden
                return;

            case 9:

            #line 64 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DLT_CLick);

            #line default
            #line hidden
                return;

            case 10:

            #line 65 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Opposite);

            #line default
            #line hidden
                return;

            case 11:

            #line 66 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Square);

            #line default
            #line hidden
                return;

            case 12:

            #line 67 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Sqrt);

            #line default
            #line hidden
                return;

            case 13:

            #line 81 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Neg);

            #line default
            #line hidden
                return;

            case 14:

            #line 83 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Dot);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }