Esempio n. 1
0
    public static void update_SignNewInfo_db(string dbfile)
    {
        DbRepository <SignNewInfo> temp_db;

        temp_db = new DbRepository <SignNewInfo>();
        temp_db.DataService(dbfile);
        temp_db.CreateTable();
        IEnumerable <SignNewInfo> res = temp_db.Select <SignNewInfo>((temp_fbx) =>
        {
            if (temp_fbx.id != "")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        });


        if (res.GetEnumerator().MoveNext())
        {
            DbRepository <SignNewInfo> anim_db;
            anim_db = new DbRepository <SignNewInfo>();
            anim_db.DataService("vesali.db");
            foreach (SignNewInfo item in res)
            {
                SignNewInfo fbx_info = anim_db.SelectOne <SignNewInfo>((temp_fbx_anim) =>
                {
                    if (temp_fbx_anim.id == item.id)
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                });


                if (fbx_info != null)
                {
                    anim_db.Update(item);
                }
                else
                {
                    anim_db.Insert(item);
                }
            }
            anim_db.Close();
        }
        temp_db.Close();
    }
Esempio n. 2
0
    public void SetData(SignNewInfo info)

    {
        //point = new StartStopPoint(info);
        sgnCol   = new Color(float.Parse(info.r) / 255.0f, float.Parse(info.g) / 255.0f, float.Parse(info.b) / 255.0f, 1);
        hightCol = new Color(float.Parse(info.high_r) / 255.0f, float.Parse(info.high_g) / 255.0f, float.Parse(info.high_b) / 255.0f, 1);

        //modName = info.mod_name;
        chName = info.sm_ch_name;
        enName = info.sm_en_name;
        sgnDes = info.description;
        try
        {
            m_params = JsonConvert.DeserializeObject <camera_params>(info.camera_params);
        }
        catch (System.Exception)
        {
        }
    }