src/taskForm.cs
/// <summary>
/// Save new settings and apply them
/// </summary>
Save new settings and apply them
Save new settings and apply them
private void applyNSaveBtn_Click(object sender, EventArgs e)
        {
            try
            {
                Directory.CreateDirectory(systemPathBox.Text);
                Directory.CreateDirectory(downloadPathBox.Text);
            }
            catch (Exception E)
            {
                MessageBox.Show("Incorrect parameters:" + Environment.NewLine + E.Message);
                return;
            }
            GlobalSettings.Settings.downloadPath = downloadPathBox.Text;
            GlobalSettings.Settings.systemPath = systemPathBox.Text;
            GlobalSettings.Settings.filenameTemplate = filenameTemplateBox.Text;
            GlobalSettings.Settings.descrFilenameTemplate = descrFilenameBox.Text;
            GlobalSettings.Settings.downloadOnlyOnce = neverDownloadTwiceCheckBox.Checked;
            GlobalSettings.Settings.scrapsTemplateActive = scrapsActTemplateBox.Text;
            GlobalSettings.Settings.scrapsTemplatePassive = scrapsPassTemplateBox.Text;
            GlobalSettings.GlobalSettingsSave();
            mainTabControl.SelectedTab = tasksTab;
        }
private void applyNSaveBtn_Click ( object sender , EventArgs e ) { try { Directory . CreateDirectory ( systemPathBox . Text ) ; Directory . CreateDirectory ( downloadPathBox . Text ) ; } catch ( Exception E ) { MessageBox . Show ( " " + Environment . NewLine + E . Message ) ; return ; } GlobalSettings . Settings . downloadPath = downloadPathBox . Text ; GlobalSettings . Settings . systemPath = systemPathBox . Text ; GlobalSettings . Settings . filenameTemplate = filenameTemplateBox . Text ; GlobalSettings . Settings . descrFilenameTemplate = descrFilenameBox . Text ; GlobalSettings . Settings . downloadOnlyOnce = neverDownloadTwiceCheckBox . Checked ; GlobalSettings . Settings . scrapsTemplateActive = scrapsActTemplateBox . Text ; GlobalSettings . Settings . scrapsTemplatePassive = scrapsPassTemplateBox . Text ; GlobalSettings . GlobalSettingsSave ( ) ; mainTabControl . SelectedTab = tasksTab ; }
Save new settings and apply them
Save new settings and apply them
sender
object
e
EventArgs