表格基本接口完成

This commit is contained in:
2025-09-01 17:12:06 +08:00
parent 6ccc323bb2
commit 29e6225cdc
251 changed files with 1671 additions and 92 deletions

Binary file not shown.

View File

@@ -30,7 +30,7 @@
"RelativeDocumentMoniker": "..\\Ramitta\\winDataGrid.xaml.cs",
"ToolTip": "D:\\Workspace\\GitHub\\Ramitta-lib\\Ramitta\\winDataGrid.xaml.cs",
"RelativeToolTip": "..\\Ramitta\\winDataGrid.xaml.cs",
"ViewState": "AgIAAEoAAAAAAAAAAAAuwFoAAAA7AAAAAAAAAA==",
"ViewState": "AgIAAGcAAAAAAAAAAAAqwIEAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-29T12:57:42.787Z",
"EditorCaption": ""
@@ -60,7 +60,7 @@
"RelativeDocumentMoniker": "MainWindow.xaml.cs",
"ToolTip": "D:\\Workspace\\GitHub\\Ramitta-lib\\template\\MainWindow.xaml.cs",
"RelativeToolTip": "MainWindow.xaml.cs",
"ViewState": "AgIAAC8AAAAAAAAAAAAIwEIAAAAeAAAAAAAAAA==",
"ViewState": "AgIAABwAAAAAAAAAAAAowD4AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-29T06:36:22.146Z",
"EditorCaption": ""

View File

@@ -2,13 +2,13 @@
"Version": 1,
"WorkspaceRootPath": "D:\\Workspace\\GitHub\\Ramitta-lib\\template\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{D86D89BB-0421-ADF4-BBEB-10F5D8B4A8A8}|..\\Ramitta\\Ramitta.csproj|d:\\workspace\\github\\ramitta-lib\\ramitta\\windatagrid.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{25FBE58B-AD1C-41A7-92E1-BCB606D5F517}|template.csproj|d:\\workspace\\github\\ramitta-lib\\template\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{25FBE58B-AD1C-41A7-92E1-BCB606D5F517}|template.csproj|solutionrelative:mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{D86D89BB-0421-ADF4-BBEB-10F5D8B4A8A8}|..\\Ramitta\\Ramitta.csproj|d:\\workspace\\github\\ramitta-lib\\ramitta\\windatagrid.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{D86D89BB-0421-ADF4-BBEB-10F5D8B4A8A8}|..\\Ramitta\\Ramitta.csproj|d:\\workspace\\github\\ramitta-lib\\ramitta\\windatagrid.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
}
@@ -24,13 +24,13 @@
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 1,
"Title": "winDataGrid.xaml.cs",
"DocumentMoniker": "D:\\Workspace\\GitHub\\Ramitta-lib\\Ramitta\\winDataGrid.xaml.cs",
"RelativeDocumentMoniker": "..\\Ramitta\\winDataGrid.xaml.cs",
"ToolTip": "D:\\Workspace\\GitHub\\Ramitta-lib\\Ramitta\\winDataGrid.xaml.cs",
"RelativeToolTip": "..\\Ramitta\\winDataGrid.xaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAASAAAAAAAAAA==",
"ViewState": "AgIAAGcAAAAAAAAAAAAqwIEAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-29T12:57:42.787Z",
"EditorCaption": ""
@@ -54,13 +54,13 @@
"Children": [
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 0,
"Title": "MainWindow.xaml.cs",
"DocumentMoniker": "D:\\Workspace\\GitHub\\Ramitta-lib\\template\\MainWindow.xaml.cs",
"RelativeDocumentMoniker": "MainWindow.xaml.cs",
"ToolTip": "D:\\Workspace\\GitHub\\Ramitta-lib\\template\\MainWindow.xaml.cs",
"RelativeToolTip": "MainWindow.xaml.cs",
"ViewState": "AgIAADAAAAAAAAAAAAAcwFQAAAAIAAAAAAAAAA==",
"ViewState": "AgIAABwAAAAAAAAAAAA7wDoAAAAMAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-08-29T06:36:22.146Z",
"EditorCaption": ""

View File

@@ -40,47 +40,26 @@ namespace template
DebugBar(Debugtag, $"未指定操作目标", );
}
xDataGrid.AddColumn("标题", ColumnType.Label);
xDataGrid.AddColumn("判断", ColumnType.CheckBox);
xDataGrid.AddColumn("康波", ColumnType.ComboBox);
xDataGrid.InitColumns(
("标题", ColumnType.Label),
("判断", ColumnType.CheckBox),
("康波", ColumnType.ComboBox)
);
xDataGrid.Rows.Add(
new Dictionary<string, Dictionary<string, object>?> {
{
"标题", new Dictionary<string, object> {
{ "Content", "你妈妈" }
}
},
{
"判断", new Dictionary<string, object> {
{ "IsChecked", true }
}
},
{
"康波", new Dictionary<string, object> {
{ "ItemsSource", new List<string>{"你妈","日你"} },
{ "SelectedValue","日你"}
}
}
});
(xDataGrid.AddRow()["标题"] as Label).Content = "1";
(xDataGrid.AddRow()["标题"] as Label).Content = "2";
(xDataGrid.AddRow()["标题"] as Label).Content = "3";
xDataGrid.AddRow()["标题"]["Content"] = "2";
xDataGrid.AddRow()["标题"]["Content"] = "3";
// 修改按钮文本
// 查找Content为"删除"的第一行
/*
var targetRow = xDataGrid.Rows.FirstOrDefault(row =>
row.ContainsKey("Content") && row["Content"]?.ToString() == "他妈");
if (targetRow != null)
{
targetRow["IsChecked"] = true;
targetRow["SelectedValue"] = "新值";
}
*/
var targetRow = xDataGrid.Rows
.FirstOrDefault(row => (row["标题"] as Label)?.Content.ToString() == "2");
(targetRow["判断"] as CheckBox).IsChecked= true;
}
#endregion
@@ -148,7 +127,7 @@ namespace template
private void (object sender, RoutedEventArgs e)
{
xDataGrid.Rows.Clear();
}
private void (object sender, RoutedEventArgs e)

