Ejemplo n.º 1
0
        public void check_missing_files_status()
        {
            logger.log("started check for " + fullname);
            //foreach csp
            foreach (String csp_name in csps)
            {
                String FilePath;
                String FilePath2;
                if (dlc)
                {
                    logger.log("char is dlc | character file");
                    FilePath = dlc_csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                    logger.log("dlc csp path : " + FilePath);
                    if (Library.get_moved_dlc_status(fullname))
                    {
                        logger.log("char is moved");
                        FilePath2 = csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                        if (!File.Exists(FilePath2))
                        {
                            if (csp_name == "chr_10" | csp_name == "chrn_11")
                            {
                                logger.log("file doesn't exist for csp path, set missing to true");
                                Library.delete_skin_csp(fullname, slot, csp_name);
                                missing = true;
                            }
                            else
                            {
                                logger.log("file doesn't exist for csp path, set missing to true");
                                Library.set_csp_workspace_status(fullname, slot, csp_name, "missing");
                                missing = true;
                            }
                        }
                        else
                        {
                            if (csp_name == "chr_10")
                            {
                                Library.add_character_icon(fullname, slot, csp_name + "_" + cspfolder + "_" + slotstring);
                            }
                            else
                            {
                                Library.add_character_nameplate(fullname, slot, csp_name + "_" + cspfolder + "_" + slotstring);
                            }
                        }
                    }
                }
                else
                {
                    logger.log("char ins't dlc");
                    FilePath = csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                    logger.log("csp path : " + FilePath);
                }

                if (File.Exists(FilePath))
                {
                    logger.log("file exists");
                    if (Library.get_csp_workspace_status(fullname, slot, csp_name) == "unknown")
                    {
                        logger.log("csp is unknown");
                        unknown = true;
                        logger.log("setting global to unknown");
                    }
                    else
                    {
                        logger.log("csp is known");
                        if (Library.get_csp_workspace_status(fullname, slot, csp_name) == "new")
                        {
                            logger.log("setting global to new");
                            new_files = true;
                        }
                    }
                }
                else
                {
                    logger.log("file doesn't exist");
                    Library.set_csp_workspace_status(fullname, slot, csp_name, "missing");
                    missing = true;
                    logger.log("setting global to missing");
                }
            }
            foreach (String model_name in models)
            {
                String folder_path = modelpath + model_name.Split('/')[0] + "/" + model_name.Split('/')[1].Substring(0, 1) + modelslotstring;
                if (Directory.Exists(folder_path))
                {
                    if (Library.get_model_workspace_status(fullname, slot, model_name) == "unknown")
                    {
                        unknown = true;
                    }
                    else
                    {
                        if (Library.get_model_workspace_status(fullname, slot, model_name) == "new")
                        {
                            new_files = true;
                        }
                    }
                }
                else
                {
                    Library.set_model_workspace_status(fullname, slot, model_name, "missing");
                    missing = true;
                }
            }
        }
Ejemplo n.º 2
0
        //Sets up selected config when the window opens
        public void retrieve_config()
        {
            textBox1.Text = properties.property_get("explorer_workspace");

            if (properties.property_check("datafolder"))
            {
                String locale   = properties.property_get("datafolder");
                String language = "";
                if (locale != "data")
                {
                    locale         = locale.Split('(')[1].Split(')')[0];
                    regionbox.Text = locale.Split('_')[0].ToUpper();

                    switch (locale.Split('_')[1])
                    {
                    case "en":
                        language = "English";
                        break;

                    case "fr":
                        language = "French";
                        break;

                    case "gr":
                        language = "German";
                        break;

                    case "it":
                        language = "Italian";
                        break;

                    case "ne":
                        language = "Nederlands";
                        break;

                    case "po":
                        language = "Portugal";
                        break;

                    case "ru":
                        language = "Russian";
                        break;

                    case "sp":
                        language = "Spanish";
                        break;

                    default:
                        language = "";
                        break;
                    }
                }
                else
                {
                    language = "English";
                }


                localisationbox.Text = language;
            }
            checkBox1.Checked = Library.get_moved_dlc_status("Mewtwo");
            checkBox2.Checked = Library.get_moved_dlc_status("Lucas");
            checkBox3.Checked = Library.get_moved_dlc_status("Roy");
            checkBox4.Checked = Library.get_moved_dlc_status("Ryu");
            checkBox5.Checked = Library.get_moved_dlc_status("Cloud");
            checkBox6.Checked = Library.get_moved_dlc_status("Corrin");
            checkBox7.Checked = Library.get_moved_dlc_status("Bayonetta");

            message.Text      = "";
            message.ForeColor = Color.Green;

            unlocalised_checkbox.Checked = properties.property_get("unlocalised") == "1" ? true : false;
            checkBox9.Checked            = properties.property_get("logging") == "1" ? true : false;
            checkBox10.Checked           = properties.property_get("beta") == "1" ? true : false;
            checkBox11.Checked           = properties.property_get("dev") == "1" ? true : false;
        }