public void ExecuteMobilityInternal() { try { if (MobilityInitialized) { CommandCameraPosition commandCameraPosition = CommandFactory.CreateCommand <CommandCameraPosition>("Camera Position"); commandCameraPosition.Execute(); } } catch (Exception) { LogHelper.GetLogger <OperationFactory>().Debug(string.Format("Execute <{0}> command fail", "Camera Position")); } }
private void ControlForm_Load(object sender, EventArgs e) { this.machineControl.CommandFactory = CommandFactory; CommandCameraPosition commandCameraPosition = CommandFactory.CreateCommand <CommandCameraPosition>("Camera Position"); commandCameraPosition.UpdateMotionPositionHandler += UpdateMotionPositionHandler; CommandMoveStart commandMoveStart = CommandFactory.CreateCommand <CommandMoveStart>("Move Start"); commandMoveStart.UpdateMotionCtrlsHandler += UpdateMotionCtrlsHandler; CommandMoveExit commandMoveExit = CommandFactory.CreateCommand <CommandMoveExit>("Move Exit"); commandMoveExit.UpdateMotionCtrlsHandler += UpdateMotionCtrlsHandler; Operation = new Thread(new ThreadStart(operationThread.ExecuteInternal)); operationThread.Start(); Operation.Start(); //Mobility = new Thread(new ThreadStart(mobilityThread.ExecuteInternal)); //mobilityThread.Start(); //Mobility.Start(); }