Beispiel #1
0
 public void Process_start_3()
 {
     newprocess.StartInfo.FileName  = "netsh";
     newprocess.StartInfo.Arguments = "wlan start hostednetwork";
     try
     {
         using (Process execute = Process.Start(newprocess.StartInfo))
         {
             execute.WaitForExit();
             int selectedIndex = comboBox1.SelectedIndex;
             var conn          = virtualRouterHost.GetSharableConnections();
             List <SharableConnection> listOfSharableConnections = conn.ToList();
             virtualRouterHost.Start(listOfSharableConnections[selectedIndex]);
             Process_progressBar.Increment(25);
             button_panel.Visible     = true;
             Play_Stop_button.Text    = "Stop";
             SSID_textBox.Enabled     = false;
             Password_textBox.Enabled = false;
             comboBox1.Enabled        = false;
             bgthread = new Thread(() => ConnectedPeersTracker());
             bgthread.Start();
         }
     }
     catch
     {
         //nothing
     }
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     wlanEnabler enabler = new wlanEnabler();
     VirtualRouterHost.IVirtualRouterHost host;
     host = new VirtualRouterHost.VirtualRouterHost();
     host.SetPassword("egordasha");
     host.SetConnectionSettings("User-AP", 10);
     IEnumerable<SharableConnection> list = host.GetSharableConnections();
     SharableConnection ics = (from c in list
                               where c.Name.Contains("vpnclient")
                               select c).First();
     if (host.Start(ics) && host.SetIP("2.0.4.1"))
         Console.ReadLine();
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            wlanEnabler enabler = new wlanEnabler();

            VirtualRouterHost.IVirtualRouterHost host;
            host = new VirtualRouterHost.VirtualRouterHost();
            host.SetPassword("egordasha");
            host.SetConnectionSettings("User-AP", 10);
            IEnumerable <SharableConnection> list = host.GetSharableConnections();
            SharableConnection ics = (from c in list
                                      where c.Name.Contains("vpnclient")
                                      select c).First();

            if (host.Start(ics) && host.SetIP("2.0.4.1"))
            {
                Console.ReadLine();
            }
        }