protected void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (ServiceAvailable) { P2PService p = new P2PService(); OptionsLoader ol = new OptionsLoader(); p.Url = ol.ServiceUrl; p.ClearEntriesForPeer(GlobalIPAddress); } GlobalThread.Abort(); GlobalTransfer.TransferShutdown(); SaveValues(); EnableListen = false; }
public void PublishFiles() { OptionsLoader ol = new OptionsLoader(); string Connection = "LAN"; Connection = ol.Connection; // Make sure the user wants these files published and the service is available if (ServiceAvailable) { this.pnlNumUsers.Text = " Publishing content list to the ShareBaby service..."; string[,] z = FileLister.GetFileList(this.lstLibrary); P2PService p = new P2PService(); p.Url = ol.ServiceUrl; p.ClearEntriesForPeer(GlobalIPAddress); for (int i = 0; i <= z.GetUpperBound(1); i++) { p.RegisterFile(GlobalIPAddress, z[0, i], Connection, z[1, i], z[2, i]); } } }
protected void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if(ServiceAvailable) { P2PService p = new P2PService(); OptionsLoader ol = new OptionsLoader(); p.Url = ol.ServiceUrl; p.ClearEntriesForPeer(GlobalIPAddress); } GlobalThread.Abort(); GlobalTransfer.TransferShutdown(); SaveValues(); EnableListen = false; }
public void PublishFiles() { OptionsLoader ol = new OptionsLoader(); string Connection = "LAN"; Connection = ol.Connection; // Make sure the user wants these files published and the service is available if(ServiceAvailable) { this.pnlNumUsers.Text = " Publishing content list to the ShareBaby service..."; string[,] z = FileLister.GetFileList(this.lstLibrary); P2PService p = new P2PService(); p.Url = ol.ServiceUrl; p.ClearEntriesForPeer(GlobalIPAddress); for (int i =0 ; i <= z.GetUpperBound(1) ; i++) { p.RegisterFile(GlobalIPAddress, z[0, i], Connection, z[1, i], z[2, i]); } } }