Ejemplo n.º 1
0
        } // buttonFindVlc_Click

        private void buttonTestVlc_Click(object sender, EventArgs e)
        {
            string message;

            var testMedia = Installation.GetTestMedia();
            var installed = Installation.TestVlcInstallation(out message, textBoxVlc.Text, testMedia);

            MessageBox.Show(this, message, this.Text, MessageBoxButtons.OK,
                            installed ? MessageBoxIcon.Information : MessageBoxIcon.Warning);

            if (!installed)
            {
                return;
            }
        } // buttonTestVlc_Click
Ejemplo n.º 2
0
        } // linkLabelPrerequisiteEmb_LinkClicked

        private void linkLabelSetupSqlCe_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var launched = Installation.RedistSetup(this, Texts.DownloadSqlCeFile, Texts.DownloadSqlCeFile32bit,
                                                    labelSqlCe.Text, labelSqlCe, SetupSqlCe_Completed);

            if (!launched)
            {
                return;
            }

            pictureBoxSqlCeOk.Image            = Resources.Status_Wait_16x16;
            linkLabelSetupSqlCe.Enabled        = false;
            linkLabelPrerequisiteSqlCe.Enabled = false;
            buttonVerifySqlCe.Enabled          = false;
            wizardControl.ShowWizardButtons(false);
        } // linkLabelSetupSqlCe_LinkClicked
Ejemplo n.º 3
0
        } // checkReadmeAck_CheckedChanged

        #endregion

        #region Prerequisites Page

        private void PagePrerequisites_Setup()
        {
            wizardControl.IsPageAllowed[wizardPagePrerequisites.Name] = false;

            buttonVerifyEmb.Visible          = true;
            linkLabelSetupEmb.Enabled        = Installation.CheckRedistFile(Texts.DownloadEmbFile, Texts.DownloadEmbFile32bit);
            linkLabelPrerequisiteEmb.Enabled = true;

            buttonVerifySqlCe.Visible          = false;
            linkLabelSetupSqlCe.Enabled        = false;
            linkLabelPrerequisiteSqlCe.Enabled = false;

            buttonVerifyVlc.Visible          = false;
            linkLabelPrerequisiteVlc.Enabled = false;
            labelVlcPath.Enabled             = false;
            textBoxVlc.Enabled    = false;
            buttonFindVlc.Enabled = false;
            buttonTestVlc.Enabled = false;

            PagePrerequisites_Step1(false);
        } // PagePrerequisites_Setup
Ejemplo n.º 4
0
        } // PagePrerequisites_Step3

        private void PagePrerequisites_Step4(bool withUi)
        {
            string message;
            string path;

            path = textBoxVlc.Text;
            var installed = Installation.IsVlcInstalled(out message, ref path);

            textBoxVlc.Text = path;
            if (withUi)
            {
                labelVlcInstallCheckResult.Text = null;
                MessageBox.Show(this, message, this.Text, MessageBoxButtons.OK,
                                installed ? MessageBoxIcon.Information : MessageBoxIcon.Warning);
            }
            else
            {
                if (!string.IsNullOrEmpty(path))
                {
                    labelVlcInstallCheckResult.Text = message;
                } // if
            }     // if-else
            if (!installed)
            {
                return;
            }

            pictureBoxVlcOk.Image            = Resources.Sucess_16x16;
            linkLabelPrerequisiteVlc.Visible = false;
            buttonVerifyVlc.Visible          = false;
            //buttonFindVlc.Enabled = false;
            buttonTestVlc.Enabled = true;
            buttonTestVlc.Focus();

            PagePrerequisites_Step5(false);
        } // PagePrerequisites_Step4
Ejemplo n.º 5
0
        } // constructor

        private void buttonFirewall_Click(object sender, EventArgs e)
        {
            string message;

            var ok = Installation.ConfigureFirewall(
                checkBoxFirewallDecoder.Checked ? Program.FirewallBinPath : null,
                checkBoxFirewallVlc.Checked ? Program.FirewallVlcPath : null,
                out message);

            if (message != null)
            {
                MessageBox.Show(this, message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            } // if

            pictureBoxSuccess.Visible = true;
            labelSuccess.Visible      = true;

            buttonFirewall.Enabled = false;
            buttonCancel.Visible   = false;
            buttonClose.Location   = buttonCancel.Location;
            buttonClose.Size       = buttonCancel.Size;
            buttonClose.Visible    = true;
        } // buttonFirewall_Click
Ejemplo n.º 6
0
        }     // Create

        private static TvPlayersSettings GetTvPlayers(string vlcPath)
        {
            List <TvPlayer> players;
            TvPlayer        player;
            string          path;

            players = new List <TvPlayer>(3);
            var programFilesFolder86 = Installation.GetProgramFilesAnyFolder();

            // VLC
            player = new TvPlayer()
            {
                Name      = "VLC",
                Id        = new Guid("{C12055FC-315A-47C4-B9CC-48D2E6ECD8FA}"),
                Path      = vlcPath,
                Arguments = new string[]
                {
                    "{param:Channel.Url}",
                    ":meta-title={param:Channel.Name}",
                } // Arguments
            }; // TvPlayer
            players.Add(player);

            // VLC (new window)
            player = new TvPlayer()
            {
                Name      = Properties.Texts.GetTvPlayersVlcSameWindow,
                Id        = new Guid("{4154BC96-5FE0-45C2-9895-083C4FB4C8CE}"),
                Path      = vlcPath,
                Arguments = new string[]
                {
                    "{param:Channel.Url}",
                    ":meta-title={param:Channel.Name}",
                    "--one-instance",
                    "--no-playlist-enqueue",
                } // Arguments
            }; // TvPlayer
            players.Add(player);

            // locate K-Lite Codec Pack Media Player Classic
            path = Path.Combine(programFilesFolder86, "K-Lite Codec Pack\\Media Player Classic\\mpc-hc.exe");
            if (File.Exists(path))
            {
                player = new TvPlayer()
                {
                    Name      = "K-Lite Media Player Classic",
                    Id        = new Guid("{8FFA2EE6-8823-40B1-B20F-F962389D4B07}"),
                    Path      = path,
                    Arguments = new string[]
                    {
                        "{param:Channel.Url}",
                        "/play",
                    } // Arguments
                }; // TvPlayer

                players.Add(player);
            } // if

            var tvPlayers = new TvPlayersSettings()
            {
                DirectLaunch    = false,
                DefaultPlayerId = new Guid("{C12055FC-315A-47C4-B9CC-48D2E6ECD8FA}"),
                Players         = players.ToArray()
            };

            return(tvPlayers);
        } // GetTvPlayers
Ejemplo n.º 7
0
        } // linkLabelPrerequisiteSqlCe_LinkClicked

        private void linkLabelPrerequisiteVlc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Installation.OpenUrl(this, Properties.Texts.DownloadUrlVlc);
        } // linkLabelPrerequisiteVlc_LinkClicked
Ejemplo n.º 8
0
        } // SetupSqlCe_Completed

        private void linkLabelPrerequisiteSqlCe_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Installation.PromptDownloadFromVendor(this, "Microsoft", Texts.DownloadSqlCeFile, Texts.DownloadSqlCeFile32bit);
            Installation.OpenUrl(this, Properties.Texts.DownloadUrlSqlCe);
        } // linkLabelPrerequisiteSqlCe_LinkClicked