Example #1
0
        private Controller.OptionCtrl InitOptionCtrl()
        {
            var ctrl = new Controller.OptionCtrl();

            ctrl.Plug(
                new Controller.OptionComponent.Import(
                    flyImportPanel,
                    btnImportAdd));

            ctrl.Plug(
                new Controller.OptionComponent.Subscription(
                    flySubsUrlContainer,
                    btnAddSubsUrl,
                    btnUpdateViaSubscription));

            return(ctrl);
        }
Example #2
0
        private void FormOption_Shown(object sender, System.EventArgs e)
        {
            this.optionCtrl = InitOptionCtrl();

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

            this.FormClosed += (s, a) =>
            {
                setting.LazyGC();
            };
        }
Example #3
0
        private void FormOption_Shown(object sender, System.EventArgs e)
        {
            // throw new System.ArgumentException("for debug");

            this.optionCtrl = InitOptionCtrl();

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

            this.FormClosed += (s, a) =>
            {
                Service.Servers.Instance.LazyGC();
            };
        }