public StorePersistentObjectTabQuery(Query query)
                : base(query)
            {
                Navigate = new Navigate();
                NavigationTarget = Query;

                object template;

                // QueryItemTemplate
                if (!Application.Current.Resources.TryGetValue("QueryItemTemplate." + Query.PersistentObject.Type, out template))
                    template = Application.Current.Resources["QueryItemTemplate.Default"];

                QueryItemTemplate = (DataTemplate)template ?? EmptyTemplate;
            }
 public StorePersistentObjectTabAttributes(PersistentObjectAttribute[] attributes, string title, PersistentObject parent)
     :
         base(attributes, title, parent)
 {
     Navigate = new Navigate();
 }
Exemplo n.º 3
0
 public Form1Page GoToReadModelPage()
 {
     return(Navigate.To <Form1Page>(By.LinkText("Fixture A values")));
 }
Exemplo n.º 4
0
 public DetailsPage GoToDetailsPage()
 {
     return(Navigate.To <DetailsPage>(By.LinkText("Details Page")));
 }
Exemplo n.º 5
0
 public CourseCreatePage GoToCreatePage()
 {
     return(Navigate.To <CourseCreatePage>(By.LinkText("Create New Course")));
 }
Exemplo n.º 6
0
 public CreateRestaurantPage ClickCreateRestaurant()
 {
     Find.Element(By.Id("admin-menu"))
     .Click();
     return(Navigate.To <CreateRestaurantPage>(By.Id("add-restaurant-menu-item")));
 }
Exemplo n.º 7
0
 public ClassPeriodIndexPage CreateClassPeriod(CreateModel createClassPeriodModel)
 {
     Input.Model(createClassPeriodModel);
     return(Navigate.To <ClassPeriodIndexPage>(By.ClassName("btn")));
 }
        /// <summary>
        /// Nativage the tree in pre-order
        /// </summary>
        public List<int> ToList(Navigate navigate)
        {
            List<int> list = new List<int>();

            navigate(root, list);

            return list;
        }
