public override void ClosingPlugin(PluginCloseInfo info)
        {
            base.ClosingPlugin(info);
            if (info.Cancel) return;

            Settings.Save();
        }
        public override void ClosingPlugin(PluginCloseInfo info)
        {
            base.ClosingPlugin(info);
            if (info.Cancel) return;

            ConnectionDetail = null; // Don't save the Connection Details when closing.
            HydrateSettingsFromUI();
            Settings.Save();
        }
Ejemplo n.º 3
0
        public void ClosingPlugin(PluginCloseInfo info)
        {
            if (info.FormReason != CloseReason.None ||
                info.ToolBoxReason == ToolBoxCloseReason.CloseAll ||
                info.ToolBoxReason == ToolBoxCloseReason.CloseAllExceptActive)
            {
                return;
            }

            info.Cancel = MessageBox.Show(@"Are you sure you want to close this tab?", @"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Allows for the plugin to prevent the form from closing, or preform some action before closing
        /// By default, if the Form is being closed, or a close all or all except active is being called, it won't prompt the user to ensure they wanted to close
        /// </summary>
        /// <param name="info"></param>
        public virtual void ClosingPlugin(PluginCloseInfo info)
        {
            if (info.FormReason != CloseReason.None ||
                info.ToolBoxReason == ToolBoxCloseReason.CloseAll ||
                info.ToolBoxReason == ToolBoxCloseReason.CloseAllExceptActive)
            {
                return;
            }

            info.Cancel = MessageBox.Show(@"Are you sure you want to close this tab?", @"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes;
        }
Ejemplo n.º 5
0
 public override void ClosingPlugin(PluginCloseInfo info)
 {
     SaveSetting();
 }
Ejemplo n.º 6
0
 public override void ClosingPlugin(PluginCloseInfo info)
 {
     if (!SaveIfChanged())
     {
         info.Cancel = true;
     }
     else
     {
         if (xmlLiveUpdate != null)
         {
             xmlLiveUpdate.Close();
             xmlLiveUpdate = null;
         }
         SaveSetting();
         LogUse("Close");
     }
 }