void ReleaseDesignerOutlets()
        {
            if (Img1 != null)
            {
                Img1.Dispose();
                Img1 = null;
            }

            if (Btn1 != null)
            {
                Btn1.Dispose();
                Btn1 = null;
            }

            if (Img3 != null)
            {
                Img3.Dispose();
                Img3 = null;
            }

            if (Btn3 != null)
            {
                Btn3.Dispose();
                Btn3 = null;
            }

            if (Img2 != null)
            {
                Img2.Dispose();
                Img2 = null;
            }

            if (Btn2 != null)
            {
                Btn2.Dispose();
                Btn2 = null;
            }

            if (Img4 != null)
            {
                Img4.Dispose();
                Img4 = null;
            }

            if (Btn4 != null)
            {
                Btn4.Dispose();
                Btn4 = null;
            }
        }
Example #2
0
        // Keyboard Keys Events.
        private void Calculator_KeyDown(object sender, KeyEventArgs e)
        {
            // Using Switch To Perform Various Key Events.
            switch (e.KeyCode)
            {
            case Keys.NumPad1: { Btn1.PerformClick(); break; }

            case Keys.NumPad2: { Btn2.PerformClick(); break; }

            case Keys.NumPad3: { Btn3.PerformClick(); break; }

            case Keys.NumPad4: { Btn4.PerformClick(); break; }

            case Keys.NumPad5: { Btn5.PerformClick(); break; }

            case Keys.NumPad6: { Btn6.PerformClick(); break; }

            case Keys.NumPad7: { Btn7.PerformClick(); break; }

            case Keys.NumPad8: { Btn8.PerformClick(); break; }

            case Keys.NumPad9: { Btn9.PerformClick(); break; }

            case Keys.NumPad0: { Btn0.PerformClick(); break; }

            case Keys.Back: { BackBtn.PerformClick(); break; }

            case Keys.Add: { BtnPlus.PerformClick(); break; }

            case Keys.Subtract: { BtnMinus.PerformClick(); break; }

            case Keys.Divide: { BtnDivision.PerformClick(); break; }

            case Keys.Multiply: { BtnMultiple.PerformClick(); break; }

            case Keys.Decimal: { BtnPoint.PerformClick(); break; }

            case Keys.Oemplus: { BtnEquals.PerformClick(); break; }

            case Keys.H: { vh.Show(); break; }

            default: break;
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (Btn1 != null)
     {
         Btn1.Dispose();
         Btn1 = null;
     }
     if (Btn2 != null)
     {
         Btn2.Dispose();
         Btn2 = null;
     }
     if (Btn3 != null)
     {
         Btn3.Dispose();
         Btn3 = null;
     }
     if (Btn4 != null)
     {
         Btn4.Dispose();
         Btn4 = null;
     }
     if (Btn5 != null)
     {
         Btn5.Dispose();
         Btn5 = null;
     }
     if (Btn6 != null)
     {
         Btn6.Dispose();
         Btn6 = null;
     }
     if (Btn7 != null)
     {
         Btn7.Dispose();
         Btn7 = null;
     }
     if (Btn8 != null)
     {
         Btn8.Dispose();
         Btn8 = null;
     }
 }
Example #4
0
        private void UpdateButtonTexts()
        {
            if (TileBox.ColorCode == 1)
            {
                Btn1.Focus();
            }
            if (TileBox.ColorCode == 2)
            {
                Btn2.Focus();
            }
            if (TileBox.ColorCode == 3)
            {
                Btn3.Focus();
            }

            Btn1.Text = TileBox.ColorCode == 1 ? "[ 1 ]" : "1";
            Btn2.Text = TileBox.ColorCode == 2 ? "[ 2 ]" : "2";
            Btn3.Text = TileBox.ColorCode == 3 ? "[ 3 ]" : "3";
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            this.Btn1.DefaultStyle();
            this.Btn1.SetTitle("Default", UIControlState.Normal);
            Btn1.AddAwesomeIcon(AwesomeIcon.Bookmark, true);

            this.Btn2.PrimaryStyle();
            this.Btn2.SetTitle("Primary", UIControlState.Normal);
            Btn2.AddAwesomeIcon(AwesomeIcon.Check, true);

            this.Btn3.SuccessStyle();
            this.Btn3.SetTitle("Success", UIControlState.Normal);
            Btn3.AddAwesomeIcon(AwesomeIcon.DownloadAlt, false);

            this.Btn4.InfoStyle();
            this.Btn4.SetTitle("Info", UIControlState.Normal);


            this.Btn5.WarningStyle();
            this.Btn5.SetTitle("Warning", UIControlState.Normal);
            Btn5.AddAwesomeIcon(AwesomeIcon.Cloud, true);

            this.Btn6.DangerStyle();
            this.Btn6.SetTitle("Danger", UIControlState.Normal);
            Btn6.AddAwesomeIcon(AwesomeIcon.Star, false);

            this.Btn7.SuccessStyle();
            this.Btn7.SetTitle(" ", UIControlState.Normal);
            Btn7.AddAwesomeIcon(AwesomeIcon.Calendar, true);

            this.Btn8.SuccessStyle();
            this.Btn8.SetTitle(" ", UIControlState.Normal);
            Btn8.AddAwesomeIcon(AwesomeIcon.Dashboard, false);

            // Perform any additional setup after loading the view, typically from a nib.
        }
Example #6
0
 private void Btn1_Click(object sender, EventArgs e)
 {
     data.AddStringExpression(Btn1.GetNumber().ToString());
     ChangeText();
 }