chore: import upstream snapshot with attribution
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:03:19 +08:00
commit 91e75e620b
3227 changed files with 1307078 additions and 0 deletions
@@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
// "Meridian CRM — Account Record" : WinForms node (classic Win32 controls,
// MSAA/UIA). Explicit fractional layout (dense, no gaps beyond borders).
// cua-driver drives the Account Name field + the "Add Record" button.
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var f = new Form { Text = "Meridian CRM — Account Record [WinForms]", ClientSize = new Size(960, 600),
StartPosition = FormStartPosition.Manual, Font = new Font("Segoe UI", 9f), BackColor = Color.FromArgb(240,240,240) };
Label band(string t, Color bg, ContentAlignment a = ContentAlignment.MiddleLeft, FontStyle fs = FontStyle.Regular)
=> new Label { Text = t, BackColor = bg, TextAlign = a, Font = new Font("Segoe UI", 9f, fs) };
var menu = band(" File Edit View Record Tools Help", Color.FromArgb(247,247,247));
var tool = band(" New Open Save Delete │ ◀ Prev Next ▶ │ Find", Color.FromArgb(235,235,235));
var nameLbl = band(" Account Name", Color.FromArgb(240,240,240));
var typeLbl = band(" Account Type", Color.FromArgb(240,240,240));
var regionLbl = band(" Region", Color.FromArgb(240,240,240));
var prioLbl = band(" Priority (1-5)", Color.FromArgb(240,240,240));
var creditLbl = band(" Credit Limit", Color.FromArgb(240,240,240));
var nameBox = new TextBox { BorderStyle = BorderStyle.FixedSingle };
var typeCmb = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList, FlatStyle = FlatStyle.Flat };
typeCmb.Items.AddRange(new object[] { "Enterprise", "SMB", "Government", "Reseller" }); typeCmb.SelectedIndex = 0;
var regionCmb = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList, FlatStyle = FlatStyle.Flat };
regionCmb.Items.AddRange(new object[] { "North", "South", "EMEA", "APAC", "LATAM" }); regionCmb.SelectedIndex = 0;
var prio = new TrackBar { Minimum = 1, Maximum = 5, Value = 3, TickStyle = TickStyle.BottomRight };
var credit = new TrackBar { Minimum = 0, Maximum = 100, Value = 40, TickFrequency = 10, TickStyle = TickStyle.BottomRight };
var saveBtn = new Button { Text = "Add Record", FlatStyle = FlatStyle.System, Font = new Font("Segoe UI", 10f, FontStyle.Bold) };
var sigHdr = band(" Signature / Notes", Color.FromArgb(225,225,225), ContentAlignment.MiddleLeft, FontStyle.Bold);
var sig = new Panel { BackColor = Color.White, BorderStyle = BorderStyle.FixedSingle };
var grid = new DataGridView { AllowUserToAddRows = false, ReadOnly = true, BackgroundColor = Color.White,
BorderStyle = BorderStyle.FixedSingle, RowHeadersVisible = false, AllowUserToResizeRows = false,
ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing };
grid.Columns.Add("acct", "Account"); grid.Columns.Add("type", "Type"); grid.Columns.Add("region", "Region");
grid.Columns.Add("pri", "Pri"); grid.Columns.Add("credit", "Credit");
grid.Columns["acct"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
var status = band(" Ready", Color.FromArgb(232,232,232));
var recLbl = band("Records: 0 USER: SYSTEM ▌ CONNECTED ", Color.FromArgb(232,232,232), ContentAlignment.MiddleRight);
// line tool: one straight segment per press-drag-release (down→up)
var segs = new List<(Point a, Point b)>(); Point? down = null; Point cur = Point.Empty;
sig.MouseDown += (s, e) => { down = e.Location; cur = e.Location; };
sig.MouseMove += (s, e) => { if (down != null) { cur = e.Location; sig.Invalidate(); } };
sig.MouseUp += (s, e) => { if (down != null) { segs.Add((down.Value, e.Location)); down = null; sig.Invalidate(); } };
sig.Paint += (s, e) => { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
using var p = new Pen(Color.MidnightBlue, 2); foreach (var sg in segs) e.Graphics.DrawLine(p, sg.a, sg.b);
if (down != null) { using var pp = new Pen(Color.FromArgb(110, 25, 25, 112), 1); e.Graphics.DrawLine(pp, down.Value, cur); } };
int records = 0;
saveBtn.Click += (s, e) =>
{
string nm = nameBox.Text.Trim(); if (nm.Length == 0) nm = "(unnamed)";
grid.Rows.Add(nm, typeCmb.Text, regionCmb.Text, prio.Value, "$" + (credit.Value * 1000));
if (grid.Rows.Count > 0) grid.FirstDisplayedScrollingRowIndex = grid.Rows.Count - 1;
records++; status.Text = $" Saved account '{nm}'."; recLbl.Text = $"Records: {records} USER: SYSTEM ▌ CONNECTED ";
nameBox.Clear();
};
foreach (Control c in new Control[] { menu, tool, nameLbl, typeLbl, regionLbl, prioLbl, creditLbl,
nameBox, typeCmb, regionCmb, prio, credit, saveBtn, sigHdr, sig, grid, status, recLbl })
f.Controls.Add(c);
void Layout()
{
int W = f.ClientSize.Width, H = f.ClientSize.Height;
int X(double a) => (int)(W * a); int Y(double a) => (int)(H * a);
Rectangle R(double x0, double y0, double x1, double y1) => Rectangle.FromLTRB(X(x0), Y(y0), X(x1), Y(y1));
menu.Bounds = R(0, 0, 1, 0.045);
tool.Bounds = R(0, 0.045, 1, 0.095);
double lc = 0.13; // label/control split
nameLbl.Bounds = R(0, 0.105, lc, 0.16); nameBox.Bounds = R(lc, 0.105, 0.42, 0.16);
typeLbl.Bounds = R(0, 0.165, lc, 0.22); typeCmb.Bounds = R(lc, 0.167, 0.42, 0.22);
regionLbl.Bounds = R(0, 0.225, lc, 0.28); regionCmb.Bounds = R(lc, 0.227, 0.42, 0.28);
prioLbl.Bounds = R(0, 0.285, lc, 0.345); prio.Bounds = R(lc, 0.285, 0.42, 0.345);
creditLbl.Bounds = R(0, 0.35, lc, 0.41); credit.Bounds = R(lc, 0.35, 0.42, 0.41);
saveBtn.Bounds = R(0.04, 0.45, 0.40, 0.52);
sigHdr.Bounds = R(0.42, 0.095, 1, 0.135);
sig.Bounds = R(0.42, 0.135, 0.995, 0.42);
grid.Bounds = R(0.005, 0.55, 0.995, 0.93);
status.Bounds = R(0, 0.94, 0.5, 1);
recLbl.Bounds = R(0.5, 0.94, 1, 1);
float gfs = Math.Max(8, H / 70f);
grid.Font = new Font("Segoe UI", gfs);
grid.ColumnHeadersDefaultCellStyle.Font = new Font("Segoe UI", gfs, FontStyle.Bold);
}
f.Load += (s, e) => Layout();
f.Resize += (s, e) => Layout();
Application.Run(f);
}
}
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<AssemblyName>winforms-legacy</AssemblyName>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
</PropertyGroup>
</Project>
@@ -0,0 +1,131 @@
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Shapes;
// "Meridian CRM — Account Record" : WPF node (XAML / UIA). Real Slider /
// ComboBox / InkCanvas (doodle) / DataGrid (spreadsheet). Account Name TextBox
// + SAVE button are what cua-driver drives.
class Program
{
public class RowVM
{
public string Account { get; set; } public string Type { get; set; }
public string Region { get; set; } public int Pri { get; set; } public string Credit { get; set; }
}
[STAThread]
static void Main()
{
var app = new Application();
var rows = new ObservableCollection<RowVM>();
var gray = new SolidColorBrush(Color.FromRgb(0xE0, 0xE0, 0xE0));
// menu
var menu = new Menu();
foreach (var m in new[] { "File", "Edit", "View", "Record", "Tools", "Help" })
menu.Items.Add(new MenuItem { Header = m });
// toolbar
var tray = new ToolBarTray();
var tb = new ToolBar();
foreach (var t in new[] { "New", "Open", "Save", "Delete", "|", "◀ Prev", "Next ▶", "|", "Find" })
tb.Items.Add(t == "|" ? (object)new Separator() : new Button { Content = t, Padding = new Thickness(6, 1, 6, 1) });
tray.ToolBars.Add(tb);
// ── left form (dense grid; cell borders only) ───────────────────────
var form = new Grid { Background = Brushes.White };
form.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(120) });
form.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
TextBlock lbl(string t) => new TextBlock { Text = " " + t, VerticalAlignment = VerticalAlignment.Center, Background = new SolidColorBrush(Color.FromRgb(0xF0, 0xF0, 0xF0)) };
int r = 0;
void AddRow(string label, FrameworkElement c, double h = 30)
{
form.RowDefinitions.Add(new RowDefinition { Height = new GridLength(h) });
var b1 = new Border { BorderBrush = gray, BorderThickness = new Thickness(0, 0, 1, 1), Child = lbl(label) };
Grid.SetRow(b1, r); Grid.SetColumn(b1, 0); form.Children.Add(b1);
var b2 = new Border { BorderBrush = gray, BorderThickness = new Thickness(0, 0, 0, 1), Child = c };
Grid.SetRow(b2, r); Grid.SetColumn(b2, 1); form.Children.Add(b2);
r++;
}
var nameBox = new TextBox { BorderThickness = new Thickness(0), VerticalContentAlignment = VerticalAlignment.Center };
var typeCmb = new ComboBox { BorderThickness = new Thickness(0) };
foreach (var s in new[] { "Enterprise", "SMB", "Government", "Reseller" }) typeCmb.Items.Add(s); typeCmb.SelectedIndex = 0;
var regionCmb = new ComboBox { BorderThickness = new Thickness(0) };
foreach (var s in new[] { "North", "South", "EMEA", "APAC", "LATAM" }) regionCmb.Items.Add(s); regionCmb.SelectedIndex = 0;
var priority = new Slider { Minimum = 1, Maximum = 5, Value = 3, TickFrequency = 1, IsSnapToTickEnabled = true, TickPlacement = TickPlacement.BottomRight, VerticalAlignment = VerticalAlignment.Center };
var credit = new Slider { Minimum = 0, Maximum = 100, Value = 40, TickFrequency = 10, TickPlacement = TickPlacement.BottomRight, VerticalAlignment = VerticalAlignment.Center };
AddRow("Account Name", nameBox);
AddRow("Account Type", typeCmb);
AddRow("Region", regionCmb);
AddRow("Priority (1-5)", priority);
AddRow("Credit Limit", credit);
var saveBtn = new Button { Content = "Add Record", FontWeight = FontWeights.Bold };
form.RowDefinitions.Add(new RowDefinition { Height = new GridLength(40) });
Grid.SetRow(saveBtn, r); Grid.SetColumn(saveBtn, 0); Grid.SetColumnSpan(saveBtn, 2); form.Children.Add(saveBtn);
// ── right top: line-tool sketch (one straight segment per drag) ─────
var ink = new Canvas { Background = Brushes.White, ClipToBounds = true };
Point? dn = null; Line preview = null;
ink.MouseLeftButtonDown += (s, e) => { dn = e.GetPosition(ink); };
ink.MouseMove += (s, e) => { if (dn != null) { var p = e.GetPosition(ink);
if (preview == null) { preview = new Line { Stroke = Brushes.MidnightBlue, StrokeThickness = 1, Opacity = 0.45 }; ink.Children.Add(preview); }
preview.X1 = dn.Value.X; preview.Y1 = dn.Value.Y; preview.X2 = p.X; preview.Y2 = p.Y; } };
ink.MouseLeftButtonUp += (s, e) => { if (dn != null) { var p = e.GetPosition(ink);
ink.Children.Add(new Line { Stroke = Brushes.MidnightBlue, StrokeThickness = 2, X1 = dn.Value.X, Y1 = dn.Value.Y, X2 = p.X, Y2 = p.Y });
if (preview != null) { ink.Children.Remove(preview); preview = null; }
dn = null; } };
var sigHdr = new TextBlock { Text = " Signature / Notes", FontWeight = FontWeights.Bold, Background = new SolidColorBrush(Color.FromRgb(0xE1,0xE1,0xE1)), Padding = new Thickness(2) };
var sigDock = new DockPanel(); DockPanel.SetDock(sigHdr, Dock.Top); sigDock.Children.Add(sigHdr); sigDock.Children.Add(ink);
// ── right bottom: spreadsheet ───────────────────────────────────────
var dg = new DataGrid { AutoGenerateColumns = false, ItemsSource = rows, IsReadOnly = true, GridLinesVisibility = DataGridGridLinesVisibility.All, HeadersVisibility = DataGridHeadersVisibility.Column };
dg.Columns.Add(new DataGridTextColumn { Header = "Account", Binding = new System.Windows.Data.Binding("Account"), Width = new DataGridLength(1, DataGridLengthUnitType.Star) });
dg.Columns.Add(new DataGridTextColumn { Header = "Type", Binding = new System.Windows.Data.Binding("Type") });
dg.Columns.Add(new DataGridTextColumn { Header = "Region", Binding = new System.Windows.Data.Binding("Region") });
dg.Columns.Add(new DataGridTextColumn { Header = "Pri", Binding = new System.Windows.Data.Binding("Pri") });
dg.Columns.Add(new DataGridTextColumn { Header = "Credit", Binding = new System.Windows.Data.Binding("Credit") });
var rightGrid = new Grid();
rightGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(150) });
rightGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(3) });
rightGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
Grid.SetRow(sigDock, 0); rightGrid.Children.Add(sigDock);
var gs2 = new GridSplitter { Height = 3, HorizontalAlignment = HorizontalAlignment.Stretch, Background = gray }; Grid.SetRow(gs2, 1); rightGrid.Children.Add(gs2);
Grid.SetRow(dg, 2); rightGrid.Children.Add(dg);
var main = new Grid();
main.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(380) });
main.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(3) });
main.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
Grid.SetColumn(form, 0); main.Children.Add(form);
var gs1 = new GridSplitter { Width = 3, Background = gray }; Grid.SetColumn(gs1, 1); main.Children.Add(gs1);
Grid.SetColumn(rightGrid, 2); main.Children.Add(rightGrid);
// status bar
var statusBar = new StatusBar();
var statusLbl = new StatusBarItem { Content = "Ready" };
var recLbl = new StatusBarItem { Content = "Records: 0", HorizontalAlignment = HorizontalAlignment.Right };
statusBar.Items.Add(statusLbl);
statusBar.Items.Add(new StatusBarItem { Content = "USER: SYSTEM ▌ CONNECTED", HorizontalAlignment = HorizontalAlignment.Right });
statusBar.Items.Add(recLbl);
int records = 0;
saveBtn.Click += (s, e) =>
{
string nm = (nameBox.Text ?? "").Trim(); if (nm.Length == 0) nm = "(unnamed)";
rows.Add(new RowVM { Account = nm, Type = typeCmb.Text, Region = regionCmb.Text, Pri = (int)priority.Value, Credit = "$" + ((int)credit.Value * 1000) });
records++; recLbl.Content = $"Records: {records}"; statusLbl.Content = $"Saved account '{nm}'.";
nameBox.Text = "";
};
var dock = new DockPanel();
DockPanel.SetDock(menu, Dock.Top); DockPanel.SetDock(tray, Dock.Top); DockPanel.SetDock(statusBar, Dock.Bottom);
dock.Children.Add(menu); dock.Children.Add(tray); dock.Children.Add(statusBar); dock.Children.Add(main);
var win = new Window { Title = "Meridian CRM — Account Record [WPF]", Width = 960, Height = 600, Content = dock, WindowStartupLocation = WindowStartupLocation.Manual };
app.Run(win);
}
}
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<AssemblyName>wpf-legacy</AssemblyName>
<EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition>
</PropertyGroup>
</Project>