private PageInterface GetNextPage(int numberPage) { PageInterface result = null; if (numberPage == 2) return new page02_EnterText(this); if (numberPage == 3) return new page03_SelectPLT(this); if (numberPage == 4) return new page04_ImageToVector(this); if (numberPage == 5) return new page05_SelectFileImageRastr(this); if (numberPage == 6) return new page06_VectorEdit(this); if (numberPage == 7) return new page07_ModifyVectors(this); if (numberPage == 8) return new page08_AddPadding(this); if (numberPage == 9) return new page09_ImageRast(this); if (numberPage == 10) return new page10_generateGkode(this); if (numberPage == 11) return new page11_DXF(this); return result; }
public AttachmentTestContext() : base() { UserInterface userInterface = new UserInterface(); users.Add(userInterface.Create("Sarah1 Swank1", "*****@*****.**")); users.Add(userInterface.Create("Sarah2 Swank2", "*****@*****.**")); users.Add(userInterface.Create("Sarah3 Swank3", "*****@*****.**")); users.Add(userInterface.Create("Sarah4 Swank4", "*****@*****.**")); users.Add(userInterface.Create("Sarah5 Swank5", "*****@*****.**")); users.Add(userInterface.Create("Sarah6 Swank6", "*****@*****.**")); PageInterface pageInterface = new PageInterface(); pages.Add(pageInterface.Create("New Attachment", users[0])); }
public PageController() : base(new PageInterface()) { pageInterface = membershipInterface as PageInterface; }
/// <summary> /// Установка нужной страницы /// </summary> private void SetPage(DirectionPage dir) { if (dir == DirectionPage.Forward) { //добавим запрос у текущей страницы, о том возможно-ли переходить на следующий шаг //if (CurrentPage) if (CurrentPage.Value.NextPage != 0) { PageInterface nextPageI = GetNextPage(CurrentPage.Value.NextPage); if (nextPageI != null) { CurrentPage.Value.actionAfter(); PathPages.AddAfter(CurrentPage, nextPageI); LinkedListNode<PageInterface> NextPage = CurrentPage.Next; if (CurrentPage.Value.pageImageNOW == null) { NextPage.Value.pageImageIN = null; } else { NextPage.Value.pageImageIN = (Bitmap)CurrentPage.Value.pageImageNOW.Clone(); } NextPage.Value.pageVectorIN = VectorProcessing.ListGroupPointClone(CurrentPage.Value.pageVectorNOW); CurrentPage = NextPage; } //if (nextPageI != null) } // if (CurrentPage.Value.NextPage != 0) } // if (dir == DirectionPage.Forward) if (dir == DirectionPage.Back) { if (CurrentPage.Previous == null) { btBACK.Enabled = false; return; } CurrentPage = CurrentPage.Previous; //прошлый узел удалим PathPages.RemoveLast(); } // А тепрь страницу добавим на форму MainPanel.Controls.Clear(); MainPanel.Controls.Add((Control)CurrentPage.Value); // и вызываем первоначальную инициализацию CurrentPage.Value.actionBefore(); // И установим доступность кнопок, вперед назад if (CurrentPage.Value.NextPage == 0) { btFORWARD.Enabled = false; } else { btFORWARD.Enabled = true; } if (CurrentPage.Previous == null) { btBACK.Enabled = false; } else { btBACK.Enabled = true; } }
public PageInterfaceProvider() { _webDriver = StartUpWebDriver(); PageInterface = new PageInterface(_webDriver); Navigator = new Navigator(_webDriver); }
public PageController(PageInterface page) { IPage = page; }