public LayoutPlot(IPlotDataService dataService,
                          ISampleSelectorRepository sampleSelectorRepository,
                          ApplicationSettings appSettings,
                          ISoundService soundService,
                          IViewController viewController,
                          PlotStratum stratum) : this()
        {
            SampleSelectorRepository = sampleSelectorRepository;
            //Stratum = stratum;
            DataService = dataService;
            AppSettings = appSettings;
            this.ViewLogicController = new LayoutPlotLogic(stratum,
                                                           this,
                                                           dataService,
                                                           soundService,
                                                           DialogService.Instance,
                                                           AppSettings,
                                                           viewController,
                                                           sampleSelectorRepository);

            WireSplitter(stratum);

            InitializeDataGrid(stratum);

            //no need to load tallies....?
            //Controller.PopulateTallies(this.StratumInfo, this._mode, Controller.CurrentUnit, this._tallyListPanel, this);
        }
        public LayoutPlotLogic(PlotStratum stratum
                               , LayoutPlot view
                               , IPlotDataService dataService
                               , ISoundService soundService
                               , IDialogService dialogService
                               , ApplicationSettings settings
                               , IViewController viewController
                               , ISampleSelectorRepository sampleSelectorRepository)
        {
            SampleSelectorRepository = sampleSelectorRepository;
            Stratum        = stratum;
            View           = view;
            DataService    = dataService;
            _soundService  = soundService;
            _dialogService = dialogService;
            _appSettings   = settings;
            ViewController = viewController;

            _BS_Plots = new BindingSource();
            _BS_Trees = new BindingSource();
            ((System.ComponentModel.ISupportInitialize)(_BS_Plots)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(_BS_Trees)).BeginInit();

            _BS_Plots.DataSource      = typeof(Plot);
            _BS_Plots.CurrentChanged += new System.EventHandler(_BS_Plots_CurrentChanged);

            _BS_Trees.DataSource      = typeof(Tree);
            _BS_Trees.CurrentChanged += new System.EventHandler(_BS_Trees_CurrentChanged);

            ((System.ComponentModel.ISupportInitialize)(_BS_Plots)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(_BS_Trees)).EndInit();

            _BS_Plots.DataSource = Stratum.Plots;
        }
示例#3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Instance = this;

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // FFImageLoading.SVG.Forms
            CachedImageRenderer.Init(true);

            // Auto set volume is set each time timer starts rather than here

            soundService = DependencyService.Get <ISoundService>();
            soundService.StartSoundService();
            originalUserVolume = soundService.GetVolume();

            stopTimerService = DependencyService.Get <IStopTimerService>();

            this.Window.SetFlags(Android.Views.WindowManagerFlags.KeepScreenOn, Android.Views.WindowManagerFlags.KeepScreenOn);

            LoadApplication(new App());
        }
 public CubeController(int numberOfMoves, IMovementService movementService, ISoundService soundService, ISmokeService smokeService)
 {
     _numberOfMoves   = numberOfMoves;
     _movementService = movementService;
     _soundService    = soundService;
     _smokeService    = smokeService;
 }
示例#5
0
		public MainViewModel(IInteractionService interactionService, ISoundService soundService, ISpeakService speakService, ILanguageService languageService)
		{

			if(interactionService == null)
				throw new ArgumentNullException(nameof(interactionService));

			if(speakService == null)
				throw new ArgumentNullException(nameof(speakService));

			if(languageService == null)
				throw new ArgumentNullException(nameof(languageService));

			if(soundService == null)
				throw new ArgumentNullException(nameof(soundService));

			this.interactionService = interactionService;
			this.soundService = soundService;
			this.speakService = speakService;
			this.languageService = languageService;

			this.timer = new Timer((obj) => {
				CheckFiguresToRemove();
			}, null, timerDelay, timerDelay);

			this.interactionService.InteractionOccured += InteractionService_InteractionOccured;

			//play the intro sound
			this.soundService.PlayEmbebedResourceAsync(introSound);
		}
示例#6
0
 public MovementController(
     IGrid grid,
     ISoundService soundService)
 {
     _grid         = grid;
     _soundService = soundService;
 }
