Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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();
        }