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