public CircuitProject() : base()
        {
            // Create all sets
            this.CreateSets();

            // Create foreign keys
            ProjectData.CreateForeignKeys(this);
            CollapsedCategoryData.CreateForeignKeys(this);
            CircuitData.CreateForeignKeys(this);
            DevicePinData.CreateForeignKeys(this);
            GateData.CreateForeignKeys(this);
            LogicalCircuitData.CreateForeignKeys(this);
            PinData.CreateForeignKeys(this);
            CircuitProbeData.CreateForeignKeys(this);
            ConstantData.CreateForeignKeys(this);
            CircuitButtonData.CreateForeignKeys(this);
            MemoryData.CreateForeignKeys(this);
            LedMatrixData.CreateForeignKeys(this);
            SplitterData.CreateForeignKeys(this);
            SensorData.CreateForeignKeys(this);
            SoundData.CreateForeignKeys(this);
            GraphicsArrayData.CreateForeignKeys(this);
            CircuitSymbolData.CreateForeignKeys(this);
            WireData.CreateForeignKeys(this);
            TextNoteData.CreateForeignKeys(this);

            this.FreezeShape();
            this.Init();
        }
示例#2
0
        // Constructor
        public CircuitSymbolSet(CircuitProject store)
        {
            ITableSnapshot table = store.Table("CircuitSymbol");

            if (table != null)
            {
                Debug.Assert(store.IsFrozen, "The store should be frozen");
                this.Table = (TableSnapshot <CircuitSymbolData>)table;
            }
            else
            {
                Debug.Assert(!store.IsFrozen, "In order to create table, the store should not be frozen");
                this.Table = CircuitSymbolData.CreateTable(store);
            }
            this.InitializeCircuitSymbolSet();
        }
示例#3
0
        // Creates CircuitSymbol wrapper
        private CircuitSymbol CreateItem(
            // Fields of CircuitSymbol table
            Guid CircuitSymbolId,
            Circuit Circuit,
            LogicalCircuit LogicalCircuit,
            int X,
            int Y,
            Rotation Rotation
            )
        {
            CircuitSymbolData dataCircuitSymbol = new CircuitSymbolData()
            {
                CircuitSymbolId  = CircuitSymbolId,
                CircuitId        = (Circuit != null) ? Circuit.CircuitId : CircuitSymbolData.CircuitIdField.Field.DefaultValue,
                LogicalCircuitId = (LogicalCircuit != null) ? LogicalCircuit.LogicalCircuitId : CircuitSymbolData.LogicalCircuitIdField.Field.DefaultValue,
                X        = X,
                Y        = Y,
                Rotation = Rotation,
            };

            return(this.Create(this.Table.Insert(ref dataCircuitSymbol)));
        }