/// <summary> /// creates a new <see cref="InfoManagementWindow"/> /// </summary> /// <param name="module">module used to access infos</param> public InfoManagementWindow(InfoModule module) { InitializeComponent(); this.module = module; foreach (Info info in module.GetInfos()) { infos.Add(new InfoItem(info)); } grdInfos.ItemsSource = infos; infos.ItemChanged += OnListItemChanged; infos.ItemRemoved += OnItemRemoved; }
public override void ExecuteCommand(IChatChannel channel, StreamCommand command) { SendMessage(channel, command.User, $"List of available infos: {string.Join(", ", module.GetInfos().Select(i => i.Key))}"); }