private void CheckPersonIsRemoved()
 {
     try
     {
         Instance?.UI(() =>
         {
             if (!MireaDateTime.Instance.WorkTime())
             {
                 if (Instance.content.ContentType() != typeof(NightPhoto))
                 {
                     content.OpenNightPhoto();
                 }
             }
             else
             {
                 if (DateTime.Now - LastUIOperation > TimeSpan.FromMinutes(1))
                 {
                     if (Instance.content.ContentType() != typeof(BackgroundVideo) && Instance.content.ContentType() != typeof(EggVideo))
                     {
                         if (HandHelper.IsHover)
                         {
                             LastUIOperation += TimeSpan.FromSeconds(10);
                             return;
                         }
                         content.OpenBackgroundVideo();
                     }
                 }
                 if (DateTime.Now - LastUIOperation > TimeSpan.FromSeconds(15))
                 {
                     if (Instance.content.ContentType() == typeof(BackgroundVideo))
                     {
                         BackgroundVideo bv = Instance.content.GetContent() as BackgroundVideo;
                         if (!bv.IsButtonInvisible() && !adminMode)
                         {
                             bv.SetButtonVisibility(Visibility.Collapsed);
                         }
                     }
                 }
             }
         });
     }
     catch (Exception) { }
 }
        public MainWindow()
        {
            InitializeComponent();

            //BackgroundVideo.Position = TimeSpan.FromSeconds(0);
            //BackgroundVideo.Play();



            channel1.LoadedBehavior = MediaState.Manual;
            channel1.Source         = new Uri(@"C:\Users\Katkin\Desktop\featureCode\ibccFeatureBranch\0.1\IBCCProject.1\IBCCProject.1\Images\RAF_Night_Raid.wmv");
            //@ means that the string behind is a path so / won't be
            //treated like a special character
            channel1.Position = TimeSpan.FromSeconds(0);
            channel1.Play();


            //secondChannel.LoadedBehavior = MediaState.Manual;
            //secondChannel.Source = new Uri(@"C:\Users\Katkin\Desktop\featureCode\ibccFeatureBranch\0.1\IBCCProject.1\IBCCProject.1\Images\airForce3.mp4");
            ////@ means that the string behind is a path so / won't be
            ////treated like a special character
            //secondChannel.Position = TimeSpan.FromSeconds(0);
            //secondChannel.Play();

            thirdChannel.LoadedBehavior = MediaState.Manual;
            thirdChannel.Source         = new Uri(@"C:\Users\Katkin\Desktop\featureCode\ibccFeatureBranch\0.1\IBCCProject.1\IBCCProject.1\Images\War_Pictorial_News.wmv");
            //@ means that the string behind is a path so / won't be
            //treated like a special character
            thirdChannel.Position = TimeSpan.FromSeconds(0);
            thirdChannel.Play();

            //C:\Users\Katkin\Desktop\featureCode\ibccFeatureBranch\0.1\IBCCProject.1\IBCCProject.1\Images\
            BackgroundVideo.Source = new Uri(@"C:\Users\Katkin\Desktop\featureCode\ibccFeatureBranch\0.1\IBCCProject.1\IBCCProject.1\Images\filmEffect.wmv");
            //@ means that the string behind is a path so / won't be
            //treated like a special character
            BackgroundVideo.Position = TimeSpan.FromSeconds(0);
            BackgroundVideo.Play();
        }
Ejemplo n.º 3
0
 private void BackgroundVideo_MediaEnded(object sender, RoutedEventArgs e)
 {
     BackgroundVideo.Position = TimeSpan.Zero;
     BackgroundVideo.Play();
 }
Ejemplo n.º 4
0
        private void load()
        {
            track.ValueChanged += ev =>
            {
                ev.OldValue?.Stop();
                ev.OldValue?.Dispose();
            };

            dependencies.Cache(backgroundVideo = new BackgroundVideo
            {
                Track = { BindTarget = track }
            });

            QueueManager queue;

            dependencies.Cache(queue = new QueueManager
            {
                Track = { BindTarget = track },
                Video = { BindTarget = video }
            });

            ProgressOverlay progress;

            dependencies.Cache(progress = new ProgressOverlay());

            PlaylistMenu menu;

            dependencies.Cache(menu = new PlaylistMenu
            {
                RelativeSizeAxes = Axes.Y
            });

            InternalChildren = new Drawable[]
            {
                queue,
                new VisualizerContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Track            = { BindTarget = track },
                    Children         = new Drawable[]
                    {
                        backgroundVideo,
                        new TriangleVisualizer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre
                        },
                        new BarVisualizer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre
                        },
                        new ProjectileVisualizer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre
                        },
                        progress,
                        menu
                    }
                },
                new SongMenu(Direction.Vertical)
                {
                    Anchor        = Anchor.TopLeft,
                    Origin        = Anchor.TopLeft,
                    PlayPause     = queue.TogglePause,
                    OpenPlaylist  = menu.Show,
                    ClosePlaylist = menu.Hide
                }
            };
        }
 private void MediaElement_MediaEnded(object sender, RoutedEventArgs e)
 {
     BackgroundVideo.Position = TimeSpan.FromSeconds(0);
     BackgroundVideo.Play();
 }