diff --git a/MeerkatUI/Windows/MainWindow.xaml.cs b/MeerkatUI/Windows/MainWindow.xaml.cs index 7e95fe9..273047a 100644 --- a/MeerkatUI/Windows/MainWindow.xaml.cs +++ b/MeerkatUI/Windows/MainWindow.xaml.cs @@ -20,6 +20,7 @@ public partial class MainWindow : Window, INotifyPropertyChanged { private readonly TemplateEngine engine; private string openedTemplatePath = string.Empty; + private char NewVariableName = 'A'; private Settings settings = new Settings(); public Settings Settings @@ -81,6 +82,13 @@ private void HighlightString(string str) } + private void IncrementVariableName() + { + if (NewVariableName < 'Z') + ++NewVariableName; + } + + private void ProcessButton_Click(object sender, RoutedEventArgs e) { RefreshVariables(); @@ -135,7 +143,8 @@ private void IgnoreUnknown_Unchecked(object sender, RoutedEventArgs e) private void AddVariable(object sender, RoutedEventArgs e) { - Variables.Add(new Variable("A", "яблоко")); + Variables.Add(new Variable(NewVariableName.ToString(), "яблоко")); + IncrementVariableName(); }