private void bVNC_Click(object sender, EventArgs e) { string text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\winvnc.exe"; string str = IP_Def; IP = tIP.Text; if (!string.IsNullOrEmpty(IP)) { str = IP; } if (File.Exists(text)) { Splash splash = new Splash("Starting Remote Control ..."); splash.Show(); splash.Invalidate(); Application.DoEvents(); if (CheckCommands.VNC_Running()) { Process.Start(text, "-kill"); while (CheckCommands.VNC_Running()) { } } Process.Start(text, "-connect " + str + ":5500 -run"); splash.Hide(); splash.Dispose(); Application.DoEvents(); MessageBox.Show("Waiting connection ..."); } else { MessageBox.Show("Remote Control Software is not installed"); } }
private void bVNC_OFF_Click(object sender, EventArgs e) { string text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\winvnc.exe"; if (File.Exists(text)) { if (CheckCommands.VNC_Running()) { Splash splash = new Splash("Stop Remote Control ..."); splash.Show(); splash.Invalidate(); Application.DoEvents(); Process.Start(text, "-kill"); while (CheckCommands.VNC_Running()) { } splash.Hide(); splash.Dispose(); Application.DoEvents(); } else { MessageBox.Show("Remote Control is stoped"); } } else { MessageBox.Show("Remote Control Software is not installed"); } }
private void DLG_VNC_Load(object sender, EventArgs e) { if (CheckCommands.Check_VNC() == null) { bVNC.Enabled = false; bVNC_OFF.Enabled = false; } }
private void bInstall_Click(object sender, EventArgs e) { if (MessageBox.Show("Atention!", "Install Remote Control Software in computer", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } Splash splash = new Splash("Installing Remote Control software..."); splash.Show(); splash.Invalidate(); Application.DoEvents(); if (CheckCommands.CopyPackages("c:\\drivers\\", "vnc_install.exe,data1.zip", _force: false)) { if (CheckCommands.InstallPackage("vnc_install.exe", "/verysilent /norestart")) { if (CheckCommands.CopyPackages("c:\\drivers\\", "data1.zip", _force: true)) { if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\ultravnc.ini")) { File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\ultravnc.ini"); } File.Copy("c:\\drivers\\data1.zip", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\uvnc bvba\\UltraVNC\\ultravnc.ini"); } MessageBox.Show("Remote Control software installed"); if (CheckCommands.Check_VNC() == null) { bVNC.Enabled = false; bVNC_OFF.Enabled = false; } } else { splash.Hide(); MessageBox.Show("Error installing Remote Control software"); } } else { splash.Hide(); MessageBox.Show("Error installing Remote Control software"); } splash.Hide(); splash.Dispose(); }
private void bKey_Click(object sender, EventArgs e) { Process[] processesByName = Process.GetProcessesByName("KVKeyboard"); if (processesByName.Length < 1) { if (File.Exists("c:\\kiosk\\KVKeyboard.exe")) { try { CheckCommands.RunPackage("c:\\kiosk\\", "KVKeyboard.exe", "es"); } catch { MessageBox.Show("Keyboard on screeen not present"); } } else { MessageBox.Show("Keyboard on screeen not present"); } } }