private void uiTsmHeroConfiuration_Click(object sender, EventArgs e)
 {
     using (var configurationForm = new ConfigurationForm())
     {
         configurationForm.ShowDialog();
     }
 }
        protected override void Start()
        {
            base.Start();

            var handle = GetConsoleWindow();

            ShowWindow(handle, SW_HIDE);

            using (ConfigurationForm form = new ConfigurationForm())
            {
                var value = form.ShowDialog();
                switch (value)
                {
                case DialogResult.Abort:
                    throw new Exception("User aborted configuration.");
                    break;

                case DialogResult.OK:
                    return;

                default:
                    throw new NotImplementedException("Not handled");
                    break;
                }
            }
        }
Beispiel #3
0
        public Main()
        {
            this._annotationPackageProvider = new AmazonAnnotationPackageProvider();

            this._annotationConfig = this._annotationPackageProvider.GetAnnotationConfigAsync().GetAwaiter().GetResult();
            if (this._annotationConfig == null)
            {
                this._annotationConfig = new AnnotationConfig();

                using (var configurationForm = new ConfigurationForm())
                {
                    configurationForm.Setup(this._annotationConfig);
                    configurationForm.ShowDialog();
                }
            }

            this.InitializeComponent();
            this.downloadControl.Dock = DockStyle.Fill;

            this.annotationPackageListControl.Setup(this._annotationPackageProvider);

            this.autoplaceAnnotationsToolStripMenuItem.Checked = true;

            this.annotationDrawControl.AutoplaceAnnotations = true;
            this.annotationDrawControl.SetObjectClasses(this._annotationConfig.ObjectClasses);
            this.annotationDrawControl.ShowLabels = true;

            this.showLabelsToolStripMenuItem.Checked = true;
        }
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            _textBox         = new TextBox();
            _textBox.ID      = "Text";
            _textBox.Columns = 50;
            this.Controls.Add(_textBox);

            _browseButton      = new Button();
            _browseButton.Text = "Browse";
            this.Controls.Add(_browseButton);

            ConfigurationForm form = ConfigurationControlUtility.Instance().GetCurrentConfigurationForm(this);

            if (form != null)
            {
                _validator    = new CustomValidator();
                _validator.ID = "Validator";
                _validator.ControlToValidate = _textBox.ID;
                _validator.ErrorMessage      = form.InvalidUrlErrorMessage;
                this.Controls.Add(_validator);

                _validator.ServerValidate += new ServerValidateEventHandler(DefaultUrlControl_ServerValidate);
            }

            _textBox.TextChanged += new EventHandler(DefaultUrlControl_TextChanged);
        }
Beispiel #5
0
        private void ConfigButton_Click(object sender, EventArgs e)
        {
            ConfigurationForm configFrm = new ConfigurationForm();

            configFrm.ShowDialog();

            fillDeptComboBox();
        }
Beispiel #6
0
        internal ImportWizard(ConfigurationForm owner)
        {
            InitializeComponent();

            this.buttonFinish.Visible = false;
            this.buttonNext.Visible = true;

            this.owner = owner;
        }
Beispiel #7
0
        internal ImportWizard(ConfigurationForm owner)
        {
            InitializeComponent();

            this.buttonFinish.Visible = false;
            this.buttonNext.Visible   = true;

            this.owner = owner;
        }
Beispiel #8
0
        public override void OnButtonPress()
        {
            DialogResult dr = new ConfigurationForm().ShowDialog();

            if (dr == DialogResult.OK || dr == DialogResult.Yes)
            {
                Logger.WriteDebug(Color.LightGreen, "Settings saved, rebuilding behaviors...");
                RebuildBehaviors();
            }
        }
Beispiel #9
0
        public OpenKMAddIn()
        {
            // Initialize vars;
            configXML = new ConfigXML();
            docXML    = new DocumentXML();
            fileUtil  = new FileUtil();

            // Initialize forms
            configurationForm = new ConfigurationForm();
        }
Beispiel #10
0
        } // menuItemDvbExit_Click

        #endregion

        #region 'IPTV' menu event handlers implementation

        private void Implementation_menuItemDvbSettings_Click(object sender, EventArgs e)
        {
            var applyChanges = new Dictionary <Guid, Action>(1);

            applyChanges.Add(UiBroadcastListSettingsRegistration.SettingsGuid, () =>
            {
                ListManager.Settings = UiBroadcastListSettingsRegistration.Settings;
            });

            ConfigurationForm.ShowConfigurationForm(this, true, applyChanges);
        } // menuItemDvbSettings_Click
