/* * private void network_FileOffered (Network network, FileOfferedEventArgs args) * { * try { * LogManager.Current.WriteToLog (args.From.NickName + " offers to send you " + args.File.FileName); * * MessageDialog dialog = new MessageDialog (null, * DialogFlags.Modal, * Gtk.MessageType.Question, * ButtonsType.YesNo, * "{0} would like to send you the following file:\n\n{1}\n\nDo you want to accept it?", * args.From.ToString(), * args.File.FileName); * * dialog.Show (); * * if (dialog.Run() == (int)Gtk.ResponseType.Yes) { * //network.DownloadFile (args.From, args.File.FileFullPath, args.File.File.Size); * } * * dialog.Destroy (); * } catch (Exception ex) { * LoggingService.LogError(ex); * Gui.ShowErrorDialog (ex.ToString(), Gui.MainWindow.Window); * } * } */ private void network_ReceivedChatInvite(Network network, Node inviteFrom, ChatRoom room, ChatInviteInfo invitation) { try { ChatRoomInvitationDialog dialog = new ChatRoomInvitationDialog(network, inviteFrom, room, invitation); dialog.Show(); } catch (Exception ex) { Core.LoggingService.LogError(ex); Gui.ShowErrorDialog(ex.ToString(), Gui.MainWindow.Window); } }
/* private void network_FileOffered (Network network, FileOfferedEventArgs args) { try { LogManager.Current.WriteToLog (args.From.NickName + " offers to send you " + args.File.FileName); MessageDialog dialog = new MessageDialog (null, DialogFlags.Modal, Gtk.MessageType.Question, ButtonsType.YesNo, "{0} would like to send you the following file:\n\n{1}\n\nDo you want to accept it?", args.From.ToString(), args.File.FileName); dialog.Show (); if (dialog.Run() == (int)Gtk.ResponseType.Yes) { //network.DownloadFile (args.From, args.File.FileFullPath, args.File.File.Size); } dialog.Destroy (); } catch (Exception ex) { LoggingService.LogError(ex); Gui.ShowErrorDialog (ex.ToString(), Gui.MainWindow.Window); } } */ private void network_ReceivedChatInvite(Network network, Node inviteFrom, ChatRoom room, ChatInviteInfo invitation) { try { ChatRoomInvitationDialog dialog = new ChatRoomInvitationDialog (network, inviteFrom, room, invitation); dialog.Show (); } catch (Exception ex) { LoggingService.LogError(ex); Gui.ShowErrorDialog (ex.ToString(), Gui.MainWindow.Window); } }