コード例 #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(textBox1.Text) ||
                !IsFileNameValid(textBox1.Text))
            {
                MessageBox.Show("不合法的名称!");
                return;
            }
            DefaultMapConfig config = null;

            if (this.comboBox1.SelectedIndex == 0)
            {
                config = new KeyBoardConfig();
            }
            else if (this.comboBox1.SelectedIndex == 1)
            {
                config = new XInputConfig();
            }
            else
            {
                config = new MixModeConfig();
            }
            config.Name = textBox1.Text;
            this.OnSuccess(config);
            this.Close();
        }
コード例 #2
0
 public ScriptJoyMap(DefaultMapConfig _config) : base(_config)
 {
     KeyBoardConfig = new KeyBoardConfig();
     XinputConfig   = new XInputConfig();
     Scripts        = new Dictionary <int, string>();
     config         = _config;
 }