Ejemplo n.º 1
0
 private void _wakeupServerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Config.Current != null)
     {
         SendWakeOnLanArgs args = new SendWakeOnLanArgs()
         {
             TcpServerName = Config.Current.TcpServerName,
             TcpPort       = Config.Current.TcpPort,
             IpAddress     = Config.Current.IpAddress,
             MacAddresses  = Config.Current.MacAddresses
         };
         ThreadPool.QueueUserWorkItem(new WaitCallback(SendWakeOnLan), args);
     }
 }
Ejemplo n.º 2
0
        private void SendWakeOnLan(object state)
        {
            SendWakeOnLanArgs args = state as SendWakeOnLanArgs;

            if (args != null &&
                !String.IsNullOrEmpty(args.ServerName))
            {
                ServerSettings serverSettings = new ServerSettings();
                serverSettings.ServerName             = args.ServerName;
                serverSettings.Port                   = args.Port;
                serverSettings.Transport              = ServiceTransport.Https;
                serverSettings.UserName               = args.UserName;
                serverSettings.Password               = args.Password;
                serverSettings.WakeOnLan.IPAddress    = args.IpAddress;
                serverSettings.WakeOnLan.MacAddresses = args.MacAddresses;
                serverSettings.WakeOnLan.Enabled      = true;
                Proxies.Initialize(serverSettings, false, new ProxyLogger());
            }
        }
Ejemplo n.º 3
0
        private void SendWakeOnLan(object state)
        {
            SendWakeOnLanArgs args = state as SendWakeOnLanArgs;

            if (args != null &&
                !String.IsNullOrEmpty(args.TcpServerName))
            {
                ServerSettings serverSettings = new ServerSettings();
                serverSettings.ServerName = args.TcpServerName;
                serverSettings.Port       = args.TcpPort;
                serverSettings.Transport  = ServiceTransport.NetTcp;

                serverSettings.WakeOnLan.IPAddress    = args.IpAddress;
                serverSettings.WakeOnLan.MacAddresses = args.MacAddresses;
                serverSettings.WakeOnLan.Enabled      = true;

                ServiceChannelFactories.Initialize(serverSettings, false);
            }
        }
Ejemplo n.º 4
0
 private void _wakeupServerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Config.Current != null)
     {
         var args = new SendWakeOnLanArgs()
         {
             ServerName = Config.Current.ServerName,
             Port = Config.Current.Port,
             UserName = Config.Current.UserName,
             Password = Config.Current.Password,
             IpAddress = Config.Current.IpAddress,
             MacAddresses = Config.Current.MacAddresses
         };
         ThreadPool.QueueUserWorkItem(new WaitCallback(SendWakeOnLan), args);
     }
 }