private void btnGeneralStart_Click(object sender, EventArgs e) { int portMax = 0; if (textBoxGeneralMax.Text.Length == 0 || false == int.TryParse(textBoxGeneralMax.Text, out portMax)) { MessageBox.Show("Invalid data"); return; } int portMin = 0; if (textBoxGeneralMin.Text.Length == 0 || false == int.TryParse(textBoxGeneralMin.Text, out portMin)) { MessageBox.Show("Invalid data"); return; } // initialize vnc client vncClient = new VncMarshall.Client(vncServerPath); // save the matrix setting desktopRow = Convert.ToInt32(numericUpDownRow.Value); desktopColumn = Convert.ToInt32(numericUpDownCol.Value); // start the server int portOpened = connectionMgr.StartServer(portMin, portMax); if (portOpened == -1) { // error start server MessageBox.Show("Error start server", "Error"); return; } this.Text = String.Format("Vistrol Server (Listening Port: {0})", portOpened); notifyIconServer.Text = String.Format("Vistrol server is running at port {0}", portOpened); refreshGeneralPanel(); // save current setting to db mainPresenter.PortMin = portMin; mainPresenter.PortMax = portMax; mainPresenter.ScreenColumn = desktopColumn; mainPresenter.ScreenRow = desktopRow; mainPresenter.VncPath = vncServerPath; // open the telnet command listening CommandParser.GetInstance().Initialize(vncClient, connectionPresenter.runningWndsMgr); Provider = new TelnetServiceProvider(); Servidor = new SocketCommand.TcpServer(Provider, Properties.Settings.Default.TelnetPort); Servidor.Start(); }
public void Initialize(VncMarshall.Client vncClient, Windows.WindowsAppMgr wndMgr) { _clearWall = new ClearWall(wndMgr); _creatPreset = new CreatePreset(); _getInputSourceList = new GetInputSourceList(); _getPresetList = new GetPresetList(); _getRemoteList = new GetRemoteList(); _getWndList = new GetWindowList(); _launchInputSource = new LaunchInputSource(); _launchPreset = new LaunchPreset(vncClient); _launchRemote = new LaunchRemote(vncClient); _messageBox = new MessageBox(); _removePreset = new RemovePreset(); }
public LaunchRemote(VncMarshall.Client vncClient) { this._vncClient = vncClient; }
public ClientPresetCmdImpl(IServer server, int userId, VncMarshall.Client vncClient) { this.clientId = userId; this.server = server; this.vncClient = vncClient; }
/// <summary> /// constructor for external class used (telnet) /// </summary> public ClientPresetCmdImpl(VncMarshall.Client vncClient) { this.vncClient = vncClient; }
public LaunchPreset(VncMarshall.Client vncClient) { this.vncClient = vncClient; }
public ClientVncCmdImpl(IServer server, VncMarshall.Client vncClient) { this.vncClientImpl = vncClient; this.server = server; }