internal void Paint(Graphics graphics, PointF location) { path = GlobalClass.GetRoundBoundry(new RectangleF(location.X + 1, location.Y + 1, GlobalClass.ThumbnailSize.Width - 2, GlobalClass.ThumbnailSize.Height - 2), GlobalClass.RoundCornorRadius); graphics.SetClip(path); graphics.DrawImage(GetThumbnail(), location); PaintShortCutInfo(graphics, location); PaintTags(graphics, location); graphics.ResetClip(); graphics.DrawPath(GlobalClass.BorderColorPen, path); }
internal void Paint(Graphics graphics) { GraphicsPath path = GlobalClass.GetRoundBoundry(new RectangleF(2, 103, GlobalClass.LeftPanelWidth, GlobalClass.ParentBoundry.Height - GlobalClass.TitleHeight - 6), 15f); graphics.FillPath(GlobalClass.LeftPanelBrush, path); graphics.DrawPath(GlobalClass.BorderColorPen, path); for (int i = 0; i < recentblocks.Count; i++) { recentblocks[i].Paint(graphics); } }
internal void PaintSelection(Graphics graphics, PointF location) { graphics.DrawPath(GlobalClass.HighlightPen, path); graphics.FillPath(GlobalClass.SelectionBrush, path); if (IsShortCut) { if (FileFound) { size = graphics.MeasureString("Shortcut", GlobalClass.SmallfontBold); graphics.FillPath(Brushes.Navy, GlobalClass.GetRoundBoundry(new RectangleF(location.X + 5, location.Y + 5, size.Width + 3, size.Height + 3), 3f)); graphics.DrawString("Shortcut", GlobalClass.SmallfontBold, Brushes.Gold, location.X + 5 + 1.5f, location.Y + 5 + 1.5f); } } }
private void PaintShortCutInfo(Graphics graphics, PointF location) { if (IsShortCut) { if (FileFound) { size = graphics.MeasureString("Shortcut", GlobalClass.SmallfontBold); graphics.FillPath(GlobalClass.ShortCutBGBrush, GlobalClass.GetRoundBoundry(new RectangleF(location.X + 5, location.Y + 5, size.Width + 3, size.Height + 3), 3f)); graphics.DrawString("Shortcut", GlobalClass.SmallfontBold, Brushes.White, location.X + 5 + 1.5f, location.Y + 5 + 1.5f); } else { graphics.DrawString("Original File has been Deleted", GlobalClass.SmallfontBold, Brushes.White, new RectangleF(location.X + 5, location.Y + 5, GlobalClass.ThumbnailSize.Width - 4, GlobalClass.ThumbnailSize.Height - 4)); graphics.DrawString("Original Folder:", GlobalClass.Smallfont, Brushes.WhiteSmoke, new RectangleF(location.X + 5, location.Y + 25, GlobalClass.ThumbnailSize.Width - 4, GlobalClass.ThumbnailSize.Height - 4)); graphics.DrawString(OldParentDisplayName, GlobalClass.SmallfontBold, Brushes.Gold, new RectangleF(location.X + 5, location.Y + 38, GlobalClass.ThumbnailSize.Width - 4, GlobalClass.ThumbnailSize.Height - 4)); graphics.DrawString("To Delete this broken shortcut, Select and press Delete.", GlobalClass.Smallfont, Brushes.SkyBlue, new RectangleF(location.X + 5, location.Y + 75, GlobalClass.ThumbnailSize.Width - 4, GlobalClass.ThumbnailSize.Height - 4)); } } }
internal void Paint(Graphics graphics) { graphics.FillRectangle(GlobalClass.TitleBrush, new RectangleF(0, 0, GlobalClass.ParentBoundry.Width, GlobalClass.TitleHeight)); // graphics.DrawImage(Properties.Resources.line, new Rectangle(0, GlobalClass.TitleHeight-3, GlobalClass.ParentBoundry.Width, 5)); if (GlobalClass.SelectedNode != null) { s = graphics.MeasureString(CurrentNodeDisplayName + " >> " + GlobalClass.SelectedNode.DisplayName, GlobalClass.SmallfontBold); graphics.DrawString(CurrentNodeDisplayName + " >> " + GlobalClass.SelectedNode.DisplayName, GlobalClass.SmallfontBold, Brushes.White, new RectangleF(5, 2, GlobalClass.ParentBoundry.Width, GlobalClass.TitleHeight)); } else { s = graphics.MeasureString(CurrentNodeDisplayName, GlobalClass.SmallfontBold); graphics.DrawString(CurrentNodeDisplayName, GlobalClass.SmallfontBold, Brushes.Gray, new RectangleF(5, 2, GlobalClass.ParentBoundry.Width, GlobalClass.TitleHeight)); } //Selected Folder Image GraphicsPath path = GlobalClass.GetRoundBoundry(new RectangleF(5, s.Height + 5, 60, 60), 10); graphics.SetClip(path); if (GlobalClass.SelectedNode != null) { graphics.DrawImage(GlobalClass.SelectedNode.CoverImage, new RectangleF(5, s.Height + 5, 60, 60)); } else { graphics.FillRectangle(GlobalClass.BlankBrush, new RectangleF(5, s.Height + 5, 60, 60)); if (CurrentNodeDisplayName == "Favorite") { graphics.DrawImage(Properties.Resources.fav, new RectangleF(5 + 60 / 2 - 36 / 2, s.Height + 5 + 60 / 2 - 36 / 2, 36, 36)); } else if (CurrentNodeDisplayName == "Recycle Bin") { graphics.DrawImage(Properties.Resources.deletedicon, new RectangleF(5 + 60 / 2 - 36 / 2, s.Height + 5 + 60 / 2 - 36 / 2, 36, 36)); } else if (CurrentNodeDisplayName == "Downloads") { graphics.DrawImage(Properties.Resources.downloads, new RectangleF(5 + 60 / 2 - 36 / 2, s.Height + 5 + 60 / 2 - 36 / 2, 36, 36)); } } graphics.ResetClip(); graphics.DrawPath(GlobalClass.BorderColorPen, path); graphics.DrawString("Loaded From : ", GlobalClass.SmallfontBold, Brushes.LightGoldenrodYellow, new PointF(GlobalClass.LeftPanelWidth, s.Height + 5)); graphics.DrawString(ActiveFolder, GlobalClass.SmallfontBold, Brushes.LightGray, new PointF(GlobalClass.LeftPanelWidth + 70, s.Height + 5)); //Selected Node Image path = GlobalClass.GetRoundBoundry(new RectangleF(5 + 65, s.Height + 5, 60, 60), 10); graphics.SetClip(path); if (GlobalClass.SelectedEntity != null) { graphics.DrawImage(GlobalClass.SelectedEntity.GetThumbnail(), new RectangleF(5 + 65, s.Height + 5, 60, 60)); } else { graphics.FillRectangle(GlobalClass.BlankBrush, new RectangleF(5 + 65, s.Height + 5, 60, 60)); } graphics.ResetClip(); graphics.DrawPath(GlobalClass.BorderColorPen, path); ////Select Nodes and Entity Count //if (NodeSelected) //{ // float startx = s.Width + 7; // if (NodeCount > 0) // { // s = graphics.MeasureString(" " + NodeCount + " folders ", GlobalClass.SmallfontBold); // graphics.DrawString(" " + NodeCount + " folders ", GlobalClass.SmallfontBold, Brushes.DeepPink, startx, 2); // startx += s.Width+5; // } // if (EntityCount > 0) // graphics.DrawString(" " + EntityCount + " images ", GlobalClass.SmallfontBold, Brushes.SkyBlue, startx, 2); // if (EntityCount == 0 && NodeCount == 0) // graphics.DrawString("Empty Folder", GlobalClass.SmallfontBold, Brushes.Gold, startx, 2); //} if (Controller.GetSelectionCount() != 0) { graphics.DrawString(Controller.GetSelectionCount() + " Items Selected", GlobalClass.SmallfontBold, Brushes.Gold, new PointF(5, s.Height + 70)); } }