private void rbtOverride_CheckedChanged(object sender, EventArgs e) { tbxPriority.Enabled = addonSelectFrame1.Enabled = rbtOverride.Checked; if (!rbtOverride.Enabled) { return; } if (m_machineChangingOverride) { return; } if (rbtOverride.Checked && m_dashboard.IsInLibDirectory()) { m_dashboard.RedirectToCfgDirectory(); } if (rbtUseDefault.Checked && m_dashboard.IsInCfgDirectory()) { if (StdDialog.YesNoDialog("s_this_action_will_delete_your_own_settings_continue")) { if (m_dashboard.IsInCfgDirectory()) { File.Delete(m_dashboard.AddonFileName); } m_dashboard.RedirectToLibDirectory(); ((IAddonInstance)m_dashboard).LoadFromFile(m_dashboard.AddonFileName); ReloadProps(); } else { m_machineChangingOverride = true; rbtOverride.Checked = true; m_machineChangingOverride = false; } } }
private void btnSettings_Click(object sender, EventArgs e) { var win = new DashboardEditorFrame(m_dashboard); win.ShowGenericDialog(Texts.Get("s_dashboard") + " - " + Path.GetFileName(m_dashboard.AddonFileName), GenericDialogType.Close); if (m_dashboard.IsInCfgDirectory()) { m_dashboard.SaveToFile(m_dashboard.AddonFileName); } }