/// <summary> /// Save settings and close the window. /// </summary> /// <param name="sender">Should be the <see cref="SettingsView"/>, but is the clicked button for some reason.</param> public void Save(object sender) { Settings.Default.PreviousHotkey = (int)PreviousHotkey; Settings.Default.ExecuteHotkey = (int)ExecuteHotkey; Settings.Default.NextHotkey = (int)NextHotkey; Settings.Default.ClearCheckBoxesHotkey = (int)ClearCheckBoxesHotkey; Settings.Default.EnabledFormats = string.Join(";", EnabledFormats.Select(i => i.ToString()).ToArray()); Settings.Default.SendToRecycleBin = SendToRecycleBin; Settings.Default.WarnIfOverwrite = OverwriteFiles; Settings.Default.EnableStatisticTracking = EnableStatisticTracking; Settings.Default.EnableLogging = EnableLogging; Settings.Default.Save(); (((sender as FrameworkElement).Parent as FrameworkElement).Parent as Window).Close(); //TODO ULTRA HACKY CHECK THIS!!!!! }
/// <summary> /// Adds the selected enabled format to the <see cref="SupportedFormats"/>. /// </summary> public void AddToSupported() { EnabledFormats.RemoveAt(EnabledIndex); NotifyOfPropertyChange(() => SupportedFormats); }
/// <summary> /// Adds the selected supported format to the <see cref="EnabledFormats"/>. /// </summary> public void AddToEnabled() { EnabledFormats.Add(SupportedFormats[SupportedIndex]); NotifyOfPropertyChange(() => SupportedFormats); }