Beispiel #1
0
        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            DataService.Instance.Dispatcher = new DispatcherWrapper(Dispatcher);
            BackgroundContainer.Blur(20, 0).Start();

            if (_isHost)
            {
                if (App.IsXbox())
                {
                    PlayPause.Focus(FocusState.Keyboard);
                }

                this.PointerMoved += MainPage_PointerMoved;
                this.KeyDown      += MainPage_KeyDown;
                _playerService.PropertyChanged += _dataService_PropertyChanged;

                _timer          = new DispatcherTimer();
                _timer.Interval = TimeSpan.FromSeconds(10);
                _timer.Tick    += _timer_Tick;
                _timer.Start();
            }
            else
            {
                AddButton.Focus(FocusState.Pointer);
                UserSongCollection.ItemsSource = (_viewModel as ClientViewModel).UserSongs;
                var t = (_viewModel as ClientViewModel).LoadUserSongs();

                this.SizeChanged += MainPage_SizeChanged;
            }
        }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     thisObj         = this.transform;
     audioManager    = FindObjectOfType <AudioManager>();
     playCube        = GameObject.Find("Cube");
     playPauseScript = playCube.GetComponent <PlayPause>();
 }
Beispiel #3
0
 void Awake()
 {
     rb              = gameObject.GetComponent <Rigidbody>();
     audioManager    = FindObjectOfType <AudioManager>();
     playCube        = GameObject.Find("Cube");
     playPauseScript = playCube.GetComponent <PlayPause>();
 }
Beispiel #4
0
 void Awake()
 {
     rate            = 0.8f;
     depth           = 0.03f;
     audioManager    = FindObjectOfType <AudioManager>();
     playCube        = GameObject.Find("Cube");
     playPauseScript = playCube.GetComponent <PlayPause>();
 }
Beispiel #5
0
    void Awake()
    {
        foreach (Sound s in sounds)
        {
            s.source      = gameObject.AddComponent <AudioSource>();
            s.source.clip = s.clip;

            s.source.volume = s.volumn;
            s.source.pitch  = s.pitch;
        }
        current           = Array.Find(sounds, sound => sound.name == "TNPN");
        playpauseAni      = gameObject.GetComponent <PlayPause>();
        audioChrousFilter = gameObject.GetComponent <AudioChorusFilter>();
    }
Beispiel #6
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (e.Location.Y > Height - TimelineHeight)
            {
                _navTimeline = true;
            }

            //if (distance(e.Location, _tbSpeed.Grab) < 6)
            //   _tbSpeed.Nav = true;
            if (distance(e.Location, _tbVolume.Grab) < 6)
            {
                _tbVolume.Nav = true;
            }

            if (distance(e.Location, new Point(Width - 20, Height - TimelineHeight - 20)) < 20)
            {
                PlayPause?.Invoke(this);
            }
        }
Beispiel #7
0
 public void PlayPauseTest()
 {
     PlayPause request = new PlayPause(1, true);
     var       result  = JsonConvert.DeserializeObject <KodiJSON.Player.Response.PlayPauseResponse>(ExecuteTest.GetResponse(request));
 }
 void Awake()
 {
     instance = this;
 }
Beispiel #9
0
 void Awake()
 {
     instance = this;
 }
Beispiel #10
0
 public static void OnPlayPause()
 {
     PlayPause?.Invoke(null, null);
 }