Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     r = new MpcHcRemote(@"C:\Program Files (x86)\Combined Community Codec Pack\MPC\mpc-hc.exe");
     r.StartApplication();
 }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string MPHCPath = "";
            bool foundMPHCPath = false;
            try
            {
                StreamReader inifile = new System.IO.StreamReader("config.ini");
                string line;
                while ((line = inifile.ReadLine()) != null)
                {
                    if(line.Contains("MediaPlayerHCPath"))
                    {
                        line = line.TrimStart(' ');
                        line = line.Substring(17);
                        line = line.TrimStart(' ');
                        line = line.TrimEnd(' ');
                        MPHCPath = String.Copy(line);
                        foundMPHCPath = true;
                        break;
                    }
                }

                inifile.Close();
                if (foundMPHCPath)
                {
                    r = new MpcHcRemote(MPHCPath);
                    r.StartApplication();
                }
                else
                {
                    textBox1.AppendText("Could not find definition for \"MediaPlayerHCPath\" in config.ini file");
                }
            }
            catch (Exception ex)
            {
                textBox1.AppendText("Error: " + ex.Message.ToString() + "\r\n");
                if (foundMPHCPath)
                {
                    textBox1.AppendText("MediaPlayerHCPath: " + MPHCPath + "\r\n");
                }
            }
        }
Beispiel #3
0
 private void MPControlStart()
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.InvokeRequired)
     {
         MPControlStartControlCallback d = new MPControlStartControlCallback(MPControlStart);
         this.Invoke(d, new object[] { });
     }
     else
     {
         this.r = new MpcHcRemote(@"C:\Program Files (x86)\SVP\MPC-HC\mpc-hc.exe");
         this.r.StartApplication();
     }
 }
Beispiel #4
0
 public MessageReceiver(MpcHcRemote master)
     : base()
 {
     Master = master;
 }