private void Initialize()
        {
            var symbolsPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Symbols",
                ReadOnlyLabel = "Removes special characters (ie. !@#$%^&*)",
                Options       = Symbols,
                IsReadOnly    = true
            };

            var numbersPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Numbers",
                ReadOnlyLabel = "Removes digits 0-9",
                Options       = Numbers,
                IsReadOnly    = true
            };

            var customPreset = new CharacterPresetGUI()
            {
                DisplayName = "Custom",
                Options     = this.custom
            };

            this.GUIPresets = new List <CharacterPresetGUI>
            {
                symbolsPreset,
                numbersPreset,
                customPreset
            };

            this.SelectedPresetIndex = 0;
        }
Exemple #2
0
 public CharacterPresetGUI(CharacterPresetGUI other)
 {
     this.DisplayName   = other.DisplayName;
     this.Options       = other.Options;
     this.ReadOnlyLabel = other.ReadOnlyLabel;
     this.IsReadOnly    = other.IsReadOnly;
 }
Exemple #3
0
        private void Initialize()
        {
            var symbolsPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Symbols",
                ReadOnlyLabel = "Removes special characters (ie. !@#$%^&*)",
                Options       = RemoveCharactersOperation.Symbols,
                IsReadOnly    = true
            };

            var numbersPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Numbers",
                ReadOnlyLabel = "Removes digits 0-9",
                Options       = RemoveCharactersOperation.Numbers,
                IsReadOnly    = true
            };

            var whitespacePreset = new CharacterPresetGUI()
            {
                DisplayName   = "Whitespace",
                ReadOnlyLabel = "Removes whitespace",
                Options       = RemoveCharactersOperation.Whitespace,
                IsReadOnly    = true
            };


            var customOptions = new RemoveCharactersOperation.Configuration();

            customOptions.CharactersToRemove = string.Empty;
            customOptions.IsCaseSensitive    = false;
            customOptions.CharactersAreRegex = false;
            var customPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Custom",
                Options       = customOptions,
                IsReadOnly    = false,
                ReadOnlyLabel = string.Empty
            };

            this.GUIPresets = new List <CharacterPresetGUI>
            {
                symbolsPreset,
                numbersPreset,
                whitespacePreset,
                customPreset
            };
        }
        private void Initialize()
        {
            var symbolsPreset = new CharacterPresetGUI()
            {
                DisplayName   = LocalizationManager.Instance.GetTranslation("symbols"),
                ReadOnlyLabel = LocalizationManager.Instance.GetTranslation("removeSpecialCharacters"),
                PresetID      = RemoveCharactersOperation.PresetID.Symbols,
                IsReadOnly    = true
            };

            var numbersPreset = new CharacterPresetGUI()
            {
                DisplayName   = LocalizationManager.Instance.GetTranslation("numbers"),
                ReadOnlyLabel = LocalizationManager.Instance.GetTranslation("removeDigits"),
                PresetID      = RemoveCharactersOperation.PresetID.Numbers,
                IsReadOnly    = true
            };

            var whitespacePreset = new CharacterPresetGUI()
            {
                DisplayName   = LocalizationManager.Instance.GetTranslation("whitespace"),
                ReadOnlyLabel = LocalizationManager.Instance.GetTranslation("removesWhitespace"),
                PresetID      = RemoveCharactersOperation.PresetID.Whitespace,
                IsReadOnly    = true
            };

            var customPreset = new CharacterPresetGUI()
            {
                DisplayName   = LocalizationManager.Instance.GetTranslation("custom"),
                PresetID      = RemoveCharactersOperation.PresetID.Custom,
                IsReadOnly    = false,
                ReadOnlyLabel = string.Empty
            };

            this.GUIPresets = new List <CharacterPresetGUI>
            {
                symbolsPreset,
                numbersPreset,
                whitespacePreset,
                customPreset
            };
        }
        private void Initialize()
        {
            var symbolsPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Symbols",
                ReadOnlyLabel = "Removes special characters (ie. !@#$%^&*)",
                PresetID      = RemoveCharactersOperation.PresetID.Symbols,
                IsReadOnly    = true
            };

            var numbersPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Numbers",
                ReadOnlyLabel = "Removes digits 0-9",
                PresetID      = RemoveCharactersOperation.PresetID.Numbers,
                IsReadOnly    = true
            };

            var whitespacePreset = new CharacterPresetGUI()
            {
                DisplayName   = "Whitespace",
                ReadOnlyLabel = "Removes whitespace",
                PresetID      = RemoveCharactersOperation.PresetID.Whitespace,
                IsReadOnly    = true
            };

            var customPreset = new CharacterPresetGUI()
            {
                DisplayName   = "Custom",
                PresetID      = RemoveCharactersOperation.PresetID.Custom,
                IsReadOnly    = false,
                ReadOnlyLabel = string.Empty
            };

            this.GUIPresets = new List <CharacterPresetGUI>
            {
                symbolsPreset,
                numbersPreset,
                whitespacePreset,
                customPreset
            };
        }