public override ActionBase GetAction()
 {
     if (this.DiscordActionTypeComboBox.SelectedIndex >= 0)
     {
         DiscordActionTypeEnum actionType = (DiscordActionTypeEnum)this.DiscordActionTypeComboBox.SelectedItem;
         if (actionType == DiscordActionTypeEnum.SendMessage)
         {
             if (this.SendMessageChannelComboBox.SelectedIndex >= 0 && !string.IsNullOrEmpty(this.SendMessageTextBox.Text))
             {
                 DiscordChannel channel = (DiscordChannel)this.SendMessageChannelComboBox.SelectedItem;
                 return(DiscordAction.CreateForChatMessage(channel, this.SendMessageTextBox.Text, this.FilePath.Text));
             }
         }
         else if (actionType == DiscordActionTypeEnum.MuteSelf)
         {
             return(DiscordAction.CreateForMuteSelf(this.MuteDeafenOptionCheckBox.IsChecked.GetValueOrDefault()));
         }
         else if (actionType == DiscordActionTypeEnum.DeafenSelf)
         {
             return(DiscordAction.CreateForDeafenSelf(this.MuteDeafenOptionCheckBox.IsChecked.GetValueOrDefault()));
         }
     }
     return(null);
 }
 public DiscordActionControl(DiscordAction action) : this()
 {
     this.action = action;
 }
 public DiscordActionControl(ActionContainerControl containerControl, DiscordAction action) : this(containerControl) { this.action = action; }