protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter is ListedItem) { ViewModel = new SelectedItemsPropertiesViewModel(e.Parameter as ListedItem); if (ViewModel.Item.PrimaryItemAttribute == StorageItemTypes.File) { propertiesType = PropertiesType.File; } else if (ViewModel.Item.PrimaryItemAttribute == StorageItemTypes.Folder) { propertiesType = PropertiesType.Folder; } } else if (e.Parameter is List <ListedItem> ) { ViewModel = new SelectedItemsPropertiesViewModel(e.Parameter as List <ListedItem>); propertiesType = PropertiesType.Combined; } else if (e.Parameter is DriveItem) { ViewModel = new SelectedItemsPropertiesViewModel(e.Parameter as DriveItem); propertiesType = PropertiesType.Drive; } AppSettings.ThemeModeChanged += AppSettings_ThemeModeChanged; base.OnNavigatedTo(e); }
/// <summary> /// Executes the logic for this workflow activity /// </summary> /// <returns>String of properties converted to the desired type</returns> protected override Dictionary <string, string> InternalExecute() { this.properties = new Dictionary <string, string>(); this.inputProperties = this.Properties.Get(this.ActivityContext); this.inputType = this.InputType.Get(this.ActivityContext); if (this.Properties.Expression != null) { switch (this.inputType) { case PropertiesType.MSBuild: this.InputMSBuild(); break; case PropertiesType.NTShell: this.InputNtshell(); break; case PropertiesType.PowerShell: this.InputPowershell(); break; } } this.ActivityContext.SetValue(this.Result, this.properties); return(this.properties); }
public static void SelectDropDown(string element, string value, PropertiesType elementType) { if (elementType == PropertiesType.Id) { new SelectElement(PropertiesCollection.driver.FindElement(By.Id(element))).SelectByText(value); } else if (elementType == PropertiesType.Name) { new SelectElement(PropertiesCollection.driver.FindElement(By.Name(element))).SelectByText(value); } }
public static void EnterText(string element, string value, PropertiesType elementType) { if (elementType == PropertiesType.Id) { PropertiesCollection.driver.FindElement(By.Id(element)).SendKeys(value);; } else if (elementType == PropertiesType.Name) { PropertiesCollection.driver.FindElement(By.Name(element)).SendKeys(value);; } }
public static void Click(string element, PropertiesType elementType) { if (elementType == PropertiesType.Id) { PropertiesCollection.driver.FindElement(By.Id(element)).Click(); } else if (elementType == PropertiesType.Name) { PropertiesCollection.driver.FindElement(By.Name(element)).Click(); // bool b = PropertiesCollection.driver.FindElement(By.Name(element)).Displayed; // Console.WriteLine(b); } }
public static string GetTextFromDDL(string element, PropertiesType elementType) { if (elementType == PropertiesType.Id) { return(new SelectElement(PropertiesCollection.driver.FindElement(By.Id(element))).AllSelectedOptions.SingleOrDefault().Text); } if (elementType == PropertiesType.Name) { return(new SelectElement(PropertiesCollection.driver.FindElement(By.Name(element))).AllSelectedOptions.SingleOrDefault().Text); } else { return(String.Empty); } }
public static string GetText(string element, PropertiesType elementType) { if (elementType == PropertiesType.Id) { return(PropertiesCollection.driver.FindElement(By.Id(element)).GetAttribute("value")); } if (elementType == PropertiesType.Name) { return(PropertiesCollection.driver.FindElement(By.Name(element)).GetAttribute("value")); } else { return(String.Empty); } }
public Object GetProperty(PropertiesType key) { try { if (properties.ContainsKey(key)) { return(properties[key]); } else { throw new Exception("Something is trying to get the property with TYPE = " + key.ToString() + ", which is not exist yet, maybe you forget to set it?"); } } catch (Exception e) { ExceptionUtil.SendErrorEventAndLog(GetType().ToString(), e.Message); throw e; //return null; } }
private SortedList <string, GEProperty> ProcessProperties(PropertiesType properties) { SortedList <string, GEProperty> processedProperties = new SortedList <string, GEProperty>(); if (properties == null) { return(processedProperties); } foreach (PropertiesTypeProperty property in properties.Property) { GEProperty newProperty = new GEProperty(property.id, null, property.defValue, property.minValue, property.maxValue); OnReferenceProcessing += delegate(object o, EventArgs e) { newProperty.Name = elementManager.GetTextElement(property.nameTextId); }; elementManager.AddProperty(newProperty); processedProperties.Add(property.id, newProperty); } return(processedProperties); }
public void SetProperty(PropertiesType key, Object value) { properties[key] = value; }