Exemplo n.º 9
0
        public static void AskForReviewIfAppropriate()
        {
            try
            {
                if (checkedForReview.AddHours(2) > DateTime.Now)
                {
                    return;
                }
                checkedForReview = DateTime.Now;

                                #if WINDOWS_PHONE
                Sale sale = AppStats.Current.CurrentSale;
                if (sale != null)
                {
                    if (sale.NumberOfSessionsBetween == 0 || AppStats.Current.SessionId % sale.NumberOfSessionsBetween == 0)
                    {
                        if (MessageBox.Show(sale.SubTitle, sale.Title, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                        {
                            SessionLog.RecordMilestone("Sale Accepted " + sale.ID, AppStats.Current.SessionId.ToString());
                            Navigate.StartBuyProduct(sale.productId);
                        }
                        else
                        {
                            if (sale.ID != null && sale.ID.StartsWith("test"))
                            {
                                SessionLog.RecordMilestone("Sale Declined " + sale.ID, AppStats.Current.SessionId.ToString());
                            }
                            else
                            {
                                SessionLog.RecordTraceValue("Sale Declined " + sale.ID, AppStats.Current.SessionId.ToString());
                            }
                        }

                        return;
                    }
                }
                                #endif

                FeedbackSettings feedbackSettings = AppStats.Current.FeedbackSettings;

                if (AppStats.Current.DaysSinceInstall < feedbackSettings.DaysTillStart)
                {
                    return;
                }
                if (UserSettings.Current.SuppressAskForReviewCount > feedbackSettings.NumberOfReAttempts)
                {
                    return;
                }
#if SUPPORTTRIAL
                if (AppStats.Current.InstalledProductKind == AppStats.ProductKind.Trial)
                {
                    return;
                }
#endif

                if (AppStats.Current.SessionId % feedbackSettings.NumberOfSessionsBetween != 0)
                {
                    return;
                }
                if (AppStats.Current.ReviewRequests >= feedbackSettings.NumberOfRequests)
                {
                    return;
                }
                AppStats.Current.ReviewRequests += 1;

                                #if WINDOWS_PHONE
                if (MessageBox.Show(AppResources.ReviewBody, AppResources.ReviewTitle, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                {
                    SessionLog.RecordMilestone("Review Request Accepted" + feedbackSettings.ID, AppStats.Current.SessionId.ToString());
                    Navigate.StartReviewTask();
                }
                else
                {
                    SessionLog.RecordTraceValue("Review Request Declined" + feedbackSettings.ID, AppStats.Current.SessionId.ToString());
                }
                                #else
                new AlertDialog.Builder(Navigate.navigationContext)
                .SetPositiveButton("Ok", (sender, args) =>
                {
                    SessionLog.RecordMilestone("Review Request Accepted" + feedbackSettings.ID, AppStats.Current.ReviewRequests.ToString());
                    Navigate.StartReviewTask();
                })
                .SetNegativeButton("Cancel", (sender, args) =>
                {
                    SessionLog.RecordTraceValue("Review Request Declined" + feedbackSettings.ID, AppStats.Current.ReviewRequests.ToString());
                })
                .SetMessage(AppResources.ReviewBody)
                .SetTitle(AppResources.ReviewTitle)
                .Create()
                .Show();
#endif
            }
            catch (Exception ex) {
                LittleWatson.ReportException(ex);
            }
        }
Exemplo n.º 10
0
 public HomePage CreateValidUser(RegisterModel registerModel)
 {
     Input.Model(registerModel);
     return(Navigate.To <HomePage>(By.CssSelector("input[type=\"submit\"]")));
 }
Exemplo n.º 11
0
        protected override void OnCreate(Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_about_info);

            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar_addItem);

            SetSupportActionBar(toolbar);
            this.SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            this.FindViewById <LinearLayout>(Resource.Id.layout_about_upgrade).Click += (object sender, EventArgs e) =>
            {
                Navigate.ToBuyNowPage();
            };
            this.FindViewById <LinearLayout>(Resource.Id.layout_about_rate).Click                 += (object sender, EventArgs e) => { Navigate.StartReviewTask(); };
            this.FindViewById <LinearLayout>(Resource.Id.layout_about_report).Click               += (object sender, EventArgs e) => { Navigate.StartEmailTask(); };
            this.FindViewById <LinearLayout>(Resource.Id.layout_about_share).Click                += (object sender, EventArgs e) => { Navigate.StartShareTask(); };
            this.FindViewById <LinearLayout>(Resource.Id.layout_about_upgrade).Visibility          = ViewStates.Gone;
            this.FindViewById <LinearLayout>(Resource.Id.layout_about_premiumpurchased).Visibility = AppStats.Current.InstalledProductKind != AppStats.ProductKind.Paid ? ViewStates.Gone : ViewStates.Visible;
        }
Exemplo n.º 12
0
 public void GivenINavigateToHippodromeOnline()
 {
     Navigate.NavigateToHippdoromeOnline(Urls.HippodromeOnline);
 }
 public void WhenIClickOnTheSecondPageLink()
 {
     Navigate.From <HomePage>()
     .Using(hp => hp.ClickSecondPageLink())
     .To <SecondPage>();
 }
Exemplo n.º 14
0
        /// <summary>
        /// iView.NET subroutine. Loads an image from the image browser.
        /// </summary>
        /// <param name="nNavigate">Specifies which way to navigate the list.</param>
        /// <param name="sFilePath">If the Navigate enum is set to Navigate.Path, you can specifiy the file path.</param>
        /// <param name="nIndex">If the Navigate enum is set to Navigate.Index, you can specifiy the item index.</param>
        /// <returns></returns>
        private SResult SubLoadImage(Navigate nNavigate, string sFilePath, int nIndex)
        {
            if ((m_oImageBrowser != null) && (m_oImageBrowser.IsLoaded))
            {
                if (ImageHasBeenEdited)
                {
                    if (ShowImageEditedDialog() == DialogResult.Cancel)
                        return SResult.Void;
                }

                Image oImage = null;

                try
                {
                    switch (nNavigate)
                    {
                        case Navigate.First:
                            oImage = m_oImageBrowser.NavigateImageList(NavigateList.First);
                            break;
                        case Navigate.Next:
                            oImage = m_oImageBrowser.NavigateImageList(NavigateList.Next);
                            break;
                        case Navigate.Previous:
                            oImage = m_oImageBrowser.NavigateImageList(NavigateList.Previous);
                            break;
                        case Navigate.Last:
                            oImage = m_oImageBrowser.NavigateImageList(NavigateList.Last);
                            break;
                        case Navigate.Index:
                            oImage = m_oImageBrowser.GetImageFromIndex(nIndex);
                            break;
                        case Navigate.Path:
                            oImage = m_oImageBrowser.GetImageFromFilePath(sFilePath);
                            break;
                    }

                    if (oImage != null)
                    {
                        // Reset the image scale flag to auto if its currently set to custom.
                        // This prevents the next image from warping.
                        if (m_nImageScale == ImageScale.Custom)
                            m_nImageScale = ImageScale.Auto;

                        // Update the image box.
                        imgbx_MainImage.ImageBoxImage = oImage;
                        imgbx_MainImage.ImageBoxVisible = true;

                        // Clear the undo list.
                        m_oUndoRedo.Clear();

                        return SResult.Completed;
                    }
                }
                catch (UnauthorizedAccessException e)
                {
                    MessageBox.Show("Unable to load the image.\n\nReason: " + e.Message, "Load Image Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                catch (IOException e)
                {
                    MessageBox.Show("Unable to load the image.\n\nReason: " + e.Message, "Load Image Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                catch (System.Security.SecurityException e)
                {
                    MessageBox.Show("Unable to load the image.\n\nReason: " + e.Message, "Load Image Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            return SResult.Void;
        }
Exemplo n.º 15
0
        public LoginPage ClickLogin()
        {
            return(Navigate.To <LoginPage>(By.Id("login-link")));

            ;
        }
Exemplo n.º 16
0
 void Navigate(Navigate info)
 {
     _navMeshAgent.destination = info.destination;
     _animator.SetBool("Run", true);
 }
Exemplo n.º 17
0
 public EditRestaurantsPage ClickEditRestaurants()
 {
     Find.Element(By.Id("admin-menu"))
     .Click();
     return(Navigate.To <EditRestaurantsPage>(By.Id("manage-restaurant-menu-item")));
 }
Exemplo n.º 18
0
        public void Print(Navigate navigate)
        {
            List<int> list = ToList(navigate);

            foreach (int data in list)
            {
                Console.Write(data + " ");
            }

            Console.WriteLine();
        }
Exemplo n.º 19
0
 public void WhenTheSubmissionPageIsOpen()
 {
     _actor.AttemptsTo(Navigate.ToUrl(ConfigurationProvider.BaseAddress));
 }