示例#1
0
		public History (NSSegmentedCell navigation)
		{
			this.navigation = navigation;
			active = true;
			
			navigation.Activated += delegate(object sender, EventArgs e) {
				var control = sender as NSSegmentedControl;
				if (control.SelectedSegment == 0)
					BackClicked ();
				else
					ForwardClicked ();
			};
			navigation.SetEnabled (false, 0);
			navigation.SetEnabled (false, 1);							
		}
示例#2
0
        public History(NSSegmentedCell navigation)
        {
            this.navigation = navigation;
            active          = true;

            navigation.Activated += delegate(object sender, EventArgs e) {
                var control = sender as NSSegmentedControl;
                if (control.SelectedSegment == 0)
                {
                    BackClicked();
                }
                else
                {
                    ForwardClicked();
                }
            };
            navigation.SetEnabled(false, 0);
            navigation.SetEnabled(false, 1);
        }
示例#3
0
        internal bool BackClicked()
        {
            if (!active || pos < 1)
            {
                return(false);
            }
            pos--;
            PageVisit p = (PageVisit)history [pos];

            ignoring = true;
            p.Go();
            ignoring = false;
            navigation.SetEnabled(pos > 0, 0);
            navigation.SetEnabled(true, 1);
            return(true);
        }