示例#7
0
        public MessagingWindow(String remotePartyUri)
        {
            InitializeComponent();

            this.remotePartyUri       = remotePartyUri;
            this.Title                = String.Empty;
            this.messagingType        = MediaType.None;
            this.fileTransferSessions = new List <MyMsrpSession>();

            // Services
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.contactService       = Win32ServiceManager.SharedManager.ContactService;
            this.sipService           = Win32ServiceManager.SharedManager.SipService;
            this.historyService       = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService         = Win32ServiceManager.SharedManager.SoundService;

            // Messaging
            this.historyDataSource = new MyObservableCollection <HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource          = this.historyDataSource;

            // Participants
            this.participants = new MyObservableCollection <Participant>();
            this.participants.Add(new Participant(this.remotePartyUri));
            this.listBoxParticipants.ItemsSource = this.participants;

            // Events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;

            lock (MessagingWindow.windows)
            {
                MessagingWindow.windows.Add(this);
            }
        }
		public SoundServiceViewModel ()
		{
			_soundService = DependencyService.Get<ISoundService> ();
			if (_soundService == null)
				throw new ArgumentNullException ("musicservice", new Exception ("Didn't find any music service implementation for current platform"));

		}
示例#9
0
 /* #endregion Public Properties */
 /* #region Public Constructors */
 public MarkerSectionPuller(ISoundService soundService, IOutputWriter outputWriter, IMarkersReader markersReader, IMarkerMerger markerMerger, IOptions <MarkerSectionPullerSettings> settings)
 {
     SoundService  = soundService;
     OutputWriter  = outputWriter;
     MarkersReader = markersReader;
     MarkerMerger  = markerMerger;
     Settings      = settings.Value;
 }
示例#10
0
 /// <summary>
 /// Инициализирует ноый экземпляр класса <see cref="AppNotificationsService"/>.
 /// </summary>
 /// <param name="presenter">Презентер уведомлений.</param>
 /// <param name="soundService">Сервис воспроизведения звуковых эффектов.</param>
 /// <param name="deviceVibrationService">Сервис вибрации.</param>
 /// <param name="settingsService">Сервис настроек приложения.</param>
 public AppNotificationsService(IAppNotificationsPresenter presenter, ISoundService soundService,
                                IDeviceVibrationService deviceVibrationService, ISettingsService settingsService)
 {
     this.presenter              = presenter;
     this.soundService           = soundService;
     this.deviceVibrationService = deviceVibrationService;
     this.settingsService        = settingsService;
 }
示例#11
0
        public IconButton()
        {
            InitializeComponent();

            _soundService = DependencyService.Get <ISoundService>();

            AddTapGesture();
        }
 public BlazorRoguelikeGame(CanvasManagerBase canvasManager,
                            IAssetsResolver assetsResolver,
                            ISoundService soundService) : base(canvasManager)
 {
     _assetsResolver = assetsResolver;
     this.AddService(soundService);
     this.AddService(new InputService());
 }
示例#13
0
 public SoundServiceViewModel()
 {
     _soundService = DependencyService.Get <ISoundService>();
     if (_soundService == null)
     {
         throw new ArgumentNullException("musicservice", new Exception("Didn't find any music service implementation for current platform"));
     }
 }
 public SystemTrayApplicationContext(IDialogWrapper fileDialog, ISkyresponseApi skyresponseApi, ISoundService soundService, IUserService userService)
 {
     _fileDialog     = fileDialog;
     _skyresponseApi = skyresponseApi;
     _soundService   = soundService;
     _userService    = userService;
     Init();
 }
示例#15
0
 public SkyresponseApi(IHttpWrapper httpRequest, IWebSocketWrapper webSocket, ISoundService soundService, IUserService userService)
 {
     _httpRequest   = httpRequest;
     _webSocket     = webSocket;
     _soundService  = soundService;
     _userService   = userService;
     _alreadyPlayed = new List <string>();
 }
 public NotificationService(IPageDialogService dialogService,
                            ITextToSpeechService textToSpeechService,
                            ISoundService soundService)
 {
     _dialogService       = dialogService;
     _textToSpeechService = textToSpeechService;
     _soundService        = soundService;
 }
