Пример #1
0
        private void PlayerForm_Disposed(object sender, EventArgs e)
        {
            playerForm.UnloadPlayerEvents();
            playerForm.Close();
            playerForm = null;
            playerForm = new MPVPlayer();
            if (isDocked)
            {
                playerForm.TopLevel = false;
                playerForm.SetPrincipalForm(this);
                playerForm.FormBorderStyle = FormBorderStyle.None;
                playerForm.AutoScroll      = true;
                panel2.Controls.Add(playerForm);
            }
            playerForm.SetDocked(isDocked);
            playerForm.SetPrincipalForm(this);
            playerForm.SetIsChannel(currentChType == ChType.CHANNEL);

            if (isLoaded)
            {
                playerForm.SetMedia(chnl.URL, Convert.ToInt32(currPos), currLang, currSub);
            }
            playerForm.Show();
            if (!isDocked)
            {
                playerForm.Location = newPositionUnDocked;
            }
            playerForm.SetDockedEvent(false);
            playerForm.SetDockIcon(isDocked);
            if (dockFullScreen > -1)
            {
                playerForm.GoFullscreen(dockFullScreen == 0 ? true : false);
                playerForm.SetFullScreenAttr(dockFullScreen == 0 ? true : false);
                playerForm.SetDocked(true);
                dockFullScreen = -1;
            }
        }
Пример #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            IPTVConfiguration cfg = new IPTVConfiguration();

            cfg.MoveConf();
            playerForm                 = new MPVPlayer();
            playerForm.TopLevel        = false;
            playerForm.FormBorderStyle = FormBorderStyle.None;
            playerForm.AutoScroll      = true;
            playerForm.SetPrincipalForm(this);
            panel2.Controls.Add(playerForm);
            playerForm.Show();
            playerForm.SetDockIcon(true);
            lstListsChannels[ALL_GROUP] = new List <ChannelListItem>();
            selectedList = ALL_GROUP;
#if _PORTABLE
            lbVersion.Text      = Utils.PORTABLE_VERSION;
            lbPortables.Visible = true;
#else
            lbVersion.Text = ApplicationDeployment.IsNetworkDeployed
               ? ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString()
          : Assembly.GetExecutingAssembly().GetName().Version.ToString();
#endif

            chList.FullRowSelect = true;
            ImageList imageList = new ImageList();
            var       x         = imageList.Images;

            imageList.Images.Add(Image.FromFile("./resources/images/seen2.png"));
            imageList.Images.Add(Image.FromFile("./resources/images/resume.png"));
            chList.SmallImageList = imageList;
            cfg.LoadAmiSettings();

            Logger logger = Logger.Current;
            logger.SetBasePath(Utils.CONF_PATH);
            RepaintLabels();
            cmbLists.SelectedIndexChanged -= new System.EventHandler(this.cmbLists_SelectedIndexChanged);
            FillIPTVLists();
            Utils.GetAccountInfo();
            cfg.LoadChannelSeen();
            cfg.LoadParentalControl();
            RefreshListView();
            LoadChannels();
            LoadEPG();
            cmbLists.SelectedIndexChanged += new System.EventHandler(this.cmbLists_SelectedIndexChanged);
        }