private void DragDataReceivedCb(object o, DragDataReceivedArgs args) { SelectionData d = args.SelectionData; if (d.Length < 0 && d.Format != 8){ Gtk.Drag.Finish(args.Context, false, false, args.Time); return; } Gtk.Drag.Finish(args.Context, true, true, args.Time); UTF8Encoding encoding = new UTF8Encoding( ); string text = encoding.GetString(d.Data); var diag = new AddChannelDialog(TheApp.Window); diag.Url = text; }
public void AddChannelActivated(object obj, EventArgs args) { using (var diag = new AddChannelDialog(TheApp.Window)) { var response = diag.Run(); diag.Hide(); switch (response) { case (int)ResponseType.Ok: var chan = new Channel(); chan.Url = diag.Url; chan.http_username = diag.Username; chan.http_password = diag.Password; TheApp.CCollection.Add(chan, true); break; } } }