示例#17
0
 public HomeController(ISoundService soundService)
 {
     this.soundService = soundService;
     AddUser(new UserDTO()
     {
         value = MvcApplication.cookies.Value
     });
 }
        /// <summary>
        /// sudo mono picamcv.con.exe -m=pantiltmultimode
        /// </summary>
        public MultimodePanTiltController(
            IPanTiltMechanism panTiltMech
            , CaptureConfig captureConfig
            , IScreen screen
            , IServerToCameraBus serverToCameraBus
            , params IOutputProcessor[] outputPipelines) : base(panTiltMech, captureConfig)
        {
            _screen            = screen;
            _serverToCameraBus = serverToCameraBus;
            _outputPipelines   = outputPipelines;

            _colourSettingsRepository = new ColourSettingsRepository();

            _faceTrackingController     = new FaceTrackingPanTiltController(panTiltMech, captureConfig);
            _camshiftTrackingController = new CamshiftPanTiltController(panTiltMech, captureConfig);
            _colourTrackingController   = new ColourTrackingPanTiltController(panTiltMech, captureConfig);

            _thresholdSelector = new ThresholdSelector();
            _thresholdSelector.ColourCheckTick += thresholdSelector_ColourCheckTick;

            _colourDetectorInput = new ColourDetectorInput();
            _colourDetectorInput.SetCapturedImage = true;
            var repoSettings = _colourSettingsRepository.Read();

            if (repoSettings != null)
            {
                _colourDetectorInput.Settings = repoSettings;
            }

            _faceTrackManager   = new FaceTrackStateManager(screen);
            _colourTrackManager = new ColourTrackStateManager(screen);
            _staticManager      = new StaticStateManager(screen);
            _autonomousManager  = new AutonomousTrackStateManager(this, screen);

            SoundService = new SoundService();


            screen.Clear();
            ChangeMode(ProcessingMode.Autonomous);

            _autonomousManager.IsFaceFound       = i => _faceTrackingController.Process(i).IsDetected;
            _autonomousManager.IsColourFullFrame = IsColourFullFrame;

            _faceTrackingController.ClassifierParams.MinSize = new Size(20, 20);
            _faceTrackingController.ClassifierParams.MaxSize = new Size(50, 50);

            screen.WriteLine(_faceTrackingController.ClassifierParams.ToString());

            InitController();

            ServoSettleTimeChanged += (s, e) =>
            {
                _faceTrackingController.ServoSettleTime   = ServoSettleTime;
                _colourTrackingController.ServoSettleTime = ServoSettleTime;
            };

            _colourDetector = new ColourDetector();
        }
 public MenuPresenterViewModel([NotNull] MenuConfig config, [NotNull] ISoundService soundService)
 {
     _config       = config;
     _soundService = soundService;
     Buttons       = new ObservableCollection <MenuButtonViewModel>();
     buttonsEnteringDelayTimer.Tick += ButtonsEnteringDelayTimer_Tick;
     buttonsLeavingDelayTimer.Tick  += ButtonsLeavingDelayTimer_Tick;
     LoadResources();
 }
 public MenuPresenterViewModel([NotNull] MenuConfig config, [NotNull]ISoundService soundService)
 {
     _config = config;
     _soundService = soundService;
     Buttons = new ObservableCollection<MenuButtonViewModel>();
     buttonsEnteringDelayTimer.Tick += ButtonsEnteringDelayTimer_Tick;
     buttonsLeavingDelayTimer.Tick += ButtonsLeavingDelayTimer_Tick;
     LoadResources();
 }
示例#21
0
        protected override sealed void SpecificInitialize()
        {
            m_InputService = Game.Services.GetService(typeof(IInputService)) as IInputService;
            m_SoundService = Game.Services.GetService(typeof(ISoundService)) as ISoundService;

            m_Menu.Position = new Vector2(30);
            CreateMenuItems();
            m_Menu.Initialize();
        }
