コード例 #1
0
ファイル: Config.cs プロジェクト: hirekoke/FloWin
        /// <summary>コンストラクタ, 初期値をセットする</summary>
        private Config()
        {
            /// 設定ファイルを置くディレクトリを作る
            MakeDirs();

            /// 初期値
            FrameRate = 30;
            WinUpdateMSec = 500;

            DrawLiquid = true;
            LiquidColor = Color.FromArgb(128, 32, 32, 255);
            FpsLocation = new Point(10, 10);
            ParticleCountLocation = new Point(10, 40);
            WinEnumLocation = new Point(10, 80);

            /// キー設定初期値
            Exit = new KeyConfig(OP_EXIT, Properties.Resources.Command_Exit,
                Key.Escape, ModifierKeys.None);
            Pause = new KeyConfig(OP_PAUSE, Properties.Resources.Command_Pause,
                Key.F11, ModifierKeys.None);
            Pour = new KeyConfig(OP_POUR, Properties.Resources.Command_Pour,
                Key.F10, ModifierKeys.None);
            DrawWall = new KeyConfig(OP_DRAWWALL, Properties.Resources.Command_DrawWall,
                Key.W, ModifierKeys.Control | ModifierKeys.Alt);

            /// 全キー設定
            Keys = new List<KeyConfig>() { Exit, Pause, Pour, DrawWall };
        }
コード例 #2
0
ファイル: ConfigViewModel.cs プロジェクト: hirekoke/FloWin
 public KeyConfigViewModel(KeyConfig keyConfig)
 {
     Value = keyConfig;
 }