public override string ToString() { string typ = ClassName.Equals("LcRevitCollection") ? ClassDisplayName : ClassName.Substring(7); return(typ + " " + DisplayName); }
/// <summary> /// Returns a list of indexes of rows containing the supplied text <code>text</code> /// at column <code>colIdx</code>. /// </summary> /// <param name="colIdx"> Index of column from 0, that should contain the text </param> /// <param name="text"> Text to search for </param> /// <returns>The a list of row indexes containing the text.</returns> public virtual IList <long?> GetRowIndexesForCellText(long colIdx, string text) { string cellPath; if (ClassName.Equals("qx.ui.treevirtual.TreeVirtual")) { // Hierarchy: // * TreeVirtual div (content element) // * composite div // * scroller div (tree column) // * composite div (for header) // * clipper div // * pane div // * anonymous div // * row div // * div.qooxdoo-table-cell // * scroller (other columns) // * clipper div // * pane div // * anonymous div // * row div // * div.qooxdoo-table-cell // // TODO: handle meta columns: this code assumes [1, -1] for metaColumnCounts //System.out.println(this.getPropertyValueAsJson("metaColumnCounts")); if (colIdx == 0) { cellPath = "./div[1]/div[1]/div[2]//div[contains(@class, 'qooxdoo-table-cell')]"; } else { cellPath = "./div[1]/div[2]/div[2]//div[contains(@class, 'qooxdoo-table-cell') and position() = " + colIdx + "]"; } } else { cellPath = ".//div[contains(@class, 'qooxdoo-table-cell') and position() = " + (colIdx + 1) + "]"; } IList <IWebElement> els = FindElements(OpenQA.Selenium.By.XPath(cellPath)); IList <long?> rowIdxs = new List <long?>(); for (int rowIdx = 0; rowIdx < els.Count; rowIdx++) { string s = els[rowIdx].Text.Trim(); if (text.Equals(s)) { rowIdxs.Add((long)rowIdx); } } return(rowIdxs); }
public override bool Equals(object obj) { MBeanInfo other = obj as MBeanInfo; return(other != null && ClassName.Equals(other.ClassName) && Description.Equals(other.Description) && Descriptor.Equals(other.Descriptor) && Attributes.SequenceEqual(other.Attributes) && Operations.SequenceEqual(other.Operations) && Constructors.SequenceEqual(other.Constructors) && Notifications.SequenceEqual(other.Notifications)); }
/// <summary> /// Returns the cell element. /// </summary> /// <param name="colIdx">Column index from 0</param> /// <param name="rowIdx">Row index from 0</param> /// <returns>The found cell.</returns> public virtual IWebElement GetCellElement(long colIdx, long rowIdx) { string cellPath; if (ClassName.Equals("qx.ui.treevirtual.TreeVirtual")) { // // Hierarchy: // * TreeVirtual div (content element) // * composite div // * scroller div (tree column) // * composite div (for header) // * clipper div // * pane div // * anonymous div // * row div // * div.qooxdoo-table-cell // * scroller (other columns) // * clipper div // * pane div // * anonymous div // * row div // * div.qooxdoo-table-cell // // TODO: handle meta columns: this code assumes [1, -1] for metaColumntCounts //System.out.println(this.getPropertyValueAsJson("metaColumnCounts")); if (colIdx == 0) { cellPath = "./div[1]/div[1]/div[2]//div[contains(@class, 'qooxdoo-table-cell')]/" + "parent::div[count(preceding-sibling::div) = " + (rowIdx) + "]/" + "div"; } else { cellPath = "./div[1]/div[2]/div[2]//div[contains(@class, 'qooxdoo-table-cell')]/" + "parent::div[count(preceding-sibling::div) = " + (rowIdx) + "]/" + "div[position() = " + (colIdx) + "]"; } } else { cellPath = ".//div[contains(@class, 'qooxdoo-table-cell')]/" + "parent::div[count(preceding-sibling::div) = " + (rowIdx) + "]/" + "div[position() = " + (colIdx + 1) + "]"; } return(FindElement(OpenQA.Selenium.By.XPath(cellPath))); }
public override bool Equals(object obj) { if (base.Equals(obj)) { return(true); } COMCLSIDServerDotNetEntry right = obj as COMCLSIDServerDotNetEntry; if (right == null) { return(false); } return(AssemblyName.Equals(right.AssemblyName) && ClassName.Equals(right.ClassName) && CodeBase.Equals(right.CodeBase) && RuntimeVersion.Equals(right.RuntimeVersion)); }
public FlaxWindow(IntPtr hwnd, int idx) { hWnd = hwnd; Id = idx; int pid = 0; string procName = "", procPath = ""; Title = Win32API.User32.GetWindowTextHelper(hwnd); // Get the process name and path from its window handle. GetProcessInfo(hwnd, ref procName, ref procPath, ref pid); ProcessName = procName; ProcessPath = procPath; PID = pid; ClassName = Win32API.User32.GetClassNameA(hWnd); if (ClassName.Equals("Windows.UI.Core.CoreWindow")) { IsValid = false; return; } var r = Win32API.User32.GetWindowRectHelper(hWnd); IsMinimized = Win32API.User32.IsIconic(hWnd); if (IsMinimized) { IsValid = true; } else { IsValid = r.Top >= -8 && r.Left >= -8 && r.Bottom - r.Top >= 40 && r.Width >= 40 && r.Left <= 10000 && r.Top <= 10000; } Left = r.Left; Top = r.Top; Right = r.Right; Bottom = r.Bottom; Width = r.Width; Height = r.Height; Rect = r; }
public void loadProperties(ArkArchive archive, GameObject next, long propertiesBlockOffset, int?nextGameObjectPropertiesOffset = null) { var offset = propertiesBlockOffset + _propertiesOffset; var nextOffset = nextGameObjectPropertiesOffset != null ? propertiesBlockOffset + nextGameObjectPropertiesOffset.Value : (next != null) ? propertiesBlockOffset + next._propertiesOffset : archive.Size - 1; archive.Position = offset; properties.Clear(); try { var property = PropertyRegistry.readProperty(archive, null); while (property != null) { if (property != ExcludedProperty.Instance) { properties.Add(_arkNameCache.Create(property.Name.Token, property.Index), property); } property = PropertyRegistry.readProperty(archive, archive.ExclusivePropertyNameTree); } } catch (UnreadablePropertyException) { // Stop reading and ignore possible extra data for now, needs a new field in ExtraDataHandler return; } finally { //these are in order of most common to least common to keep lookups at a minimum if (Properties.ContainsKey(_ownerName) || Properties.ContainsKey(_bHasResetDecayTime) || ClassName.Name == "CherufeNest_C") { if (ClassName.Token.StartsWith("DeathItemCache_")) { _isFlags |= GameObjectIs.IsDeathItemCache; goto SkipRest; } _isFlags |= GameObjectIs.IsStructure; goto SkipRest; } if (Properties.ContainsKey(_dinoId1)) { _isFlags |= GameObjectIs.IsCreature; } int tamingTeamID = 0; int targetingTeamId = 0; if (IsCreature) { if (Properties.ContainsKey(_tamingTeamID)) { PropertyInt32 tamingTeam = (PropertyInt32)Properties[_tamingTeamID]; tamingTeamID = tamingTeam.Value.GetValueOrDefault(0); } if (Properties.ContainsKey(_targetTeamID)) { PropertyInt32 targetingTeam = (PropertyInt32)Properties[_targetTeamID]; targetingTeamId = targetingTeam.Value.GetValueOrDefault(0); } if (targetingTeamId > 1000000000) { if ((tamingTeamID > 0 && tamingTeamID < 1000000000) & !Properties.ContainsKey(_imprinterName)) { } else { _isFlags |= GameObjectIs.IsTamedCreature; } } } if (IsCreature && !IsTamedCreature) { _isFlags |= GameObjectIs.IsWildCreature; } if (IsTamedCreature && (ClassName.Equals(_raft_bp_c) || ClassName.Equals(_motorraft_bp_c))) { _isFlags |= GameObjectIs.IsRaftCreature; } if (Properties.ContainsKey(_currentStatusValues)) { _isFlags |= GameObjectIs.IsStatusComponent; } if (IsStatusComponent && ClassName.Token.StartsWith("DinoCharacterStatusComponent_")) { _isFlags |= GameObjectIs.IsDinoStatusComponent; } if (IsStatusComponent && !IsDinoStatusComponent && ClassName.Token.StartsWith("PlayerCharacterStatusComponent_")) { _isFlags |= GameObjectIs.IsPlayerCharacterStatusComponent; } if (ClassName.Token.StartsWith("DroppedItemGeneric_") & !ClassName.Name.Contains("NoPhysics")) { if (Properties.ContainsKey(_droppedByPlayerId)) { PropertyInt64 selectedPlayerId = (PropertyInt64)Properties[_droppedByPlayerId]; if (selectedPlayerId.Value != 0) { _isFlags |= GameObjectIs.IsDroppedItem; } } } if (IsItem) { goto SkipRest; } if (IsCreature) { goto SkipRest; } if (IsStatusComponent) { goto SkipRest; } if (Properties.ContainsKey(_bInitializedMe)) { _isFlags |= GameObjectIs.IsInventory; } if (IsInventory && ClassName.Token.StartsWith("PrimalInventoryBP_")) { _isFlags |= GameObjectIs.IsStructureInventory; } if (IsInventory && !IsStructureInventory && ClassName.Token.StartsWith("DinoTamedInventoryComponent_")) { _isFlags |= GameObjectIs.IsTamedCreatureInventory; } if (IsInventory && !(IsStructureInventory || IsTamedCreatureInventory) && ClassName.Token.StartsWith("PrimalInventoryComponent")) { _isFlags |= GameObjectIs.IsPlayerCharacterInventory; } if (IsInventory && !(IsStructureInventory || IsTamedCreatureInventory || IsPlayerCharacterInventory) && ClassName.Token.StartsWith("DinoWildInventoryComponent_")) { _isFlags |= GameObjectIs.IsWildCreatureInventory; } if (IsInventory) { goto SkipRest; } if (ClassName.Equals(_structurePaintingComponent)) { _isFlags |= GameObjectIs.IsStructurePaintingComponent; goto SkipRest; } if (ClassName.Equals(_droppedItem)) { _isFlags |= GameObjectIs.IsDroppedItem; goto SkipRest; } if (ClassName.Equals(_male) || ClassName.Equals(_female)) { _isFlags |= GameObjectIs.IsPlayerCharacter; goto SkipRest; } _isFlags |= GameObjectIs.IsSomethingElse; //IsStructure = (Properties.ContainsKey(_ownerName) || Properties.ContainsKey(_bHasResetDecayTime)); //if (IsStructure) goto SkipRest; //IsCreature = Properties.ContainsKey(_dinoId1); //IsTamedCreature = IsCreature && (Properties.ContainsKey(_tamerString) || Properties.ContainsKey(_tamingTeamID)); //IsWildCreature = IsCreature && !IsTamedCreature; //IsRaftCreature = IsTamedCreature && ClassName.Equals(_raft_bp_c); //if (IsCreature) goto SkipRest; //IsStatusComponent = Properties.ContainsKey(_currentStatusValues); //IsDinoStatusComponent = IsStatusComponent && ClassName.Token.StartsWith("DinoCharacterStatusComponent_"); //IsPlayerCharacterStatusComponent = IsStatusComponent && !IsDinoStatusComponent && ClassName.Token.StartsWith("PlayerCharacterStatusComponent_"); //if (IsStatusComponent) goto SkipRest; //IsInventory = Properties.ContainsKey(_bInitializedMe); //IsStructureInventory = IsInventory && ClassName.Token.StartsWith("PrimalInventoryBP_"); //IsTamedCreatureInventory = IsInventory && !IsStructureInventory && ClassName.Token.StartsWith("DinoTamedInventoryComponent_"); //IsPlayerCharacterInventory = IsInventory && !(IsStructureInventory || IsTamedCreatureInventory) && ClassName.Token.StartsWith("PrimalInventoryComponent"); //IsWildCreatureInventory = IsInventory && !(IsStructureInventory || IsTamedCreatureInventory || IsPlayerCharacterInventory) && ClassName.Token.StartsWith("DinoWildInventoryComponent_"); //if (IsInventory) goto SkipRest; //IsStructurePaintingComponent = ClassName.Equals(_structurePaintingComponent); //if (IsStructurePaintingComponent) goto SkipRest; //IsDroppedItem = ClassName.Equals(_droppedItem); //if (IsDroppedItem) goto SkipRest; //IsPlayerCharacter = ClassName.Equals(_male) || ClassName.Equals(_female); //if (IsPlayerCharacter) goto SkipRest; //IsSomethingElse = true; SkipRest :; } var distance = nextOffset - archive.Position; if (distance > 0) { ExtraData = ExtraDataRegistry.getExtraData(this, archive, distance); } else { ExtraData = null; } }
public bool Equals(SearchCriteria criteria) { if (!IsSpecified) { return(false); } if (criteria.ID != IntPtr.Zero && this.Handle != criteria.ID) { return(false); } if (criteria.PID != IntPtr.Zero && PID != criteria.PID) { return(false); } var comp = StringComparison.OrdinalIgnoreCase; if (!string.IsNullOrEmpty(criteria.ClassName)) { if (!ClassName.Equals(criteria.ClassName, comp)) { return(false); } } if (!string.IsNullOrEmpty(criteria.Title)) { if (!TitleCompare(Title, criteria.Title)) { return(false); } } if (!string.IsNullOrEmpty(criteria.Text)) { foreach (var text in Text) { if (text.IndexOf(criteria.Text, comp) == -1) { return(false); } } } if (!string.IsNullOrEmpty(criteria.ExcludeTitle)) { if (Title.IndexOf(criteria.ExcludeTitle, comp) != -1) { return(false); } } if (!string.IsNullOrEmpty(criteria.ExcludeText)) { foreach (var text in Text) { if (text.IndexOf(criteria.ExcludeText, comp) != -1) { return(false); } } } return(true); }
protected override bool LLEquals(SwiftType other) { var sct = other as SwiftClassType; return(sct != null && ClassName.Equals(sct.ClassName)); }
private bool ClassNameIs(string className) { return(ClassName.Equals(className, StringComparison.InvariantCultureIgnoreCase)); }
public void loadProperties(ArkArchive archive, GameObject next, long propertiesBlockOffset, int?nextGameObjectPropertiesOffset = null) { var offset = propertiesBlockOffset + _propertiesOffset; var nextOffset = nextGameObjectPropertiesOffset != null ? propertiesBlockOffset + nextGameObjectPropertiesOffset.Value : (next != null) ? propertiesBlockOffset + next._propertiesOffset : archive.Size - 1; archive.Position = offset; properties.Clear(); try { var property = PropertyRegistry.readProperty(archive); while (property != null) { properties.Add(_arkNameCache.Create(property.Name.Token, property.Index), property); property = PropertyRegistry.readProperty(archive); } } catch (UnreadablePropertyException) { // Stop reading and ignore possible extra data for now, needs a new field in ExtraDataHandler return; } finally { //these are in order of most common to least common to keep lookups at a minimum if (IsItem) { goto SkipRest; } IsStructure = (Properties.ContainsKey(_ownerName) || Properties.ContainsKey(_bHasResetDecayTime)); if (IsStructure) { goto SkipRest; } IsCreature = Properties.ContainsKey(_dinoId1); IsTamedCreature = IsCreature && (Properties.ContainsKey(_tamerString) || Properties.ContainsKey(_tamingTeamID)); IsWildCreature = IsCreature && !IsTamedCreature; IsRaftCreature = IsTamedCreature && ClassName.Equals(_raft_bp_c); if (IsCreature) { goto SkipRest; } IsStatusComponent = Properties.ContainsKey(_currentStatusValues); IsDinoStatusComponent = IsStatusComponent && ClassName.Token.StartsWith("DinoCharacterStatusComponent_"); IsPlayerCharacterStatusComponent = IsStatusComponent && !IsDinoStatusComponent && ClassName.Token.StartsWith("PlayerCharacterStatusComponent_"); if (IsStatusComponent) { goto SkipRest; } IsInventory = Properties.ContainsKey(_bInitializedMe); IsStructureInventory = IsInventory && ClassName.Token.StartsWith("PrimalInventoryBP_"); IsTamedCreatureInventory = IsInventory && !IsStructureInventory && ClassName.Token.StartsWith("DinoTamedInventoryComponent_"); IsPlayerCharacterInventory = IsInventory && !(IsStructureInventory || IsTamedCreatureInventory) && ClassName.Token.StartsWith("PrimalInventoryComponent"); IsWildCreatureInventory = IsInventory && !(IsStructureInventory || IsTamedCreatureInventory || IsPlayerCharacterInventory) && ClassName.Token.StartsWith("DinoWildInventoryComponent_"); if (IsInventory) { goto SkipRest; } IsStructurePaintingComponent = ClassName.Equals(_structurePaintingComponent); if (IsStructurePaintingComponent) { goto SkipRest; } IsDroppedItem = ClassName.Equals(_droppedItem); if (IsDroppedItem) { goto SkipRest; } IsPlayerCharacter = ClassName.Equals(_male) || ClassName.Equals(_female); if (IsPlayerCharacter) { goto SkipRest; } IsSomethingElse = true; SkipRest :; } var distance = nextOffset - archive.Position; if (distance > 0) { ExtraData = ExtraDataRegistry.getExtraData(this, archive, distance); } else { ExtraData = null; } }