private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.TimerTimerComplete); window.CommandSaved += Window_CommandSaved; window.ForceShow(); }
private void AddCommandButton_Click(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.ActionGroup); window.CommandSaved += Window_CommandSaved; window.ForceShow(); }
private void UserSelectedCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((GameQueueMainControlViewModel)this.DataContext).GameQueueUserSelectedCommand = command; }; window.ForceShow(); }
private void RankDownNewCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.UserRankDown); window.CommandSaved += RankDownWindow_CommandSaved; window.ForceShow(); }
private void OpenEditorWindow(ExternalCommand command) { if (command == null) { command = new ExternalCommand(); } var vm = new CommandEditorWindowViewModel(command, ExternalCommands); var window = new CommandEditorWindow() { DataContext = vm }; window.ShowDialog(); if (!vm.IsDone || command.Equals(vm.Command)) { return; } var index = ExternalCommands.IndexOf(command); if (index >= 0) { RemoveExternalComand(command); ExternalCommands.Insert(index, vm.Command); } else { ExternalCommands.Add(vm.Command); } IsDirty = true; UpdateView(); }
private void GiveawayUserJoinedCommand_EditClicked(object sender, RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((GiveawayMainControlViewModel)this.DataContext).GiveawayUserJoinedCommand = command; }; window.ForceShow(); }
private void TradeCommand_EditClicked(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { this.viewModel.TradeCommand = command; }; window.Show(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.ProgressBarGoalReached); window.CommandSaved += Window_CommandSaved; window.Show(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.StreamBossNewStreamBoss); window.CommandSaved += Window_CommandSaved; window.Show(); }
private async void OkButton_Click(object sender, System.Windows.RoutedEventArgs e) { if (this.ViewModel.IsExistingCommandSelected && this.ViewModel.SelectedExistingCommand == null) { return; } MaterialDesignThemes.Wpf.DialogHost.CloseDialogCommand.Execute(true, this); await Task.Delay(500); if (this.ViewModel.IsNewCommandSelected) { if (this.ViewModel.SelectedNewCommandType == this.command.Type) { this.command.ID = Guid.NewGuid(); CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(this.command); window.CommandSaved += Window_CommandSaved; window.ForceShow(); } else { CommandEditorWindow window = new CommandEditorWindow(this.ViewModel.SelectedNewCommandType, this.command.Name, this.command.Actions); window.CommandSaved += Window_CommandSaved; window.ForceShow(); } } else if (this.ViewModel.IsExistingCommandSelected) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(this.ViewModel.SelectedExistingCommand, this.command.Actions); window.CommandSaved += Window_CommandSaved; window.ForceShow(); } }
private void StatusCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((CoinPusherGameCommandEditorWindowViewModel)this.DataContext).StatusCommand = (CustomCommandModel)command; }; window.Show(); }
private void UserFailureCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((WordScrambleGameCommandEditorWindowViewModel)this.DataContext).UserFailureCommand = (CustomCommandModel)command; }; window.ForceShow(); }
private void NewEntranceCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, UserDataEditorWindowViewModel.UserEntranceCommandName); window.CommandSaved += (object s, CommandModelBase command) => { this.viewModel.EntranceCommand = command; }; window.ForceShow(); }
private void ThiefSelectedCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((TreasureDefenseGameCommandEditorWindowViewModel)this.DataContext).ThiefSelectedCommand = (CustomCommandModel)command; }; window.Show(); }
private void NotEnoughPlayersCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((RussianRouletteGameCommandEditorWindowViewModel)this.DataContext).NotEnoughPlayersCommand = (CustomCommandModel)command; }; window.Show(); }
private void MiddleThirdsSucceedCommand_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { ((HeistGameCommandEditorWindowViewModel)this.DataContext).MiddleThirdsSucceedCommand = (CustomCommandModel)command; }; window.ForceShow(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.OverlayLeaderboardNewLeader); window.CommandSaved += Window_CommandSaved; window.ForceShow(); }
private void ExistingEntranceCommandButtons_EditClicked(object sender, RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CommandModelBase>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { this.viewModel.EntranceCommand = command; }; window.ForceShow(); }
private void NewEventCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <EventCommandItemViewModel>(sender).EventType); window.Closed += Window_Closed; window.Show(); }
private void UserOnlyChatCommandButtons_EditClicked(object sender, RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <UserOnlyChatCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { this.viewModel.RefreshUserOnlyChatCommands(); }; window.ForceShow(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Chat); window.CommandSaved += Window_CommandSaved; window.Show(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.TwitchChannelPoints); window.CommandSaved += Window_CommandSaved; window.ForceShow(); }
private void AddCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.StreamlootsCard); window.CommandSaved += Window_CommandSaved; window.ForceShow(); }
private void DefaultLevelUpCommandButtons_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(this.viewModel.DefaultLevelUpCommand); window.CommandSaved += Window_CommandSaved; window.Show(); }
private void NewWebhookCommandButton_Click(object sender, RoutedEventArgs e) { WebhookCommandItemViewModel commandItem = ((Button)sender).DataContext as WebhookCommandItemViewModel; CommandEditorWindow window = new CommandEditorWindow(commandItem.Webhook); window.Closed += Window_Closed; window.ForceShow(); }
private async void AddCustomLevelUpButtom_Click(object sender, System.Windows.RoutedEventArgs e) { if (await this.viewModel.ValidateAddingCustomLevelUpCommand()) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, string.Format("{0} - {1}", MixItUp.Base.Resources.LevelUp, this.viewModel.CustomLevelUpNumber)); window.CommandSaved += CustomLevelUpWindow_CommandSaved; window.Show(); } }
private void CustomProductNewCommandButton_Click(object sender, RoutedEventArgs e) { Button button = (Button)sender; this.lastSelectedProductCommand = (RedemptionStoreProductViewModel)button.DataContext; CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.CustomProductRedemption); window.CommandSaved += Window_CommandSaved; window.Show(); }
private void Strike3Command_EditClicked(object sender, System.Windows.RoutedEventArgs e) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(FrameworkElementHelpers.GetDataContext <CustomCommandModel>(sender)); window.CommandSaved += (object s, CommandModelBase command) => { this.Strike3Command.DataContext = null; this.Strike3Command.DataContext = command; }; window.ForceShow(); }
private void AddUserOnlyCommandButton_Click(object sender, RoutedEventArgs e) { CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.UserOnlyChat, this.viewModel.User.ID); window.CommandSaved += (object s, CommandModelBase command) => { this.viewModel.AddUserOnlyChatCommand((UserOnlyChatCommandModel)command); this.viewModel.RefreshUserOnlyChatCommands(); }; window.ForceShow(); }
private void CommandButtons_EditClicked(object sender, RoutedEventArgs e) { ChatCommandModel command = ((CommandListingButtonsControl)sender).GetCommandFromCommandButtons <ChatCommandModel>(); if (command != null) { CommandEditorWindow window = CommandEditorWindow.GetCommandEditorWindow(command); window.CommandSaved += Window_CommandSaved; window.ForceShow(); } }