public BasicEventCommandEditorControl(CommandWindow window, OtherEventTypeEnum otherEventType, BasicCommandTypeEnum commandType) { this.window = window; this.otherEventType = otherEventType; this.commandType = commandType; InitializeComponent(); }
private EventCommandItem GetEventCommand(OtherEventTypeEnum eventType) { EventCommand command = ChannelSession.Settings.EventCommands.FirstOrDefault(c => c.OtherEventType.Equals(eventType)); if (command != null) { return(new EventCommandItem(command)); } else { return(new EventCommandItem(eventType)); } }
public EventCommandDetailsControl(EventCommand command) { this.command = command; if (this.command.IsOtherEventType) { this.OtherEventType = this.command.OtherEventType; } else { this.EventType = this.command.EventType; } InitializeComponent(); }
public BasicEventCommandEditorControl(CommandWindow window, EventCommand command) : this(window, command.EventType, BasicCommandTypeEnum.None) { this.window = window; this.command = command; if (this.command.IsOtherEventType) { this.otherEventType = this.command.OtherEventType; } else { this.eventType = this.command.EventType; } InitializeComponent(); }
public static async Task ProcessDonationEventCommand(UserDonationModel donation, OtherEventTypeEnum eventType, Dictionary <string, string> additionalSpecialIdentifiers = null) { GlobalEvents.DonationOccurred(donation); UserViewModel user = new UserViewModel(0, donation.UserName); UserModel userModel = await ChannelSession.Connection.GetUser(user.UserName); if (userModel != null) { user = new UserViewModel(userModel); } EventCommand command = ChannelSession.Constellation.FindMatchingEventCommand(EnumHelper.GetEnumName(eventType)); if (command != null) { Dictionary <string, string> specialIdentifiers = donation.GetSpecialIdentifiers(); if (additionalSpecialIdentifiers != null) { foreach (var kvp in additionalSpecialIdentifiers) { specialIdentifiers[kvp.Key] = kvp.Value; } } await command.Perform(user, arguments : null, extraSpecialIdentifiers : specialIdentifiers); } }
public EventCommand(OtherEventTypeEnum otherEventType, string name) : base(EnumHelper.GetEnumName(otherEventType), CommandTypeEnum.Event, name) { this.OtherEventType = otherEventType; }
public EventCommand() { this.OtherEventType = OtherEventTypeEnum.None; }
public EventCommandItem(OtherEventTypeEnum otherEventType) { this.OtherEventType = otherEventType; }
public EventCommandDetailsControl(OtherEventTypeEnum otherEventType) { this.OtherEventType = otherEventType; InitializeComponent(); }