コード例 #1
0
ファイル: FormMain.cs プロジェクト: OpenVisionE2/CrossEPG
 private void LoadFromDecoder()
 {
     db = new EpgDB();
     if (db.LoadLameDBFromFTP(new Uri(String.Format("ftp://{0}/{1}", Settings.Default.device_ip, Settings.Default.lamedb_path)),
                              Settings.Default.device_username,
                              Settings.Default.device_password))
     {
         db.LoadCrossEPGDBFromFTP(new Uri(String.Format("ftp://{0}/{1}/crossepg.headers.db", Settings.Default.device_ip, Settings.Default.crossepg_path)),
                                  new Uri(String.Format("ftp://{0}/{1}/crossepg.descriptors.db", Settings.Default.device_ip, Settings.Default.crossepg_path)),
                                  Settings.Default.device_username,
                                  Settings.Default.device_password);
     }
     RefreshUI();
 }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: OpenVisionE2/CrossEPG
        private void LoadOnlyCrossEPGFromFile()
        {
            db = new EpgDB();
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter           = "lamedb|lamedb|All files (*.*)|*.*";
            dialog.FilterIndex      = 0;
            dialog.RestoreDirectory = true;

            if (db.LoadLameDBFromFTP(new Uri(String.Format("ftp://{0}/{1}", Settings.Default.device_ip, Settings.Default.lamedb_path)),
                                     Settings.Default.device_username,
                                     Settings.Default.device_password))
            {
                FolderBrowserDialog folder = new FolderBrowserDialog();
                if (folder.ShowDialog() == DialogResult.OK)
                {
                    db.LoadCrossEPGDBFromDir(folder.SelectedPath);
                }
            }
            RefreshUI();
        }
コード例 #3
0
ファイル: FormMain.cs プロジェクト: OpenVisionE2/CrossEPG
        private void LoadAllFromFile()
        {
            db = new EpgDB();
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter           = "lamedb|lamedb|All files (*.*)|*.*";
            dialog.FilterIndex      = 0;
            dialog.RestoreDirectory = true;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                db.LoadLameDBFromFile(dialog.FileName);

                FolderBrowserDialog folder = new FolderBrowserDialog();
                if (folder.ShowDialog() == DialogResult.OK)
                {
                    db.LoadCrossEPGDBFromDir(folder.SelectedPath);
                }
            }
            RefreshUI();
        }