private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (!ptrForm.IsDisposed) { ptrForm.Dispose(); QST = null; } } disposedValue = true; } }
public void Terminate() { try { using (System.IO.StreamWriter fn = new System.IO.StreamWriter("log.csv", false)) { fn.WriteLine(countStartStop); } } catch (Exception ex) { MessageBox.Show(ex.Message); } ptrForm.ownerObj = null; ptrForm.Close(); QST = null; NList.Clear(); }
public void Initialize3(string InstanceName, ref object AppPtr) { try { QST = (Quasi97.Application)AppPtr; myInst = InstanceName; myStatus = 0; //not missing InitializeIronPython(); using (System.IO.StreamReader fn = new System.IO.StreamReader("log.csv")) { countStartStop = int.Parse(fn.ReadLine()); } QST.QstStatus.Message = "Hello World!"; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (!ptrForm.IsDisposed) { ptrForm.Dispose(); QST = null; } } disposedValue = true; } }