Exemple #1
0
        public MainForm(string[] args)
        {
            if (args.Length > 0)
            {
                this.initialConnectionName = ExtractSwitchValue("/connection:", ref args);
                this.initialPluginName = ExtractSwitchValue("/plugin:", ref args);
            }

            InitializeComponent();

            ProcessMenuItemsForPlugin();
            MouseWheel += (sender, e) => HomePageTab.Focus();

            currentOptions = Options.Load();
            Text = string.Format("{0} (v{1})", Text, Assembly.GetExecutingAssembly().GetName().Version);

            ManageConnectionControl();
        }
Exemple #2
0
        public MainForm(string[] args)
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            if (args.Length > 0)
            {
                this.initialConnectionName = ExtractSwitchValue("/connection:", ref args);
                this.initialPluginName = ExtractSwitchValue("/plugin:", ref args);
            }

            InitializeComponent();

            pluginsModels = new List<PluginModel>();
            pluginControlStatuses = new List<PluginControlStatus>();
            ProcessMenuItemsForPlugin();
            MouseWheel += (sender, e) => pnlPlugins.Focus();

            currentOptions = Options.Load();

            Text = string.Format("{0} (v{1})", Text, Assembly.GetExecutingAssembly().GetName().Version);

            ManageConnectionControl();
        }
Exemple #3
0
        private void TsbOptionsClick(object sender, EventArgs e)
        {
            var oDialog = new OptionsDialog(currentOptions, pManager);
            if (oDialog.ShowDialog(this) == DialogResult.OK)
            {
                bool reinitDisplay = currentOptions.DisplayMostUsedFirst != oDialog.Option.DisplayMostUsedFirst
                                     || currentOptions.MostUsedList.Count != oDialog.Option.MostUsedList.Count
                                     || currentOptions.DisplayLargeIcons != oDialog.Option.DisplayLargeIcons
                                     || !oDialog.Option.HiddenPlugins.SequenceEqual(currentOptions.HiddenPlugins);

                currentOptions = oDialog.Option;

                if (reinitDisplay)
                {
                    //pManager.PluginsControls.Clear();
                    pluginsModels.Clear();
                    tabControl1.SelectedIndex = 0;
                    DisplayPlugins(tstxtFilterPlugin.Text);
                    AdaptPluginControlSize();
                }
            }
        }