forked from LingFeng-bbben/MajdataEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
180 lines (175 loc) · 17.8 KB
/
Copy pathMainWindow.xaml
File metadata and controls
180 lines (175 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lex="http://wpflocalizeextension.codeplex.com"
lex:LocalizeDictionary.DesignCulture="zh-CN"
lex:ResxLocalizationProvider.DefaultAssembly="MajdataEdit"
lex:ResxLocalizationProvider.DefaultDictionary="Langs"
xmlns:local="clr-namespace:MajdataEdit"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2" x:Name="TheWindow" x:Class="MajdataEdit.MainWindow"
mc:Ignorable="d"
Title="MajdataEdit" Height="502" Width="720.5" Loaded="Window_Loaded" Closing="Window_Closing" MinHeight="517" WindowStartupLocation="CenterScreen">
<Grid Margin="0" DragEnter="Grid_DragEnter" AllowDrop="True" Drop="Grid_Drop">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF526675"/>
<GradientStop Color="#FF735573" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image x:Name="MusicWave" Stretch="Fill" Height="74" VerticalAlignment="Bottom" Margin="0,0,-521,0" MouseWheel="MusicWave_MouseWheel" PreviewMouseLeftButtonDown="MusicWave_PreviewMouseLeftButtonDown" MouseMove="MusicWave_MouseMove" Grid.Column="1" HorizontalAlignment="Left" Width="877"/>
<Image x:Name="MusicWaveCusor" Stretch="Fill" Height="74" VerticalAlignment="Bottom" Margin="0,0,-521,0" MouseWheel="MusicWave_MouseWheel" PreviewMouseLeftButtonDown="MusicWave_PreviewMouseLeftButtonDown" MouseMove="MusicWave_MouseMove" Grid.Column="1" HorizontalAlignment="Left" Width="877" Opacity="0.815"/>
<Line StrokeThickness="3" Y2="56" Height="74" VerticalAlignment="Bottom" Stroke="Red" Y1="15" Grid.Column="1" HorizontalAlignment="Left" Width="45"/>
<Menu Height="19" VerticalAlignment="Top" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Grid.ColumnSpan="2">
<MenuItem Header="{lex:Loc Files}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}">
<MenuItem x:Name="Menu_New" Header="{lex:Loc New}" Click="Menu_New_Click"/>
<MenuItem x:Name="Menu_Open" Header="{lex:Loc Open}" Click="Menu_Open_Click"/>
<MenuItem x:Name="Menu_Save" Header="{lex:Loc Save}" Click="Menu_Save_Click"/>
<MenuItem x:Name="Menu_SaveAs" Header="{lex:Loc SaveAs}" Click="Menu_SaveAs_Click" IsEnabled="False" Visibility="Collapsed"/>
</MenuItem>
<MenuItem x:Name="MenuEdit" Header="{lex:Loc Edit}" IsEnabled="False" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}">
<MenuItem Header="{lex:Loc MirrorLR}" Click="MirrorLeftRight_MenuItem_Click"/>
<MenuItem Header="{lex:Loc MirrorUD}" Click="MirrorUpDown_MenuItem_Click"/>
<MenuItem Header="{lex:Loc Mirror180}" Click="Mirror180_MenuItem_Click"/>
<MenuItem Header="{lex:Loc Mirror45}" Click="Mirror45_MenuItem_Click"/>
<MenuItem Header="{lex:Loc MirrorCcw45}" Click="MirrorCcw45_MenuItem_Click"/>
<Separator/>
<MenuItem Header="{lex:Loc MapInfo}" Click="MenuItem_InfomationEdit_Click"/>
<Separator/>
<MenuItem Header="{lex:Loc FindAndReplace}" Click="MenuFind_Click"/>
</MenuItem>
<MenuItem Header="{lex:Loc Setting}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}">
<MenuItem x:Name="VolumnSetting" Header="{lex:Loc Volume}" Click="MenuItem_SoundSetting_Click" IsEnabled="False"/>
<Separator/>
<MenuItem Header="{lex:Loc EditorSetting}" Click="MenuItem_EditorSetting_Click"/>
<MenuItem Header="{lex:Loc RemapViewer}" Click="Menu_ResetViewWindow"/>
</MenuItem>
<MenuItem Header="{lex:Loc Tools}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}">
<MenuItem Header="{lex:Loc BPMtap}" Click="BPMtap_MenuItem_Click"/>
<MenuItem x:Name="MenuMuriCheck" Header="{lex:Loc MapMuriDetc}" Click="MuriCheck_Click_1" IsEnabled="False"></MenuItem>
</MenuItem>
<MenuItem Header="{lex:Loc SimaiWiki}" Click="MenuItem_SimaiWiki_Click" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}" />
<MenuItem Header="{lex:Loc Github}" Click="MenuItem_GitHub_Click" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}" />
<MenuItem Header="{lex:Loc CheckUpdate}" Click="CheckUpdate_Click" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkMenuItem}" />
</Menu>
<Image x:Name="FFTImage" HorizontalAlignment="Right" Margin="0,0,14,92" Width="255" Height="255" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" Grid.Column="1">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<CheckBox x:Name="FollowPlayCheck" Content="{lex:Loc TextFollow}" HorizontalAlignment="Left" Height="21" Margin="9,0,0,129" VerticalAlignment="Bottom" Width="87" Foreground="{DynamicResource ButtonForeground}" HorizontalContentAlignment="Right" Click="FollowPlayCheck_Click" Background="{DynamicResource ButtonsBackground}" Template="{DynamicResource DarkCheck}"/>
<RichTextBox x:Name="FumenContent"
Padding="0,5" FontFamily="Consolas"
Foreground="#FFE8E8E8" TextChanged="FumenContent_TextChanged"
Margin="105,30,10,91" HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Visible"
SelectionChanged="FumenContent_SelectionChanged" Grid.ColumnSpan="2"
InputMethod.IsInputMethodEnabled="False"
AutoWordSelection="False"
PreviewKeyDown="FumenContent_OnPreviewKeyDown">
<RichTextBox.Resources>
<RoutedUICommand x:Key="PlayAndPause" Text="PlayAndPause"/>
<RoutedUICommand x:Key="SaveFile" Text="SaveFile"/>
<RoutedUICommand x:Key="StopPlaying" Text="StopPlaying"/>
<RoutedUICommand x:Key="SendToView" Text="SendToView"/>
<RoutedUICommand x:Key="IncreasePlaybackSpeed" Text="IncreasePlaybackSpeed"/>
<RoutedUICommand x:Key="DecreasePlaybackSpeed" Text="DecreasePlaybackSpeed"/>
<RoutedUICommand x:Key="Find" Text="Find"/>
<RoutedUICommand x:Key="MirrorLR" Text="MirrorLR"/>
<RoutedUICommand x:Key="MirrorUD" Text="MirrorUD"/>
<RoutedUICommand x:Key="Mirror180" Text="Mirror180"/>
<RoutedUICommand x:Key="Mirror45" Text="Mirror45"/>
<RoutedUICommand x:Key="MirrorCcw45" Text="MirrorCcw45"/>
</RichTextBox.Resources>
<RichTextBox.Background>
<SolidColorBrush Color="#FF171717" Opacity="0.3"/>
</RichTextBox.Background>
<!--Bindings are dynamicly added via ReadEditorSetting()-->
<RichTextBox.CommandBindings>
<CommandBinding Command="{StaticResource PlayAndPause}" CanExecute="PlayAndPause_CanExecute"/>
<CommandBinding Command="{StaticResource SaveFile}" CanExecute="SaveFile_Command_CanExecute"/>
<CommandBinding Command="{StaticResource StopPlaying}" CanExecute="StopPlaying_CanExecute"/>
<CommandBinding Command="{StaticResource SendToView}" CanExecute="SendToView_CanExecute"/>
<CommandBinding Command="{StaticResource IncreasePlaybackSpeed}" CanExecute="IncreasePlaybackSpeed_CanExecute"/>
<CommandBinding Command="{StaticResource DecreasePlaybackSpeed}" CanExecute="DecreasePlaybackSpeed_CanExecute"/>
<CommandBinding Command="{StaticResource Find}" CanExecute="FindCommand_CanExecute"/>
<CommandBinding Command="{StaticResource MirrorLR}" CanExecute="MirrorLRCommand_CanExecute"/>
<CommandBinding Command="{StaticResource MirrorUD}" CanExecute="MirrorUDCommand_CanExecute"/>
<CommandBinding Command="{StaticResource Mirror180}" CanExecute="Mirror180Command_CanExecute"/>
<CommandBinding Command="{StaticResource Mirror45}" CanExecute="Mirror45Command_CanExecute"/>
<CommandBinding Command="{StaticResource MirrorCcw45}" CanExecute="MirrorCcw45Command_CanExecute"/>
</RichTextBox.CommandBindings>
<FlowDocument/>
</RichTextBox>
<Label x:Name="TimeLabel" Content="0:00" HorizontalAlignment="Left" Height="64" Margin="0,17,0,0" VerticalAlignment="Top" Width="105" Foreground="White" FontFamily="Bahnschrift Light" FontSize="50" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
<ComboBox x:Name="LevelSelector" Margin="10,117,0,0" SelectionChanged="ComboBox_SelectionChanged" HorizontalAlignment="Left" Width="87" Height="21" VerticalAlignment="Top" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkComboBox}">
<ComboBoxItem Content="EASY"/>
<ComboBoxItem Content="BASIC"/>
<ComboBoxItem Content="ADVANCED"/>
<ComboBoxItem Content="EXPERT"/>
<ComboBoxItem Content="MASTER"/>
<ComboBoxItem Content="Re:MASTER"/>
<ComboBoxItem Content="ORIGINAL"/>
</ComboBox>
<Button x:Name="WaveViewZoomIn" Content="+" HorizontalAlignment="Left" Height="24" Margin="10,0,0,41" VerticalAlignment="Bottom" Width="24" Click="WaveViewZoomIn_Click" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkButton}"/>
<Button x:Name="WaveViewZoomOut" Content="-" HorizontalAlignment="Left" Height="24" Margin="10,0,0,10" VerticalAlignment="Bottom" Width="24" Click="WaveViewZoomOut_Click" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkButton}"/>
<Label Content="{lex:Loc Difficulty}" HorizontalAlignment="Left" Height="25" Margin="5,143,0,0" VerticalAlignment="Top" Width="45" Foreground="White"/>
<TextBox x:Name="LevelTextBox" HorizontalAlignment="Left" Height="25" Margin="50,143,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="46" VerticalContentAlignment="Center" TextChanged="LevelTextBox_TextChanged" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" HorizontalContentAlignment="Center"/>
<Label Content="{lex:Loc Offset}" HorizontalAlignment="Left" Height="25" Margin="5,173,0,0" VerticalAlignment="Top" Width="45" Foreground="White"/>
<TextBox x:Name="OffsetTextBox" HorizontalAlignment="Left" Height="25" Margin="50,173,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="46" VerticalContentAlignment="Center" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" HorizontalContentAlignment="Center" TextChanged="OffsetTextBox_TextChanged" MouseWheel="OffsetTextBox_MouseWheel"/>
<Button x:Name="PlayAndPauseButton" Content="▶" HorizontalAlignment="Left" Margin="58,0,0,91" Width="38" Click="PlayAndPauseButton_Click" Height="38" VerticalAlignment="Bottom" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkButton}"/>
<Button x:Name="StopButton" Content="◼" HorizontalAlignment="Left" Height="38" Margin="9,0,0,91" VerticalAlignment="Bottom" Width="38" Click="StopButton_Click" Background="{DynamicResource ButtonsBackground}" Foreground="{DynamicResource ButtonForeground}" Template="{DynamicResource DarkButton}"/>
<Label x:Name="NoteNowText" Content="行" HorizontalAlignment="Left" Margin="0,74,0,0" VerticalAlignment="Top" Foreground="White" Width="105" HorizontalContentAlignment="Center" Height="25"/>
<Button x:Name="Export_Button" Content="{lex:Loc RecMode}" Height="30" Margin="9,0,0,166" VerticalAlignment="Bottom" RenderTransformOrigin="1.1,0.25" Click="Export_Button_Click" HorizontalAlignment="Left" Width="87" Template="{DynamicResource DarkButton}" Foreground="{DynamicResource ButtonForeground}" Background= "{DynamicResource ButtonsBackground}" ToolTip="{lex:Loc RecordModeDiscrp}"/>
<Label Content="{lex:Loc TouchSpeed}" MouseUp="SettingLabel_MouseUp" HorizontalAlignment="Left" Height="24" Margin="5,0,0,201" VerticalAlignment="Bottom" Width="80" Foreground="White" RenderTransformOrigin="9.667,-2.284" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Label x:Name="ViewerTouchSpeed" MouseUp="SettingLabel_MouseUp" HorizontalAlignment="Left" Height="24" Margin="65,0,0,201" Content="7.0" VerticalAlignment="Bottom" Width="35" VerticalContentAlignment="Center" Foreground="{DynamicResource ButtonForeground}" HorizontalContentAlignment="Center" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Label Content="{lex:Loc Speed}" MouseUp="SettingLabel_MouseUp" HorizontalAlignment="Left" Height="24" Margin="5,0,0,227" VerticalAlignment="Bottom" Width="60" Foreground="White" RenderTransformOrigin="9.667,-2.284" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Label x:Name="ViewerSpeed" MouseUp="SettingLabel_MouseUp" HorizontalAlignment="Left" Height="24" Margin="65,0,0,227" Content="7.0" VerticalAlignment="Bottom" Width="35" VerticalContentAlignment="Center" Foreground="{DynamicResource ButtonForeground}" HorizontalContentAlignment="Center" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Label Content="{lex:Loc Brightness}" MouseUp="SettingLabel_MouseUp" HorizontalAlignment="Left" Height="24" Margin="5,0,0,251" VerticalAlignment="Bottom" Width="60" Foreground="White" RenderTransformOrigin="9.667,-2.284" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Label x:Name="ViewerCover" MouseUp="SettingLabel_MouseUp" Height="24" Margin="65,0,0,251" Content="0.6" VerticalAlignment="Bottom" VerticalContentAlignment="Center" Foreground="{DynamicResource ButtonForeground}" HorizontalAlignment="Left" Width="35" HorizontalContentAlignment="Center" ToolTip="{lex:Loc SpeedSettingTooltip}"/>
<Grid x:Name="PlbSpdAdjGrid" HorizontalAlignment="Left" Height="105" Margin="105,290,0,0" VerticalAlignment="Top" Width="148" Visibility="Hidden">
<Grid.Background>
<SolidColorBrush Color="#FF303030" Opacity="0.8"/>
</Grid.Background>
<Label Content="{lex:Loc PlayBackSpeed}" Height="26" Margin="44,20,44,0" VerticalAlignment="Top" Foreground="White" HorizontalContentAlignment ="Center"/>
<Label x:Name="PlbSpdLabel" Content="100%" Margin="34,46,34,20" Foreground="White" FontWeight="Bold" FontSize="22" HorizontalContentAlignment="Center"/>
</Grid>
<Grid x:Name="FindGrid" Margin="0,30,29,0" Grid.Column="1" HorizontalAlignment="Right" Width="272" Height="69" VerticalAlignment="Top" Visibility="Collapsed">
<Grid.Background>
<SolidColorBrush Color="Black" Opacity="0.2"/>
</Grid.Background>
<TextBox x:Name="InputText" HorizontalAlignment="Left" Height="22" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="231" VerticalContentAlignment="Center"/>
<Image x:Name="Find_icon" HorizontalAlignment="Left" Height="22" Margin="246,10,0,0" VerticalAlignment="Top" Width="26" Source="Image/outline_search_white_24dp.png" MouseDown="Find_icon_MouseDown" ToolTip="{lex:Loc FindNext}"/>
<Image x:Name="Replace_icon" HorizontalAlignment="Left" Height="22" Margin="246,37,0,0" VerticalAlignment="Top" Width="26" Source="Image/outline_find_replace_white_24dp.png" MouseDown="Replace_icon_MouseDown" ToolTip="{lex:Loc ReplaceNext}"/>
<Label x:Name="FindClose" Content="^" Height="19" Margin="127,53,127,-3" VerticalAlignment="Top" FontSize="11" FontWeight="Bold" Foreground="White" MouseDown="FindClose_MouseDown"/>
<TextBox x:Name="ReplaceText" HorizontalAlignment="Left" Height="22" Margin="10,37,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="231" VerticalContentAlignment="Center"/>
</Grid>
<StackPanel x:Name="OverrideModeTipsPopup" Margin="105,30,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal" Visibility="Collapsed">
<StackPanel.Background>
<SolidColorBrush Color="Black" Opacity="0.8"/>
</StackPanel.Background>
<Label Content="{lex:Loc OverwriteMode}" Foreground="White"/>
<Label Foreground="{DynamicResource HelperForeground}" Margin="3,0,0,0">
<Label.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock Text="{lex:Loc Key=OverwriteModeTooltip}"></TextBlock>
</StackPanel>
</ToolTip>
</Label.ToolTip>
<TextBlock TextDecorations="Underline" FontSize="10" Text="{lex:Loc Key=WhatsThis}"></TextBlock>
</Label>
</StackPanel>
<Rectangle x:Name="Cover" Fill="#FF1F1F1F" Margin="0,19,0,0" Stroke="Black" Grid.ColumnSpan="2" d:IsHidden="True"/>
</Grid>
</Window>