// Override original form closing
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     if (e.CloseReason == CloseReason.WindowsShutDown)
     {
         return;
     }
     //this.Close();
     try
     {
         if (Existing_Values)
         {
             BV._parent._GLOBAL_DELETE_FORMAT_RULE("BIN_ASSIGNMENT");
         }
         List <string> g    = new List <string>();
         string        temp = "";
         foreach (List <string> gg in Bin_Assignment_List)
         {
             temp = temp + "|" + gg[0] + "~" + gg[1] + "~" + gg[2];
         }
         if (temp.Length > 3)
         {
             BV._parent._GLOBAL_ADD_FORMAT_RULE(new List <string>()
             {
                 "FORMAT_RULE", "BIN_ASSIGNMENT", temp.Substring(1), "", "", ""
             });
         }
         BV.Populate_Grid();
         BV.Focus();
     }
     catch
     {
     }
     this.Dispose();
 }
Exemple #2
0
        public void TestSerialization_BV()
        {
            var bv = new BV(1, 1);

            SerializeObjectToFile_bin("bbv.bin", bv);
            var bv_ = (BV)DeserializeObjectFromFile_bin("bbv.bin");

            Assert.AreEqual <string>(bv.ToString(), bv_.ToString());
        }