Пример #1
0
        public ManualControlViewModel(Global global)
        {
            _global = global ?? throw new ArgumentNullException();

            AxisX = new AxisViewModel(this, global)
            {
                AxisIndex = 0
            };
            AxisY = new AxisViewModel(this, global)
            {
                AxisIndex = 1
            };
            AxisZ = new AxisViewModel(this, global)
            {
                AxisIndex = 2,
                HomeIsMax = true
            };
            AxisA = new AxisViewModel(this, global)
            {
                AxisIndex = 3
            };
            AxisB = new AxisViewModel(this, global)
            {
                AxisIndex = 4
            };
            AxisC = new AxisViewModel(this, global)
            {
                AxisIndex = 5
            };

            Move = new MoveViewModel(this, global);

            CommandHistory = new CommandHistoryViewModel(this, global);

            SD = new SDViewModel(this, global);

            DirectCommand = new DirectCommandViewModel(this, global);

            Shift = new ShiftViewModel(this, global);

            Tool = new ToolViewModel(this, global);

            Rotate = new RotateViewModel(this, global);

            Custom = new CustomViewModel(this, global);

            WorkOffset = new WorkOffsetViewModel(this, global);

            _global.Com.LocalCom.CommandQueueEmpty  += OnCommandQueueEmpty;
            _global.Com.RemoteCom.CommandQueueEmpty += OnCommandQueueEmpty;
        }
Пример #2
0
        public ManualControlViewModel()
        {
            AxisX = new AxisViewModel(this)
            {
                AxisIndex = 0
            };
            AxisY = new AxisViewModel(this)
            {
                AxisIndex = 1
            };
            AxisZ = new AxisViewModel(this)
            {
                AxisIndex = 2,
                HomeIsMax = true
            };
            AxisA = new AxisViewModel(this)
            {
                AxisIndex = 3
            };
            AxisB = new AxisViewModel(this)
            {
                AxisIndex = 4
            };
            AxisC = new AxisViewModel(this)
            {
                AxisIndex = 5
            };

            Move = new MoveViewModel(this);

            CommandHistory = new CommandHistoryViewModel(this);

            SD = new SDViewModel(this);

            DirectCommand = new DirectCommandViewModel(this);

            Shift = new ShiftViewModel(this);

            Tool = new ToolViewModel(this);

            Rotate = new RotateViewModel(this);

            Custom = new CustomViewModel(this);

            WorkOffset = new WorkOffsetViewModel(this);

            Global.Instance.Com.LocalCom.CommandQueueEmpty  += OnCommandQueueEmpty;
            Global.Instance.Com.RemoteCom.CommandQueueEmpty += OnCommandQueueEmpty;
        }