private void BtnDel_Clicked(object?sender, EventArgs e) { var index = GtkHelper.GetSelectedIndex(LbQueues); if (GtkHelper.GetSelectedIndex(LbQueues) >= 0) { GtkHelper.RemoveAt(this.queueListStore, index); } }
private void BtnOK_Clicked(object?sender, EventArgs e) { var selectedIndex = GtkHelper.GetSelectedIndex(LbQueues); var queueId = this.queueIds.ElementAt(selectedIndex); QueueSelected?.Invoke(this, new QueueSelectionEventArgs(queueId, downloadIds)); QueueSelected = null; Result = true; this.group.RemoveWindow(this); Visible = false; }
private void BtnAdd_Clicked(object?sender, EventArgs e) { var index = GtkHelper.GetSelectedIndex(LbQueues); if (index < 0) { return; } var dlg = NewQueueDialog.CreateFromGladeFile(this, this.group, (queue, newQueue) => { LoadQueueDetails(queue); }, GtkHelper.GetSelectedValue <DownloadQueue>(this.LbQueues, 1)); dlg.Run(); dlg.Destroy(); dlg.Dispose(); }