Пример #1
0
 private void bool2TruthBtn_Click(object sender, EventArgs e)
 {
     if (!this.checkEquation(this.bexpText.Text))
     {
         return;
     }
     this.truthtable.createTruthTable(this.bexpText.Text, FileSave.grabOptions().useBinary);
     int num = (int)this.truthtable.ShowDialog();
 }
Пример #2
0
        private void exportTableBtn_Click(object sender, EventArgs e)
        {
            this.saveTableDia.InitialDirectory = FileSave.grabOptions().defaultPath;
            int num = (int)this.saveTableDia.ShowDialog();

            if (!(this.saveTableDia.FileName != ""))
            {
                return;
            }
            this.exportTable(this.theTable, this.saveTableDia.FileName);
        }
Пример #3
0
 public void grabOptions()
 {
     FileSave.OptionData optionData = FileSave.grabOptions();
     if (optionData.defaultPath != null)
     {
         this.useTrueFalseCheck.Checked = !optionData.useBinary;
         this.defaultPathTxt.Text       = optionData.defaultPath;
     }
     else
     {
         this.useTrueFalseCheck.Checked = false;
         this.defaultPathTxt.Text       = "C:/";
         FileSave.saveOptions("C:/", true);
     }
 }
Пример #4
0
 public static FileSave.OptionData grabOptions()
 {
     try
     {
         Stream serializationStream     = (Stream)File.Open("settings.set", FileMode.Open);
         FileSave.OptionData optionData = (FileSave.OptionData) new BinaryFormatter().Deserialize(serializationStream);
         serializationStream.Close();
         return(optionData);
     }
     catch (IOException ex)
     {
         FileSave.saveOptions("C:", true);
         int num = (int)MessageBox.Show("Options reverted back to defaults.");
         return(new FileSave.OptionData());
     }
 }
Пример #5
0
 private void okBtn_Click(object sender, EventArgs e)
 {
     FileSave.saveOptions(this.defaultPathTxt.Text, !this.useTrueFalseCheck.Checked);
     this.Close();
 }