コード例 #1
0
 private void btn_3D_Click(object sender, EventArgs e)
 {
     this.Return_Mode = Variables.Constants.Mode._3D;
     Console.WriteLine("3D");
     this.Visible = false;
     this.Dispose();
 }
コード例 #2
0
 /// <summary>
 /// Select button of mode current
 /// </summary>
 /// <param name="_mode">Used to focus button</param>
 private void SetFocusButton(Variables.Constants.Mode _mode)
 {
     if (_mode == Variables.Constants.Mode._2D)
     {
         this.btn_2D.BackColor = Variables.Constants.Background_Btn_Focus;
         this.btn_2D.Focus();
     }
     else if (_mode == Variables.Constants.Mode._3D)
     {
         this.btn_3D.BackColor = Variables.Constants.Background_Btn_Focus;
         this.btn_3D.Focus();
     }
 }
コード例 #3
0
        /// <summary>
        /// Construction with mode current.
        /// </summary>
        /// <param name="_mode">Used to set focus button of this mode</param>
        public ChooseMode(Variables.Constants.Mode _mode)
        {
            InitializeComponent();
            // xem cách sử dụng user control và component nữa, còn nhiều cái
            // phải học đối với C# ở trong đó.....
            this.Return_Mode = _mode;
            SetFocusButton(_mode);

            if (mf == null)
            {
                mf = new MyFilter();
                Application.AddMessageFilter(mf);
            }

            mf.MouseDown += new MyFilter.LeftButtonDown(mf_MouseDown);
            mf.KeyUp     += new MyFilter.KeyPressUp(mf_KeyUp);
        }