コード例 #1
0
        private void buttonUpdateGeneralConfig_Click(Object sender, EventArgs e)
        {
            String appPath = textBoxAppPath.Text.Trim();

            if (ConfigDataValidator.ValidateAppLocation(appPath, errorProviderAppPath, buttonShowAppDialog))
            {
                _configProvider.SaveAppPath(appPath);
                _configProvider.SaveOutputLevel((OutputLevel)comboBoxOutputLevel.SelectedItem);
            }
            buttonUpdateGeneralConfig.Enabled = false;
        }
コード例 #2
0
        private void buttonUpdateSourceEntry_Click(Object sender, EventArgs e)
        {
            String source = textBoxSourcePath.Text.Trim();
            String config = textBoxConfigPath.Text.Trim();

            if (!ConfigDataValidator.ValidateSourceEntry(source, config, errorProviderSourcePath, buttonShowSourceDialog))
            {
                return;
            }
            if (IsNewEntrySelected())
            {
                _configProvider.CreateSourceEntry(source, config);
                _hasNewRow = false;
            }
            else
            {
                _configProvider.SaveSourceEntry(listBoxSources.SelectedIndex, source, config);
            }
            listBoxSources.Items[listBoxSources.SelectedIndex] = source;
            buttonUpdateSourceEntry.Enabled = false;
        }