/// <summary> /// Adds a value in the matrix. /// </summary> /// <param name="columnValues">Array of column values.</param> /// <param name="rowValues">Array of row values.</param> /// <param name="cellValues">Array of data values.</param> /// <param name="dataRowNo">Datasource row index.</param> /// <remarks> /// See the <see cref="AddValue(object[],object[],object[])"/> method for more details. /// </remarks> public void AddValue(object[] columnValues, object[] rowValues, object[] cellValues, int dataRowNo) { MatrixHeaderItem column = Columns.Find(columnValues, true, dataRowNo); MatrixHeaderItem row = Rows.Find(rowValues, true, dataRowNo); Cells.AddValue(column.Index, row.Index, cellValues); }
public ПраздникиRow FindByДата(DateTime Дата) { return((ПраздникиRow)Rows.Find(new object[] { Дата })); }
public TestsRow FindById(int Id) { return((TestsRow)(Rows.Find(new object[] { Id }))); }
/// <summary> /// /// </summary> /// <param name="oid"></param> /// <returns></returns> IFeature IFeatureCollection.this[object oid] { get { if (PrimaryKey.Length == 0) { return((FeatureDataRow)Rows[Convert.ToInt32(oid)]); } var fdr = (FeatureDataRow)Rows.Find(oid); return(fdr); } }
public EntityRow Find(string keyValue) { if (PrimaryKey == null) { return(null); } int idx = Columns.IndexOf(PrimaryKey); var entityRow = Rows.Find(row => keyValue.Equals(row[idx].ToString())); entityRow.Table = this; return(entityRow); }
public void AddValues(int number, int row, int column) { Rows.Find(x => x.Number == row + 1).Values[column] = number; Columns.Find(x => x.Number == column + 1).Values[row] = number; if (column < 3) { if (row < 3) { Fields.Find(x => x.Number == 1).Values[row, column] = number; } else if (row > 5) { Fields.Find(x => x.Number == 7).Values[row - 6, column] = number; } else { Fields.Find(x => x.Number == 4).Values[row - 3, column] = number; } } else if (column > 5) { if (row < 3) { Fields.Find(x => x.Number == 3).Values[row, column - 6] = number; } else if (row > 5) { Fields.Find(x => x.Number == 9).Values[row - 6, column - 6] = number; } else { Fields.Find(x => x.Number == 6).Values[row - 3, column - 6] = number; } } else if (row < 3) { Fields.Find(x => x.Number == 2).Values[row, column - 3] = number; } else if (row > 5) { Fields.Find(x => x.Number == 8).Values[row - 6, column - 3] = number; } else { Fields.Find(x => x.Number == 5).Values[row - 3, column - 3] = number; } }
private void ReorderRowsBackgrounds() { object L = FavCimsCore.GetPrivateVariable <object>(InstanceManager.instance, "m_lock"); do { }while (!Monitor.TryEnter(L, SimulationManager.SYNCHRONIZE_TIMEOUT)); try { CitizenRow[] CitizenRows = FavCimsCitizenRowsPanel.GetComponentsInChildren <CitizenRow> (); foreach (CitizenRow Rows in CitizenRows) { if (Rows != null && Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite") != null) { if (Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture != null) { Texture FavDot; if (Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture.name.Length > 0) { if (RowAlternateBackground == false) { FavDot = ResourceLoader.loadTexture((int)Rows.width, 40, "UIMainPanel.Rows.bgrow_1.png"); FavDot.name = "FavDot_1"; Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture = FavDot; RowAlternateBackground = true; } else { FavDot = ResourceLoader.loadTexture((int)Rows.width, 40, "UIMainPanel.Rows.bgrow_2.png"); FavDot.name = "FavDot_2"; Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture = FavDot; RowAlternateBackground = false; } Rows.eventMouseLeave -= (UIComponent component, UIMouseEventParameter eventParam) => Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture = FavDot; Rows.eventMouseLeave += (UIComponent component, UIMouseEventParameter eventParam) => Rows.Find <UITextureSprite>("FavCimsCitizenSingleRowBGSprite").texture = FavDot; } } } } } catch (Exception e) { Debug.Error("Reorder Background Error " + e.ToString()); } finally { Monitor.Exit(L); } }
public bool Remove(string keyValue) { if (PrimaryKey == null) { return(false); } int idx = Columns.IndexOf(PrimaryKey); var it = Rows.Find(row => keyValue.Equals(row[idx])); if (it == null) { return(false); } Rows.Remove(it); NotifyCollectionChangedEventArgs e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, it, idx); OnCollectionChanged(e); return(true); }
//-------------------------------------------------------------------------------- public DataRow FindByID(uint id) { return((DataRow_security)Rows.Find(new object[] { id })); }
public EO_UserEventLogRow findByPrimaryKey(String EOUEL_UserEventLogId) { return((EO_UserEventLogRow)(Rows.Find(new object[] { EOUEL_UserEventLogId }))); }
/// <summary> /// Finds a FeatureRow by the FID field. /// </summary> /// <param name="fid">The long fid to find</param> /// <returns>A FeatureRow</returns> public FeatureRow FindByFid(long fid) { return((FeatureRow)Rows.Find(new object[] { fid })); }
public EO_MenuStructRow findByPrimaryKey(String EOMS_NodeId) { return((EO_MenuStructRow)(Rows.Find(new object[] { EOMS_NodeId }))); }
/// <summary> /// Returns the first row with the given ID, or null if not found. /// </summary> public Row this[int id] => Rows.Find(row => row.ID == id);
public EO_DepartmentRow findByPrimaryKey(String EOD_DepartmentId) { return((EO_DepartmentRow)(Rows.Find(new object[] { EOD_DepartmentId }))); }
public CR_RegistrationRow findByPrimaryKey(String CRR_RegistrationId) { return((CR_RegistrationRow)(Rows.Find(new object[] { CRR_RegistrationId }))); }
public EO_PermissionSettingRow findByPrimaryKey(String EOPS_PermissionSettingId) { return((EO_PermissionSettingRow)(Rows.Find(new object[] { EOPS_PermissionSettingId }))); }
public TableRowSe FindRow(Predicate <TableRowSe> predicate) { return(Rows.Find(predicate)); }
public TableRowSe FindRow(FindRow findRow) { return(Rows.Find(i => i.Cells[findRow.KeyColumn].Text.RemoveLineBreaks().Contains(findRow.Key))); }
public TableRowSe FindRow(string key, int keyColumn) { return(Rows.Find(i => i.Cells[keyColumn].Text.RemoveLineBreaks().Contains(key))); }
public TableRowSe FindRow(string key) { return(Rows.Find(i => i.Text.RemoveLineBreaks().Contains(key))); }
public EO_OrganizationRow findByPrimaryKey(String EOO_OrganizationId) { return((EO_OrganizationRow)(Rows.Find(new object[] { EOO_OrganizationId }))); }
//-------------------------------------------------------------------------------- public DataRow FindByID(uint id) { return((DataRow_timeframe)Rows.Find(new object[] { id })); }
public AL_AssmblingRow findByPrimaryKey(String ALA_AssmblingId) { return((AL_AssmblingRow)(Rows.Find(new object[] { ALA_AssmblingId }))); }
//-------------------------------------------------------------------------------- public DataRow FindByDT(DateTime dt) { return((DataRow_candle)Rows.Find(new object[] { dt })); }
public EO_MenuRow findByPrimaryKey(String EOM_MenuId) { return((EO_MenuRow)(Rows.Find(new object[] { EOM_MenuId }))); }
//-------------------------------------------------------------------------------- public DataRow FindByID(int id) { return((DataRow_stopOrder)Rows.Find(new object[] { id })); }
public EO_EmployeeRow findByPrimaryKey(String EOE_EmployeeId) { return((EO_EmployeeRow)(Rows.Find(new object[] { EOE_EmployeeId }))); }
public CR_CourseRow findByPrimaryKey(String CRC_CourseId) { return((CR_CourseRow)(Rows.Find(new object[] { CRC_CourseId }))); }
public FeriadoRow FindByID(int ID) { return((FeriadoRow)(Rows.Find(new object[] { ID }))); }
public WT_ScheduleDateRow findByPrimaryKey(String WTSD_ScheduleDateId) { return((WT_ScheduleDateRow)(Rows.Find(new object[] { WTSD_ScheduleDateId }))); }