private void BtnOpen_Click(object sender, EventArgs e) { if (OpenFileDlg.ShowDialog() == DialogResult.OK) { string fileName = OpenFileDlg.FileName; TxtBox.Clear(); TxtBox.Text = File.ReadAllText(fileName); } }
private void RtClickButton_ClickImpl(object sender, EventArgs e, ref StoryBoard SB) { string TBT = TxtBox.Text; switch(Counter) { case 0: TextBoxes[Counter] = TBT; break; } SB.Counter++; // Adds 1 to the counter. LtClickButton.Enabled = true; TxtBox.Clear(); // Clears the text box. }
private void Button_Click(object sender, EventArgs e) { if (!_infinityCheck) { if ((TxtBox.Text == Constants.ZeroValue) || (_boloperatorPerf)) { TxtBox.Clear(); } _boloperatorPerf = false; Button output = (Button)sender; if (output.Text == Constants.BulletOperator) { if (!TxtBox.Text.Contains(Constants.BulletOperator)) { TxtBox.Text = TxtBox.Text + output.Text; } } else if (_equalclick) { Global_Clr.PerformClick(); _resultValue = 0; _firstValue = 0; Label_Show.Text = string.Empty; TxtBox.Text = output.Text; _equalclick = false; } else if (_equalclick && _resultValue <= 0 && _resultValue >= 0) { _resultValue = _firstValue; _firstValue = double.Parse(TxtBox.Text); TxtBox.Text = output.Text; Label_Show.Text = $"{_firstValue} {_operatorPerf}"; TxtBox.Text = output.Text; _equalclick = false; } else { TxtBox.Text = TxtBox.Text + output.Text; } } else { Global_Clr.PerformClick(); } }