2 Commits

Author SHA1 Message Date
4aaf64eae5 feat: add tas operation interface 2025-11-19 13:19:07 +08:00
eb40906975 fix: update some words and styles 2025-11-18 22:34:01 +08:00
8 changed files with 109 additions and 9 deletions

View 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();
}
}
}

View File

@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BallanceTasEditor.Views" 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"> Title="About Ballance TAS Editor" Width="340" Height="480" Icon="/Assets/About.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BallanceTasEditor.Views" 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"> Title="Add Frame" Height="250" Width="400" Icon="/Assets/AddFrame.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BallanceTasEditor.Views" 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"> Title="Edit FPS" Height="220" Width="400" Icon="/Assets/SetFps.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BallanceTasEditor.Views" 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"> Title="Goto..." Height="180" Width="400" Icon="/Assets/Goto.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -48,7 +48,7 @@
<MenuItem Header="_Open File" Icon="{StaticResource IconOpenFile}" InputGestureText="Ctrl+O"/> <MenuItem Header="_Open File" Icon="{StaticResource IconOpenFile}" InputGestureText="Ctrl+O"/>
<Separator/> <Separator/>
<MenuItem Header="_Save File" Icon="{StaticResource IconSaveFile}" InputGestureText="Ctrl+S"/> <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"/> <MenuItem Header="Save File then _Run Game" Icon="{StaticResource IconSaveFileThenRunGame}" InputGestureText="B"/>
<Separator/> <Separator/>
<MenuItem Header="Close File" Icon="{StaticResource IconCloseFile}"/> <MenuItem Header="Close File" Icon="{StaticResource IconCloseFile}"/>
@ -104,7 +104,7 @@
<Rectangle StrokeThickness="4" Stroke="Gray" StrokeDashArray="4 4" Fill="Transparent"/> <Rectangle StrokeThickness="4" Stroke="Gray" StrokeDashArray="4 4" Fill="Transparent"/>
<StackPanel Orientation="Horizontal" Margin="20"> <StackPanel Orientation="Horizontal" Margin="20">
<Image Source="/Assets/OpenFile.ico" Width="24" Height="24" Margin="5" VerticalAlignment="Center"/> <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> </StackPanel>
</Grid> </Grid>
@ -148,7 +148,7 @@
<StatusBar Grid.Row="3"> <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"/> <Separator DockPanel.Dock="Right"/>
<StatusBarItem Content="$PasteMode" DockPanel.Dock="Right"/> <StatusBarItem Content="$PasteMode" DockPanel.Dock="Right"/>
<Separator DockPanel.Dock="Right"/> <Separator DockPanel.Dock="Right"/>

View File

@ -7,7 +7,7 @@
xmlns:vm="clr-namespace:BallanceTasEditor.ViewModels" xmlns:vm="clr-namespace:BallanceTasEditor.ViewModels"
xmlns:conveter="clr-namespace:BallanceTasEditor.Converters" xmlns:conveter="clr-namespace:BallanceTasEditor.Converters"
d:DataContext="{d:DesignInstance vm:NewFileDialog}" 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"> Title="New File" Height="250" Width="400" Icon="/Assets/NewFile.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BallanceTasEditor.Views" xmlns:local="clr-namespace:BallanceTasEditor.Views"
xmlns:styles="clr-namespace:BallanceTasEditor.Styles" 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"> Title="Editor Preference" Height="450" Width="400" Icon="/Assets/Preference.ico">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>