예제 #1
0
        public void Test()
        {
            MdCore.Serialize(new MdPersistentData(), MdConstant.N_PERSISTENT_DATA);


            MdMetaUtil.ResetDefaults();
        }
예제 #2
0
        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));
        }
예제 #3
0
 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();
     }
 }
예제 #4
0
        public FmMain()
        {
            InitializeComponent();

            MdMetaUtil.FirstRunCheck();

            MdSessionData.Init();
            EventHook();
            PostInitGUI();
        }
예제 #5
0
        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();
        }