-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another way to help users with program configuration
- Loading branch information
Dmitry Khudyakov
committed
Aug 5, 2024
1 parent
82c4e4f
commit 0fac272
Showing
12 changed files
with
155 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<UserControl | ||
x:Class="SPT_AKI_Profile_Editor.Views.ServerSelectHelpDialog" | ||
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:local="clr-namespace:SPT_AKI_Profile_Editor.Views" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:Background="White" | ||
d:DataContext="{d:DesignInstance Type=local:ServerSelectHelpDialogViewModel}" | ||
mc:Ignorable="d"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="85" /> | ||
</Grid.RowDefinitions> | ||
<StackPanel | ||
Grid.Row="0" | ||
Margin="0,10,0,0" | ||
Orientation="Vertical"> | ||
<Image Height="320"> | ||
<Image.Source> | ||
<BitmapImage UriSource="/Resources/Images/server_folder.jpg" /> | ||
</Image.Source> | ||
</Image> | ||
<Label | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Bottom" | ||
Content="{Binding WhatIsServerFolder, FallbackValue=WhatIsServerFolder}" | ||
Template="{StaticResource TitleLabel}" /> | ||
</StackPanel> | ||
<Button | ||
Grid.Row="1" | ||
Margin="5,0,5,0" | ||
HorizontalAlignment="Right" | ||
Command="{Binding CancelCommand}" | ||
Content="{Binding AppLocalization.Translations[save_profile_dialog_ok], FallbackValue=save_profile_dialog_ok}" | ||
Style="{DynamicResource MahApps.Styles.Button.Dialogs.Accent}" /> | ||
</Grid> | ||
</UserControl> |
12 changes: 12 additions & 0 deletions
12
SPT-AKI Profile Editor/Views/ServerSelectHelpDialog.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace SPT_AKI_Profile_Editor.Views | ||
{ | ||
/// <summary> | ||
/// Логика взаимодействия для ServerSelectHelpDialog.xaml | ||
/// </summary> | ||
public partial class ServerSelectHelpDialog : UserControl | ||
{ | ||
public ServerSelectHelpDialog() => InitializeComponent(); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
SPT-AKI Profile Editor/Views/ServerSelectHelpDialogViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using SPT_AKI_Profile_Editor.Core; | ||
using SPT_AKI_Profile_Editor.Core.HelperClasses; | ||
using SPT_AKI_Profile_Editor.Helpers; | ||
|
||
namespace SPT_AKI_Profile_Editor.Views | ||
{ | ||
public class ServerSelectHelpDialogViewModel : ClosableDialogViewModel | ||
{ | ||
private readonly AppSettings AppSettings; | ||
|
||
public ServerSelectHelpDialogViewModel(AppSettings appSettings, object context) : base(context) | ||
{ | ||
AppSettings = appSettings; | ||
} | ||
|
||
public string WhatIsServerFolder | ||
{ | ||
get | ||
{ | ||
var prefix = AppLocalization.GetLocalizedString("tab_settings_server") + " - "; | ||
var serverExe = AppSettings.FilesList.ContainsKey(SPTServerFile.serverexe) | ||
? AppSettings.FilesList[SPTServerFile.serverexe] | ||
: "\"settings file corrupted\""; | ||
return prefix + AppLocalization.GetLocalizedString("what_is_server_folder", serverExe); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters