void entityHelper_EntityCharged(object sender, EntityChangedArgs ea) { PropertyChangedEventArgs e = ea.ChangedEventArgs; List <string> propertyNameList = new List <string>(); if (object.Equals(this.Entity, sender)) { if (OwnerList.Contains(e.PropertyName)) { propertyNameList = OnOwnerPropertyChanged(sender, e); } else { propertyNameList.Add(e.PropertyName.ToEntityString()); } if (OrderPropertyChanged != null) { OrderPropertyChangedArgs args = new OrderPropertyChangedArgs(propertyNameList); OrderPropertyChanged(sender, args); } } else { if (this.CollectionEntityChanged != null) { this.CollectionEntityChanged(sender, ea); } } }
internal PMLProcess(XmlReader processListReader) { XmlDocument processXMLDoc = new XmlDocument(); processXMLDoc.Load(processListReader); string tempString = XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_Owner); // Actual object creation i.e., assigning values to members ProcessId = XMLUtils.ParseTagContentAsInt(processXMLDoc, ProcMonXMLTagNames.Process_ProcessId); ParentProcessId = XMLUtils.ParseTagContentAsInt(processXMLDoc, ProcMonXMLTagNames.Process_ParentProcessId); ProcessIndex = XMLUtils.ParseTagContentAsInt(processXMLDoc, ProcMonXMLTagNames.Process_ProcessIndex); ParentProcessIndex = XMLUtils.ParseTagContentAsInt(processXMLDoc, ProcMonXMLTagNames.Process_ParentProcessIndex); AuthenticationId = XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_AuthenticationId); CreateTime = XMLUtils.ParseTagContentAsFileTime(processXMLDoc, ProcMonXMLTagNames.Process_CreateTime); FinishTime = XMLUtils.ParseTagContentAsFileTime(processXMLDoc, ProcMonXMLTagNames.Process_FinishTime); IsVirtualized = XMLUtils.ParseTagContentAsBoolean(processXMLDoc, ProcMonXMLTagNames.Process_IsVirtualized); Is64bit = XMLUtils.ParseTagContentAsBoolean(processXMLDoc, ProcMonXMLTagNames.Process_Is64bit); ProcessIntegrity = ProcessIntegrityLevelExtensions.ToProcessIntegrityLevel(XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_Integrity)); OwnerIndex = OwnerList.AddOwnerToList(tempString); ProcessNameIndex = ProcessNameList.AddProcessNameToList(XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_ProcessName)); CommandLine = (XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_CommandLine)).HTMLUnEscape().Trim(); LoadedModuleList = PMLModule.LoadModules(processXMLDoc); var image = XMLUtils.GetInnerText(processXMLDoc, ProcMonXMLTagNames.Process_ImagePath); ImageIndex = ModuleList.LocateInOrAddToModuleList(image); StringBuilder buffer = new StringBuilder(string.Format( "{0}{1} Process - {2} [{3}] with ID = {4} was created at {5} with {6} integrity, which loaded {7} modules, as a child of {8} by {9}", (IsVirtualized ? "Virtualized " : ""), (Is64bit ? "64-Bit" : "32-Bit"), ProcessNameList.GetProcessName(ProcessNameIndex), ModuleList.GetModuleDescription(ImageIndex), ProcessId, CreateTime, ProcessIntegrity, LoadedModuleList.Count, ParentProcessId, OwnerList.GetOwnerName(OwnerIndex) )); if (!string.IsNullOrWhiteSpace(CommandLine)) { buffer.AppendFormat(", using the command line {0}", CommandLine); } buffer.Append(" "); if (FinishTime <= CreateTime) { buffer.Append("and is running."); } else { buffer.AppendFormat("and ended at {0}.", FinishTime); } summary = #if DEBUG "[PMLProcess]:\n" + #endif buffer.ToString(); }
public new void Remove() { base.Remove(); if (this.OwnerList != null && OwnerList.Contains(this.DataBoundItem)) { OwnerList.Remove(this.DataBoundItem); } }
public void Verify_that_owner_is_set_when_item_is_added() { var ownerList = new OwnerList <TestElement>(this.ownerTestElement); var contained = new TestElement("contained"); ownerList.Add(contained); Assert.That(contained.Owner, Is.EqualTo(this.ownerTestElement)); }
/// <summary> /// Set the selection state for this ListItem. /// Internal version. Should NOT be used by client code. /// </summary> /// <param name="setting"></param> /// <param name="notify"></param> public void SetSelectedImpl(bool setting, bool notify) { if (_selectable && setting != _selected) { _selected = setting; // notify the ItemListbox if there is one that we just got selected // to ensure selection scheme is not broken when setting selection from code if (OwnerList != null && notify) { OwnerList.NotifyItemSelectState(this, setting); } OnSelectionChanged(new WindowEventArgs(this)); } }
/// <summary> /// DataTable转换到List /// </summary> /// <param name="dt"></param> /// <returns></returns> private void DataTableToList(DataTable dt) { //获取最原始的List var orgList = (from dataTable in dt.AsEnumerable() select new PropertyNodeItem() { ParentName = dataTable["OWNER"].ToString(), ChildrenName = dataTable["TABLE_NAME"].ToString() }).ToList(); OrgList.AddRange(orgList); DataTable newdt = new DataView(dt.Columns["OWNER"].Table).ToTable(true, "OWNER");//去除重复,只留下OWNER //只获得Owner列表 var newList = (from dataTable in newdt.AsEnumerable() select dataTable["OWNER"].ToString()); OwnerList.AddRange(newList); }
protected internal override void OnSemanticInputEvent(SemanticEventArgs e) { var rangeSelection = e.d_semanticValue == SemanticValue.SV_SelectRange; var cumulativeSelection = e.d_semanticValue == SemanticValue.SV_SelectCumulative; if (_selectable && (e.d_semanticValue == SemanticValue.SV_CursorActivate || rangeSelection || cumulativeSelection) && e.d_payload.source == CursorInputSource.Left) { if (OwnerList != null) { OwnerList.NotifyItemActivated(this, cumulativeSelection, rangeSelection); } else { SetSelected(!IsSelected()); } ++e.handled; } }
public ExpandedState(T variable) { Variable = variable; var rootNode = variable.DomNode.GetRoot(); Root = ReferenceEquals(variable.DomNode.Parent, rootNode); OwnerList = rootNode.As <SledLuaVarBaseListType <T> >(); Context = SledLuaVarLookUpContextType.Normal; { var luaVarWatchList = OwnerList.As <SledLuaVarWatchListType>(); if (luaVarWatchList != null) { Context = luaVarWatchList.IsCustomWatchedVariable(Variable) ? SledLuaVarLookUpContextType.WatchCustom : SledLuaVarLookUpContextType.WatchProject; } } LookUp = SledLuaVarLookUpType.FromLuaVar(variable, Context); Children = new List <ExpandedState>(); }
/// <summary> /// To Retrieve BLA Details for a particular Contract - Generate Contract Screen /// </summary> /// <param name="contractId"></param> /// <param name="merchantId"></param> /// <returns></returns> public ContractBLA RetrieveBLADetails(Int64 contractId, Int64 merchantId) { ContractBLA mBLA = new ContractBLA(); List<EntityType> entityList = new List<EntityType>(); List<OwnerList> ownerList = new List<OwnerList>(); DataSet dsData = new DataSet(); dsData = contractsRepository.RetrieveBLADetails(contractId, merchantId); if (dsData.Tables.Count > 0) { if (dsData.Tables[0].Rows.Count > 0) { mBLA.contractNumber = Convert.ToString(dsData.Tables[0].Rows[0]["contractNumber"]); mBLA.salesRepName = Convert.ToString(dsData.Tables[0].Rows[0]["salesRepName"]); mBLA.salesRepId = Convert.ToString(dsData.Tables[0].Rows[0]["salesRepId"]); mBLA.date = Convert.ToDateTime(dsData.Tables[0].Rows[0]["date"]); mBLA.companyName = Convert.ToString(dsData.Tables[0].Rows[0]["companyName"]); mBLA.businessName = Convert.ToString(dsData.Tables[0].Rows[0]["businessName"]); mBLA.orgCountry = Convert.ToString(dsData.Tables[0].Rows[0]["orgCountry"]); mBLA.address = Convert.ToString(dsData.Tables[0].Rows[0]["address"]); mBLA.province = Convert.ToString(dsData.Tables[0].Rows[0]["province"]); mBLA.country = Convert.ToString(dsData.Tables[0].Rows[0]["country"]); mBLA.legalAddress = Convert.ToString(dsData.Tables[0].Rows[0]["legalAddress"]); mBLA.legalProvince = Convert.ToString(dsData.Tables[0].Rows[0]["legalProvince"]); mBLA.legalCountry = Convert.ToString(dsData.Tables[0].Rows[0]["legalCountry"]); mBLA.businessStartDate = Convert.ToDateTime(dsData.Tables[0].Rows[0]["businessStartDate"]); mBLA.RNCNumber = Convert.ToString(dsData.Tables[0].Rows[0]["RNCNumber"]); //mBLA.ownerName = Convert.ToString(dsData.Tables[0].Rows[0]["ownerName"]); // mBLA.jobTitle = Convert.ToString(dsData.Tables[0].Rows[0]["jobTitle"]); //mBLA.telephone = Convert.ToString(dsData.Tables[0].Rows[0]["telephone"]); //mBLA.email = Convert.ToString(dsData.Tables[0].Rows[0]["email"]); mBLA.bankName = Convert.ToString(dsData.Tables[0].Rows[0]["bankName"]); mBLA.bankCity = Convert.ToString(dsData.Tables[0].Rows[0]["bankCity"]); mBLA.bankCountry = Convert.ToString(dsData.Tables[0].Rows[0]["bankCountry"]); mBLA.mcaAmount = Convert.ToString(dsData.Tables[0].Rows[0]["mcaAmount"]); mBLA.totalOwnedAount = Convert.ToString(dsData.Tables[0].Rows[0]["totalOwnedAount"]); mBLA.retention = Convert.ToString(dsData.Tables[0].Rows[0]["retention"]); mBLA.expenseAmount = Convert.ToString(dsData.Tables[0].Rows[0]["expenseAmount"]); mBLA.businessTypeId = Convert.ToInt64(dsData.Tables[0].Rows[0]["businessTypeId"]); } if (dsData.Tables[1].Rows.Count > 0) { foreach (DataRow dRow in dsData.Tables[1].Rows) { OwnerList eType = new OwnerList(); eType.name = Convert.ToString(dRow["ownerName"]); eType.jobtitle = Convert.ToString(dRow["jobTitle"]); eType.telephone = Convert.ToString(dRow["telephone"]); eType.email = Convert.ToString(dRow["email"]); eType.PassportNbr = Convert.ToString(dRow["PassportNbr"]); DataHelper.FillObjectFromDataRow(eType.Address, dRow); ownerList.Add(eType); eType = null; } } //if (ownerList.Count > 0) //{ // mBLA.ownerName = ownerList[0].name; // mBLA.jobTitle = ownerList[0].jobtitle; // mBLA.telephone = ownerList[0].telephone; // mBLA.email = ownerList[0].email; //} if (dsData.Tables[2].Rows.Count > 0) { foreach (DataRow dRow in dsData.Tables[2].Rows) { EntityType eType = new EntityType(); eType.entityTypeId = Convert.ToString(dRow["entityTypeId"]); eType.entityName = Convert.ToString(dRow["entityName"]); entityList.Add(eType); eType = null; } } mBLA.EntityList = entityList; mBLA.ownerList = ownerList; entityList = null; } return mBLA; }
public OwnerForm() { Owners = new OwnerList(); }