Compare commits
2 Commits
ee6a565ce0
...
mvvm
| Author | SHA1 | Date | |
|---|---|---|---|
| 4aaf64eae5 | |||
| eb40906975 |
100
BallanceTasEditor/Utils/TasOperation.cs
Normal file
100
BallanceTasEditor/Utils/TasOperation.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceTasEditor.Utils {
|
||||
|
||||
/// <summary>
|
||||
/// TAS操作接口。所有TAS操作均需要支持此接口。
|
||||
/// </summary>
|
||||
public interface ITasOperation {
|
||||
/// <summary>
|
||||
/// 执行对应的TAS操作。
|
||||
/// </summary>
|
||||
/// <param name="storage">所要操作的TAS存储容器。</param>
|
||||
void Execute(ITasStorage<TasFrame> storage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 可撤销的TAS操作接口,所有可撤销的TAS操作均需支持此接口。
|
||||
/// </summary>
|
||||
public interface ITasRevocableOperation : ITasOperation {
|
||||
/// <summary>
|
||||
/// 撤销对应TAS操作。
|
||||
/// </summary>
|
||||
/// <param name="storage">所要撤销操作的TAS存储容器。</param>
|
||||
void Revoke(ITasStorage<TasFrame> storage);
|
||||
}
|
||||
|
||||
public enum CellKeysOperationKind {
|
||||
Set, Unset, Flip
|
||||
}
|
||||
|
||||
public class CellKeysOperation : ITasRevocableOperation {
|
||||
|
||||
private CellKeysOperationKind m_Kind;
|
||||
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Revoke(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class CellFpsOperation : ITasRevocableOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Revoke(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveFrameOperation : ITasRevocableOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Revoke(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class AddFrameOperation : ITasRevocableOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Revoke(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class InsertFrameOperation : ITasRevocableOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Revoke(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class ClearKeysOperation : ITasOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class UniformFpsOperation : ITasOperation {
|
||||
public void Execute(ITasStorage<TasFrame> storage) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BallanceTasEditor.Views"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="About Ballance TAS Editor" Width="340" Height="480" Icon="/Assets/About.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BallanceTasEditor.Views"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="Add Frame" Height="250" Width="400" Icon="/Assets/AddFrame.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BallanceTasEditor.Views"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="Edit FPS" Height="220" Width="400" Icon="/Assets/SetFps.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BallanceTasEditor.Views"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="Goto..." Height="180" Width="400" Icon="/Assets/Goto.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<MenuItem Header="_Open File" Icon="{StaticResource IconOpenFile}" InputGestureText="Ctrl+O"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="_Save File" Icon="{StaticResource IconSaveFile}" InputGestureText="Ctrl+S"/>
|
||||
<MenuItem Header="Save File As ..." Icon="{StaticResource IconSaveFileAs}"/>
|
||||
<MenuItem Header="Save File as ..." Icon="{StaticResource IconSaveFileAs}"/>
|
||||
<MenuItem Header="Save File then _Run Game" Icon="{StaticResource IconSaveFileThenRunGame}" InputGestureText="B"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="Close File" Icon="{StaticResource IconCloseFile}"/>
|
||||
@ -104,7 +104,7 @@
|
||||
<Rectangle StrokeThickness="4" Stroke="Gray" StrokeDashArray="4 4" Fill="Transparent"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="20">
|
||||
<Image Source="/Assets/OpenFile.ico" Width="24" Height="24" Margin="5" VerticalAlignment="Center"/>
|
||||
<TextBlock Margin="5" Text="Open or Drop a TAS File for Editing" Foreground="Gray" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBlock Margin="5" Text="Create, Open or Drop a TAS File in There for Editing" Foreground="Gray" FontSize="16" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
|
||||
<StatusBar Grid.Row="3">
|
||||
<!-- 这玩意要逆序排列才能达到我想要的需求也是奇葩 -->
|
||||
<StatusBarItem Content="v1.2 stable" DockPanel.Dock="Right" Foreground="Gray" FontStyle="Italic"/>
|
||||
<StatusBarItem Content="v2.0 stable" DockPanel.Dock="Right" Foreground="Gray" FontStyle="Italic"/>
|
||||
<Separator DockPanel.Dock="Right"/>
|
||||
<StatusBarItem Content="$PasteMode" DockPanel.Dock="Right"/>
|
||||
<Separator DockPanel.Dock="Right"/>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
xmlns:vm="clr-namespace:BallanceTasEditor.ViewModels"
|
||||
xmlns:conveter="clr-namespace:BallanceTasEditor.Converters"
|
||||
d:DataContext="{d:DesignInstance vm:NewFileDialog}"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="New File" Height="250" Width="400" Icon="/Assets/NewFile.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BallanceTasEditor.Views"
|
||||
xmlns:styles="clr-namespace:BallanceTasEditor.Styles"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
||||
Title="Editor Preference" Height="450" Width="400" Icon="/Assets/Preference.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
Reference in New Issue
Block a user