コード例 #1
0
 public Iobserver()
 {
     observers     = new Dictionary <string, SimpleComand>();
     auto          = new Timer();
     auto.Tick    += new EventHandler(tick);
     auto.Interval = 1000 / Constants.fp;
     auto.Enabled  = true;
     bs            = new SocketManager();
     _this         = this;
 }
コード例 #2
0
        private bool disposedValue = false; // To detect redundant calls

        public void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).
                    mainform = null;
                    _this    = null;
                    auto.Stop();
                    auto      = null;
                    observers = null;
                    bs        = null;
                    ps        = false;
                    GC.Collect();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }