Beispiel #1
0
        protected override void CreateFile(String filePath)
        {
            ConfigBusiness config = new ConfigBusiness(filePath);

            config.Set("DeviceType", "LaunchpadPro");
            config.Set("DeviceBackGround", "#535353");
            config.Set("DeviceSize", "600");
            config.Set("IsMembrane", "false");
            config.Save();
            mw.mySettingUserControl.AddPlayer(Path.GetFileName(filePath));
        }
Beispiel #2
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            ConfigBusiness config = new ConfigBusiness(filePath);
            ComboBoxItem   item   = (ComboBoxItem)cbDeviceType.SelectedItem;

            config.Set("DeviceType", item.Content.ToString());
            config.Set("DeviceBackGround", tbBackGround.Text);
            if (!Double.TryParse(tbDeviceSize.Text.Trim(), out Double iDeviceSize))
            {
                System.Windows.Forms.MessageBox.Show("请输入正确的数字(可以为小数)!");
                return;
            }
            config.Set("DeviceSize", iDeviceSize.ToString());
            if (cbMembrane.IsChecked == true)
            {
                config.Set("IsMembrane", "true");
            }
            else
            {
                config.Set("IsMembrane", "false");
            }
            config.Save();
        }