Пример #1
0
        private void addPath(DynamicTableEntity entity)
        {
            PathModel model = new PathModel();

            model.Type   = (int)entity["t"].Int32Value;
            model.UserId = entity["u"].StringValue;

            model.Layer           = entity.GetInt("l", Consts.MAIN_LAYER_NUM);
            model.Zoom            = entity.GetInt("z", 1);
            model.TransformMatrix = entity.GetString("tm", "1,0,0,1");
            model.Color           = entity.GetString("o", "#000000");
            model.TipSize         = entity.GetInt("s", 0 /*default*/);
            model.BrushId         = entity.GetInt("b", 0 /*default*/);
            model.Blur            = entity.GetInt("r", 0 /*default*/);
            model.Idiosyncrasy    = entity.GetString("i", "");

            //model.HeadX = (int)entity["hx"].Int32Value;
            model.HeadX = entity.GetIntOrString("hx");                          // typed changed from int to string.

            //model.HeadY = (int)entity["hy"].Int32Value;
            model.HeadY = entity.GetIntOrString("hy");                          // typed changed from int to string.

            model.BlockIndexX  = (int)entity["bx"].Int32Value;
            model.BlockIndexY  = (int)entity["by"].Int32Value;
            model.DxDyCombined = entity["c"].StringValue;
            model.Gsid         = entity.GetInt("g", 0);

            this.AddPath(model);
        }