Exemplo n.º 1
0
        private void ComputeDockHideType()
        {
            bool flag = this.dockedForm.Top <= 0;

            if (flag)
            {
                this.dockHideType = DockHideType.Top;
                bool flag2 = this.dockedForm.Bounds.Contains(Cursor.Position);
                if (flag2)
                {
                    this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                }
                else
                {
                    this.formDockHideStatus = FormDockHideStatus.Hide;
                }
            }
            else
            {
                bool flag3 = this.dockedForm.Left <= 0;
                if (flag3)
                {
                    this.dockHideType = DockHideType.Left;
                    bool flag4 = this.dockedForm.Bounds.Contains(Cursor.Position);
                    if (flag4)
                    {
                        this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                    }
                    else
                    {
                        this.formDockHideStatus = FormDockHideStatus.Hide;
                    }
                }
                else
                {
                    bool flag5 = this.dockedForm.Left < Screen.PrimaryScreen.Bounds.Width - this.dockedForm.Width;
                    if (flag5)
                    {
                        this.dockHideType       = DockHideType.None;
                        this.formDockHideStatus = FormDockHideStatus.ShowNormally;
                    }
                    else
                    {
                        this.dockHideType = DockHideType.Right;
                        bool flag6 = this.dockedForm.Bounds.Contains(Cursor.Position);
                        if (flag6)
                        {
                            this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                        }
                        else
                        {
                            this.formDockHideStatus = FormDockHideStatus.Hide;
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 判断是否达到了隐藏的条件?以及是哪种类型的隐藏。
 /// </summary>
 private void ComputeDockHideType()
 {
     if (this.dockedForm.Top <= 0)
     {
         this.dockHideType = DockHideType.Top;
         if (this.dockedForm.Bounds.Contains(Cursor.Position))
         {
             this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
             return;
         }
         this.formDockHideStatus = FormDockHideStatus.Hide;
         return;
     }
     else
     {
         if (this.dockedForm.Left <= 0)
         {
             this.dockHideType = DockHideType.Left;
             if (this.dockedForm.Bounds.Contains(Cursor.Position))
             {
                 this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                 return;
             }
             this.formDockHideStatus = FormDockHideStatus.Hide;
             return;
         }
         else
         {
             if (this.dockedForm.Left < Screen.PrimaryScreen.Bounds.Width - this.dockedForm.Width)
             {
                 this.dockHideType       = DockHideType.None;
                 this.formDockHideStatus = FormDockHideStatus.ShowNormally;
                 return;
             }
             this.dockHideType = DockHideType.Right;
             if (this.dockedForm.Bounds.Contains(Cursor.Position))
             {
                 this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                 return;
             }
             this.formDockHideStatus = FormDockHideStatus.Hide;
             return;
         }
     }
 }
Exemplo n.º 3
0
 public void ShowOnce()
 {
     this.showOnce           = true;
     this.formDockHideStatus = FormDockHideStatus.ShowNormally;
 }
Exemplo n.º 4
0
 public void ShowOnce()
 {
     _showOnce           = true;
     _formDockHideStatus = FormDockHideStatus.ShowNormally;
 }
Exemplo n.º 5
0
 /// <summary>
 /// 判断是否达到了隐藏的条件?以及是哪种类型的隐藏。
 /// </summary>
 private void ComputeDockHideType()
 {
     if (this.dockedForm.Top <= 0)
     {
         this.dockHideType = DockHideType.Top;
         if (this.dockedForm.Bounds.Contains(Cursor.Position))
         {
             this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
             return;
         }
         this.formDockHideStatus = FormDockHideStatus.Hide;
         return;
     }
     else
     {
         if (this.dockedForm.Left <= 0)
         {
             this.dockHideType = DockHideType.Left;
             if (this.dockedForm.Bounds.Contains(Cursor.Position))
             {
                 this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                 return;
             }
             this.formDockHideStatus = FormDockHideStatus.Hide;
             return;
         }
         else
         {
             if (this.dockedForm.Left < Screen.PrimaryScreen.Bounds.Width - this.dockedForm.Width)
             {
                 this.dockHideType = DockHideType.None;
                 this.formDockHideStatus = FormDockHideStatus.ShowNormally;
                 return;
             }
             this.dockHideType = DockHideType.Right;
             if (this.dockedForm.Bounds.Contains(Cursor.Position))
             {
                 this.formDockHideStatus = FormDockHideStatus.ReadyToHide;
                 return;
             }
             this.formDockHideStatus = FormDockHideStatus.Hide;
             return;
         }
     }
 }
Exemplo n.º 6
0
 public void ShowOnce()
 {
     this.showOnce = true;
     this.formDockHideStatus = FormDockHideStatus.ShowNormally;
 }