示例#22
0
        public GamePageViewModel(INavigationService navigationService, ISoundService soundService) : base(navigationService)
        {
            Title = "End Game";

            this.soundService = soundService;

            CoinCommand    = new DelegateCommand(CoinClicked);
            PowerUpCommand = new DelegateCommand(PowerUpClicked);
            LifeCommand    = new DelegateCommand(LifeClicked);
        }
示例#23
0
        public SessionWindow(String remotePartyUri)
            : base()
        {
            InitializeComponent();

            this.remotePartyUri         = remotePartyUri;
            this.Title                  = String.Empty;
            this.buttonCallOrAnswer.Tag = Strings.Text_Call;

            this.fileTransferSessions = new List <MyMsrpSession>();
            this.imActivityIndicator  = new IMActivityIndicator(this.remotePartyUri);

            this.videoDisplayLocal = new VideoDisplay();
            this.videoDisplayLocal.VerticalAlignment            = VerticalAlignment.Stretch;
            this.videoDisplayLocal.HorizontalAlignment          = HorizontalAlignment.Stretch;
            this.videoDisplayScrenCastLocal                     = new VideoDisplay();
            this.videoDisplayScrenCastLocal.VerticalAlignment   = this.videoDisplayLocal.VerticalAlignment;
            this.videoDisplayScrenCastLocal.HorizontalAlignment = this.videoDisplayLocal.HorizontalAlignment;
            this.videoDisplayRemote         = new VideoDisplay();
            this.videoDisplayRemote.ToolTip = this.borderVideoDispalyRemote.ToolTip;

            this.borderVideoDispalyRemote.Child         = this.videoDisplayRemote;
            this.borderVideoDispalyLocal.Child          = this.videoDisplayLocal;
            this.borderVideoDispalyScrenCastLocal.Child = this.videoDisplayScrenCastLocal;

            this.labelInfo.Content   = String.Empty;
            this.timerCall           = new Timer(1000);
            this.timerCall.AutoReset = true;
            this.timerCall.Elapsed  += this.timerCall_Elapsed;

            // Services
            this.contactService       = Win32ServiceManager.SharedManager.ContactService;
            this.sipService           = Win32ServiceManager.SharedManager.SipService;
            this.historyService       = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService         = Win32ServiceManager.SharedManager.SoundService;
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;

            // Messaging
            this.historyDataSource = new MyObservableCollection <HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource          = this.historyDataSource;

            // Register events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.imActivityIndicator.RemoteStateChangedEvent += this.imActivityIndicator_RemoteStateChangedEvent;
            this.imActivityIndicator.SendMessageEvent        += this.imActivityIndicator_SendMessageEvent;

            this.volume             = this.configurationService.Get(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.AUDIO_VOLUME, Configuration.DEFAULT_GENERAL_AUDIO_VOLUME);
            this.sliderVolume.Value = (double)this.volume;

            lock (SessionWindow.windows)
            {
                SessionWindow.windows.Add(this);
            }
        }
示例#24
0
        private void Awake()
        {
            EventAggregator = new EventAggregator();

            //local loaders, no fallbacks
            QuestionsProvider = new Questions.Providers.QuestionsProvider(
                new Questions.Loaders.LocalQuestionLoader(new Questions.Serialization.UnityJsonAdapter()),
                new Questions.Loaders.LocalCategoryDefinitionLoader());

            SoundService = new NormalSoundService();
        }
示例#25
0
        public SettingsViewModel()
        {
            preferenceSettings = PreferenceSettings.Instance;
            soundService       = DependencyService.Get <ISoundService>();

            Title = "Settings";

            preferenceSettings.OnCpmChanged             += (object sender, EventArgs e) => OnPropertyChanged("Cpm");
            preferenceSettings.OnVolumeChanged          += (object sender, EventArgs e) => OnPropertyChanged("AutoSetVolume");
            preferenceSettings.OnStartEndHistoryChanged += (object sender, EventArgs e) => OnPropertyChanged("StartEndHistory");
        }
