Пример #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();
        }