protected override void LoadContent()
        {
            LoadCharacter();
            LoadNpcs();
            LoadSounds();
            base.LoadContent();
            OpenMap();
            //Load2DTileMap();
            LoadIsoTileMap();
            LoadGun();
            LoadWindows();
            LoadItems();
            LoadEnemies();
            oldState = new ButtonState();

            missions = gameRef.Content.Load <MissionFactory>(@"Missions\AllMissions");
            missionManager.AddMission(missions.GetMissionById(0));

            dialogueManager.DialogueSelected += missionManager.OnUpdateEvent;

            AllDialogues allDialogues = gameRef.Content.Load <AllDialogues>(@"Dialogues\AllDialogues");

            DialogueService.GetInstance().AllDialogues = allDialogues.Dialogues;
            DialogueService.GetInstance().RegisterDialogueProcessor(OnDialogueSelected);

            //commandManager.RegisterCommand(Keys.I, OpenEquipmentScreen);
            //commandManager.RegisterCommand(Keys.U, OpenInventoryScreen);
            commandManager.RegisterCommand(Keys.Escape, OpenPauseMenuWindow);
            commandManager.RegisterCommand(Keys.L, OpenMissionLogWindow);
            commandManager.RegisterCommand(Keys.E, OpenDialogueWindow);
            commandManager.RegisterCommand(Keys.C, OpenPlayerInfoWindow);

            //TODO: remove after done testing
            //commandManager.RegisterCommand(Keys.E, PickupItem);
        }
 // Start is called before the first frame update
 void Start()
 {
     dDialogMgr        = GetComponent <DialogueService>();
     mySpeechInputMgr  = GetComponent <SpeechInputService>();
     mySpeechOutputMgr = GetComponent <SpeechOutputService>();
     myAnimator        = myCharacter.GetComponent <Animator>();
 }
Exemple #3
0
        private void Login()
        {
            Connection   = true;
            ReConnection = false;

            if (!_businessLogic.IsAuthenticated())
            {
                if (!_businessLogic.Login(Properties.user.Default.UseServiceLayer))
                {
                    Seconds      = 10;
                    Connection   = false;
                    ReConnection = true;

                    dispatcherTimer          = new DispatcherTimer();
                    dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
                    dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
                    dispatcherTimer.Start();
                }
                else
                {
                    var ds = new DialogueService();
                    ds.ShowAlarmWindowViewDialog();
                    ds.CloseServerDisconnectViewDialog();
                }
            }
        }
Exemple #4
0
 private void CloseWindow(Object obj)
 {
     if (_dialogueService == null)
     {
         _dialogueService = new DialogueService();
     }
     _dialogueService.CloseSystemInfoWindowViewDialog();
 }
Exemple #5
0
        public DialogueServiceTest()
        {
            _repository = Substitute.For <IRepository>();

            IRepositoryProvider provider = new FakeRepositoryProvider(_repository);

            _service = new DialogueService(provider);
        }
Exemple #6
0
 private void CloseWindow(Object obj)
 {
     if (_dialogueService == null)
     {
         _dialogueService = new DialogueService();
     }
     _dialogueService.CloseGiveAudioWindowViewDialog();
 }
Exemple #7
0
 private void CloseWindow(Object obj)
 {
     if (_dialogueService == null)
     {
         _dialogueService = new DialogueService();
     }
     _dialogueService.CloseRecordedVideoWindowViewDialog();
 }
Exemple #8
0
        private void SystemInfo(object _selected)
        {
            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }

            _dialogueService.ShowSystemInfoWindowViewDialog();
        }
Exemple #9
0
        private void ConnectionInfo(object _selected)
        {
            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }

            _dialogueService.ShowConnectionInfoWindowViewDialog();
        }
Exemple #10
0
        private void GiveAudioStream(object _selected)
        {
            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }

            _dialogueService.ShowGiveAudioWindowViewDialog();
        }
Exemple #11
0
        private void LiveStream(object _selected)
        {
            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }

            _dialogueService.ShowLiveStreamWindowViewDialog();
        }
Exemple #12
0
 private void CloseWindow(Object obj)
 {
     if (_dialogueService == null)
     {
         _dialogueService = new DialogueService();
     }
     _dialogueService.CloseLiveStreamWindowViewDialog();
     ((Window)obj).Close();
 }
        public DialogueServiceWithDatabaseTest()
        {
            SetDatabaseEntity();
            _context = new EfContext(Database);

            IRepositoryProvider provider = new FakeRepositoryProvider(new Repository(_context));

            _service = new DialogueService(provider);
        }
Exemple #14
0
        private void RecordedVideo(object _selected)
        {
            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }

            _dialogueService.ShowRecordedVideoWindowViewDialog();
        }
    //string _testString = "<speak version=\"1.0\"><express-as type=\"Hi\">Hi How are you today!</express-as></speak>";

    void Start()
    {
        LogSystem.InstallDefaultReactors();
        Runnable.Run(CreateService());


        myDS = GetComponent <DialogueService>();
        //audioSrc = GetComponent<AudioSource>();
    }
 public TrueManagementSettingViewModel(IRegionManager regionManager, DialogueService dialogService, IEventAggregator eventAggregator)
 {
     this.regionManager     = regionManager;
     this.dialogservice     = dialogService;
     this.eventAggregator   = eventAggregator;
     this.ModifyCommand     = new DelegateCommand(Modify);
     this.UpdateCommand     = new DelegateCommand(Update);
     this.UninstallCommand  = new DelegateCommand(uninstall);
     this.WindowLoadCommand = new DelegateCommand(LoadAction);
     this.NavigateCommand   = new DelegateCommand <string>(Navigate);
 }
Exemple #17
0
 private void GetImage(object _selected)
 {
     DisplayedVideo = _businessLogic.GetRecordedVideo(SelectedCamera?.id, $"{StartDate:yyyyMMdd}T{StartTime:hhmmss}.000Z,c", $"P0Y0M0DT{DurationTime.Hours}H{DurationTime.Minutes}M{DurationTime.Seconds}S");
     Messenger.Default.Send <ViewStreamLink>(new ViewStreamLink()
     {
         Link = DisplayedVideo
     });
     if (_dialogueService == null)
     {
         _dialogueService = new DialogueService();
     }
     _dialogueService.ShowVideoWindowViewDialog();
 }
Exemple #18
0
        private void BigScreen(Object obj)
        {
            string curDir     = Directory.GetCurrentDirectory();
            var    currentDir = String.Format("{0}/video.html?sid={1}&cid={2}&host={3}&h={4}&w={5}", $"file:///{curDir}", _businessLogic.GetLoginSessionId(Properties.user.Default.UseServiceLayer), ((CameraContract)obj).id, new Uri(ConfigurationManager.AppSettings["baseUrl"]).Authority, 460, 620);

            var liveStream = new Uri(Properties.user.Default.UseServiceLayer ? _businessLogic.GetLive(((CameraContract)obj).id, "format", "fmp4") : currentDir).AbsoluteUri;

            Messenger.Default.Send <ViewStreamLink>(new ViewStreamLink()
            {
                Link = liveStream
            });

            if (_dialogueService == null)
            {
                _dialogueService = new DialogueService();
            }
            _dialogueService.ShowVideoWindowViewDialog();
        }