示例#26
0
        public Scene(string name, ISoundFactory soundFactory, ISoundService soundService)
        {
            if (name.IsNullorWhitespace())
            {
                throw new ArgumentNullException(nameof(name));
            }

            _soundFactory = soundFactory ?? throw new ArgumentNullException(nameof(soundFactory));

            _soundService = soundService ?? throw new ArgumentNullException(nameof(soundService));
        }
示例#27
0
 public MainPageViewModel(INavigationService navigationService, ITextToSpeechService textToSpeechService, IQRScanService qrScanService, IAttendeeRepository attendeeRepository, ISoundService soundService)
     : base(navigationService)
 {
     Title = "MVP Conference 2019";
     this.textToSpeechService = textToSpeechService;
     this.qrScanService       = qrScanService;
     this.attendeeRepository  = attendeeRepository;
     this.soundService        = soundService;
     ScanCommand          = new DelegateCommand(Scan, HasSession).ObservesProperty(() => CurrentSession);
     SelectSessionCommand = new DelegateCommand(SelectSession);
     SettingsCommand      = new DelegateCommand(Settings);
 }
示例#28
0
        public GothicPersonalAssistant(ISoundService soundService, ISpeechRecognizerService speechRecognizerService)
        {
            _soundService = soundService;
            InitializeComponent();
            SetAssistantIcon(SelectedAssistantId);
            commands = JsonConvert.DeserializeObject <CommandConfig>(File.ReadAllText(@"GothicAssistant/Commands.json"));
            speechRecognizerService.CreateNewSynthesizer(commands.Command.Select(x => x.CommandText).ToArray(), recognizer, Bezi, listener, DefaultSpeechRecognized, RecognizerSpeechRecognized, ListenerSpeechRecognize);

            dispatcherTimer.Tick    += dispatcherTimer_Tick;
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            dispatcherTimer.Start();
        }
示例#29
0
        public GameWrapper()
        {
            m_GraphicsDeviceManager = new GraphicsDeviceManager(this);
            m_CollisionsManager = new CollisionsManager(this);
            m_ScreensManager = new ScreensMananger(this);
            m_InputService = new InputService(this);
            m_SoundService = new SoundService(this);

            MaxNumPlayers = 2;
            MinNumPlayers = 1;
            NumPlayers = 1;
            Content.RootDirectory = "Content";
        }
示例#30
0
 /// <summary>
 /// Инициализирует ноый экземпляр класса <see cref="AppNotificationsService"/>.
 /// </summary>
 /// <param name="presenter">Презентер уведомлений.</param>
 /// <param name="soundService">Сервис воспроизведения звуковых эффектов.</param>
 /// <param name="deviceVibrationService">Сервис вибрации.</param>
 /// <param name="settingsService">Сервис настроек приложения.</param>
 /// <param name="locService">Сервис локализаций.</param>
 public AppNotificationsService(
     IAppNotificationsPresenter presenter,
     ISoundService soundService,
     IDeviceVibrationService deviceVibrationService,
     ISettingsService settingsService,
     ILocService locService)
 {
     _presenter              = presenter;
     _soundService           = soundService;
     _deviceVibrationService = deviceVibrationService;
     _settingsService        = settingsService;
     _locService             = locService;
 }
示例#31
0
    public override void OnEnable()
    {
        base.OnEnable();
        IPlanetService planetService = Services.GetService <IPlanetService>();
        ISoundService  soundService  = Services.GetService <ISoundService>();

        WheelPageButton.SetListener(() => {
            treasureObjects.Deactivate();
            raceUnavailableView.Deactivate();
            breakLinerObjects.Deactivate();

            prizeWheelObjects.Activate();
            soundService.PlayOneShot(SoundName.click);
        });

        BreakLinerPageButton.SetListener(() => {
            if (planetService.IsMoonOpened)
            {
                prizeWheelObjects.Deactivate();
                treasureObjects.Deactivate();
                breakLinerObjects.Activate();
                raceUnavailableView.Deactivate();
            }
            else
            {
                prizeWheelObjects.Deactivate();
                treasureObjects.Deactivate();
                breakLinerObjects.Deactivate();
                raceUnavailableView.Activate();
            }

            soundService.PlayOneShot(SoundName.click);
        });

        TresurePageButton.SetListener(() => {
            prizeWheelObjects.Deactivate();
            treasureObjects.Activate();
            raceUnavailableView.Deactivate();
            breakLinerObjects.Deactivate();
            soundService.PlayOneShot(SoundName.click);
            GameEvents.OnTutorialEvent(new TutorialEventData(TutorialEventName.ChestTabOpened));
        });

        closeButton.SetListener(() => {
            Services.ViewService.Remove(Type);
            Services.SoundService.PlayOneShot(SoundName.click);
        });

        GameEvents.PlanetStateChanged += OnPlanetStateChanged;
        GameEvents.OnTutorialEvent(new TutorialEventData(TutorialEventName.MiniGameOpened));
    }
