// Creates TextNote wrapper private TextNote CreateItem( // Fields of TextNote table Guid TextNoteId, LogicalCircuit LogicalCircuit, int X, int Y, int Width, int Height, string Note, Rotation Rotation ) { TextNoteData dataTextNote = new TextNoteData() { TextNoteId = TextNoteId, LogicalCircuitId = (LogicalCircuit != null) ? LogicalCircuit.LogicalCircuitId : TextNoteData.LogicalCircuitIdField.Field.DefaultValue, X = X, Y = Y, Width = Width, Height = Height, Note = Note, Rotation = Rotation, }; return(this.Create(this.Table.Insert(ref dataTextNote))); }
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(); }
// Constructor public TextNoteSet(CircuitProject store) { ITableSnapshot table = store.Table("TextNote"); if (table != null) { Debug.Assert(store.IsFrozen, "The store should be frozen"); this.Table = (TableSnapshot <TextNoteData>)table; } else { Debug.Assert(!store.IsFrozen, "In order to create table, the store should not be frozen"); this.Table = TextNoteData.CreateTable(store); } this.InitializeTextNoteSet(); }