Пример #1
0
 public override void Start()
 {
     //requestCode = RequestCode.Game;
     actionCode = ActionCode.StartPlay;
     vsPanel    = GetComponent <VSPanel>();
     base.Start();
 }
 public override void Start()
 {
     requestCode = RequestCode.Room;
     actionCode  = ActionCode.QuitRoom;
     vsPanel     = GetComponent <VSPanel>();
     base.Start();
 }
 private void cpConfigHead_MouseMove(object sender, MouseEventArgs e)
 {
     if (isMove)
     {
         VSPanel p = (VSPanel)((CaptionPanel)sender).Parent;
         p.Location = new Point(p.Left + e.Location.X - mleft, p.Top + e.Location.Y - mtop);
     }
 }
        private void cpConfigHead_MouseDown(object sender, MouseEventArgs e)
        {
            isMove = true;
            VSPanel p = (VSPanel)((CaptionPanel)sender).Parent;

            mleft = e.Location.X;
            mtop  = e.Location.Y;
        }
 public override void Start()
 {
     requestCode = RequestCode.Room;
     actionCode = ActionCode.UpdateRoom;
     vsPanel = GetComponent<VSPanel>();
     Debug.Log("updateRoomTothe ActonCode");
     base.Start();
 }
    /// <summary> 
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    //protected override void Dispose(bool disposing) {
    //  if (disposing && (components != null)) {
    //    components.Dispose();
    //  }
    //  base.Dispose(disposing);
    //}

    #region Component Designer generated code

    /// <summary> 
    /// Required method for Designer support - do not modify 
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent() {
      components = new System.ComponentModel.Container();
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
      this.VSPanel1 = new VSPanel();
      this.VSPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
      this.SuspendLayout();
      this.Controls.Add(this.VSPanel1);
      this.ResumeLayout();
    }
Пример #7
0
        /// <summary>
        /// 移动的方法
        /// </summary>
        /// <param name="obj">移动的对象</param>
        /// <param name="leftSize">左边距离</param>
        /// <param name="topSize">上边距离</param>
        private void ToMove(VSPanel obj, int leftSize, int topSize)
        {
            obj.Left += (Cursor.Position.X - leftSize);
            obj.Top  += (Cursor.Position.Y - topSize);


            this.Cursor = Cursors.SizeAll;
            left        = Cursor.Position.X;
            top         = Cursor.Position.Y;
        }
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        //protected override void Dispose(bool disposing) {
        //  if (disposing && (components != null)) {
        //    components.Dispose();
        //  }
        //  base.Dispose(disposing);
        //}

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            components         = new System.ComponentModel.Container();
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.VSPanel1      = new VSPanel();
            this.VSPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.SuspendLayout();
            this.Controls.Add(this.VSPanel1);
            this.ResumeLayout();
        }