예제 #1
0
        private void BtnDel_Clicked(object?sender, EventArgs e)
        {
            var index = GtkHelper.GetSelectedIndex(LbQueues);

            if (GtkHelper.GetSelectedIndex(LbQueues) >= 0)
            {
                GtkHelper.RemoveAt(this.queueListStore, index);
            }
        }
예제 #2
0
        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;
        }
예제 #3
0
        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();
        }