示例#1
0
 private void ButtonPoint_Click(object sender, EventArgs e)
 {
     if (TextBoxResult.Text.Contains(".") || CheckIfTextBoxResultIsString())
     {
         return;
     }
     TextBoxResult.AppendText(".");
 }
示例#2
0
        private void ButtonTask_Click(object sender, EventArgs e)
        {
            TextBoxResult.Clear();

            var words  = TextBoxSource.Text.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
            var result = FormUtils.RunAlgorithm(words);

            foreach (var index in result)
            {
                TextBoxResult.AppendText(words[index] + '\n');
            }
        }
示例#3
0
 private void HelperNumberButtonsToSetValue(string ValueToSet)
 {
     if (TextBoxResult.Text == "0")
     {
         TextBoxResult.Clear();
         TextBoxResult.Text = ValueToSet;
         return;
     }
     if (!(TextBoxResult.Text.Contains(".")) && CheckIfTextBoxResultIsString())
     {
         TextBoxResult.Text = "0";
         return;
     }
     TextBoxResult.AppendText(ValueToSet);
 }