Ejemplo n.º 1
0
        private void UpdateZxbz()
        {
            var ssdw    = ComBox_SSDW.Text;
            var bzlx    = ComBox_BZLX.Text;
            var bzText  = TXT_BZNR.Text.Trim();
            var dysbfid = TXT_DYSBFID.Tag == null ? string.Empty : TXT_DYSBFID.Tag.ToString();

            if (string.IsNullOrEmpty(dysbfid))
            {
                MessageBox.Show("请选择杂项标注对应的父设备!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (string.IsNullOrEmpty(bzlx))
            {
                MessageBox.Show("标注类型不能为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (string.IsNullOrEmpty(bzText))
            {
                return;
            }
            if (entityArgs.ObjId == ObjectId.Null)
            {
                return;
            }
            if (!bzText.Equals(zxbzn.MIF_TEXT))
            {
                SymbolLabel.UpdateDBText(entityArgs.ObjId, bzText);
            }
            var result  = UpdateDBEntity.UpdateZXBZN(bzText, bzlx, ssdw, dysbfid, zxbzn);
            var message = result ? "修改成功!" : "修改失败!";

            PublicMethod.Instance.ShowMessage(message);
        }
Ejemplo n.º 2
0
        private void UpdateDBText(long g3e_fid, string newTextString, string oldTextString)
        {
            //获取标注对象
            var values = DBEntityFinder.Instance.GetDBSymbolFinderByFidOrEntityType(g3e_fid, EntityType.Label);

            var objList = values.Select(id => id.Key).ToList();

            //批量更新标注
            foreach (var objectId in objList)
            {
                SymbolLabel.UpdateDBText(objectId, newTextString, oldTextString);
            }
        }
Ejemplo n.º 3
0
        private void UpdateGraph(DBEntity dbEntity)
        {
            //存储坐标数据
            if (dbEntity.IsCoordinate)
            {
                var objectId = ObjectId.Null;
                var pt       = dbEntity as ElectronSymbol;
                switch (pt.EntityType)
                {
                case EntityType.None:
                    objectId = DBEntityFinder.Instance.GetObjectIdByFid(pt.G3E_FID, EntityType.None);
                    if (!updateStateGEOMETRY.ContainsKey(objectId))
                    {
                        updateStateGEOMETRY.Add(objectId, pt);
                    }

                    GetGraphG3eFID(dbEntity, pointFidList);
                    break;

                case EntityType.Label:
                    objectId = DBEntityFinder.Instance.GetObjectIdByFid(pt.G3E_FID, EntityType.Label);
                    SymbolLabel.UpdateDBText(pt, objectId);
                    break;

                case EntityType.ZxLabel:
                    objectId = DBEntityFinder.Instance.GetObjectIdByFid(pt.G3E_FID, EntityType.ZxLabel);
                    break;
                }
                //更新缓存
                PublicMethod.Instance.UpdateDBSymbolFinder(objectId, pt);
            }
            else
            {
                GetNotGraphG3eFID(dbEntity, notPointFidList);
            }
        }