示例#32
0
        public CprViewModel()
        {
            preferenceSettings = PreferenceSettings.Instance;
            soundService       = DependencyService.Get <ISoundService>();
            stopTimerService   = DependencyService.Get <IStopTimerService>();

            ToggleTimerCommand = new Command(async() => await ToggleTimer());

            preferenceSettings.OnCpmChanged += (object sender, EventArgs e) => OnPropertyChanged("Cpm");

            SetInitialValues();

            stopTimerService.RegisterOnDestroyOrPause((object sender, EventArgs e) => StopTimer());
        }
示例#33
0
        public Process_Step2(ObservableCollection <Sound> availableSounds, int delayAutoPlay)
        {
            InitializeComponent();
            AvailableSounds = availableSounds;

            this.DataContext = this;

            soundServiceSingleton = SoundServiceSingleton.Instance;

            _delayAutoPlay = delayAutoPlay;

            this.Loaded   += Process_Step2_Loaded;
            this.Unloaded += Process_Step2_Unloaded;
        }
示例#34
0
        public ShellViewModel(ISoundService soundService)
        {
            #region Initialization some property and install keyboard global hook for hotkeys


            _selectedFilename = string.Empty;
            _selectedKey      = string.Empty;

            Music = new ObservableCollection <SoundModel>();

            _keyBoardHook = new KeyBoardHookManager();

            _soundService = soundService;

            _keyBoardHook.KeyDown += keyboardHook_KeyDown;
            _keyBoardHook.Install();

            Directory.CreateDirectory(_musicPath);

            Task.Run(async() =>
            {
                var music = await _soundService.GetAsync();
                Music     = new ObservableCollection <SoundModel>(music);

                List <string> files = Directory.GetFiles(_musicPath).ToList();

                files = files.Except(Music.Select(x => x.FullPath)).ToList();

                foreach (var file in files)
                {
                    try
                    {
                        File.Delete(file);
                    }
                    catch { }
                }
            });

            #endregion

            Task.Run(async() =>
            {
                while (_isPlaying)
                {
                    await Task.Delay(1000);
                    StartPosition += 1;
                }
            });
        }
示例#35
0
        public FormDataEntryLogic(IApplicationController controller,
                                  IDialogService dialogService,
                                  ISoundService soundService,
                                  IDataEntryDataService dataService,
                                  IApplicationSettings settings,
                                  IDataEntryView view,
                                  ISampleSelectorRepository sampleSelectorRepository)
        {
            this.Controller = controller;
            this.View       = view;

            _dialogService      = dialogService;
            _soundService       = soundService;
            _dataService        = dataService;
            _appSettings        = settings;
            _sampleSelectorRepo = sampleSelectorRepository;
        }
        public TimeSetRunPage(TimeSet timeSet)
        {
            this.TimeSet = timeSet;
            _isEnglish = timeSet.IsEnglish;
            Title = "执行倒计时";
            BackgroundColor = Color.FromHex("#eee");
            _textToSpeech = DependencyService.Get<ITextToSpeech>().New();
            _textToSpeech.Inited += _textToSpeech_Init;
            _textToSpeech.InitedError += _textToSpeech_InitedError;
            _textToSpeech.Init(TimeSet.VoiceEngine);

            _soundService = DependencyService.Get<ISoundService>();

            //
            _performer = new Performer(this.TimeSet);
            _performer.Speak += performer_Speak;
            _performer.PrepareTick += performer_PrepareTick;
            _performer.Tick += performer_HeartBeat;
            _performer.CurrentSecondChanged += performer_CurrentSecondChanged;
            _performer.StageChanged += performer_StageChanged;
            InitView();
            //_textToSpeech.Speak(timeSet.Name);
        }
		public MainViewModel(
			IInteractionService interactionService,
			ISoundService soundService,
			ISpeakService speakService,
			ILanguageService languageService,
			IDeviceService deviceService)
		{

			this.interactionService = interactionService;
			this.soundService = soundService;
			this.speakService = speakService;
			this.languageService = languageService;
			this.deviceService = deviceService;

			this.timer = new Timer((obj) => {
				CheckFiguresToRemove();
			}, null, timerDelay, timerDelay);

			this.interactionService.InteractionOccured += InteractionService_InteractionOccured;

			//play the intro sound
			this.soundService.PlayEmbebedResourceAsync(introSound);
		}
