示例#1
0
 public SettingUI(Launch launch)
 {
     InitializeComponent();
     this.launch            = launch;
     panel1.MouseDown      += launch.HammerDown;
     panel1.MouseUp        += launch.HammerUp;
     pictureBox1.MouseDown += launch.HammerDown;
     pictureBox1.MouseUp   += launch.HammerUp;
     checkBox1.Checked      = launch.soundsOn;
 }
示例#2
0
 public GameUI(Launch launch)
 {
     this.DoubleBuffered = true;                         //设置本窗体
     SetStyle(ControlStyles.UserPaint, true);
     SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
     SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲
     this.launch = launch;
     InitializeComponent();
     mouse = new PictureBox[] { mouse1, mouse2, mouse3, mouse4, mouse5, mouse6, mouse7, mouse8, mouse9 };
     for (int i = 0; i < 9; ++i)
     {
         mouse[i].Click     += new System.EventHandler(this.mouseHit);
         mouse[i].MouseDown += launch.HammerDown;
         mouse[i].MouseUp   += launch.HammerUp;
     }
     this.MouseDown  += launch.HammerDown;
     this.MouseUp    += launch.HammerUp;
     gameTime.Enabled = true;
     mouseGen.Enabled = true;
     Start();
     Pause();
 }
示例#3
0
        public LaunchUI(Launch launch)
        {
            this.DoubleBuffered = true;                         //设置本窗体
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲
            InitializeComponent();
            this.launch                     = launch;
            this.MouseDown                 += launch.HammerDown;
            this.MouseUp                   += launch.HammerUp;
            this.PicNewGame.MouseDown      += launch.HammerDown;
            this.PicNewGame.MouseUp        += launch.HammerUp;
            this.PicContinueGame.MouseDown += launch.HammerDown;
            this.PicContinueGame.MouseUp   += launch.HammerUp;
            this.PicIntroduce.MouseDown    += launch.HammerDown;
            this.PicIntroduce.MouseUp      += launch.HammerUp;
            this.PicSetting.MouseDown      += launch.HammerDown;
            this.PicSetting.MouseUp        += launch.HammerUp;
            this.PicQuit.MouseDown         += launch.HammerDown;
            this.PicQuit.MouseUp           += launch.HammerUp;

            gameUI = new GameUI(launch);
        }