예제 #1
0
        public void RegisterListGroup(string fullName, ListGroupNode lg)
        {
            string[]  names   = fullName.Split(NAME_SEPARATORS);
            Hashtable current = _varTable;

            if (names[0] != _specName)
            {
                throw new FormatException("List group name does not start with unique appliance name.");
            }

            if (names[names.Length - 1] != lg.Name)
            {
                throw new FormatException("List group name does not end with same name as ListGroupNode object");
            }

            for (int i = 1; i < names.Length - 1; i++)
            {
                if (current[names[i]] == null)
                {
                    current[names[i]] = new Hashtable();
                }

                current = (Hashtable)current[names[i]];
            }

            if (current[lg.Name] == null)
            {
                current[lg.Name] = new Hashtable();
            }

            current = (Hashtable)current[lg.Name];
            current[ListGroupTag.GetToken()] = lg;
        }
예제 #2
0
        /*
         * Constructor
         */

        public IndexedDataWindow(ListGroupNode listGroup)
        {
            _listGroup = listGroup;
            _listGroup.ListDataChanged += new ListEvent(listGroup_ListDataChanged);

            _windows = new ArrayList();
            _index   = 1;
        }
예제 #3
0
        /*
         * Constructors
         */

        public ApplyOver(ListGroupNode list, ApplyType type)
        {
            _trueIf        = type;
            _listGroup     = list;
            _listGroupName = list.FullPath;

            _indexWindow = new IndexedDataWindow(_listGroup.DataWindow);
            _valid       = true;
        }
예제 #4
0
        public IndexedDataWindow(IndexedDataWindow indexedWindow)
        {
            _windows = new ArrayList();

            this._listGroup             = indexedWindow._listGroup;
            _listGroup.ListDataChanged += new ListEvent(listGroup_ListDataChanged);
            this._index = indexedWindow._index;

            indexedWindow.Parent.AddChildWindow(this);
        }
예제 #5
0
 protected virtual void updateListData(ListGroupNode lg, PUCData data)
 {
     try
     {
         _appliance.GetConnection().Send(new StateChangeRequest(data));
     }
     catch (Exception)
     {
     }
 }
예제 #6
0
        /*
         * Member Methods
         */

        public override object Clone()
        {
            // instantiate cloned object
            ListGroupNode obj = new ListGroupNode();

            // call the cloneHelper
            cloneHelper(obj);

            // return object
            return(obj);
        }
예제 #7
0
        public bool ResolveObject(VariableTable varTable)
        {
            _listGroup = varTable.GetListGroup(_listGroupName);

            if (_listGroup == null)
            {
                throw new PUC.Parsers.SpecParseException(_lineNumber, "List group references by " + PUC.Parsers.SpecParser21.APPLY_OVER_TAG + " element could not be found: " + _listGroupName);
            }

            _valid       = true;
            _indexWindow = new IndexedDataWindow(_listGroup.DataWindow);

            return(_valid);
        }
예제 #8
0
        /// <summary>
        /// This method helps in the cloning process by allowing each
        /// class in the hierarchy to clone their own member variables.
        /// The class being cloned will create a new instance of itself,
        /// and then call the cloneHelper in its super-class to get any
        /// member variables of its super classes to be copied.
        /// </summary>
        /// <param name="g">the instance of the cloned object</param>
        protected void cloneHelper(ListGroupNode g)
        {
            base.cloneHelper(g);

            // none of these objects should be defined yet
            System.Diagnostics.Debug.Assert(_listLengthState == null);
            System.Diagnostics.Debug.Assert(_listSelectionState == null);
            System.Diagnostics.Debug.Assert(_listSelectionLengthState == null);
            System.Diagnostics.Debug.Assert(_dataWindow == null);

            // shallow copy these
            g._appliance         = _appliance;
            g._itemCount         = _itemCount;
            g._minimum           = _minimum;
            g._maximum           = _maximum;
            g._defined           = _defined;
            g._selectionReadOnly = _selectionReadOnly;
            g._selectionType     = _selectionType;
        }
예제 #9
0
 private void listGroup_ListDataChanged(ListGroupNode listGroup, ListEventArgs a)
 {
     this.Update();
 }
예제 #10
0
        protected const int ROW_SPACING = 5;         // TODO: Calculate the actual value for this


        /*
         * Static Methods
         */

        public static ConcreteInteractionObject CreateListCIO(PUC.ListGroupNode g)
        {
            return(new OneDimCategoricalList(g));
        }