Beispiel #11
0
        private void configToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConfigurationForm configurationForm = new ConfigurationForm();

            if (configurationForm.ShowDialog(this) == DialogResult.OK)
            {
                ConnectToDatabase();
            }

            configurationForm.Dispose();
        }
Beispiel #12
0
 public override void OnButtonPress()
 {
     if (_a == null)
     {
         _a = new ConfigurationForm();
     }
     if (_a != null || _a.IsDisposed)
     {
         _a.ShowDialog();
     }
 }
Beispiel #13
0
 public void ShowConfiguration(bool isLocal)
 {
     _syncContext.Post((state) =>
     {
         var form = new ConfigurationForm(_startupParams.WatchToken, _vm, isLocal);
         if (isLocal)
         {
             form.OnWhateverDo(() => ShowConfiguration(false));
         }
         form.Show();
     }, null);
 }
Beispiel #14
0
 private async void SettingsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var configurationForm = new ConfigurationForm())
     {
         configurationForm.Setup(this._annotationConfig);
         var dialogResult = configurationForm.ShowDialog();
         if (dialogResult == DialogResult.OK)
         {
             await this._annotationPackageProvider.SetAnnotationConfigAsync(this._annotationConfig);
         }
     }
 }
Beispiel #15
0
        } // GetDisplayedBroadcastList

        public UiBroadcastListSettings ShowSettingsEditor(IWin32Window owner, bool autoApplyChanges)
        {
            var result = ConfigurationForm.ShowConfigurationForm(owner, UiBroadcastListSettingsRegistration.RegistrationGuid, fieldSettings);

            if ((result != null) && (autoApplyChanges))
            {
                SaveSettings(result);
                Settings = result;
            } // if

            return(result);
        } // ShowSettingsEditor
Beispiel #16
0
 public static void ShowOptionsWindow()
 {
     using (var ConfigurationForm = new ConfigurationForm())
     {
         ConfigurationForm.ShowDialog();
         if (ConfigurationForm.save)
         {
             SaveConfiguration();
             DeviceController.ApplyConfiguration();
         }
     }
 }
        private void ConfigurationButton_Click(object sender, EventArgs e)
        {
            var configurationForm = new ConfigurationForm();

            try
            {
                configurationForm.ShowDialog();
            }
            finally
            {
                configurationForm.Dispose();
            }
        }
