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 1e39e52..5d0df3a 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -7,69 +7,111 @@
xmlns:local="clr-namespace:RDTKEditor"
mc:Ignorable="d"
Title="RDTK Editor" Height="450" Width="800">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 传给 AI 的文本
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AI问答
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 3fc9987..f49b01c 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -2,6 +2,7 @@
using Ollama;
using RDTKEditor.AIAssistant;
using RDTKEditor.Models;
+using RhythmBase.Components;
using RhythmBase.Events;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
@@ -9,6 +10,7 @@ using System.ComponentModel;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Media;
using System.Windows.Shapes;
namespace RDTKEditor
@@ -24,7 +26,30 @@ namespace RDTKEditor
public MainWindow()
{
InitializeComponent();
- }
+ viewModel.Level = RDLevel.Default;
+
+ viewModel.Level.Add(new Comment() { Beat = new RDBeat(1,2.33f) });
+ viewModel.Level.Add(new Comment() { Beat = new RDBeat(1,4f),Y=1 });
+ foreach (var item in viewModel.Level)
+ {
+ var time = item.Beat.BeatOnly;
+ Label label = new();
+ label.Content = time;
+ label.Background = new SolidColorBrush(Colors.Red);
+ if (time ==1)
+ {
+ label.Margin = new Thickness(0, 0, 0, 0);
+ }else
+ {
+ label.Margin = new Thickness(time*10, item.Y*30, 0, 0);
+ }
+ timelineCanvas.Children.Add(label);
+ }
+
+
+ }
+
+
private void OpenFile(object sender, RoutedEventArgs e)
{
OpenFileDialog openFileDialog = new()
@@ -57,33 +82,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)
{
@@ -135,7 +133,8 @@ namespace RDTKEditor
Type = RDPropertyType.String,
};
}
- internal void OnUpdateEventProperties(RDTKProperty[] properties)
+ private readonly List selectedEvents = new();
+ internal void OnUpdateEventProperties(RDTKProperty[] properties)
{
ItemProperties.Items.Clear();
foreach (var property in properties)
@@ -255,13 +254,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);
@@ -284,7 +286,11 @@ namespace RDTKEditor
IsStroke = true,
});
}
-
+ private void CheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("已确认");
+ }
+
private async void AIAssistantButton_Click(object sender, RoutedEventArgs e)
{
string input = AIAssistantText.Text;
@@ -294,8 +300,25 @@ namespace RDTKEditor
AIAssistantText.Text = responce.Content;
}
}
- public class MainViewModel : INotifyPropertyChanged
+
+
+ public class MainViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
- }
+ private bool _isButtonEnabled = true;
+ public bool IsButtonEnabled
+ {
+ get => _isButtonEnabled;
+ set
+ {
+ _isButtonEnabled = value;
+
+ }
+ }
+
+ }
+
+
+
+
}
\ No newline at end of file
diff --git a/Models/RDTKView.cs b/Models/RDTKView.cs
index e4bdd38..6898146 100644
--- a/Models/RDTKView.cs
+++ b/Models/RDTKView.cs
@@ -91,7 +91,7 @@ namespace RDTKEditor.Models
internal class RDTKView
{
- private RDLevel? Level { get; set; }
+ public RDLevel? Level { get; set; }
public RDTKView()
{
}