Ejemplo n.º 1
0
    public static bool Init(string iniFilePath)
    {
        try
        {
            DataSource.iniFile = new Ini.File(iniFilePath);

            readConfig();

            if (DataSource.archives != null && DataSource.packages != null)
            {
                DataSource.writeLog("Already loaded");
                return(false);
            }
            DataSource.archives = new wzarchives(DataSource.location + "\\" + "base.wz");
            DataSource.packages = archives.root;

            DataSource.tag_version = DataSource.tag + "" + archives.version;

            Console.Write(DataSource.tag_version);
            Console.Write("> ");
            Console.Write(DataSource.archives.location);
            Console.Write("\n");
        }
        catch (Exception ex)
        {
            DataSource.writeLog(ex.Message);
            DataSource.writeLog(ex.StackTrace);
        }
        return(true);
    }
Ejemplo n.º 2
0
    internal components_source(string location)
    {
        /*	string character = location + (location.EndsWith("\\") ? "" : "\\") + "character.wz";
         *      string item = location + (location.EndsWith("\\") ? "" : "\\") + "item.wz";
         *
         *      if (File.Exists(character) || File.Exists(item))
         *      {
         *              archives = new wzarchive[]
         *              {
         *                      new wzarchive(character),
         *                      new wzarchive(item),
         *              };
         *
         *              packages = new wzpackage[]
         *              {
         *                      archives[0].root,
         *                      archives[1].root,
         *              };
         *      }*/

        string basewz = location + (location.EndsWith("\\") ? "" : "\\") + "base.wz";

        if (File.Exists(basewz))
        {
            archives = new wzarchives(basewz);

            packages = new wzpackage[]
            {
                archives.root["Character"],
                archives.root["Item"],
            };
        }
    }
Ejemplo n.º 3
0
        public bool Load(string location)
        {
            string path = location + "\\" + "base.wz";

            if (System.IO.File.Exists(path))
            {
                this.archives = new wzarchives(location + "\\" + "base.wz");
                this.packages = archives.root;
                return(true);
            }
            //System.Windows.Forms.MessageBox.Show("version: " + MInspect.archives.version, "version");
            return(false);
        }
Ejemplo n.º 4
0
    public static void Init(string iniFilePath)
    {
        DataSource.iniFile = new Ini.File(iniFilePath);

        readConfig();

        if (DataSource.archives != null && DataSource.packages != null)
        {
            return;
        }

        DataSource.archives = new wzarchives(DataSource.location + "\\" + "base.wz");
        DataSource.packages = archives.root;
    }