public void PropertyActionDetailDeleteButton() { test = reports.StartTest("PropertyActionDetailDeleteButton"); PropertyPage propertyObj = new PropertyPage(); propertyObj.ActionDetailDeleteButton(); }
public void PropertySearchFunction() { test = reports.StartTest("PropertySearchFunction"); PropertyPage propertyObj = new PropertyPage(); propertyObj.SearchFunction(); }
public void PropertyCheckActionButtonTest() { test = reports.StartTest("PropertyCheckActionButtonTest"); PropertyPage propertyObj = new PropertyPage(); propertyObj.CheckActionButton(); }
public void AddDetailPropertyToClosingFile() { //HelperSet.DisplayWidget("Property Maps"); var workFlownav = new WorkFlowPageNavigation(Driver); var property = new PropertyPage(Driver); var summaryPage = new SummaryPage(Driver); workFlownav .GoToWorkFlowPage() .GoToAppropriateClosingFile() .ClickDetailsMenuItem(); property .ClickPropertySideMenuItem() .TypeAddress1Field("500 Southeast 8th Avenue, Hillsboro") .ClickLookupButton(); // .ChooseState("500 Southeast 8th Avenue") // .ClickConfirmButton(); //workFlownav // .ClickSummaryMenuItem(); Driver.Navigate().Refresh(); var addresslocation = summaryPage.GetLocation(); Assert.IsTrue(addresslocation.Contains("Hillsboro")); }
void SetPageProperties(PropertyPage page, UIColumn column, string prefix = "") { page.Properties["ID"] = prefix + column.ColumnName; page.Properties["Label"] = column.ColumnText; page.Properties["DataField"] = column.ColumnName; page.Properties["Placeholder"] = "Please, enter " + column.ColumnText; Dictionary <string, object> configs = column.ConfigContent.Configure(); if (configs.ContainsKey("Options")) { List <ItemOption> options = (List <ItemOption>)configs["Options"]; Dictionary <string, string> items = new Dictionary <string, string>(); foreach (ItemOption opt in options) { items.Add(opt.Value, opt.Text); } page.Properties["Items"] = items; } if (configs.ContainsKey("DataSource")) { page.Properties["QueryOrUrl"] = configs["DataSource"]; } if (configs.ContainsKey("ValueMember")) { page.Properties["ValueMember"] = configs["ValueMember"]; } if (configs.ContainsKey("DisplayMember")) { page.Properties["DisplayMember"] = configs["DisplayMember"]; } }
public void WhenAllInputFieldsHaveBeenPopulated() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Add a new Property"); // Create an class and object to call the method PropertyPage newProperty = new PropertyPage(); newProperty.AddingProperty(); }
public void WhenUserDeletesAnExistingAdvirtisementJob() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Delete a new Advertised Job"); // Create an class and object to call the method PropertyPage newProperty = new PropertyPage(); newProperty.DeleteAdvertisedJobs(); }
public void PO_DeleteProperty() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Delete existing property Property"); // Create an class and object to call the method PropertyPage obj = new PropertyPage(); obj.deleteProperty(); }
public void PO_AddRepaymentsExpensesLiabilities() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Add Repayment,Expense and Liabilities option"); // Create an class and object to call the method PropertyPage obj = new PropertyPage(); obj.RepaymentExpensesLiabilities(); }
public void WhenUserDeletesAnExistingProperty() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Deleting an existing Property"); System.Threading.Thread.Sleep(5000); // Create an class and object to call the method PropertyPage deletePropertyPage = new PropertyPage(); deletePropertyPage.deleteProperty(); }
public void PO_EditAdvertisement() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Add a Rental Property"); // Create an class and object to call the method PropertyPage obj = new PropertyPage(); obj.EditAdvertisedJobs(); }
public void PO_AddNewProperty() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Add new Property"); // Create an class and object to call the method PropertyPage obj = new PropertyPage(); obj.AddingProperty(); }
public void WhenAllInputFieldsForRepaymentAndExpensesAndLiabilitiesHaveBeenPopulated() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Testing repayment, expenses and liabilities options"); System.Threading.Thread.Sleep(5000); // Create an class and object to call the method PropertyPage property = new PropertyPage(); property.RepaymentExpensesLiabilities(); }
void DisplayGrid(DataSourceUITable uiTable) { TableRow row = this.elementLayoutDesigner1.AddRow(); row.AddTableCells(1); this.elementLayoutDesigner1.SelectCell(0, 0); PropertyPage ctrl = CreateGridPropertyPage(uiTable); this.elementLayoutDesigner1.AddElement(ctrl); }
private PropertyPage <TPage> GetPage(ISldWorks app) { if (m_Page == null) { m_Page = new PropertyPage <TPage>(app, GetPageSpec()); m_Page.DataChanged += OnDataChanged; m_Page.PageClosed += OnPageClosed; m_Page.PageApplying += OnPageApplying; } return(m_Page); }
void DisplayUITable(DataSourceUITable uitable) { int rowIdx = 0; int colIdx = 0; bool skipThisCol = false; foreach (UIColumn col in uitable.DataColumns) { if (skipThisCol) { skipThisCol = false; colIdx++; continue; } TableRow row = this.elementLayoutDesigner1.AddRow(); if (colIdx + 1 < uitable.DataColumns.Count - 1) { UIColumn nextCol = (UIColumn)uiTable.DataColumns[colIdx + 1]; if (col.CtrlType != ControlType.Hidden && nextCol.CtrlType != ControlType.Hidden && col.CtrlType != ControlType.Textarea && nextCol.CtrlType != ControlType.Textarea) { row.AddTableCells(2); this.elementLayoutDesigner1.SelectCell(rowIdx, 0); PropertyPage ctrl = CreatePropertyPageFromUIColumn(col); this.elementLayoutDesigner1.AddElement(ctrl); this.elementLayoutDesigner1.SelectCell(rowIdx, 1); PropertyPage nextCtrl = CreatePropertyPageFromUIColumn(nextCol); this.elementLayoutDesigner1.AddElement(nextCtrl); skipThisCol = true; } else { row.AddTableCells(1); this.elementLayoutDesigner1.SelectCell(rowIdx, 0); PropertyPage ctrl = CreatePropertyPageFromUIColumn(col); this.elementLayoutDesigner1.AddElement(ctrl); } } else { row.AddTableCells(1); this.elementLayoutDesigner1.SelectCell(rowIdx, 0); PropertyPage ctrl = CreatePropertyPageFromUIColumn(col); this.elementLayoutDesigner1.AddElement(ctrl); } colIdx++; rowIdx++; } }
private void Btn_Click(object sender, EventArgs e) { PropertyPage page = (PropertyPage)((Button)sender).Tag; int idx = GetPropertyPageIndex(page); int counter = counters[idx]; PropertyPage newPage = page.CreateNew(counter); counters[idx] = counter + 1; if (this.OnClickEventHandler != null) { this.OnClickEventHandler(newPage); } }
int GetPropertyPageIndex(PropertyPage p) { int idx = 0; foreach (PropertyPage page in pages) { if (p.GetElementID() == page.GetElementID()) { return(idx); } idx++; } return(idx); }
public void ShouldSearchForApartmentLeastExpensiveWithTwoBeds() { //Prepare the data PropertySearchCriteria criteria = GetPropertySearchCriteria(TestContext.CurrentContext.Test.MethodName); HomePage homePage = new HomePage(); PropertyPage propertyPage = new PropertyPage(); //actions homePage.FillPropertyCriteria(criteria); homePage.SelectlastSearchResult(); string actualBedRooms = propertyPage.GetBedRooms(); //verifications Assert.AreEqual("The bed rooms number is not correct", criteria.MinBed, actualBedRooms); }
public PropertyForm() { InitializeComponent(); //1 вкладка главные настройки _generalPage = new TabPage(LanguageHolder.Instance()[WordEnum.GENERAL]); var ppage = new PropertyPage(RConfig.Instance) { Location = new Point(3, 3) }; _generalPage.Controls.Add(ppage); _tabs.TabPages.Add(_generalPage); foreach (var enu in Enum.GetValues(typeof(Game))) { var gpage = new TabPage(GameInfo.getNameOf(enu)); var gp = RConfig.Instance.getGameProperty((Game)enu); var gppage = new PropertyPage(gp) { Location = new Point(3, 3), Enabled = gp.isEnable() }; gpage.Controls.Add(gppage); _tabs.TabPages.Add(gpage); } _versionControlPage = new TabPage(LanguageHolder.Instance()[WordEnum.VERSION_CONTROL]); var assemblyPage = AssemblyPage.Instance(); assemblyPage.Location = new Point(3, 3); _versionControlPage.Controls.Add(assemblyPage); _tabs.TabPages.Add(_versionControlPage); Shown += PropertyForm_Shown; }
public void ShowPropertyPageByName(string pageName) { if (_capture != null) { PropertyPage p = null; if (_capture.PropertyPages != null && _capture.PropertyPages.Count > 0) { for (int i = 0; i < _capture.PropertyPages.Count; i++) { if (string.Compare(pageName, _capture.PropertyPages[i].Name, StringComparison.OrdinalIgnoreCase) == 0) { p = _capture.PropertyPages[i]; break; } } } if (p != null) { try { p.Show(_previewWindow); } catch (Exception e) { processError("ShowPropertyPageByName({0})", e, pageName); } } else { processError("ShowPropertyPageByName({0})", "invalid page name", pageName); } } else { processError("ShowPropertyPageByName({0})", "capture device not initialized", pageName); } }
void AddElementDesigners() { string[] indexes = IndexesToShow.Split(new char[] { ',' }); pages.Clear(); pages.Add(new TextboxPropertyPage()); pages.Add(new TextareaPropertyPage()); pages.Add(new SelectBoxPropertyPage()); pages.Add(new RadioGroupPropertyPage()); pages.Add(new CheckboxPropertyPage()); pages.Add(new DateTimePropertyPage()); pages.Add(new GridPropertyPage()); pages.Add(new TabPagesPropertyPage()); pages.Add(new FileUploadPropertyPage()); pages.Add(new ButtonPropertyPage()); counters.Clear(); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); counters.Add(1); elementDesigners.Clear(); foreach (string idx in indexes) { PropertyPage pg = pages[Convert.ToInt16(idx)]; elementDesigners.Add(pg); } }
private void cboUpstreamPropPages_SelectedIndexChanged(object sender, System.EventArgs e) { try { if (cboUpstreamPropPages.Enabled) // Flag for programmatic vs. user input { PropertyPage pp = (PropertyPage)cboUpstreamPropPages.SelectedItem; pp.Show(this.Handle); // To save Crossbar info vc.SaveCameraSettings(); UpdateCurrentSettings(); } } catch (COMException ex) { Log(DShowError._AMGetErrorText(ex.ErrorCode)); Log(ex.ToString()); } catch (Exception ex) { Log(ex.ToString()); } }
public override void BuildDocs(string outputPath) { var pages = new PageTree("docs"); var PageTrees = new List <PageTree>(); foreach (var type in Library.GetExportedTypes()) { var typePath = $"{type.Namespace.Replace('.', '/')}/{DocUtilities.GetURLTitle(type)}"; var typeData = Docs[ID.GetIDString(type)]; pages[typePath] = new TypePage(type, typeData, Docs); PageTrees.Add(pages.GetNode(typePath)); // Constructors var ctors = type.GetConstructors(); if (ctors.Length > 0) { // Path to ctors group var ctorsGroupPath = $"{typePath}/ctors"; var ctorsData = new Dictionary <ConstructorInfo, MemberXmlDocs>(); foreach (var ctor in ctors) { var ctorData = Docs[ID.GetIDString(ctor)]; ctorsData.Add(ctor, ctorData); } pages[ctorsGroupPath] = new ConstructorsPage(type, ctors, ctorsData); PageTrees.Add(pages.GetNode(ctorsGroupPath)); } // Method groups foreach (var methodGroup in type.GetMethods() .Where(m => !m.Name.StartsWith("get_") && !m.Name.StartsWith("set_")) .GroupBy(m => m.Name)) { // Path to method group var methodGroupPath = $"{typePath}/{methodGroup.Key}"; // Map of reflected methods and documentation var methods = new Dictionary <MethodInfo, MemberXmlDocs>(); foreach (var method in methodGroup) { var methodData = Docs[ID.GetIDString(method)]; methods[method] = methodData; } pages[methodGroupPath] = new MethodGroupPage(type, methodGroup.Key, methods); PageTrees.Add(pages.GetNode(methodGroupPath)); } // Fields foreach (var field in type.GetFields().Where(f => (f.IsPublic || !f.IsPrivate) && (!f.DeclaringType.IsEnum || !f.IsSpecialName))) { var fieldPath = Path.Combine(typePath, field.Name).Replace('\\', '/'); var fieldData = Docs[ID.GetIDString(field)]; pages[fieldPath] = new FieldPage(field, fieldData); PageTrees.Add(pages.GetNode(fieldPath)); } // Properties and Indexers int numIndexers = 0; foreach (var property in type.GetProperties()) { var propData = Docs[ID.GetIDString(property)]; string propPath; if (property.GetIndexParameters().Length > 0) { propPath = $"{typePath}/this/{++numIndexers}"; } else { propPath = $"{typePath}/{property.Name}"; } pages[propPath] = new PropertyPage(property, propData); PageTrees.Add(pages.GetNode(propPath)); } } // Create a task for each document that needs to be exported, run them all at once var exportTasks = new Task[PageTrees.Count]; for (int i = 0; i < PageTrees.Count; i++) { var node = PageTrees[i]; exportTasks[i] = Task.Run(() => { var documentDir = Directory.GetParent($"{outputPath}/{node.Path}").FullName; var documentPath = $"{outputPath}/{node.Path}.md"; Directory.CreateDirectory(documentDir); using (var writer = new MarkdownWriter(documentPath)) { node.Page.Render(node, writer); } }); } // Wait for all export tasks to finish Task.WaitAll(exportTasks); }
private void elementPadCtrl1_OnClickEventHandler(PropertyPage ctrl) { this.ctrl = ctrl; }
PropertyPage CreatePropertyPageFromUIColumn(UIColumn column) { string prefix = ""; PropertyPage page = null; if (column.CtrlType == ControlType.Textbox || column.CtrlType == ControlType.Numericbox || column.CtrlType == ControlType.Hidden) { page = new TextboxPropertyPage(); prefix = "txt"; if (column.CtrlType == ControlType.Numericbox) { page.Properties["IsNumeric"] = true; } if (column.CtrlType == ControlType.Hidden) { page.Properties["IsHidden"] = true; } } else if (column.CtrlType == ControlType.Textarea || column.CtrlType == ControlType.HtmlEditor) { prefix = "txt"; page = new TextareaPropertyPage(); if (column.CtrlType == ControlType.HtmlEditor) { page.Properties["IsHtml"] = true; } } else if (column.CtrlType == ControlType.Image || column.CtrlType == ControlType.File) { prefix = "file"; if (column.CtrlType == ControlType.Image) { prefix = "image"; } page = new FileUploadPropertyPage(); } else if (column.CtrlType == ControlType.Combobox || column.CtrlType == ControlType.LookupCombobox) { prefix = "cmb"; page = new SelectBoxPropertyPage(); } else if (column.CtrlType == ControlType.Checkboxes || column.CtrlType == ControlType.LookupCheckboxes) { prefix = "chk"; page = new CheckboxPropertyPage(); } else if (column.CtrlType == ControlType.Radiobuttons || column.CtrlType == ControlType.LookupRadiobuttons) { prefix = "rd"; page = new RadioGroupPropertyPage(); } else if (column.CtrlType == ControlType.Date || column.CtrlType == ControlType.Datetime || column.CtrlType == ControlType.Daterange) { prefix = "dt"; page = new DateTimePropertyPage(); if (column.CtrlType == ControlType.Datetime) { page.Properties["IncludeTime"] = true; } if (column.CtrlType == ControlType.Daterange) { page.Properties["DateRange"] = true; } } SetPageProperties(page, column, prefix); return(page); }
public static UrlModel Create(UrlModel model) { var win = new PropertyPage(model); return(Make(win)); }
public PropertyDescriptorPropertyPage(PropertyPage page, string name, Attribute[] attrs) : base(name, createAttributes(attrs)) { _page = page; }
public static UrlModel Create(IEnumerable <string> items) { var win = new PropertyPage(items); return(Make(win)); }
/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { try { //search for the weatherLayer first ILayer layer = null; RSSWeatherLayerClass RSSLayer = null; if (m_pHookHelper.FocusMap.LayerCount == 0) { return; } IEnumLayer layers = m_pHookHelper.FocusMap.get_Layers(null, false); layers.Reset(); layer = layers.Next(); while (layer != null) { if (layer is RSSWeatherLayerClass) { RSSLayer = (RSSWeatherLayerClass)layer; break; } layer = layers.Next(); } //In case that the weather layer wasn't found,just return if (null == RSSLayer) { return; } //Launch the layer's properties Type typ; object obj; Guid[] g; // METHOD 1: Instantiating a COM object and displaying its property pages // ONLY WORKS ON TRUE COM OBJECTS! .NET objects that have rolled their own // ISpecifyPropertyPages implementation will error out when you try to cast // the instantiated object to your own ISpecifyPropertyPages implementation. // Get the typeinfo for the ActiveX common dialog control typ = Type.GetTypeFromProgID("MSComDlg.CommonDialog"); // Create an instance of the control. We pass it to the property frame function // so the property pages have an object from which to get current settings and apply // new settings. obj = Activator.CreateInstance(typ); // This handy function calls IPersistStreamInit->New on COM objects to initialize them ActiveXMessageFormatter.InitStreamedObject(obj); // Get the property pages for the control using the direct CAUUID method // This only works for true COM objects and I demonstrate it here only // to show how it is done. Use the static method // PropertyPage.GetPagesForType() method for real-world use. ISpecifyPropertyPages pag = (ISpecifyPropertyPages)obj; CAUUID cau = new CAUUID(0); pag.GetPages(ref cau); g = cau.GetPages(); // Instantiating a .NET object and displaying its property pages // WORKS ON ALL OBJECTS, .NET or COM // Create an instance of the .NET control, MyUserControl typ = Type.GetTypeFromProgID("RSSWeatherLayer.PropertySheet"); // Retrieve the pages for the control g = PropertyPage.GetPagesForType(typ); // Create an instance of the control that we can give to the property pages obj = Activator.CreateInstance(typ); //add the RSS layer to the property-sheet control ((PropertySheet)obj).RSSWatherLayer = RSSLayer; // Display the OLE Property page for the control object[] items = new object[] { obj }; PropertyPage.CreatePropertyFrame(IntPtr.Zero, 500, 500, "RSS Layer properties", items, g); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message); } }