Beispiel #18
0
        public override void OnButtonPress()
        {
            if (_configForm == null || _configForm.IsDisposed || _configForm.Disposing)
            {
                _configForm        = new ConfigurationForm();
                _configForm.Height = SingularSettings.Instance.FormHeight;
                _configForm.Width  = SingularSettings.Instance.FormWidth;
                TabControl tab = (TabControl)_configForm.Controls["tabControl1"];
                tab.SelectedIndex = SingularSettings.Instance.FormTabIndex;
            }

            _configForm.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (Manager.runningTasks.Count > 0)
            {
                if (MessageBox.Show(this.resourceManager.GetString("information.ConfigureForm"), "", MessageBoxButtons.OK, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    this.stopWork();
                }
            }
            ConfigurationForm f = new ConfigurationForm(this);

            f.Show();
            this.Hide();
        }
        public void TestGetProperties()
        {
            using (var form = new ConfigurationForm()) {
                var panel = ((FlowLayoutPanel)form.Controls[1]);

                ((TextBox)panel.Controls[1]).Text = "http://server.com";
                ((TextBox)panel.Controls[3]).Text = "user";
                ((TextBox)panel.Controls[5]).Text = "pass";

                Assert.AreEqual(form.GetServer(), "http://server.com");
                Assert.AreEqual(form.GetUsername(), "user");
                Assert.AreEqual(form.GetPassword(), "pass");
            }
        }
Beispiel #21
0
        public void TestGetProperties()
        {
            using (var form = new ConfigurationForm()) {
                var panel = ((FlowLayoutPanel)form.Controls[1]);

                ((TextBox)panel.Controls[1]).Text = "http://server.com";
                ((TextBox)panel.Controls[3]).Text = "user";
                ((TextBox)panel.Controls[5]).Text = "pass";

                Assert.AreEqual(form.GetServer(), "http://server.com");
                Assert.AreEqual(form.GetUsername(), "user");
                Assert.AreEqual(form.GetPassword(), "pass");
            }
        }
        public RankingTrackerContext()
        {
            if (currContext == null)
            {
                currContext = this;
            }
            CreateWindsorContainer();

            Application.ApplicationExit += new EventHandler(OnApplicationExit);

            configurationForm = container.Resolve <ConfigurationForm>();
            trackerForm       = container.Resolve <TrackerForm>();

            ShowConfigurationForm();
        }
Beispiel #23
0
        private void bgTraktSync_DoWork(object sender, DoWorkEventArgs e)
        {
            MPTVSeriesLog.Write("Trakt: Synchronize Start");

            buttonManualSync.Text = cButtonCancelSync;
            ConfigurationForm.GetInstance().EnableImportButtonState(false);

            List <DBSeries> seriesList = DBSeries.Get(new SQLCondition());

            int progress = 0;

            foreach (DBSeries series in seriesList)
            {
                if (bgTraktSync.CancellationPending)
                {
                    return;
                }

                if (series[DBSeries.cID] <= 0)
                {
                    continue;
                }

                List <DBEpisode> episodesUnSeen  = TraktHandler.GetEpisodesToSync(series, TraktSyncModes.unseen);
                List <DBEpisode> episodesLibrary = TraktHandler.GetEpisodesToSync(series, TraktSyncModes.library);
                List <DBEpisode> episodesSeen    = TraktHandler.GetEpisodesToSync(series, TraktSyncModes.seen);

                // remove any seen episodes from library episode list as 'seen' counts as being part of the library
                // dont want to hit the server unnecessarily
                episodesLibrary.RemoveAll(eps => episodesSeen.Contains(eps));

                // sync UnSeen
                TraktHandler.SynchronizeLibrary(episodesUnSeen, TraktSyncModes.unseen);

                // sync library
                TraktHandler.SynchronizeLibrary(episodesLibrary, TraktSyncModes.library);

                // sync Seen
                TraktHandler.SynchronizeLibrary(episodesSeen, TraktSyncModes.seen);

                int percentage = Convert.ToInt32((double)(100 * progress++) / seriesList.Count());
                bgTraktSync.ReportProgress(percentage);
            }

            MPTVSeriesLog.Write("Trakt: Synchronize Complete");
        }
Beispiel #24
0
        public TerraFormMain()
        {
            InitializeComponent();

            configurationForm = new ConfigurationForm();
            metricsPanel      = new TerraForm.MetricsPanel.MetricsPanel();
            miniMap           = new TerraForm.MiniMap.MiniMapForm();
            movementForm      = new TerraForm.Movement.MovementForm();

            configurationForm.MdiParent = this;
            configurationForm.Show();
            metricsPanel.MdiParent = this;
            metricsPanel.Show();
            miniMap.MdiParent = this;
            miniMap.Show();
            movementForm.MdiParent = this;
            movementForm.Show();
        }
Beispiel #25
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        protected override void MenuItemCallback(object sender, EventArgs e)
        {
            base.PreMenuItemCallback();

            try
            {
                ConfigurationForm configurationForm = new ConfigurationForm();
                if (configurationForm.ShowDialog(new WindowAdapter(m_devEnvApplicationObject.MainWindow.HWnd)) == DialogResult.OK)
                {
                    ConfigurationPersister.Instance.Configuration = configurationForm.GetConfiguration();
                    ConfigurationPersister.Instance.StoreConfiguration();
                }
            }
            catch (Exception ex)
            {
                ExceptionForm.Show(new WindowAdapter(m_devEnvApplicationObject.MainWindow.HWnd), ex, "Error starting Versioning Controlled Build add-in");
            }
        }
Beispiel #26
0
 /// <summary>
 /// Updates the configure button, description box and surveillance variable.
 /// If the surveillance system chosen can be configured then enable it,
 /// otherwise disable it.
 /// </summary>
 private void updateTrackingSystemGui()
 {
     surveillance = foundTrackingSystems[cmbAvailableTrackingSystems.SelectedIndex];
     // Update configuration options.
     if (surveillance.IsConfigurable)
     {
         // Dispose old one.
         if (trackingConfigForm != null)
         {
             trackingConfigForm.Dispose();
         }
         trackingConfigForm = surveillance.ConfigurationForm;
         // Get default configuration.
         trackingConfiguration = trackingConfigForm.GetConfiguration();
     }
     btnConfigureTrackingSystem.Enabled = surveillance.IsConfigurable;
     txtTrackingDescription.Text        = surveillance.Description;
 }
Beispiel #27
0
 /// <summary>
 /// Updates the configure button, description box and output variable.
 /// If the out system chosen can be configured then enable it,
 /// otherwise disable it.
 /// </summary>
 private void updateOutputSystemGui()
 {
     output = foundOutputSystems[cmbAvailableOutputSystems.SelectedIndex];
     // Update configuration options.
     if (output.IsConfigurable)
     {
         // Dispose old one.
         if (outputConfigForm != null)
         {
             outputConfigForm.Dispose();
         }
         outputConfigForm = output.ConfigurationForm;
         // Get default configuration.
         outputConfiguration = outputConfigForm.GetConfiguration();
     }
     btnConfigureOutput.Enabled = output.IsConfigurable;
     txtOutputDescription.Text  = output.Description;
 }
Beispiel #28
0
        private void BtnConfigMenu_Click(object sender, EventArgs e)
        {
            using (ConfigurationForm configF = new ConfigurationForm(SerializationHandler.Configuration.ProxyServer))
            {
                if (configF.ShowDialog() == DialogResult.OK)
                {
                    SerializationHandler.Configuration.ProxyServer.IPAddress = configF.IPAddress;
                    SerializationHandler.Configuration.ProxyServer.Port      = configF.Port.ToString();
                    SerializationHandler.Configuration.ProxyServer.Username  = configF.Username;
                    SerializationHandler.Configuration.ProxyServer.Password  = configF.Password;

                    if (ProxyRouter.IsAttached)
                    {
                        ProxyRouter?.Dispose();
                        ProxyRouter.Start();
                    }
                }
            }
        }
        public void TestServerValidation()
        {
            using (var form = new ConfigurationForm())
            {
                var panel = ((FlowLayoutPanel)form.Controls[1]);
                var server = ((TextBox)panel.Controls[1]);
                server.Text = "asd";
                server.Refresh();
                Assert.IsFalse(form.ValidateChildren());

                server.Text = "http://";
                server.Refresh();
                Assert.IsFalse(form.ValidateChildren());

                server.Text = "http://asd.com";
                server.Refresh();
                Assert.IsTrue(form.ValidateChildren());
            }
        }
Beispiel #30
0
        public void TestServerValidation()
        {
            using (var form = new ConfigurationForm())
            {
                var panel  = ((FlowLayoutPanel)form.Controls[1]);
                var server = ((TextBox)panel.Controls[1]);
                server.Text = "asd";
                server.Refresh();
                Assert.IsFalse(form.ValidateChildren());

                server.Text = "http://";
                server.Refresh();
                Assert.IsFalse(form.ValidateChildren());

                server.Text = "http://asd.com";
                server.Refresh();
                Assert.IsTrue(form.ValidateChildren());
            }
        }
Beispiel #31
0
        private void configureManagerToolStripMenuItem_Click( object sender, EventArgs e )
        {
            if( this._managerContainer.Started )
            {
                MessageBox.Show( "You must stop the Manager to access the configuration settings.", "Warning" );
                return;
            }

            ConfigurationForm form = new ConfigurationForm();
            form.SetConfiguration( this._managerContainer.Config );

            if( form.ShowDialog() == DialogResult.OK )
            {
                this._managerContainer.Config = form.GetConfiguration();

                // and store it in the config file
                this._managerContainer.Config.Slz();
            }
        }
Beispiel #32
0
        private void AddMacro(bool makeCopy)
        {
            UpdateSelectedMacro();
            AnyMachinesChanged = _hasUnsavedChanges = true;
            string macroName = ConfigurationForm.GetFirstAvailableDefaultName(
                Settings.Client.Macros.Select(macro => macro.Name).ToList(), makeCopy ? _selectedMacro.Name : "Macro");

            _selectedMacro = makeCopy ? _selectedMacro.Copy(macroName) : new Macro(macroName);
            Settings.Client.Macros.Add(_selectedMacro);
            textBoxMacroName.Text = _selectedMacro.Name;
            ListViewItem item = listViewMacros.Items.Add(new ListViewItem(_selectedMacro.Name)
            {
                Tag = _selectedMacro
            });

            listViewMacros.SelectedItems.Clear();
            item.Selected      = true;
            panelMacro.Visible = true;
            EnableControls();
            textBoxMacroName.Focus();
        }
 private void Setup_button_Click(object sender, EventArgs e)
 {
     configForm = new ConfigurationForm(mConfiguration, this);
     configForm.ShowDialog(this);
 }
 /// <summary>
 /// Indicates whether plugin can be enabled/disabled
 /// </summary>
 public void ShowPlugin()
 {
     ConfigurationForm configurationForm = new ConfigurationForm();
       configurationForm.ShowDialog();
 }
Beispiel #35
0
        private void Config_btn_Click(object sender, EventArgs e)
        {
            ConfigurationForm configForm = new ConfigurationForm(this.Configuration);

            configForm.ShowDialog();
        }