Ejemplo n.º 1
0
        public void iInitializeComponent()
        {
            //Program vmv = new Program();
            //vmv.Show();
            IPHostEntry hostEntry = Dns.GetHostEntry(Dns.GetHostName());

            IPAddress[] address = hostEntry.AddressList;

            string endpoint = "";

            for (int i = 0; i < address.Count(); i++)
            {
                if (address.GetValue(i).ToString().StartsWith("192.160"))
                {
                    endpoint = "net.p2p://" + address.GetValue(i).ToString() + ":8089/MyChatServer/Chat";
                    break;
                }
            }



            PageContainer vmv2 = new PageContainer(endpoint);


            MainMenu mm = new MainMenu();

            vmv2.LoadControl(mm, true);

            vmv2.Show();
        }