void OnFileTextChanged(object sender, RoutedEventArgs args) { SStartupFile file = GetCurrentStartupFile(); if (file != null) { file.SetFilePath(startupFileTextBox.Text); } }
private bool ApplyCurrentSettings() { if (!ValidateDefs()) { CUserInteractionUtils.ShowErrorMessageBox(Properties.Resources.DCCDefChangesNotSaved); return(false); } if (GetCurrentProgram() != null) { if (File.Exists(programExeTextBox.Text)) { SDCCProgram pro = GetCurrentProgram(); pro.ExecutablePath = programExeTextBox.Text; } else { CUserInteractionUtils.ShowErrorMessageBox(Properties.Resources.CommonPathDoesntExist + " (" + programExeTextBox.Text + ")"); } if (GetCurrentStartupFile() != null) { if (File.Exists(startupFileTextBox.Text)) { SStartupFile file = GetCurrentStartupFile(); file.SetFilePath(startupFileTextBox.Text); file.Copy = (bool)copyFileCheckbox.IsChecked; file.LaunchWithProgram = (bool)launchWithProgCheckbox.IsChecked; } else { CUserInteractionUtils.ShowErrorMessageBox(Properties.Resources.CommonPathDoesntExist + " (" + startupFileTextBox.Text + ")"); } } UpdateListViews(); } ApplyAllChanges(); return(true); }