예제 #1
0
        public BBotFrontEndViewModel()
        {
            connectionViewModel = new ConnectionViewModel();
            voiceViewModel = new VoiceViewModel(connectionViewModel.ConnectionCOMModel);
            botTerminalViewModel = new BotTerminalViewModel(connectionViewModel.ConnectionCOMModel);
            legsViewModel = new LegsViewModel(connectionViewModel.ConnectionCOMModel);
            quickButtonsViewModel = new QuickButtonsViewModel(connectionViewModel.ConnectionCOMModel);
            eyeViewModel = new EyeViewModel(connectionViewModel.ConnectionCOMModel);

            //Add widgets to a list
            //Currently this list isn't used
            bBotWidgetsList = new List<IRobotWidget>();
            bBotWidgetsList.Add(voiceViewModel.VoiceModel);
            bBotWidgetsList.Add(botTerminalViewModel.BotTerminalModel);
            bBotWidgetsList.Add(legsViewModel.LegsModel);
            bBotWidgetsList.Add(quickButtonsViewModel.QuickButtonsModel);
            bBotWidgetsList.Add(eyeViewModel.EyeModel);
        }
예제 #2
0
        public BBotFrontEndViewModel()
        {
            connectionViewModel   = new ConnectionViewModel();
            voiceViewModel        = new VoiceViewModel(connectionViewModel.ConnectionCOMModel);
            botTerminalViewModel  = new BotTerminalViewModel(connectionViewModel.ConnectionCOMModel);
            legsViewModel         = new LegsViewModel(connectionViewModel.ConnectionCOMModel);
            quickButtonsViewModel = new QuickButtonsViewModel(connectionViewModel.ConnectionCOMModel);
            eyeViewModel          = new EyeViewModel(connectionViewModel.ConnectionCOMModel);

            //Add widgets to a list
            //Currently this list isn't used
            bBotWidgetsList = new List <IRobotWidget>();
            bBotWidgetsList.Add(voiceViewModel.VoiceModel);
            bBotWidgetsList.Add(botTerminalViewModel.BotTerminalModel);
            bBotWidgetsList.Add(legsViewModel.LegsModel);
            bBotWidgetsList.Add(quickButtonsViewModel.QuickButtonsModel);
            bBotWidgetsList.Add(eyeViewModel.EyeModel);
        }
예제 #3
0
        private void btn_WalkStop_Click(object sender, RoutedEventArgs e)
        {
            LegsViewModel v = ( LegsViewModel )DataContext;

            v.LegsModel.Throttle_Stop();
        }
예제 #4
0
        private void btn_WalkBackward_Click(object sender, RoutedEventArgs e)
        {
            LegsViewModel v = ( LegsViewModel )DataContext;

            v.LegsModel.Throttle_Down();
        }