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); } }
internal void Right() { OpenedNode.Next(View); if (View == view.FullImage) { FullImage.LoadEntity(OpenedNode.GetSelectedEntity(), ActiveFolder); } }
internal void Left() { OpenedNode.Previous(View); if (View == view.FullImage) { FullImage.LoadEntity(OpenedNode.GetSelectedEntity(), ActiveFolder); } }
internal void Rotate() { OpenedNode.Rotate(); if (View == view.FullImage) { FullImage.Reload(ActiveFolder); } }
internal void MouseUp(Point location) { if (showcontextmenu) { contextmenu.MouseUp(); } if (View == view.Explorer) { OpenedNode.MouseUp(); } else if (View == view.FullImage) { FullImage.MouseUp(location); } }
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()); } } }
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); } }
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); } }
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); } }
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); } }