Exemplo n.º 1
0
        // Creates GraphicsArray wrapper
        private GraphicsArray CreateItem(
            // Fields of GraphicsArray table
            Guid GraphicsArrayId,
            bool WriteOn1,
            MemoryOnStart OnStart,
            int DataBitWidth,
            int BitsPerPixel,
            int Width,
            int Height,
            string Note
            // Fields of Circuit table

            )
        {
            TableSnapshot <CircuitData> tableCircuit = (TableSnapshot <CircuitData>) this.CircuitProject.Table("Circuit");
            CircuitData dataCircuit = new CircuitData()
            {
                CircuitId = GraphicsArrayId
            };
            RowId rowIdCircuit = tableCircuit.Insert(ref dataCircuit);

            GraphicsArrayData dataGraphicsArray = new GraphicsArrayData()
            {
                GraphicsArrayId = GraphicsArrayId,
                WriteOn1        = WriteOn1,
                OnStart         = OnStart,
                DataBitWidth    = DataBitWidth,
                BitsPerPixel    = BitsPerPixel,
                Width           = Width,
                Height          = Height,
                Note            = Note,
            };

            return(this.Create(this.Table.Insert(ref dataGraphicsArray), rowIdCircuit));
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        // Constructor
        public GraphicsArraySet(CircuitProject store)
        {
            ITableSnapshot table = store.Table("GraphicsArray");

            if (table != null)
            {
                Debug.Assert(store.IsFrozen, "The store should be frozen");
                this.Table = (TableSnapshot <GraphicsArrayData>)table;
            }
            else
            {
                Debug.Assert(!store.IsFrozen, "In order to create table, the store should not be frozen");
                this.Table = GraphicsArrayData.CreateTable(store);
            }
            this.InitializeGraphicsArraySet();
        }