コード例 #1
0
 /// <summary>
 ///     Called when this process needs to be destroyed.
 /// </summary>
 public override void Dispose()
 {
     if (_eventListener != null)
     {
         EventManager.DetachListener(_eventListener);
     }
     if (_process != null)
     {
         _process.Dispose();
     }
     _eventListener = null;
     _process       = null;
     _entity        = null;
 }
コード例 #2
0
ファイル: GuiType.cs プロジェクト: Karamelon/TanjiLuaModule
        public void Create(string title, int width, int height)
        {
            Form           = new Form();
            Form.Disposed += new EventHandler(delegate
            {
                _scriptProcess.Dispose();
            });
            var resources = new ComponentResourceManager(typeof(MainForm));

            Form.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            Form.Width           = width;
            Form.Text            = title;
            Form.Height          = height;
            Form.Icon            = ((Icon)(resources.GetObject("$this.Icon")));
        }