private void SaveAction(Action <TableModel> saveAction) { tableState = this.tableState.saveCurrentTransaction(() => { saveAction(this); }); }
public static void AddRow(ITableState tableState, int rowIndex, IEnumerable <string> values) { var splitter = tableState.SplitterState; var rowBackgroundStyle = (rowIndex & 1) == 0 ? evenRowStyle : oddRowStyle; Rect rowRect = GUILayoutUtility.GetRect(GUIClip.visibleRect.width, 16f); rowRect.x += 2; if (Event.current.type == EventType.Repaint) { rowBackgroundStyle.Draw(rowRect, GUIContent.none, false, false, false, false); int columnIndex = 0; foreach (var value in values) { if (columnIndex != 0) { valueStyle.alignment = TextAnchor.MiddleRight; } rowRect.width = (float)splitter.realSizes[columnIndex] - 4f; valueStyle.Draw(rowRect, value, false, false, false, false); rowRect.x += (float)splitter.realSizes[columnIndex]; valueStyle.alignment = TextAnchor.MiddleLeft; ++columnIndex; } } }
public void ToVacant(Action <Table> saveDetails) { state = this.state.PayOut(() => { saveDetails(this); transactionEnded(); }); }
public void TimeOut() { state = this.state.TimeOut(() => { this.timeEnded(DateTime.Now); this.transaction.timeOut(this); }); }
public Transaction GetTransaction() { Transaction ret = new Transaction(); tableState = this.tableState.GetTransaction(() => { ret = currentTransaction; }); return(ret); }
public int GetTransactionTypeCode() { int ret = 0; state = this.state.GetTransactionType(() => { ret = transaction.TransactionType(); }); return(ret); }
public void TimeIn(ITableTransaction transType, Action <Table> saveCurrentTransaction, DateTime timeStarted) { state = this.state.TimeIn(() => { transaction = transType; this.timeStarted = timeStarted; Console.WriteLine(state.StateType()); }); state = this.state.saveCurrentTransaction(() => { saveCurrentTransaction(this); }); }
public static void BeginTable(ITableState tableState, GUIStyle style, params GUILayoutOption[] options) { GUILayout.BeginHorizontal(); SplitterGUILayout.BeginHorizontalSplit(tableState.SplitterState); foreach (var header in tableState.Headers) { GUILayout.Toggle(false, header, headerStyle); } SplitterGUILayout.EndHorizontalSplit(); GUILayout.EndHorizontal(); GUILayout.Space(1f); tableState.ScrollPosition = EditorGUILayout.BeginScrollView(tableState.ScrollPosition, style, options); }
public Expression <Func <Item, bool> > GetFilter(ITableState <Item> state) { if ((Searchable || SearchExpression != null) && Property != null && !string.IsNullOrEmpty(state.SearchText)) { var filter = FilterService.GetFilter(this, state.SearchText); if (filter == null) { return(null); } return(PredicateBuilder .New <Item>() .And(NotNull()) .And(filter)); } return(null); }
public DbTableBuilder(ITableTransaction transType, ITableState tableState, Transaction currentTransaction) { this.TransactionType = transType; this.TableState = tableState; this.Transaction = currentTransaction; }
public TheGridDataFactory(List <IColumn <Item> > columns, ITableState <Item> state) { this.columns = columns; this.state = state; }
public void SetTableState(ITableState newState) { _tableModel.SetState(newState); }
public TableModel(ITableState state, ITableTransaction rentTrans, Transaction trans) { tableState = state; currentTransaction = trans; rentTransaction = rentTrans; }
public void SetState(ITableState newState) { tableState = newState; }
public Table(ITableState dbState) { this.state = dbState; }