C2026-043-Tech-Debt_v1 - Stash 1

This commit is contained in:
2026-07-21 06:49:28 -04:00
parent 0fed1acfd8
commit 9486b37300
70 changed files with 4222 additions and 10191 deletions
@@ -1,8 +1,5 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using C1.Win.C1FlexGrid;
@@ -16,8 +13,8 @@ namespace Volian.Controls.Library
public event BorderSelectionPanelEvent BordersChanged;
private void OnBordersChanged(object sender, EventArgs args)
{
if (BordersChanged != null) BordersChanged(sender, args);
}
BordersChanged?.Invoke(sender, args);
}
#endregion
#region Properties
private bool _HasRows = true;
@@ -155,8 +152,6 @@ namespace Volian.Controls.Library
}
public void InitializeBorder(VlnFlexGrid myFlexGrid, CellRange myRange)
{
//if (myRange.r1 == 0 && myRange.c1 == 0 && myRange.r2 == 2 && myRange.c2 == 2)
//Console.WriteLine("here");
_TopBorder = GridLinePattern.Unknown;
_InsideHorizontalBorder = GridLinePattern.Unknown;
_BottomBorder = GridLinePattern.Unknown;
@@ -249,18 +244,11 @@ namespace Volian.Controls.Library
DrawBackground(e, x1, y1, x2, y2, w1, h1, w2, h2, offset, HasRows, HasColumns);
DrawBorder(e, x1, y1, x2, y2);
}
private static void DrawBackground(PaintEventArgs e, int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int offset,bool hasRows, bool hasColumns)
{
#pragma warning disable IDE0060 // Remove unused parameter
private static void DrawBackground(PaintEventArgs e, int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int offset,bool hasRows, bool hasColumns)
#pragma warning restore IDE0060 // Remove unused parameter
{
e.Graphics.FillRectangle(Brushes.White, offset, offset, w2 - 2* offset, h2 - 2* offset);
// Old Backgound - Shows corners
//e.Graphics.DrawLine(Pens.LightBlue, x1, offset, x1, y1);
//e.Graphics.DrawLine(Pens.LightBlue, x2, offset, x2, y1);
//e.Graphics.DrawLine(Pens.LightBlue, x1, y2, x1, h2 - offset);
//e.Graphics.DrawLine(Pens.LightBlue, x2, y2, x2, h2 - offset);
//e.Graphics.DrawLine(Pens.LightBlue, offset, y1, x1, y1);
//e.Graphics.DrawLine(Pens.LightBlue, x2, y1, w2 - offset, y1);
//e.Graphics.DrawLine(Pens.LightBlue, offset, y2, x1, y2);
//e.Graphics.DrawLine(Pens.LightBlue, x2, y2, w2 - offset, y2);
// Horizontal Lines
e.Graphics.DrawLine(Pens.LightBlue, offset, y1, w2 - offset, y1);
if (hasRows) e.Graphics.DrawLine(Pens.LightBlue, x1 + offset, (y1 + y2) / 2, x2 - offset , (y1 + y2) / 2);
@@ -287,8 +275,8 @@ namespace Volian.Controls.Library
if (LineWidth(linePattern) == 3)
{
dxo2 = dxo1 = -1;
dyi2 = dyo1 = LineWidth(startPattern) == 3 ? -1 : 0;
dyi1 =dyo2 = LineWidth(endPattern) == 3 ? 1 : 0;
dyo1 = LineWidth(startPattern) == 3 ? -1 : 0;
dyo2 = LineWidth(endPattern) == 3 ? 1 : 0;
dxi1 = -dxo1; dxi2 = -dxo2; dyi1 = -dyo1; dyi2 = -dyo2;
if (linePattern == GridLinePattern.Thick) dyo2++; // Fix for bug in Graphics. Seems to happen when line is thick.
}
@@ -303,8 +291,8 @@ namespace Volian.Controls.Library
if (LineWidth(linePattern) == 3)
{
dyo2 = dyo1 = 1;
dxi2 = dxo1 = LineWidth(startPattern) == 3 ? -1 : 0;
dxi1 = dxo2 = LineWidth(endPattern) == 3 ? 1 : 0;
dxo1 = LineWidth(startPattern) == 3 ? -1 : 0;
dxo2 = LineWidth(endPattern) == 3 ? 1 : 0;
dxi1 = -dxo1;dxi2 = -dxo2;dyi1 = -dyo1;dyi2 = -dyo2;
if (linePattern == GridLinePattern.Thick) dxo2++; // Fix for bug in Graphics. Seems to happen when line is thick.
}
@@ -347,7 +335,7 @@ namespace Volian.Controls.Library
{
if (linePattern == GridLinePattern.None) return;
int dyi1 = 0; int dyi2 = 0; int dxi1 = 0; int dxi2 = 0;
int dyo1 = 0; int dyo2 = 0; int dxo1 = 0; int dxo2 = 0;
int dyo1; int dyo2; int dxo1 = 0; int dxo2 = 0;
if (LineWidth(linePattern) == 3)
{
dxo2 = dxo1 = 1;
@@ -368,7 +356,7 @@ namespace Volian.Controls.Library
{
if (linePattern == GridLinePattern.None) return;
int dyi1 = 0; int dyi2 = 0; int dxi1 = 0; int dxi2 = 0;
int dyo1 = 0; int dyo2 = 0; int dxo1 = 0; int dxo2 = 0;
int dyo1 = 0; int dyo2 = 0; int dxo1; int dxo2;
if (LineWidth(linePattern) == 3)
{
dyo2 = dyo1 = -1;