示例#1
0
文件: Main.cs 项目: samisleem/rtmpGUI
        public void RefreshSettings()
        {
            XmlDocument xDoc = new XmlDocument();
            Options     f2   = new Options();

            try
            {
                xDoc.Load(Application.StartupPath.ToString() + "\\config.xml");
                vlcLoc   = xDoc.GetElementsByTagName("vlc-loc")[0].InnerText;
                suppress = xDoc.GetElementsByTagName("suppress")[0].InnerText;

                apiUser = xDoc.SelectSingleNode("/rtmpGUI/api/@user").Value;
                apiKey  = xDoc.SelectSingleNode("/rtmpGUI/api/@key").Value;

                if (suppress == "true")
                {
                    supcom = true;
                }
                else
                {
                    supcom = false;
                }
            }
            catch (Exception ex)
            {
                f2.Show();
                MessageBox.Show("There was an error with the config file.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                DebugLog(ex.ToString());
            }
        }
示例#2
0
文件: Main.cs 项目: samisleem/rtmpGUI
        private void optionsMenu_Click(object sender, EventArgs e)
        {
            Options form = Options.Instance();

            if (!form.Visible)
            {
                form.Show();
            }
            else
            {
                form.BringToFront();
            }
        }
示例#3
0
文件: Main.cs 项目: relrix/rtmpGUI
        public void RefreshSettings()
        {
            XmlDocument xDoc = new XmlDocument();
            Options f2 = new Options();
            try
            {
                xDoc.Load(Application.StartupPath.ToString() + "\\config.xml");
                vlcLoc = xDoc.GetElementsByTagName("vlc-loc")[0].InnerText;
                suppress = xDoc.GetElementsByTagName("suppress")[0].InnerText;

                apiUser = xDoc.SelectSingleNode("/rtmpGUI/api/@user").Value;
                apiKey = xDoc.SelectSingleNode("/rtmpGUI/api/@key").Value;

                if (suppress == "true")
                {
                    supcom = true;
                }
                else
                {
                    supcom = false;
                }
            }
            catch (Exception ex)
            {
                f2.Show();
                MessageBox.Show("There was an error with the config file.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                DebugLog(ex.ToString());
            }
        }
示例#4
0
文件: Main.cs 项目: relrix/rtmpGUI
        public void LoadSettings()
        {
            XmlDocument xDoc = new XmlDocument();
            Options f2 = new Options();
            try
            {
                xDoc.Load(Application.StartupPath.ToString() + "\\config.xml");
                vlcLoc = xDoc.GetElementsByTagName("vlc-loc")[0].InnerText;
                list = xDoc.SelectSingleNode("/rtmpGUI/list/@remote").Value;
                updates = xDoc.GetElementsByTagName("updates")[0].InnerText;
                altload = xDoc.SelectSingleNode("/rtmpGUI/altpage/@load").Value;
                altpage = xDoc.GetElementsByTagName("altpage")[0].InnerText;
                suppress = xDoc.GetElementsByTagName("suppress")[0].InnerText;
                default_commands = xDoc.GetElementsByTagName("default_commands")[0].InnerText;

                apiUser = xDoc.SelectSingleNode("/rtmpGUI/api/@user").Value;
                apiKey = xDoc.SelectSingleNode("/rtmpGUI/api/@key").Value;

                if (list == "true")
                {
                    ThreadStart update = new ThreadStart(RemoteXML);
                    Thread check = new Thread(update);
                    check.Start();
                }
                else
                {
                    localloadloc = xDoc.GetElementsByTagName("list")[0].InnerText;
                    ThreadStart update = new ThreadStart(LocalXml);
                    Thread check = new Thread(update);
                    check.Start();
                }

                if (updates == "true")
                {
                    CheckUpdates();
                }
                else
                {
                    //Do jack
                }

                if (altload == "true")
                {
                    homepage = altpage;
                }
                else
                {
                    homepage = "http://tvlistings.tvguide.com/ListingsWeb/listings/ScrollingGridIFrame.aspx";
                }
                wbApp.Navigate(homepage);

                if (suppress == "true")
                {
                    supcom = true;
                }
                else
                {
                    supcom = false;
                }

                if (default_commands == "true")
                {
                    txtCommands.BringToFront();
                    wbApp.SendToBack();
                }
                else
                {
                    wbApp.BringToFront();
                    txtCommands.SendToBack();
                }
            }
            catch (Exception ex)
            {
                f2.Show();
                MessageBox.Show("There was an error with the config file.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                DebugLog(ex.ToString());
            }
        }
示例#5
0
文件: Main.cs 项目: samisleem/rtmpGUI
        public void LoadSettings()
        {
            XmlDocument xDoc = new XmlDocument();
            Options     f2   = new Options();

            try
            {
                xDoc.Load(Application.StartupPath.ToString() + "\\config.xml");
                vlcLoc           = xDoc.GetElementsByTagName("vlc-loc")[0].InnerText;
                list             = xDoc.SelectSingleNode("/rtmpGUI/list/@remote").Value;
                updates          = xDoc.GetElementsByTagName("updates")[0].InnerText;
                altload          = xDoc.SelectSingleNode("/rtmpGUI/altpage/@load").Value;
                altpage          = xDoc.GetElementsByTagName("altpage")[0].InnerText;
                suppress         = xDoc.GetElementsByTagName("suppress")[0].InnerText;
                default_commands = xDoc.GetElementsByTagName("default_commands")[0].InnerText;

                apiUser = xDoc.SelectSingleNode("/rtmpGUI/api/@user").Value;
                apiKey  = xDoc.SelectSingleNode("/rtmpGUI/api/@key").Value;

                if (list == "true")
                {
                    ThreadStart update = new ThreadStart(RemoteXML);
                    Thread      check  = new Thread(update);
                    check.Start();
                }
                else
                {
                    localloadloc = xDoc.GetElementsByTagName("list")[0].InnerText;
                    ThreadStart update = new ThreadStart(LocalXml);
                    Thread      check  = new Thread(update);
                    check.Start();
                }

                if (updates == "true")
                {
                    CheckUpdates();
                }
                else
                {
                    //Do jack
                }

                if (altload == "true")
                {
                    homepage = altpage;
                }
                else
                {
                    homepage = "http://tvlistings.tvguide.com/ListingsWeb/listings/ScrollingGridIFrame.aspx";
                }
                wbApp.Navigate(homepage);

                if (suppress == "true")
                {
                    supcom = true;
                }
                else
                {
                    supcom = false;
                }

                if (default_commands == "true")
                {
                    txtCommands.BringToFront();
                    wbApp.SendToBack();
                }
                else
                {
                    wbApp.BringToFront();
                    txtCommands.SendToBack();
                }
            }
            catch (Exception ex)
            {
                f2.Show();
                MessageBox.Show("There was an error with the config file.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                DebugLog(ex.ToString());
            }
        }