Esempio n. 1
0
 public MainForm()
 {
     InitializeComponent();
     SetTemperature("");
     InitializeComPort();
     ReadPort(phonePort);
     pictureBoxForImage.Hide();
     VideoProvider.InitializeVideos();
     InitializeVideoPlayer(1);
     camera = new CameraProvider();
     createHealthChecker();
 }
Esempio n. 2
0
        private void InitializeVideoPlayer(int id)
        {
            try
            {
                var videosPath = VideoProvider.GetVideosById(id);
                videoPlayer.playlistCollection.remove(videoPlayer.currentPlaylist);
                WMPLib.IWMPPlaylist playlist = videoPlayer.playlistCollection.newPlaylist($"myplaylist1{id}");
                foreach (string video in videosPath)
                {
                    SetVideo(video);
                    playlist.appendItem(media);
                }

                videoPlayer.currentPlaylist = playlist;
                videoPlayer.uiMode          = "None";
                videoPlayer.settings.setMode("loop", true);
            }
            catch (Exception e)
            {
                Emailer.getInstance().logException(e);
            }
        }