Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit e95a8ee

Browse files
committed
remake configs windows buttons - add "duplicate config" button
1 parent 5e68824 commit e95a8ee

File tree

6 files changed

+198
-163
lines changed

6 files changed

+198
-163
lines changed

Resources/Icons/add.png

5.69 KB
Loading

Resources/Icons/duplicate.png

7.16 KB
Loading

Resources/Icons/trash.png

9.92 KB
Loading

Spcode.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@
466466
<Content Include="Deploy\nsis-plugins\DotNetChecker.dll" />
467467
<Resource Include="Resources\Icons\icon-error.png" />
468468
<Resource Include="Resources\Icons\icon-warning.png" />
469+
<Resource Include="Resources\Icons\add.png" />
470+
<Resource Include="Resources\Icons\duplicate.png" />
471+
<Resource Include="Resources\Icons\trash.png" />
469472
<Content Include="Resources\License.txt" />
470473
<Content Include="Resources\Misc\Configurations\sm_1_10_0_6509\include\admin.inc" />
471474
<Content Include="Resources\Misc\Configurations\sm_1_10_0_6509\include\adminmenu.inc" />

UI/Windows/ConfigWindow.xaml

Lines changed: 188 additions & 157 deletions
Large diffs are not rendered by default.

UI/Windows/ConfigWindow.xaml.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private void LoadConfigToUI(int index)
253253
AllowChange = true;
254254
}
255255

256-
private void NewButton_Clicked(object sender, RoutedEventArgs e)
256+
private void NewButton_Click(object sender, RoutedEventArgs e)
257257
{
258258
var c = new Config
259259
{
@@ -268,7 +268,12 @@ private void NewButton_Clicked(object sender, RoutedEventArgs e)
268268
ConfigListBox.Items.Add(new ListBoxItem { Content = Translate("NewConfig") });
269269
}
270270

271-
private void DeleteButton_Clicked(object sender, RoutedEventArgs e)
271+
private void CopyButton_Click(object sender, RoutedEventArgs e)
272+
{
273+
274+
}
275+
276+
private void DeleteButton_Click(object sender, RoutedEventArgs e)
272277
{
273278
var index = ConfigListBox.SelectedIndex;
274279
var c = Program.Configs[index];
@@ -730,8 +735,6 @@ private void Language_Translate()
730735
Title = Translate("Configs");
731736
AddSMDirButton.Content = Translate("Add");
732737
RemoveSMDirButton.Content = Translate("Remove");
733-
NewButton.Content = Translate("New");
734-
DeleteButton.Content = Translate("Delete");
735738
NameBlock.Text = Translate("Name");
736739
ScriptingDirBlock.Text = Translate("ScriptDir");
737740
CopyDirBlock.Text = Translate("CopyDir");
@@ -757,8 +760,6 @@ private void Language_Translate()
757760
Rcon_MenuC.Text = Translate("RConCMDLineCom");
758761
FTPTestConnectionButton.Content = Translate("TestConnection");
759762
RCONTestConnectionButton.Content = Translate("TestConnection");
760-
//BackupConfigsButton.Content = Translate("BackupConfigs");
761-
//LoadConfigsButton.Content = Translate("LoadConfigs");
762763
}
763764

764765
private void EvaluateRTL()

0 commit comments

Comments
 (0)