From 3fa6184341d3f0687b91d6697af18522e6d9a31a Mon Sep 17 00:00:00 2001 From: Koquem T Date: Tue, 15 Apr 2025 09:48:47 +0800 Subject: [PATCH 1/3] test --- MainWindow.xaml | 153 ++++++++++++++++++++++++++++----------------- MainWindow.xaml.cs | 55 +++++++--------- 2 files changed, 117 insertions(+), 91 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index df9dfed..bcccf7a 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -7,62 +7,99 @@ xmlns:local="clr-namespace:RDTKEditor" mc:Ignorable="d" Title="RDTK Editor" Height="450" Width="800"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index f173f26..f9d166e 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -19,10 +19,11 @@ namespace RDTKEditor { private SKSizeI _vsScale = new(1600,900); private readonly RDTKView viewModel = new(); - public MainWindow() + /*public MainWindow() { InitializeComponent(); - } + SlV.Content = "Button"; + }*/ private void OpenFile(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new() @@ -55,33 +56,6 @@ namespace RDTKEditor { OnUpdateEventProperties(GetProperties(new MoveRow())); - //OnUpdateEventProperties([ - // new(){ - // Verifier = new RDTKPropertyVerifierDefault(), - // Name = "Name", - // Value = "RDTK Editor", - // Type = RDPropertyType.String, - // }, - // new(){ - // Verifier = new RDTKPropertyVerifierDefault(), - // Name = "Version", - // Value = "1.0.0", - // Type = RDPropertyType.String, - // }, - // new(){ - // Verifier = new RDTKPropertyVerifierEnum(typeof(EventType)), - // Name = "Description", - // Value = "RDTK Editor 是一个简单的节奏医生关卡编辑器。", - // Type = RDPropertyType.Enum, - // }, - // new(){ - // Verifier = new RDTKPropertyVerifierBool(), - // Name = "测试值", - // Value = "true", - // Type = RDPropertyType.Bool, - // } - // ]); - //MessageBox.Show("RDTK Editor 是一个简单的节奏医生关卡编辑器。", "关于 RDTK Editor"); } private RDTKProperty[] GetProperties(BaseEvent e) { @@ -253,13 +227,16 @@ namespace RDTKEditor }); }*/ - private void mainUI_PaintSurface(object sender, SKPaintSurfaceEventArgs e) + + + + private void mainUI_PaintSurface(object sender, SKPaintSurfaceEventArgs e) { var sfc = e.Surface; var cvs = sfc.Canvas; var info = e.Info; cvs.Clear(SKColors.Black); - SKPoint scale = new(info.Width / _vsScale.Width, info.Height / _vsScale.Height); + SKPoint scale = new((float)info.Width / _vsScale.Width, (float)info.Height / _vsScale.Height); cvs.Save(); cvs.Scale(scale); Draw(cvs); @@ -282,9 +259,21 @@ namespace RDTKEditor IsStroke = true, }); } - } - public class MainViewModel : INotifyPropertyChanged + + private void CheckBox_Checked(object sender, RoutedEventArgs e) + { + MessageBox.Show("已确认"); + } + } + + + + public class MainViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; } + + + + } \ No newline at end of file From 6cb66cde364796277d303144f51f7b6a8593df3e Mon Sep 17 00:00:00 2001 From: Koquem T Date: Thu, 24 Apr 2025 21:05:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E8=BE=93=E5=87=BAbeat=E5=B7=A6=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIAssistant/Model.cs | 4 +-- MainWindow.xaml | 23 +++++++++++++---- MainWindow.xaml.cs | 61 +++++++++++++++++++++++++++++++++----------- Models/RDTKView.cs | 2 +- 4 files changed, 67 insertions(+), 23 deletions(-) diff --git a/AIAssistant/Model.cs b/AIAssistant/Model.cs index d1d9ca1..65bef72 100644 --- a/AIAssistant/Model.cs +++ b/AIAssistant/Model.cs @@ -12,10 +12,10 @@ namespace RDTKEditor.AIAssistant { public class Assistant { - public const string Deepseek = "deepseek-r1:8b"; + public const string Deepseek = "deepseek-r1:14b"; public const string Smollm = "smollm2:135m"; public const string Qwen_0_5 = "qwen2.5-coder:0.5b"; - public const string Qwen_3 = "qwen2.5-coder:3b"; + public const string Qwen_3 = "qwen2.5-coder:7b"; public OllamaApiClient Ollama { get; } = new(baseUri: new Uri("http://127.0.0.1:11434/api")); public Chat Chat { get; } public Assistant(string modelName) diff --git a/MainWindow.xaml b/MainWindow.xaml index 6cbc7ed..5d0df3a 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -15,6 +15,7 @@ + @@ -42,7 +43,7 @@ - + @@ -60,7 +61,7 @@ -