Пример #1
0
        static void Main(string[] args)
        {
            ControllerAccess controllerAccess = new ControllerAccess();
            DxfController    dxfController    = new DxfController(controllerAccess);

            Console.WriteLine("press 'e' to export or 'c' to change the controller state and 'd' to dispose\n");

            while (true)
            {
                char input = Console.ReadKey().KeyChar;
                if (input == 'e')
                {
                    dxfController.ExportToDxf();
                }
                else if (input == 'c')
                {
                    controllerAccess.RaiseEventToChangeControllerState();
                }
                else if (input == 'd')
                {
                    dxfController.Dispose();
                }
            }

            Console.ReadKey();
        }
Пример #2
0
 public DxfController(ControllerAccess controllerAccess)
 {
     _ControllerAccess = controllerAccess;
     _ControllerStateChangedSubscription = _ControllerAccess.StatusChanged.Subscribe(OnStateChanged);
     Console.WriteLine("DxfController object created\n");
 }