コード例 #1
0
ファイル: settings.cs プロジェクト: rvs76/deft_xmltv
        public void init(SettingsData defaultsettings)
        {
            /* default non-gui settings */
            RegistryKey rkApp   = Registry.LocalMachine.OpenSubKey("SOFTWARE\\For The Record\\Install", false);
            string      ftrpath = ((rkApp != null) ? (string)rkApp.GetValue("", "") : "");

            defaultsettings.ftriconspath = (ftrpath != "" ? ftrpath + "Services\\Channel Logos\\" : "");                                      //"C:\\xmltv\\icons\\4tr\\"
            defaultsettings.ftrguidepath = (ftrpath != "" ? ftrpath + "Services\\XMLTV\\guide.xml" : "");
            defaultsettings.mpiconspath  = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") + "\\Team MediaPortal\\Thumbs\\TV\\Logos\\"; /*"C:\\xmltv\\icons\\mp\\";*/
            defaultsettings.xmltvpath    = "C:\\xmltv\\";

            if (!File.Exists(Application.StartupPath + "\\deft-xmltv.cfg"))
            {
                FileInputDialog d = new FileInputDialog("Path to xmltv", "C:\\xmltv");

                d.ShowDialog();
                defaultsettings.xmltvpath  = d.path;
                defaultsettings.outputfile = d.path + (d.path.EndsWith("\\") ? "" : "\\") + "tvguide.xml";
            }

            _sd = defaultsettings;


            if (!readcfg())
            {
                log.warning("Error reading config file!");
            }
        }
コード例 #2
0
ファイル: settings.cs プロジェクト: jensnielsen/deft_xmltv
        public void init(SettingsData defaultsettings)
        {
            /* default non-gui settings */
            RegistryKey rkApp = Registry.LocalMachine.OpenSubKey("SOFTWARE\\For The Record\\Install", false);
            string ftrpath = ((rkApp != null) ? (string)rkApp.GetValue("", "") : "");

            defaultsettings.ftriconspath = (ftrpath != "" ? ftrpath + "Services\\Channel Logos\\" : ""); //"C:\\xmltv\\icons\\4tr\\"
            defaultsettings.ftrguidepath = (ftrpath != "" ? ftrpath + "Services\\XMLTV\\guide.xml" : "");
            defaultsettings.mpiconspath = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") + "\\Team MediaPortal\\Thumbs\\TV\\Logos\\"; /*"C:\\xmltv\\icons\\mp\\";*/
            defaultsettings.xmltvpath = "C:\\xmltv\\";

            if (!File.Exists(Application.StartupPath + "\\deft-xmltv.cfg"))
            {
                FileInputDialog d = new FileInputDialog("Path to xmltv", "C:\\xmltv");

                d.ShowDialog();
                defaultsettings.xmltvpath = d.path;
                defaultsettings.outputfile = d.path + (d.path.EndsWith("\\") ? "" : "\\") + "tvguide.xml";
            }

            _sd = defaultsettings;

            if (!readcfg())
            {
                log.warning("Error reading config file!");
            }
        }