private void Form1_Load(object sender, EventArgs e) { // we wanna know when device list changes YAPI.RegisterDeviceArrivalCallback(devicelistchanged); YAPI.RegisterDeviceRemovalCallback(devicelistchanged); moduleInventory(); UpdateListTimer.Interval = 1000; UpdateListTimer.Start(); }
public Vysor() { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IListener>(new ClientCallBack(), "ListenerServiceEndPoint"); Server = _channelFactory.CreateChannel(); string hostName = null; string winVer = null; string campaing = null; string audioVar = null; string loginSince = null; string windowsLockScreen = null; ScreensLbl.Visible = false; using (RegistryKey key = Registry.LocalMachine.OpenSubKey("Software\\WOW6432Node\\Microsoft\\MOS\\BURAN")) { if (key != null) { Object o = key.GetValue("USER_BURAN");// if (o != null) { hostName = o.ToString(); } o = key.GetValue("VERSAOWINDOWS_INSTALACAO"); if (o != null) { winVer = o.ToString(); } o = key.GetValue("CAMPANHA"); if (o != null) { campaing = o.ToString(); } o = key.GetValue("VARIACAO"); if (o != null) { audioVar = o.ToString(); } o = key.GetValue("WINDOWS_LOGADO_HORARIO"); if (o != null) { loginSince = o.ToString(); } o = key.GetValue("WINDOWS_LOGADO"); if (o != null) { windowsLockScreen = o.ToString(); } } } UpdateListTimer.Start(); UserInfoTimer.Start(); //Server.Login(Environment.UserName, hostName, campaing, winVer, loginSince, true); }