Initial population

This commit is contained in:
Jon
2026-03-07 19:22:22 -06:00
parent 647f55feb9
commit cae1a3ec46
108 changed files with 28484 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Windows.Forms;
namespace JRCookbookControls
{
internal static class modSharedRoutines
{
internal static void ShowInsertionBar(Control control, JRCookbookControls.InsertLocation insertLocation)
{
if (insertLocation == InsertLocation.InsertBefore)
{
DrawLine(control, 0, 0, control.Width - 1, 0, System.Drawing.SystemColors.MenuHighlight);
}
else if (insertLocation == InsertLocation.InsertAfter)
{
DrawLine(control, 0, control.Height - 1, control.Width - 1, control.Height - 1, System.Drawing.SystemColors.MenuHighlight);
}
}
internal static void HideInsertionBar(Control control)
{
DrawLine(control, 0, 0, control.Width - 1, 0, System.Drawing.SystemColors.Control);
DrawLine(control, 0, control.Height - 1, control.Width - 1, control.Height - 1, System.Drawing.SystemColors.Control);
}
internal static void DragStarted(Control control)
{
control.BackColor = System.Drawing.SystemColors.MenuHighlight;
}
internal static void DragEnded(Control control)
{
control.BackColor = System.Drawing.SystemColors.Control;
}
private static void DrawLine(Control control, int x1, int y1, int x2, int y2, Color color)
{
System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(color, 1);
System.Drawing.Graphics line = control.CreateGraphics();
line.DrawLine(myPen, x1, y1, x2, y2);
//control.Refresh();
myPen.Dispose();
line.Dispose();
}
}
}