public void Test() { MdCore.Serialize(new MdPersistentData(), MdConstant.N_PERSISTENT_DATA); MdMetaUtil.ResetDefaults(); }
private void ChangeInputMethod() { MdConfig.Main.CurrentInputMethod = this.DDInputMethod.SelectedKey + MdConstant.E_INPUT_METHOD; MdSessionData.CurrentInputMethod = MdConfig.Main.GetCurrentInputMethod(); MdMetaUtil.ReloadInputMethodUI(); MdCore.Serialize(MdConfig.Main, Path.Combine(MdPersistentData.ConfigPath, MdConstant.N_CONFIG)); }
private void ResetDefaults() { // TODO if (MessageBox.Show("Are you sure you wish to proceed?\nArbites will restart itself after this operation.", "This will reset your defaults.", MessageBoxButtons.YesNo, MessageBoxType.Question, MessageBoxDefaultButton.No) == DialogResult.Yes) { MdMetaUtil.ResetDefaults(); Application.Instance.Restart(); } }
public FmMain() { InitializeComponent(); MdMetaUtil.FirstRunCheck(); MdSessionData.Init(); EventHook(); PostInitGUI(); }
private void PostInitGUI() { this.DDInputMethod.Items.Clear(); var inputMethods = MdMetaUtil.GetListOfInputMethods(); this.Icon = MdSessionData.WindowIcon; for (var i = 0; i < inputMethods.Count; i++) { var item = Path.GetFileNameWithoutExtension(inputMethods[i]); this.DDInputMethod.Items.Add(item); if (item + MdConstant.E_INPUT_METHOD == MdConfig.Main.CurrentInputMethod) { this.DDInputMethod.SelectedIndex = i; } } MdSessionData.KeyMenu = new FmKeyMenu(); }