Esempio n. 1
0
            private bool add()
            {
                var content = dataControl.getContent();

                dataControls.Add(dataControl);
                elements.Add(content);

                var hasId = content as HasId;

                if (hasId != null)
                {
                    Controller.Instance.IdentifierSummary.addId(hasId.GetType(), hasId.getId());
                }

                return(true);
            }
Esempio n. 2
0
            private bool move(int times)
            {
                var content = dataControl.getContent();

                var index = dataControls.IndexOf(dataControl);

                if (index == -1)
                {
                    return(false);
                }

                var pos = index + times;

                if (!pos.InRange(0, dataControls.Count - 1))
                {
                    return(false);
                }

                dataControls.RemoveAt(index);
                elements.RemoveAt(index);

                dataControls.Insert(pos, dataControl);
                elements.Insert(pos, content);

                return(true);
            }
Esempio n. 3
0
            private bool add()
            {
                var content = dataControl.getContent();

                dataControls.Add(dataControl);
                elements.Add(content);

                var hasId = content as HasId;

                if (hasId != null)
                {
                    Controller.Instance.IdentifierSummary.addId(hasId.GetType(), hasId.getId());
                }

                if (isRemove) // This means is undoing
                {
                    // Update references to var and flags in case the element contains them
                    Controller.Instance.updateVarFlagSummary();
                }

                return(true);
            }