public EventCommandOptions(ShowOptionsCommand refCommand, EventPage refPage, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; mCurrentPage = refPage; InitLocalization(); txtShowOptions.Text = mMyCommand.Text; txtShowOptionsOpt1.Text = mMyCommand.Options[0]; txtShowOptionsOpt2.Text = mMyCommand.Options[1]; txtShowOptionsOpt3.Text = mMyCommand.Options[2]; txtShowOptionsOpt4.Text = mMyCommand.Options[3]; cmbFace.Items.Clear(); cmbFace.Items.Add(Strings.General.none); cmbFace.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Face)); if (cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)) > -1) { cmbFace.SelectedIndex = cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)); } else { cmbFace.SelectedIndex = 0; } UpdateFacePreview(); }
private void RegisterMenuCommands() { ICommandManagerService commandManager = _serviceProvider.GetService <SCommandManagerService, ICommandManagerService>(); var showAppVeyorWindowCommand = new ShowAppVeyorWindowCommand(_serviceProvider); _menuCommandService.AddCommand(showAppVeyorWindowCommand); commandManager.RegisterCommand(showAppVeyorWindowCommand); var showOptionsCommand = new ShowOptionsCommand(_serviceProvider); _menuCommandService.AddCommand(showOptionsCommand); commandManager.RegisterCommand(showOptionsCommand); var refrshCommand = new RefreshCommand(_serviceProvider); _menuCommandService.AddCommand(refrshCommand); commandManager.RegisterCommand(refrshCommand); }
private static string GetCommandText(ShowOptionsCommand command, MapInstance map) { return(Strings.EventCommandList.showoptions.ToString(Truncate(command.Text, 30))); }