示例#38
0
 protected override void SpecificInitialize()
 {
     m_SoundService = Game.Services.GetService(typeof(ISoundService)) as ISoundService;
 }
示例#39
0
        public SessionWindow(String remotePartyUri)
            : base()
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.buttonCallOrAnswer.Tag = "Call";

            this.fileTransferSessions = new List<MyMsrpSession>();

            this.videoDisplayLocal = new VideoDisplay();
            this.videoDisplayLocal.Visibility = Visibility.Hidden;
            this.videoDisplayRemote = new VideoDisplay();
            this.videoDisplayRemote.Visibility = Visibility.Hidden;
            this.videoDisplayRemote.ToolTip = this.borderVideoDispalyRemote.ToolTip;

            this.borderVideoDispalyRemote.Child = this.videoDisplayRemote;
            this.borderVideoDispalyLocal.Child = this.videoDisplayLocal;

            this.labelInfo.Content = String.Empty;
            this.timerCall = new Timer(1000);
            this.timerCall.AutoReset = true;
            this.timerCall.Elapsed += this.timerCall_Elapsed;

            // Services
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;

            // Messaging
            this.historyDataSource = new MyObservableCollection<HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource = this.historyDataSource;

            // Register to SIP events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;

            lock (SessionWindow.windows)
            {
                SessionWindow.windows.Add(this);
            }
        }
示例#40
0
        public MessagingWindow(String remotePartyUri)
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.messagingType = MediaType.None;
            this.fileTransferSessions = new List<MyMsrpSession>();

            // Services
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;

            // Messaging
            this.historyDataSource = new MyObservableCollection<HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource = this.historyDataSource;

            // Participants
            this.participants = new MyObservableCollection<Participant>();
            this.participants.Add(new Participant(this.remotePartyUri));
            this.listBoxParticipants.ItemsSource = this.participants;

            // Events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;

            lock (MessagingWindow.windows)
            {
                MessagingWindow.windows.Add(this);
            }
        }
示例#41
0
 protected override void SpecificInitialize()
 {
     initAnimations();
     IsDying = false;
     m_SoundService = Game.Services.GetService(typeof(ISoundService)) as ISoundService;
 }
示例#42
0
		public SpeakService(ISoundService soundService)
		{
			this.synthesizer = new SpeechSynthesizer();
			this.soundService = soundService;
		}
