Ejemplo n.º 1
0
        public virtual void setGroupName(GroupRecord groupRec, Symbol groupID)
        {
            GroupRecord grec = null;

            if (groups != null)
                groups.TryGetValue(groupID, out grec);
            else if (groupRec != null)
                groups = new Dictionary<Symbol, GroupRecord>();

            if (grec != null)
            {
                if (groupRec != null)
                    groups[groupID] = groupRec;
                else
                    groups.Remove(groupID);
            }
            else if (groupRec != null)
            {
                groups.Add(groupID, groupRec);
            }

            getNetwork().setDirty();
        }
Ejemplo n.º 2
0
        public override void setGroupName(GroupRecord gr, Symbol groupID)
        {
            bool update_where = (gr != null ? gr.changesWhere() : true);

            // If we're just clearing old group information, then only update the
            // WHERE param, if the old group says it needs to.
            if (gr == null)
            {
                String current_group_name = getGroupName(groupID);
                if (current_group_name != null)
                {
                    Network net = getNetwork();
                    String symstr = SymbolManager.theSymbolManager.getSymbolString(groupID);
                    GroupManager gmgr = net.getGroupManagers()[symstr];
                    GroupRecord old_grec = gmgr.getGroup(current_group_name);
                    if (old_grec == null)
                        update_where = false;
                    else if (old_grec.changesWhere() == false)
                        update_where = false;
                }
            }
            base.setGroupName(gr, groupID);
            if (update_where && image != null)
                notifyWhereChange(true);
        }