public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");
                ClassNameHeader.Text       = strings.GetString(prefix, "ClassHeader");
                EntityNameHeader.Text      = strings.GetString(prefix, "NameHeader");
                GoToButton.Text            = strings.GetString(prefix, "GoTo");
                DeleteButton.Text          = strings.GetString(prefix, "Delete");
                PropertiesButton.Text      = strings.GetString(prefix, "Properties");
                FollowSelection.Text       = strings.GetString(prefix, "FollowSelection");
                FilterGroup.Text           = strings.GetString(prefix, "Filter");
                TypeAll.Text               = strings.GetString(prefix, "ShowAll");
                TypePoint.Text             = strings.GetString(prefix, "ShowPoint");
                TypeBrush.Text             = strings.GetString(prefix, "ShowBrush");
                IncludeHidden.Text         = strings.GetString(prefix, "IncludeHidden");
                FilterByKeyValueLabel.Text = strings.GetString(prefix, "FilterByKeyValue");
                FilterByClassLabel.Text    = strings.GetString(prefix, "FilterByClass");
                FilterClassExact.Text      = strings.GetString(prefix, "Exact");
                FilterKeyValueExact.Text   = strings.GetString(prefix, "Exact");
                ResetFiltersButton.Text    = strings.GetString(prefix, "ResetFilters");
                CloseButton.Text           = strings.GetString(prefix, "Close");
            });
        }
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");

                FindGroup.Text    = strings.GetString(prefix, "Find");
                ReplaceGroup.Text = strings.GetString(prefix, "Replace");

                FindBrowse.Text = ReplaceBrowse.Text = strings.GetString(prefix, "Browse");

                ReplaceInGroup.Text    = strings.GetString(prefix, "ReplaceIn");
                ReplaceSelection.Text  = strings.GetString(prefix, "ReplaceSelection");
                ReplaceVisible.Text    = strings.GetString(prefix, "ReplaceVisible");
                ReplaceEverything.Text = strings.GetString(prefix, "ReplaceEverything");

                RescaleTextures.Text = strings.GetString(prefix, "RescaleTextures");

                ActionGroup.Text      = strings.GetString(prefix, "Action");
                ActionExact.Text      = strings.GetString(prefix, "ActionExact");
                ActionPartial.Text    = strings.GetString(prefix, "ActionPartial");
                ActionSubstitute.Text = strings.GetString(prefix, "ActionSubstitute");
                ActionSelect.Text     = strings.GetString(prefix, "ActionSelect");

                OKButton.Text     = strings.GetString(prefix, "OK");
                CancelButton.Text = strings.GetString(prefix, "Cancel");
            });
        }
Beispiel #3
0
 public CheckForUpdates(
     [Import("Shell")] Form shell,
     [Import] ITranslationStringProvider translation
     )
 {
     _shell       = shell;
     _translation = translation;
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
 }
Beispiel #4
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");
            });
        }
 public void Translate(ITranslationStringProvider translation)
 {
     this.InvokeLater(() => {
         SaveAllButton.Text       = translation.GetString(typeof(SaveChangesForm).FullName + ".SaveAll");
         DiscardButton.Text       = translation.GetString(typeof(SaveChangesForm).FullName + ".DiscardAll");
         CancelButton.Text        = translation.GetString(typeof(SaveChangesForm).FullName + ".Cancel");
         UnsavedChangesLabel.Text = translation.GetString(typeof(SaveChangesForm).FullName + ".UnsavedChangesMessage");
         Text = translation.GetString(typeof(SaveChangesForm).FullName + ".Title");
     });
 }
Beispiel #6
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Title = strings.GetString(prefix, "Title");
                DeselectAllButton.Text = strings.GetString(prefix, "DeselectAll");
                ResetButton.Text       = strings.GetString(prefix, "ResetToOriginal");
            });
        }
Beispiel #7
0
        public async Task Initialise(ITranslationStringProvider translation)
        {
            _textureList.Collection = await _document.Environment.GetTextureCollection();

            _textures.Clear();
            _textures.AddRange(_textureList.Collection.GetBrowsableTextures());

            UpdatePackageList();
            UpdateTextureList();
            UpdateFavouritesList();
            _textureList.SortTextureList(x => x, GetMemory("SortDescending", false));

            translation.Translate(this);
        }
