/// <summary> /// 获取父级名称,没有父级则为字符空。 /// </summary> public string GetParentName() { string idName = IdentityName.Replace("/", "\\"); int idx = idName.LastIndexOf("\\"); if (idx <= 0) { return(string.Empty); } else { return(idName.Substring(0, idx)); } }
/// <summary> /// 获取名称(目录或文件名) /// </summary> public string GetName() { string idName = IdentityName.Replace("/", "\\"); int idx = idName.LastIndexOf("\\"); if (idx == -1) { return(idName); } else { return(idName.Substring(idx)); } }
/// <summary> /// 获取项目标志的目录深度 /// </summary> public int GetDeepth() { if (GetParentName() == string.Empty) { return(1); } string strID = IdentityName.Replace("/", "\\"); if (!strID.StartsWith("\\")) { strID = "\\" + strID; } if (strID.EndsWith("\\")) { strID = strID.TrimEnd('\\'); } return(strID.Split('\\').Length - 1); }
internal override void Export(string table) { base.Export(table); table = GetType().Name; var vals = new List <object> { Id, HfId_Trickster.DBExport(), EntityId_Target.DBExport(), IdentityId.DBExport(), HfId_Identity.DBExport(), IdentityName.DBExport(), IdentityRace.DBExport(), IdentityCaste.DBExport(HistoricalFigure.Castes) }; Database.ExportWorldItem(table, vals); }
public string GenerateCatalog( Workflow workflow, string profileName, string identityName, string validityEnd, string emailAddress, string configurationType) { SelectCustomer.SelectByText(profileName); webDriver.WaitForElementDisplayed( By.XPath("//select[@id='ContentPageHolder_drp_CBC_Identity']/option[text()='" + identityName + "']"), TimeSpan.FromSeconds(10)); IdentityName.SelectByText(identityName); System.Threading.Thread.Sleep(10000); ValidityEnd.SendKeys(validityEnd); EmailAddress.SendKeys(emailAddress); if (workflow == Workflow.Eudc) { if (!string.IsNullOrEmpty(configurationType)) { Console.WriteLine("Configuration Type not provided"); } ClearConfigurationTypes(); if (configurationType.Equals("Standard Configurations")) { ////ConfigurationTypes.ElementAt(0).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0)); } else if (configurationType.Equals("SNP")) { ////ConfigurationTypes.ElementAt(2).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2)); } } if (workflow == Workflow.Asn) { if (!ConfigurationTypes.ElementAt(0).Selected) { ////ConfigurationTypes.ElementAt(0).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0)); } if (!ConfigurationTypes.ElementAt(7).Selected) { ////ConfigurationTypes.ElementAt(7).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(7)); } if (!ConfigurationTypes.ElementAt(2).Selected) { ////ConfigurationTypes.ElementAt(2).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2)); } if (!ConfigurationTypes.ElementAt(3).Selected) { ////ConfigurationTypes.ElementAt(3).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(3)); } if (!ConfigurationTypes.ElementAt(6).Selected) { ////ConfigurationTypes.ElementAt(6).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(6)); } } ////GenerateCatalogLink.Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", GenerateCatalogLink); webDriver.WaitForElementDisplayed(By.Id("ContentPageHolder_lbl_TY_ThreadId"), new TimeSpan(0, 0, 10)); return(ThreadId.Text); }