Пример #1
0
        internal void MouseMove(Point location)
        {
            if (showcontextmenu)
            {
                contextmenu.MouseMove(location);
                if (contextmenu.IsMenuSelected)
                {
                    if (contextmenu.HoveredIndex == -1)
                    {
                        showcontextmenu = false;
                    }
                }
                return;
            }

            if (View == view.Explorer)
            {
                if (location.X >= GlobalClass.LeftPanelWidth)
                {
                    OpenedNode.MouseMove(location);
                }
                else if (location.X < GlobalClass.LeftPanelWidth && location.Y > GlobalClass.TitleHeight)
                {
                    recentnodes.MouseMove(location);
                }
            }
            else if (View == view.FullImage)
            {
                FullImage.MouseMove(location);
            }
        }
Пример #2
0
 internal void Right()
 {
     OpenedNode.Next(View);
     if (View == view.FullImage)
     {
         FullImage.LoadEntity(OpenedNode.GetSelectedEntity(), ActiveFolder);
     }
 }
Пример #3
0
 internal void Left()
 {
     OpenedNode.Previous(View);
     if (View == view.FullImage)
     {
         FullImage.LoadEntity(OpenedNode.GetSelectedEntity(), ActiveFolder);
     }
 }
Пример #4
0
 internal void Rotate()
 {
     OpenedNode.Rotate();
     if (View == view.FullImage)
     {
         FullImage.Reload(ActiveFolder);
     }
 }
Пример #5
0
        internal void MouseUp(Point location)
        {
            if (showcontextmenu)
            {
                contextmenu.MouseUp();
            }

            if (View == view.Explorer)
            {
                OpenedNode.MouseUp();
            }
            else if (View == view.FullImage)
            {
                FullImage.MouseUp(location);
            }
        }
Пример #6
0
        private void OpenNodeOrEntity()
        {
            if (OpenedNode.SelectedIndexes != null && OpenedNode.SelectedIndexes.Count > 0)
            {
                if (OpenedNode.selection == Node.Selection.Entity)
                {
                    FullImage.LoadEntity(OpenedNode.GetSelectedEntity(), ActiveFolder);

                    View = view.FullImage;
                }
                else if (OpenedNode.selection == Node.Selection.Node)
                {
                    View = view.Explorer;
                    OpenNode(OpenedNode.GetSelectedNode());
                }
            }
        }
Пример #7
0
 internal void MouseWheel(int delta, Point p)
 {
     if (View == view.Explorer)
     {
         if (p.X >= GlobalClass.LeftPanelWidth)
         {
             OpenedNode.MouseWheel(delta);
         }
         else if (p.X < GlobalClass.LeftPanelWidth && p.Y > GlobalClass.TitleHeight)
         {
             recentnodes.MouseWheel(delta, p);
         }
     }
     else if (View == view.FullImage)
     {
         FullImage.MouseWheel(delta);
     }
 }
Пример #8
0
        internal void MouseDoubleClick(Point location)
        {
            if (showcontextmenu)
            {
                if (new Rectangle(location, new Size(1, 1)).IntersectsWith(contextmenu.regionRect))
                {
                    contextmenu.MouseDown(location);
                    return;
                }
                showcontextmenu = false;
            }

            if (View == view.Explorer)
            {
                OpenNodeOrEntity();
            }
            else if (View == view.FullImage)
            {
                FullImage.MouseDoubleClick(location);
            }
        }
Пример #9
0
        internal void Paint(Graphics graphics)
        {
            if (View == view.Explorer)
            {
                if (BackgroundImage != null)
                {
                    graphics.DrawImage(BackgroundImage, new PointF(0, 0));
                }

                OpenedNode.Paint(graphics);
                PaintTitle(graphics);
                recentnodes.Paint(graphics);
            }
            else if (View == view.FullImage)
            {
                FullImage.Paint(graphics);
            }

            if (showcontextmenu)
            {
                contextmenu.Paint(graphics);
            }
        }
Пример #10
0
 internal void MouseDown(Point location, MouseButtons button)
 {
     if (showcontextmenu)
     {
         if (new Rectangle(location, new Size(1, 1)).IntersectsWith(contextmenu.regionRect))
         {
             contextmenu.MouseDown(location);
             return;
         }
         showcontextmenu = false;
     }
     if (button == MouseButtons.Right)
     {
         contextmenu.SetLocation(location);
         showcontextmenu = true;
     }
     else
     {
         showcontextmenu = false;
     }
     if (View == view.Explorer)
     {
         if (location.X >= GlobalClass.LeftPanelWidth)
         {
             OpenedNode.MouseDown(location, button);
         }
         else if (location.X < GlobalClass.LeftPanelWidth && location.Y > GlobalClass.TitleHeight)
         {
             recentnodes.MouseDown(location);
         }
     }
     else if (View == view.FullImage)
     {
         FullImage.MouseDown(location);
     }
 }