コード例 #1
0
 private void AddNewCharToInput(string newChar)
 {
     if (newChar.Length == 1 && NumberSystemConversion.GetRealValue(newChar) < int.Parse(inputBase.SelectedItem.ToString()))
     {
         input += newChar;
     }
 }
コード例 #2
0
 private void UpdatePage()
 {
     if (input == "")
     {
         inputBox.Text = "0";
     }
     else
     {
         inputBox.Text = input;
     }
     resultBox.Text = NumberSystemConversion.XAryToYAry(inputBox.Text, int.Parse(inputBase.SelectedItem.ToString()), int.Parse(outputBase.SelectedItem.ToString()));
 }
コード例 #3
0
 private void inputBase_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (input == "")
     {
         inputBox.Text = "0";
     }
     else
     {
         inputBox.Text = NumberSystemConversion.XAryToYAry(resultBox.Text, int.Parse(outputBase.SelectedItem.ToString()), int.Parse(inputBase.SelectedItem.ToString()));
         input         = inputBox.Text;
     }
 }