Exemple #1
0
 private void btnLoad_Click(object sender, EventArgs e)
 {
     if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         IFormatter formatter = new BinaryFormatter();
         Stream     file      = openFileDialog1.OpenFile();
         DataToSave obj       = (DataToSave)formatter.Deserialize(file);
         this.verbs = obj.verbs;
         nouns      = obj.nouns;
         viewer.Clear();
     }
 }
Exemple #2
0
 private void btnLoad_Click(object sender, EventArgs e)
 {
     if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         viewer.Clear();
         IFormatter formatter = new BinaryFormatter();
         Stream     file      = openFileDialog1.OpenFile();
         viewer         = (MMViewManeger)formatter.Deserialize(file);
         viewer.Control = this.pnlDrawing;
         tmr            = viewer._TMR;
         this.UpdateCmbNouns();
         this.UpdateCmbVerbs();
         file.Close();
     }
 }