Files
Ramitta-lib/template/MainWindow.xaml.cs

104 lines
2.7 KiB
C#
Raw Normal View History

2025-09-12 18:34:33 +08:00
using Neo4j.Driver;
using Newtonsoft.Json;
2025-09-03 16:16:00 +08:00
using Newtonsoft.Json.Linq;
2025-09-12 18:34:33 +08:00
using NPOI.SS.Formula.Functions;
2025-08-30 21:14:02 +08:00
using Ramitta;
2025-09-12 18:34:33 +08:00
using Ramitta.lib;
using System.Collections.Generic;
2025-08-30 21:14:02 +08:00
using System.Data.Common;
2025-09-12 18:34:33 +08:00
using System.Data.SQLite;
2025-08-29 14:57:55 +08:00
using System.Diagnostics;
2025-09-03 16:16:00 +08:00
using System.IO;
2025-09-12 18:34:33 +08:00
using System.Linq;
using System.Security.Cryptography;
using System.Security.Policy;
2025-08-29 14:57:55 +08:00
using System.Text;
2025-09-12 18:34:33 +08:00
using System.Text.RegularExpressions;
2025-08-29 14:57:55 +08:00
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
2025-08-30 21:14:02 +08:00
using System.Xml.Linq;
2025-09-12 18:34:33 +08:00
using static Ramitta.Excel;
2025-08-30 21:14:02 +08:00
using static Ramitta.lib.Basic;
2025-09-12 18:34:33 +08:00
using static Ramitta.lib.CryptoHelper;
using static Ramitta.SQLite;
2025-08-30 21:14:02 +08:00
using static Ramitta.winDataGrid;
2025-08-29 14:57:55 +08:00
namespace template
{
public partial class MainWindow : Window
{
static string? filePath;
#region MainWindow
public MainWindow(StartupEventArgs e)
{
Startupe = ParseCommandLineArgs(e.Args);
InitializeComponent();
if (Startupe.TryGetValue("getfile", out string filePath))
{
MainWindow.filePath = filePath;
DebugBar(Debugtag, $"操作目标:{filePath}", 绿);
}
else
{
DebugBar(Debugtag, $"未指定操作目标", );
}
2025-08-30 21:14:02 +08:00
2025-08-29 14:57:55 +08:00
}
#endregion
2025-09-12 18:34:33 +08:00
private async void (object sender, RoutedEventArgs e)
2025-08-29 14:57:55 +08:00
{
2025-09-12 18:34:33 +08:00
();
2025-08-29 14:57:55 +08:00
}
2025-09-12 18:34:33 +08:00
private async void (object sender, RoutedEventArgs e)
2025-08-29 14:57:55 +08:00
{
2025-09-12 18:34:33 +08:00
();
2025-08-29 14:57:55 +08:00
}
2025-09-12 18:34:33 +08:00
private async void (object? sender = null, RoutedEventArgs? e=null)
2025-08-29 14:57:55 +08:00
{
}
2025-09-12 18:34:33 +08:00
private async void (object sender, RoutedEventArgs e)
2025-08-29 14:57:55 +08:00
{
2025-09-12 18:34:33 +08:00
var properties = new Dictionary<string, string>
{
{ "文件夹", "承重柱" }
2025-08-29 14:57:55 +08:00
2025-09-12 18:34:33 +08:00
};
2025-08-29 14:57:55 +08:00
2025-09-12 18:34:33 +08:00
var newmore = await neo4jService.GetRelatedNodesAsync("文件", properties);
Debug.WriteLine("=== ☆ ===");
HashSet<string> = new HashSet<string>();
foreach (var nodeDict in newmore)
2025-09-03 16:16:00 +08:00
{
2025-09-12 18:34:33 +08:00
if (nodeDict.ContainsKey("型号") && !string.IsNullOrEmpty(nodeDict["型号"]))
2025-09-03 16:16:00 +08:00
{
2025-09-12 18:34:33 +08:00
.Add(nodeDict["型号"]);
2025-09-03 16:16:00 +08:00
}
}
2025-09-12 18:34:33 +08:00
// 输出结果
Debug.WriteLine($"不重复的型号数量: {北平.Count}");
foreach (var in )
2025-09-03 16:16:00 +08:00
{
2025-09-12 18:34:33 +08:00
Debug.WriteLine($"型号: {型号}");
2025-09-03 16:16:00 +08:00
}
2025-09-12 18:34:33 +08:00
}
}
2025-08-29 14:57:55 +08:00
}