public PathTemplateWindow(string value, WotContext context, Style style, SaveType saveType)
            : this()
        {
            MainWindow.ApplyUiZoom(this);

            Title = App.Translation.PathTemplateWindow.Title;
            Lingo.TranslateWindow(this, App.Translation.PathTemplateWindow);

            _context  = context;
            _style    = style;
            _saveType = saveType;

            ctValue.Text = value;
            ctValue.Focus();
            ctValue_TextChanged(null, null);
            var isAtlas = saveType != SaveType.Icons;

            if (isAtlas)
            {
                ctIconsPathMacro.Text = "{AtlasPath}";
                for (int i = 4; i <= 9; ++i)
                {
                    var row = this.ctHelpGrid.RowDefinitions[i];
                    row.Height = new GridLength(0);
                }
            }
            else
            {
                _exampleTank = context.Tanks.FirstOrDefault(x => x.TankId.Contains("Object_260"));
                if (_exampleTank == null)
                {
                    _exampleTank = context.Tanks.FirstOrDefault();
                }
            }

            ctIconsPathHelp.Text = isAtlas
                ? ctIconsPathHelp.Text.Replace("{cur}",
                                               Ut.ExpandIconPath("{AtlasPath}", _context, _style, "", "", fragment: true))
                : ctIconsPathHelp.Text.Replace("{cur}",
                                               Ut.ExpandIconPath("{IconsPath}", _context, _style, "", "", fragment: true));
            ctTimPathHelp.Text = ctTimPathHelp.Text.Replace("{cur}",
                                                            Ut.ExpandIconPath("{TimPath}", _context, _style, "", "", fragment: true));
            ctGamePathHelp.Text = ctGamePathHelp.Text.Replace("{cur}",
                                                              Ut.ExpandIconPath("{GamePath}", _context, _style, "", "", fragment: true));
            ctGameVersionHelp.Text = ctGameVersionHelp.Text.Replace("{cur}",
                                                                    Ut.ExpandIconPath("{GameVersion}", _context, _style, "", "", fragment: true));
            ctStyleNameHelp.Text = ctStyleNameHelp.Text.Replace("{cur}",
                                                                Ut.ExpandIconPath("{StyleName}", _context, _style, "", "", fragment: true));
            ctStyleAuthorHelp.Text = ctStyleAuthorHelp.Text.Replace("{cur}",
                                                                    Ut.ExpandIconPath("{StyleAuthor}", _context, _style, "", "", fragment: true));
        }
 private void ctValue_TextChanged(object sender, TextChangedEventArgs e)
 {
     ctExpandsTo.Text = Ut.ExpandIconPath(ctValue.Text, _context, _style, _exampleTank, saveType: this._saveType);
 }