View File

@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("template")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+624125ec7bc047b18fa8ff88e2c9642011f8b503")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ccc323bb25fcf34a3b9f41375feadd4945d8b52")]
[assembly: System.Reflection.AssemblyProductAttribute("template")]
[assembly: System.Reflection.AssemblyTitleAttribute("template")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
9316ac5cee352d57308074ce86b009892663d4f20a1fccdac33e40ff85774d86
ffb5b8e98e38a761592a7fcc9649544a6c099b7f7d2cfee068e291579a53214a

View File

@@ -1 +1 @@
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/624125ec7bc047b18fa8ff88e2c9642011f8b503/*"}}
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/6ccc323bb25fcf34a3b9f41375feadd4945d8b52/*"}}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("template")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ccc323bb25fcf34a3b9f41375feadd4945d8b52")]
[assembly: System.Reflection.AssemblyProductAttribute("template")]
[assembly: System.Reflection.AssemblyTitleAttribute("template")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
ffb5b8e98e38a761592a7fcc9649544a6c099b7f7d2cfee068e291579a53214a

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = template
build_property.ProjectDir = D:\Workspace\GitHub\Ramitta-lib\template\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/6ccc323bb25fcf34a3b9f41375feadd4945d8b52/*"}}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("template")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ccc323bb25fcf34a3b9f41375feadd4945d8b52")]
[assembly: System.Reflection.AssemblyProductAttribute("template")]
[assembly: System.Reflection.AssemblyTitleAttribute("template")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
ffb5b8e98e38a761592a7fcc9649544a6c099b7f7d2cfee068e291579a53214a

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = template
build_property.ProjectDir = D:\Workspace\GitHub\Ramitta-lib\template\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/6ccc323bb25fcf34a3b9f41375feadd4945d8b52/*"}}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("template")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ccc323bb25fcf34a3b9f41375feadd4945d8b52")]
[assembly: System.Reflection.AssemblyProductAttribute("template")]
[assembly: System.Reflection.AssemblyTitleAttribute("template")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
ffb5b8e98e38a761592a7fcc9649544a6c099b7f7d2cfee068e291579a53214a

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = template
build_property.ProjectDir = D:\Workspace\GitHub\Ramitta-lib\template\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/6ccc323bb25fcf34a3b9f41375feadd4945d8b52/*"}}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("template")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ccc323bb25fcf34a3b9f41375feadd4945d8b52")]
[assembly: System.Reflection.AssemblyProductAttribute("template")]
[assembly: System.Reflection.AssemblyTitleAttribute("template")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
ffb5b8e98e38a761592a7fcc9649544a6c099b7f7d2cfee068e291579a53214a

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = template
build_property.ProjectDir = D:\Workspace\GitHub\Ramitta-lib\template\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
{"documents":{"D:\\Workspace\\GitHub\\Ramitta-lib\\*":"https://raw.githubusercontent.com/XerolySkinner/Ramitta-lib/6ccc323bb25fcf34a3b9f41375feadd4945d8b52/*"}}