Ejemplo n.º 1
0
 public void Cleanup()
 {
     logUpdater?.Dispose();
     formSearch?.Close();
     luaCoreCtrl?.Kill();
     qLogger?.Dispose();
 }
Ejemplo n.º 2
0
        public void Cleanup()
        {
            logUpdater?.Dispose();
            formSearch?.Close();
            luaCoreCtrl?.AbortNow();
            qLogger?.Dispose();

            if (luaAcm != null)
            {
                luaAcm.TargetControlWrapper = null;
            }
            luaEditor?.Dispose();
        }
Ejemplo n.º 3
0
        private void FormConfiger_Load(object sender, EventArgs e)
        {
            setting.RestoreFormRect(this);

            InitToolsPanel();
            this.configer = InitConfiger();

            SetTitle(configer.GetAlias());
            ToggleToolsPanel(isShowPanel);

            chkIsV4.Checked = setting.isUseV4;

            editor = configer
                     .GetComponent <Controllers.ConfigerComponet.Editor>()
                     .GetEditor();

            editor.Click += OnMouseLeaveToolsPanel;
            BindServerEvents();

            this.FormClosing += (s, a) =>
            {
                if (!configer.IsConfigSaved())
                {
                    a.Cancel = !Misc.UI.Confirm(I18N.ConfirmCloseWinWithoutSave);
                }
            };

            this.FormClosed += (s, a) =>
            {
                formSearch?.Close();
                editor.Click -= OnMouseLeaveToolsPanel;
                toolsPanelController.Dispose();
                ReleaseServerEvents();
                configer.Cleanup();
                editor?.Dispose();
                setting.SaveFormRect(this);
                setting.LazyGC();
            };

            configer.UpdateServerMenusLater();
        }
Ejemplo n.º 4
0
        private void FormConfiger_Shown(object sender, EventArgs e)
        {
            setting.RestoreFormRect(this);

            InitToolsPanel();
            this.configer = InitConfiger();

            UpdateServerMenu();
            SetTitle(configer.GetAlias());
            ToggleToolsPanel(isShowPanel);

            chkIsV4.Checked = setting.isUseV4;

            var editor = configer
                         .GetComponent <Controller.ConfigerComponet.Editor>()
                         .GetEditor();

            editor.Click += OnMouseLeaveToolsPanel;
            servers.OnRequireMenuUpdate += MenuUpdateHandler;

            this.FormClosing += (s, a) =>
            {
                if (!configer.IsConfigSaved())
                {
                    a.Cancel = !Lib.UI.Confirm(
                        I18N.ConfirmCloseWinWithoutSave);
                }
            };

            this.FormClosed += (s, a) =>
            {
                formSearch?.Close();
                editor.Click -= OnMouseLeaveToolsPanel;
                servers.OnRequireMenuUpdate -= MenuUpdateHandler;
                setting.SaveFormRect(this);
                toolsPanelController.Dispose();
                setting.LazyGC();
            };
        }