コード例 #1
0
 private void LoadConfiguration()
 {
     _configuration = ModulesConfiguration.Load();
     _keys          = _configuration.Keys;
 }
コード例 #2
0
        public bool Configuration(System.Windows.Forms.IWin32Window parent)
        {
            if (_working)
            {
                System.Windows.Forms.MessageBox.Show(parent, "Konfiguracja jest niedostępna w trakcie działania skryptu korzystającego z tego modułu.", "Uwaga", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
                return(false);
            }
            KeyboardInputConfigurationDialog d = new KeyboardInputConfigurationDialog(ModulesConfiguration.Load(ModulesConfiguration.ConfigurationFilePath));

            if (d.ShowDialog(parent) == System.Windows.Forms.DialogResult.OK)
            {
                d.Configuration.Save();
                ModulesConfiguration.Reload();
                LoadConfiguration();
                return(true);
            }

            return(false);
        }