示例#43
0
        public SessionWindow(String remotePartyUri)
            : base()
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.buttonCallOrAnswer.Tag = Strings.Text_Call;

            this.fileTransferSessions = new List<MyMsrpSession>();
            this.imActivityIndicator = new IMActivityIndicator(this.remotePartyUri);

            this.videoDisplayLocal = new VideoDisplay();
            this.videoDisplayLocal.VerticalAlignment = VerticalAlignment.Stretch;
            this.videoDisplayLocal.HorizontalAlignment = HorizontalAlignment.Stretch;
            this.videoDisplayScrenCastLocal = new VideoDisplay();
            this.videoDisplayScrenCastLocal.VerticalAlignment = this.videoDisplayLocal.VerticalAlignment;
            this.videoDisplayScrenCastLocal.HorizontalAlignment = this.videoDisplayLocal.HorizontalAlignment;
            this.videoDisplayRemote = new VideoDisplay();
            this.videoDisplayRemote.ToolTip = this.borderVideoDispalyRemote.ToolTip;

            this.borderVideoDispalyRemote.Child = this.videoDisplayRemote;
            this.borderVideoDispalyLocal.Child = this.videoDisplayLocal;
            this.borderVideoDispalyScrenCastLocal.Child = this.videoDisplayScrenCastLocal;

            this.labelInfo.Content = String.Empty;
            this.timerCall = new Timer(1000);
            this.timerCall.AutoReset = true;
            this.timerCall.Elapsed += this.timerCall_Elapsed;

            // Services
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;

            // Messaging
            this.historyDataSource = new MyObservableCollection<HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource = this.historyDataSource;

            // Register events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.imActivityIndicator.RemoteStateChangedEvent += this.imActivityIndicator_RemoteStateChangedEvent;
            this.imActivityIndicator.SendMessageEvent += this.imActivityIndicator_SendMessageEvent;

            this.volume = this.configurationService.Get(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.AUDIO_VOLUME, Configuration.DEFAULT_GENERAL_AUDIO_VOLUME);
            this.sliderVolume.Value = (double)this.volume;

            lock (SessionWindow.windows)
            {
                SessionWindow.windows.Add(this);
            }
        }
示例#44
0
        public MainWindow()
        {
            InitializeComponent();

            // Initialize Screen Service
            this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService;
            this.screenService.SetTabControl(this.tabControl);
            this.screenService.SetProgressLabel(this.labelProgressInfo);

            // Initialize SIP Service
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.sipService.onStackEvent += this.sipService_onStackEvent;
            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.sipService.onMessagingEvent += this.sipService_onMessagingEvent;
            this.sipService.onSubscriptionEvent += this.sipService_onSubscriptionEvent;
            this.sipService.onHyperAvailabilityTimedout += this.sipService_onHyperAvailabilityTimedout;

            // Initialize other Services
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.stateMonitorService = Win32ServiceManager.SharedManager.StateMonitorService;
            this.xcapService = Win32ServiceManager.SharedManager.XcapService;
            this.configurationService.onConfigurationEvent += this.configurationService_onConfigurationEvent;
            this.xcapService.onXcapEvent += this.xcapService_onXcapEvent;
            this.stateMonitorService.onStateChangedEvent += this.stateMonitorService_onStateChangedEvent;

            // Hook Closeable items
            this.AddHandler(CloseableTabItem.CloseTabEvent, new RoutedEventHandler(this.CloseTab));

            this.registrations = new MyObservableCollection<RegistrationInfo>();
            this.watchers = new MyObservableCollection<WatcherInfo>();

            // Show Authentication Screen
            //this.screenService.Show(ScreenType.Contacts);
            this.screenService.Show(ScreenType.Authentication);
        }
示例#45
0
        protected override void LoadContent()
        {
            base.LoadContent();

            m_ScoreBoard.AddPlayer(m_ShipsManager.Player1, Color.CornflowerBlue);
            m_LivesDisplay.AddPlayer(m_ShipsManager.Player1);

            if (m_TwoPlayers)
            {
                m_ScoreBoard.AddPlayer(m_ShipsManager.Player2, Color.DarkSeaGreen);
                m_LivesDisplay.AddPlayer(m_ShipsManager.Player2);
            }

            m_SoundService = Game.Services.GetService(typeof(ISoundService)) as ISoundService;
        }
示例#46
0
        private void getServices()
        {
            if (m_SoundService == null)
            {
                m_SoundService = Game.Services.GetService(typeof(ISoundService)) as ISoundService;
            }

            if (m_InputService == null)
            {
                m_InputService = Game.Services.GetService(typeof(IInputService)) as IInputService;
            }
        }
示例#47
0
 public override void Initialize()
 {
     Selected = false;
     m_SpriteFontManager.Initialize();
     m_SoundService = m_Game.Services.GetService(typeof(ISoundService)) as ISoundService;
 }