Archived
forked from RDTKEditor/RDTKEditor
test
This commit is contained in:
+39
-2
@@ -42,6 +42,41 @@
|
||||
<Border Grid.Column="0" Background="LightBlue">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl x:Name="ItemProperties" Background="LightGray">
|
||||
<ComboBox Width="120" Height="21" BorderBrush="#FFDF4444" Foreground="#FFC65E5E" RenderTransformOrigin="0.5,0.5">
|
||||
<ComboBox.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="-0.383"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</ComboBox.RenderTransform>
|
||||
<ComboBox.Background>
|
||||
<LinearGradientBrush EndPoint="0,1">
|
||||
<GradientStop Color="#FFF0F0F0"/>
|
||||
<GradientStop Color="#FF963333" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</ComboBox.Background>
|
||||
<ComboBoxItem Content="选项 1" />
|
||||
<ComboBoxItem Content="选项 2" />
|
||||
</ComboBox>
|
||||
<Label Content="Label" Height="28" Width="112" RenderTransformOrigin="0.5,0.5">
|
||||
<Label.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="0.017"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Label.RenderTransform>
|
||||
</Label>
|
||||
<ListView Height="65" Width="192" d:ItemsSource="{d:SampleData ItemCount=5}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -59,8 +94,10 @@
|
||||
</Border>
|
||||
<GridSplitter Grid.Row="1" Grid.ColumnSpan="5" Height="5" Background="Gray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
<Border Grid.ColumnSpan="5" Grid.Row="2" Background="LightSalmon">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<Canvas x:Name="timelineCanvas" Background="LightGray" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" x:Name="SlV">
|
||||
<Canvas x:Name="timelineCanvas" Background="LightGray" >
|
||||
<CheckBox Content="CheckBox" Checked="CheckBox_Checked" VerticalAlignment="Top" HorizontalAlignment="Center" VerticalContentAlignment="Bottom" HorizontalContentAlignment="Right" Canvas.Top="10" />
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
+19
-30
@@ -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)
|
||||
{
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("已确认");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class MainViewModel : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user