コード例 #1
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.TimerTimerComplete);

            window.CommandSaved += Window_CommandSaved;
            window.ForceShow();
        }
コード例 #2
0
        private void AddCommandButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.ActionGroup);

            window.CommandSaved += Window_CommandSaved;
            window.ForceShow();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        private void RankDownNewCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.UserRankDown);

            window.CommandSaved += RankDownWindow_CommandSaved;
            window.ForceShow();
        }
コード例 #5
0
        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();
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        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();
        }
コード例 #8
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.ProgressBarGoalReached);

            window.CommandSaved += Window_CommandSaved;
            window.Show();
        }
コード例 #9
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.StreamBossNewStreamBoss);

            window.CommandSaved += Window_CommandSaved;
            window.Show();
        }
コード例 #10
0
        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();
            }
        }
コード例 #11
0
        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();
        }
コード例 #12
0
        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();
        }
コード例 #13
0
        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();
        }
コード例 #17
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Custom, MixItUp.Base.Resources.OverlayLeaderboardNewLeader);

            window.CommandSaved += Window_CommandSaved;
            window.ForceShow();
        }
コード例 #18
0
        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();
        }
コード例 #19
0
        private void NewEventCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(FrameworkElementHelpers.GetDataContext <EventCommandItemViewModel>(sender).EventType);

            window.Closed += Window_Closed;
            window.Show();
        }
コード例 #20
0
        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();
        }
コード例 #21
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.Chat);

            window.CommandSaved += Window_CommandSaved;
            window.Show();
        }
コード例 #22
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.TwitchChannelPoints);

            window.CommandSaved += Window_CommandSaved;
            window.ForceShow();
        }
コード例 #23
0
        private void AddCommandButton_Click(object sender, RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(CommandTypeEnum.StreamlootsCard);

            window.CommandSaved += Window_CommandSaved;
            window.ForceShow();
        }
コード例 #24
0
        private void DefaultLevelUpCommandButtons_EditClicked(object sender, System.Windows.RoutedEventArgs e)
        {
            CommandEditorWindow window = new CommandEditorWindow(this.viewModel.DefaultLevelUpCommand);

            window.CommandSaved += Window_CommandSaved;
            window.Show();
        }
コード例 #25
0
        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();
        }
コード例 #26
0
 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();
     }
 }
コード例 #27
0
        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();
        }
コード例 #28
0
        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();
        }
コード例 #29
0
        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();
        }
コード例 #30
0
        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();
            }
        }