Пример #1
0
 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");
     });
 }
Пример #2
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");
            });
        }
Пример #3
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")}";
        }
Пример #4
0
        public void Translate(ITranslationStringProvider strings)
        {
            CreateHandle();
            var prefix = GetType().FullName;

            this.InvokeLater(() =>
            {
                Text = strings.GetString(prefix, "Title");
            });
        }
Пример #5
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");
            });
        }
Пример #6
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");
            });
        }
Пример #7
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");
            });
        }
        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));
            });
        }
Пример #9
0
        private List <VisgroupItem> GetItemHierarchies(MapDocument document)
        {
            var list = new List <VisgroupItem>();

            // add user visgroups
            var visgroups = document.Map.Data.Get <Primitives.MapData.Visgroup>().ToList();

            foreach (var v in visgroups)
            {
                list.Add(new VisgroupItem(v.Name)
                {
                    CheckState = GetVisibilityCheckState(v.Objects),
                    Colour     = v.Colour,
                    Tag        = v
                });
            }

            var auto = new VisgroupItem(AutoVisgroups)
            {
                Disabled = true
            };

            list.Insert(0, auto);

            // add auto visgroups
            var autoVisgroups = document.Map.Data.Get <AutomaticVisgroup>().ToList();
            var parents       = new Dictionary <string, VisgroupItem> {
                { "", auto }
            };

            foreach (var av in autoVisgroups.OrderBy(x => x.Path.Length))
            {
                VisgroupItem parent = auto;
                if (!parents.ContainsKey(av.Path))
                {
                    var path = new List <string>();
                    foreach (var spl in av.Path.Split('/'))
                    {
                        path.Add(spl);
                        var seg = String.Join("/", path);
                        if (!parents.ContainsKey(seg))
                        {
                            var group = new VisgroupItem(_translation.GetString(spl))
                            {
                                Parent   = parent,
                                Disabled = true
                            };
                            list.Add(group);
                            parents[seg] = group;
                        }
                        parent = parents[seg];
                    }
                }
                else
                {
                    parent = parents[av.Path];
                }
                list.Add(new VisgroupItem(_translation.GetString(av.Key))
                {
                    CheckState = GetVisibilityCheckState(av.Objects),
                    Tag        = av,
                    Parent     = parent
                });
            }

            for (var i = list.Count - 1; i >= 0; i--)
            {
                var v = list[i];
                if (v.Tag != null)
                {
                    continue;
                }

                var children = list.Where(x => x.Parent == v).ToList();
                if (children.All(x => x.CheckState == CheckState.Checked))
                {
                    v.CheckState = CheckState.Checked;
                }
                else if (children.All(x => x.CheckState == CheckState.Unchecked))
                {
                    v.CheckState = CheckState.Unchecked;
                }
                else
                {
                    v.CheckState = CheckState.Indeterminate;
                }
            }

            return(list);
        }
Пример #10
0
        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");
            });
        }
Пример #11
0
        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
                });
            });
        }
Пример #12
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");
            });
        }
Пример #13
0
        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");
            });
        }
Пример #14
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");
            });
        }