Beispiel #8
0
        public UpdaterForm(UpdateReleaseDetails details, ITranslationStringProvider translations)
        {
            _details  = details;
            _filename = Path.Combine(Path.GetTempPath(), details.FileName);

            InitializeComponent();

            var prefix = GetType().FullName;

            Icon              = Resources.Sledge;
            Text              = translations.GetString(prefix + ".Title");
            StatusLabel.Text  = translations.GetString(prefix + ".UpdateAvailable");
            _downloadingLabel = translations.GetString(prefix + ".Downloading") ?? "";

            ReleaseDetails.Text = $"{_details.Name}\r\n\r\n{_details.Changelog.Replace("\r", "").Replace("\n", "\r\n")}";
        }
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text              = strings.GetString(prefix, "Title");
                NameLabel.Text    = strings.GetString(prefix, nameof(NameLabel));
                ColorLabel.Text   = strings.GetString(prefix, nameof(ColorLabel));
                AddButton.Text    = strings.GetString(prefix, nameof(AddButton));
                RemoveButton.Text = strings.GetString(prefix, nameof(RemoveButton));
                OkButton.Text     = strings.GetString(prefix, nameof(OkButton));
                CancelButton.Text = strings.GetString(prefix, nameof(CancelButton));
            });
        }
Beispiel #10
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text                 = strings.GetString(prefix, "Title");
                lblWindow.Text       = strings.GetString(prefix, "Window");
                lblRows.Text         = strings.GetString(prefix, "Rows");
                lblColumns.Text      = strings.GetString(prefix, "Columns");
                btnApply.Text        = strings.GetString(prefix, "Apply");
                btnCancel.Text       = strings.GetString(prefix, "Cancel");
                lblInstructions.Text = strings.GetString(prefix, "Instructions");
                lblPreset.Text       = strings.GetString(prefix, "ClickAPreset");
            });
        }
Beispiel #11
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Title        = strings.GetString(prefix, "Title");
                lblMode.Text = strings.GetString(prefix, "Mode");
                TranslateModeCheckbox.Text = strings.GetString(prefix, "Translate");
                RotateModeCheckbox.Text    = strings.GetString(prefix, "Rotate");
                SkewModeCheckbox.Text      = strings.GetString(prefix, "Skew");
                Show3DWidgetsCheckbox.Text = strings.GetString(prefix, "Show3DWidgets");
                lblActions.Text            = strings.GetString(prefix, "Actions");
                MoveToWorldButton.Text     = strings.GetString(prefix, "MoveToWorld");
                MoveToEntityButton.Text    = strings.GetString(prefix, "TieToEntity");
            });
        }
Beispiel #12
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text                 = strings.GetString(prefix, "Title");
                grpDetails.Text      = strings.GetString(prefix, "Details");
                btnGoToError.Text    = strings.GetString(prefix, "GoToError");
                btnFix.Text          = strings.GetString(prefix, "FixError");
                btnFixAllOfType.Text = strings.GetString(prefix, "FixAllOfType");
                btnFixAll.Text       = strings.GetString(prefix, "FixAll");
                chkVisibleOnly.Text  = strings.GetString(prefix, "VisibleObjectsOnly");
                chkSelectedOnly.Text = strings.GetString(prefix, "SelectedObjectsOnly");
                lnkExtraDetails.Text = strings.GetString(prefix, "ClickForAdditionalDetails");
                btnClose.Text        = strings.GetString(prefix, "CloseButton");
            });
        }
Beispiel #13
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");
                FavouriteTexturesLabel.Text      = strings.GetString(prefix, "FavouriteTextures");
                AddFavouriteFolderButton.Text    = strings.GetString(prefix, "AddFolder");
                DeleteFavouriteFolderButton.Text = strings.GetString(prefix, "DeleteFolder");
                RemoveFavouriteItemButton.Text   = strings.GetString(prefix, "RemoveSelected");

                FilterLabel.Text = strings.GetString(prefix, "Filter");
                SizeLabel.Text   = strings.GetString(prefix, "Size");

                UsedTexturesOnlyBox.Text    = strings.GetString(prefix, "UsedTexturesOnly");
                SelectButton.Text           = strings.GetString(prefix, "Select");
                SortByLabel.Text            = strings.GetString(prefix, "SortBy");
                SortDescendingCheckbox.Text = strings.GetString(prefix, "SortDescending");
            });
        }
