public void Dispose()
        {
            Log.Debug("OutputDeviceManager.Dispose()");

            if (_OutputDevice != null)
            {
                Log.Debug("Disposing output device");

                _OutputDevice.Dispose();
                _OutputDevice = null;

                Log.Debug("Disposing output device factory");
                _OutputDeviceFactory.Dispose();
            }
        }
예제 #2
0
        public virtual void Close()
        {
            bool locked = false;

            try
            {
                IOmonitor.IdleForLock(_IOprocessing);
                //
                if (_OutputDevice != null && _OutputDevice.IsInitialized && _OutputDevice.InitializedBy == ParentIDE.Machine)
                {
                    locked = false;
                    if (_OutputDevice.IsLockingRequiredForDispose())
                    {
                        IOmonitor.IdleForLock(_OutputDevice, out locked);
                    }
                    _OutputDevice.Dispose();
                    if (locked)
                    {
                        IOmonitor.Unlock(_OutputDevice);
                    }
                }
                _OutputBuffer.Clear();
            }
            finally
            {
                if (locked)
                {
                    IOmonitor.Unlock(_OutputDevice);
                }
                //
                IOmonitor.Unlock(_IOprocessing);
            }
        }
예제 #3
0
 /// <summary>
 /// アプリケーション全体の終了準備
 /// </summary>
 private static void FinalizeApp()
 {
     if (FinalizeProcess)
     {
         return;
     }
     FinalizeProcess = true;
     if (OutputDevice != null)
     {
         OutputDevice.Dispose();
         OutputDevice = null;
     }
     MyComponentManager.FinalizeComponents();
 }