Exemple #1
0
        private void RefreshList(List <Item> items)
        {
            List <ListViewItem> list = new List <ListViewItem>();
            string pathHistoric      = SetConfigRegistry.ReadRegistry("PathDownload") + "\\HomeBrewDonwload\\" + @"\historic.txt";

            string FindHist = "";

            foreach (var item in items)
            {
                FindHist = "";
                var a = new ListViewItem(item.TitleId);
                FindHist = Utilitary.ReadFileHistoric(pathHistoric, item.TitleId);
                if (FindHist == "Y")
                {
                    a.BackColor = ColorTranslator.FromHtml("#B7FF7C");
                }

                a.SubItems.Add(item.TitleName);
                a.SubItems.Add(item.Author);
                a.SubItems.Add(item.Version);
                a.Tag = item;
                list.Add(a);
            }

            lstTitles.BeginUpdate();
            //lstTitles.Columns[4].Width = 335;
            lstTitles.Items.Clear();
            lstTitles.Items.AddRange(list.ToArray());

            lstTitles.ListViewItemSorter = new ListViewItemComparer(2, false);
            lstTitles.Sort();

            lstTitles.EndUpdate();
        }
Exemple #2
0
        private void FormGetDLC_Load(object sender, EventArgs e)
        {
            gamesDbs.Clear();
            if (!this.TypeConsole.Equals(""))
            {
                string psvitadb = SetConfigRegistry.ReadRegistry("OptionVitaDB");
                string pathlist = SetConfigRegistry.ReadRegistry(TypeConsole);

                if (psvitadb == "Y" && TypeConsole == "PathPsvita")
                {
                    LoadVitadb_sync("http://rinnegatamante.it/vitadb/list_hbs_json.php", (vita) =>
                    {
                        gamesDbs.AddRange(vita);
                        RefreshList(gamesDbs);
                    });
                }
                else
                {
                    LoadDatabase_sync(pathlist, (vita) =>
                    {
                        gamesDbs.AddRange(vita);
                        RefreshList(gamesDbs);
                    });
                }
            }
        }
Exemple #3
0
        public static bool VerifyPath()
        {
            var registryKey = Registry.CurrentUser.OpenSubKey(@"Software\SHM\", true);

            if (registryKey == null)
            {
                MessageBox.Show("01 - First set the path to download and set the tsv path in option Setting", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            string PathDown = SetConfigRegistry.ReadRegistry("PathDownload");

            if (string.IsNullOrWhiteSpace(PathDown))
            {
                MessageBox.Show("02 - First set the path to download in option Setting", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            if (PathDown != "" && !Directory.Exists(PathDown))
            {
                MessageBox.Show("03 - First set the path to download in option Setting", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            return(true);
        }
Exemple #4
0
        void LoadSettings()
        {
            try
            {   //CreateRegistry
                SetConfigRegistry.VerifyRegistry();
                textPSV.Text      = SetConfigRegistry.ReadRegistry("PathPsvita");
                textPS3.Text      = SetConfigRegistry.ReadRegistry("PathPS3");
                textPS4.Text      = SetConfigRegistry.ReadRegistry("PathPS4");
                textDownload.Text = SetConfigRegistry.ReadRegistry("PathDownload");

                if (!SetConfigRegistry.ReadRegistry("OptionVitaDB").Equals(""))
                {
                    checkVitadb.Checked = true;
                    textPSV.Enabled     = false;
                    button3.Enabled     = false;
                }
                else
                {
                    checkVitadb.Checked = false;
                    textPSV.Enabled     = true;
                    button3.Enabled     = true;
                }
            }
            catch (Exception ex)
            {
                return;
            }
        }
Exemple #5
0
 private void rootToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!Utilitary.VerifyPath())
     {
         OptionsSet o = new OptionsSet();
         o.ShowDialog();
         return;
     }
     System.Diagnostics.Process.Start(SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()));
 }
Exemple #6
0
        private void Psvita_CheckedChanged(object sender, EventArgs e)
        {
            if (Psvita.Checked)
            {
                if (!Utilitary.VerifyPath())
                {
                    OptionsSet o = new OptionsSet();
                    o.ShowDialog();
                    Psvita.Checked = false;
                    return;
                }
                if (!Utilitary.Verifythersvita(TypeRege.PathPsvita.ToString()))
                {
                    OptionsSet o = new OptionsSet();
                    o.ShowDialog();
                    Psvita.Checked = false;
                    return;
                }

                Utilitary.CreateFolder(SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()) + "\\HomeBrewDonwload");
                Utilitary.CreateFolder(SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()) + "\\HomeBrewDonwload\\" + "Psvita");

                var HomeBrewList  = new List <string>();
                var HomeBrewSelec = Utilitary.GetHomeBrewSelec(HomeBrewList, TypeRege.PathPsvita.ToString());

                if (string.IsNullOrEmpty(HomeBrewSelec.TitleId))
                {
                    Psvita.Checked = false;
                    return;
                }

                if (HomeBrewSelec.TitleId == "--Exit--")
                {
                    Psvita.Checked = false;
                    return;
                }

                Utilitary.CreateFolder(SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()) + "\\HomeBrewDonwload\\" + "Psvita\\" + HomeBrewSelec.TitleId);

                //Find extension
                string Ext = FindExten(HomeBrewSelec.LastDirectLink);

                string patharc = SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()) + "\\HomeBrewDonwload\\" + "Psvita\\" + HomeBrewSelec.TitleId + "\\" + HomeBrewSelec.TitleName + Ext;
                DownloadFile(HomeBrewSelec.LastDirectLink, patharc);
                progressBar1.Visible = true;
                label6.Visible       = true;
                Psvita.Enabled       = false;
                PS3.Enabled          = false;
                PS4.Enabled          = false;
                Psvita.Checked       = false;

                string NameArtTxt = SetConfigRegistry.ReadRegistry(TypeRege.PathDownload.ToString()) + "\\HomeBrewDonwload\\" + @"\historic.txt";
                Utilitary.CreateFileWriteHistoric(NameArtTxt, HomeBrewSelec.TitleId);
            }
        }
Exemple #7
0
        public static bool Verifythers(string pstype)
        {
            string Ps = SetConfigRegistry.ReadRegistry(pstype);

            if (string.IsNullOrWhiteSpace(Ps))
            {
                MessageBox.Show("04-First set the PS3/PS4 tsv path in the Setting option", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            return(true);
        }
Exemple #8
0
        public static bool Verifythersvita(string pstype)
        {
            string Ps       = SetConfigRegistry.ReadRegistry(pstype);
            string psvitadb = SetConfigRegistry.ReadRegistry("OptionVitaDB");

            if (string.IsNullOrWhiteSpace(Ps) && string.IsNullOrWhiteSpace(psvitadb))
            {
                MessageBox.Show("05-First set the Psvita tsv path in the Setting option or use vitadb by ticking the setting option for list homebrews", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            return(true);
        }
Exemple #9
0
 void UpdateSettings(bool withStoring)
 {
     SetConfigRegistry.RecordRegistry("PathPsvita", textPSV.Text);
     SetConfigRegistry.RecordRegistry("PathPS3", textPS3.Text);
     SetConfigRegistry.RecordRegistry("PathPS4", textPS4.Text);
     SetConfigRegistry.RecordRegistry("PathDownload", textDownload.Text);
     if (checkVitadb.Checked)
     {
         SetConfigRegistry.RecordRegistry("OptionVitaDB", "Y");
     }
     else
     {
         SetConfigRegistry.RecordRegistry("OptionVitaDB", "");
     }
 }