Beispiel #14
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");
                btnAdvancedMode.Text  = strings.GetString(prefix, "AdvancedMode");
                lblProfile.Text       = strings.GetString(prefix, "Profile");
                tabSteps.Text         = strings.GetString(prefix, "StepsToRun");
                btnSimpleMode.Text    = strings.GetString(prefix, "SimpleMode");
                btnSaveProfile.Text   = strings.GetString(prefix, "SaveProfile");
                btnSaveProfileAs.Text = strings.GetString(prefix, "SaveProfileAs");
                btnCancel.Text        = strings.GetString(prefix, "Cancel");
                btnGo.Text            = strings.GetString(prefix, "Compile");

                ProfileName      = strings.GetString(prefix, "ProfileName");
                OK               = strings.GetString(prefix, "OK");
                Cancel           = strings.GetString(prefix, "Cancel");
                DeleteProfile    = strings.GetString(prefix, "DeleteProfile");
                DeleteAreYouSure = strings.GetString(prefix, "DeleteAreYouSure");
            });
        }
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");

                ScaleLabel.Text = strings.GetString(prefix, "Scale");
                ShiftLabel.Text = strings.GetString(prefix, "Shift");

                BrowseButton.Text  = strings.GetString(prefix, "Browse");
                ReplaceButton.Text = strings.GetString(prefix, "Replace");
                ApplyButton.Text   = strings.GetString(prefix, "Apply");

                RotationLabel.Text         = strings.GetString(prefix, "Rotation");
                LightmapLabel.Text         = strings.GetString(prefix, "Lightmap");
                SmoothingGroupsButton.Text = strings.GetString(prefix, "SmoothingGroups");

                AlignGroup.Text           = strings.GetString(prefix, "Align");
                AlignToWorldCheckbox.Text = strings.GetString(prefix, "World");
                AlignToFaceCheckbox.Text  = strings.GetString(prefix, "Face");

                JustifyGroup.Text       = strings.GetString(prefix, "Justify");
                JustifyFitButton.Text   = strings.GetString(prefix, "Fit");
                TreatAsOneCheckbox.Text = strings.GetString(prefix, "TreatAsOne");

                HideMaskCheckbox.Text  = strings.GetString(prefix, "HideMask");
                FilterRecentLabel.Text = strings.GetString(prefix, "FilterRecent");

                LeftClick         = strings.GetString(prefix, "LeftClick");
                RightClick        = strings.GetString(prefix, "RightClick");
                ActionLift        = strings.GetString(prefix, "ActionLift");
                ActionSelect      = strings.GetString(prefix, "ActionSelect");
                ActionApply       = strings.GetString(prefix, "ActionApply");
                ActionValues      = strings.GetString(prefix, "ActionValues");
                ActionAxis        = strings.GetString(prefix, "ActionAxis");
                ActionAlignToView = strings.GetString(prefix, "ActionAlignToView");

                LeftClickActionButton.Text = $@"{LeftClick}: {ActionLift}+{ActionSelect}";
                LeftClickActionMenu.Items.Clear();
                LeftClickActionMenu.Items.Add(new ToolStripMenuItem($"{ActionLift}+{ActionSelect}")
                {
                    Tag = ClickAction.Lift | ClickAction.Select
                });
                LeftClickActionMenu.Items.Add(new ToolStripMenuItem(ActionLift)
                {
                    Tag = ClickAction.Lift
                });
                LeftClickActionMenu.Items.Add(new ToolStripMenuItem(ActionSelect)
                {
                    Tag = ClickAction.Select
                });

                RightClickActionButton.Text = $@"{RightClick}: {ActionApply}+{ActionValues}";
                RightClickActionMenu.Items.Clear();
                RightClickActionMenu.Items.Add(new ToolStripMenuItem(ActionApply)
                {
                    Tag = ClickAction.Apply
                });
                RightClickActionMenu.Items.Add(new ToolStripMenuItem($"{ActionApply}+{ActionValues}")
                {
                    Tag = ClickAction.Apply | ClickAction.Values
                });
                RightClickActionMenu.Items.Add(new ToolStripMenuItem($"{ActionApply}+{ActionValues}+{ActionAxis}")
                {
                    Tag = ClickAction.Apply | ClickAction.AlignToSample
                });
                RightClickActionMenu.Items.Add(new ToolStripMenuItem(ActionAlignToView)
                {
                    Tag = ClickAction.AlignToView
                });
            });
        }