Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
Added new variable name change.
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rj committed Feb 2, 2021
1 parent afd9624 commit 0ed3a47
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion MeerkatUI/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
}


Expand Down

0 comments on commit 0ed3a47

Please sign in to comment.