Пример #1
0
        private void Button_Reset(object sender, EventArgs e)
        {
            Button button  = (Button)sender;
            string FullTag = button.Tag.ToString();

            if (FullTag.StartsWith(TAG_FRAC))
            {
                tB_Frac.Text           = fracController.Reset();
                label_Frac_Memory.Text = string.Empty;
            }
            else if (FullTag.StartsWith(TAG_COMPLEX))
            {
                tB_Complex.Text            = complexController.Reset();
                tB_Complex_SpecialOut.Text = string.Empty;
                label_Complex_Memory.Text  = string.Empty;
            }
            else if (FullTag.StartsWith(TAG_PNUMBER))
            {
                tB_PNumber.Text           = pNumberController.Reset();
                label_PNumber_Memory.Text = string.Empty;
            }
        }
Пример #2
0
        private void Button_Reset(object sender, EventArgs e)
        {
            Button button   = (Button)sender;
            string tag      = button.Tag.ToString();
            string part_tag = tag.Substring(0, tag.IndexOf('_')) + "_";

            switch (part_tag)
            {
            case TAG_PNUMBER:
                tB_PNumber.Text           = pNumber_ctrl.Reset();
                label_PNumber_Memory.Text = string.Empty;
                break;

            case TAG_FRAC:
                tB_Frac.Text           = frac_ctrl.Reset();
                label_Frac_Memory.Text = string.Empty;
                break;

            case TAG_COMPLEX:
                tB_Complex.Text            = complex_ctrl.Reset();
                tB_Complex_SpecialOut.Text = label_Complex_Memory.Text = string.Empty;
                break;
            }
        }