Ejemplo n.º 1
0
        void eLoadExpo(object s, EventArgs e)
        {
            res_info ri = LoadExpo();

            if (File.Exists(ri.lib.pe_path))
            {
                LoadPE(ri.lib.pe_path);
            }
            if (ri.table_data != null)
            {
                string tstr = string.Format("{0}\n", ri.table_data.Length);
                foreach (res_category rc in ri.table_data)
                {
                    tstr += string.Format("type:{0}\n", rc.table_id);
                    foreach (res_table rt in rc.table_data)
                    {
                        tstr += string.Format("\t{1}:{0}\n", rt._n, rt._t);
                    }
                }
                Client.richTextBox1.Text = tstr;
            }
            else
            {
                Client.richTextBox1.Text = "TABLE DATA EMPTY";
            }
            MessageBox.Show("shit!!");
        }
Ejemplo n.º 2
0
        void eExportInfoDump(object sender, EventArgs args)
        {
            if (Client.tvRes.SelectedNode.Index != 0)
            {
                MessageBox.Show(res.err_pe_load, "first");
                return;
            }
            string name = ((Client.tvRes.SelectedNode).Tag as LibLoader2).LibraryPath;

            if (name == null)
            {
                throw new ArgumentException(string.Format(res.err_arg_filter, (Client.tvRes.SelectedNode).Tag));
            }
            MessageBox.Show(name);
            string pathname = Path.GetFileNameWithoutExtension(name);
            string basepath = Cor3.FileUtil.GetDir(string.Format(bp, pathname));

            if (basepath == string.Empty)
            {
                return;
            }
            string   newdir    = DirUtil.CreateIfNoExist(Path.Combine(basepath, pathname));
            string   stroutput = string.Empty;
            res_info wry       = Resources[name].ToResInfo();

            foreach (res_category ri in wry.table_data)
            {
                string tpath = DirUtil.CreateIfNoExist(Path.Combine(newdir, string.Format("{0}", ri.table_id)));
                foreach (res_table rt in ri.table_data)
                {
                    thought?t = new thought(Resources[name], ri.table_id, rt._n, rt.Lang);
                    Application.DoEvents();
                    byte[] bits = LoadBinary(t);
                    if (t.GetValueOrDefault().table.type == "BITMAP")
                    {
                        BITMAPINFOHEADER bih       = BITMAPINFOHEADER.CreateMemory(bits);
                        string           imagename = ckpath(tpath, ckname(t, bih)); // convert the dir/name
                        SaveImage(imagename, t, bih);
                        rt.ext_info = imagename;
                    }
                    else
                    {
                        SaveImage(Path.Combine(tpath, rt.name), bits);
                    }
                    t          = null;
                    stroutput += string.Format("{0}:{1}\n", rt._n, rt._t);
                }
            }
            if (Resources.ContainsKey(name))
            {
                Resources[name].SaveXml(wry, newdir, pathname);
            }
            Client.richTextBox1.Text = stroutput;
        }
Ejemplo n.º 3
0
    void Start()
    {
        if (workerManager == null)
        {
            workerManager = GameObject.Find(vars.worker_manager_name).GetComponent <WorkerManager>();
        }

        workerManager.addRessource(this);

        click_collider.SetActive(false);
        is_selected_by_res_manager = false;
        ressource_pos = this.gameObject.transform.position;
        res           = new res_info();
        //res = vars.res_type_a;
        res.target_collection_ants = 0;
        //hier node registeren
        this.name = vars.res_name + "_" + ressource_id;
        refresh_res_info();
        show_complete_model();


        //	ressource_id = this.GetComponent<path_point>().waypoint_id;
    }
Ejemplo n.º 4
0
 void Start()
 {
     click_collider.SetActive(false);
     is_selected_by_res_manager = false;
     ressource_pos = this.gameObject.transform.position;
     res = new res_info();
     //res = vars.res_type_a;
     res.target_collection_ants = 0;
     //hier node registeren
     this.name = vars.res_name + "_" + ressource_id;
     refresh_res_info();
     show_complete_model();
 }
Ejemplo n.º 5
0
        res_info LoadExpo(string file)
        {
            res_info ri = res_info.Load(file);

            return(ri);
        }
Ejemplo n.º 6
0
    void Start()
    {
        if(workerManager == null) {
            workerManager = GameObject.Find (vars.worker_manager_name).GetComponent<WorkerManager>();
        }

        workerManager.addRessource(this);

        click_collider.SetActive(false);
        is_selected_by_res_manager = false;
        ressource_pos = this.gameObject.transform.position;
        res = new res_info();
        //res = vars.res_type_a;
        res.target_collection_ants = 0;
        //hier node registeren
        this.name = vars.res_name + "_" + ressource_id;
        refresh_res_info();
        show_complete_model();

        //	ressource_id = this.GetComponent<path_point>().waypoint_id;
    }