예제 #1
0
파일: sample8.cs 프로젝트: zcatt/StarUML
        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]);
                }
            }
        }