Ejemplo n.º 1
0
		public void Add (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			wizardStep.SetWizard (wizard);
			list.Add (wizardStep);
			wizard.UpdateViews ();
		}
Ejemplo n.º 2
0
 private static void RemoveIfAlreadyExistsInWizard(WizardStepBase wizardStep)
 {
     if (wizardStep.Owner != null)
     {
         wizardStep.Owner.WizardSteps.Remove(wizardStep);
     }
 }
Ejemplo n.º 3
0
		public void AddAt (int index, WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			wizardStep.SetWizard (wizard);
			list.Insert (index, wizardStep);
			wizard.UpdateViews ();
		}
Ejemplo n.º 4
0
        int IList.Add(object value)
        {
            WizardStepBase stepAndVerify = GetStepAndVerify(value);

            stepAndVerify.PreventAutoID();
            this.Add(stepAndVerify);
            return(this.IndexOf(stepAndVerify));
        }
Ejemplo n.º 5
0
 public int IndexOf(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     return(list.IndexOf(wizardStep));
 }
 public bool Contains(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     return this.Views.Contains(wizardStep);
 }
Ejemplo n.º 7
0
 public bool Contains(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     return(list.Contains(wizardStep));
 }
Ejemplo n.º 8
0
 public void Remove(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     list.Remove(wizardStep);
     wizard.UpdateViews();
 }
 private void AddTemplatedWizardStep(WizardStepBase wizardStep)
 {
     TemplatedWizardStep item = wizardStep as TemplatedWizardStep;
     if (item != null)
     {
         this._wizard.TemplatedSteps.Add(item);
         this._wizard.RegisterCustomNavigationContainers(item);
     }
 }
Ejemplo n.º 10
0
        private static WizardStepBase GetStepAndVerify(object value)
        {
            WizardStepBase base2 = value as WizardStepBase;

            if (base2 == null)
            {
                throw new ArgumentException(System.Web.SR.GetString("Wizard_WizardStepOnly"));
            }
            return(base2);
        }
Ejemplo n.º 11
0
        private void AddTemplatedWizardStep(WizardStepBase wizardStep)
        {
            TemplatedWizardStep item = wizardStep as TemplatedWizardStep;

            if (item != null)
            {
                this._wizard.TemplatedSteps.Add(item);
                this._wizard.RegisterCustomNavigationContainers(item);
            }
        }
Ejemplo n.º 12
0
 public void AddAt(int index, WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     wizardStep.SetWizard(wizard);
     list.Insert(index, wizardStep);
     wizard.UpdateViews();
 }
Ejemplo n.º 13
0
 public void AddAt(int index, WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     RemoveIfAlreadyExistsInWizard(wizardStep);
     wizardStep.PreventAutoID();
     wizardStep.Owner = this._wizard;
     this.Views.AddAt(index, wizardStep);
     this.AddTemplatedWizardStep(wizardStep);
     this.NotifyWizardStepsChanged();
 }
 public void AddAt(int index, WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     RemoveIfAlreadyExistsInWizard(wizardStep);
     wizardStep.PreventAutoID();
     wizardStep.Owner = this._wizard;
     this.Views.AddAt(index, wizardStep);
     this.AddTemplatedWizardStep(wizardStep);
     this.NotifyWizardStepsChanged();
 }
Ejemplo n.º 15
0
        public void Remove(WizardStepBase wizardStep)
        {
            if (wizardStep == null)
            {
                throw new ArgumentNullException("wizardStep");
            }
            this.Views.Remove(wizardStep);
            wizardStep.Owner = null;
            TemplatedWizardStep item = wizardStep as TemplatedWizardStep;

            if (item != null)
            {
                this._wizard.TemplatedSteps.Remove(item);
            }
            this.NotifyWizardStepsChanged();
        }
Ejemplo n.º 16
0
        public void RemoveAt(int index)
        {
            WizardStepBase base2 = this.Views[index] as WizardStepBase;

            if (base2 != null)
            {
                base2.Owner = null;
                TemplatedWizardStep item = base2 as TemplatedWizardStep;
                if (item != null)
                {
                    this._wizard.TemplatedSteps.Remove(item);
                }
            }
            this.Views.RemoveAt(index);
            this.NotifyWizardStepsChanged();
        }
Ejemplo n.º 17
0
		public void Insert (int index, WizardStepBase wizardStep)
		{
			AddAt (index, wizardStep);
		}
 public WizardStepBaseTemplateDefinition(WizardDesigner designer, WizardStepBase step, string name, Style style) : base(designer, name, step, name, style)
 {
     this._step = step;
 }
Ejemplo n.º 19
0
        public void Remove(WizardStepBase wizardStep) {
            if (wizardStep == null) {
                throw new ArgumentNullException("wizardStep");
            }

            Views.Remove(wizardStep);
            wizardStep.Owner = null;
            var templatedWizardStep = wizardStep as TemplatedWizardStep;
            if (templatedWizardStep != null) {
                _wizard.TemplatedSteps.Remove(templatedWizardStep);
            }

            NotifyWizardStepsChanged();
        }
Ejemplo n.º 20
0
 private void AddTemplatedWizardStep(WizardStepBase wizardStep) {
     var templatedWizardStep = wizardStep as TemplatedWizardStep;
     if (templatedWizardStep != null) {
         _wizard.TemplatedSteps.Add(templatedWizardStep);
         _wizard.RegisterCustomNavigationContainers(templatedWizardStep);
     }
 }
Ejemplo n.º 21
0
        public void MoveTo(WizardStepBase wizardStep) {
            if (wizardStep == null)
                throw new ArgumentNullException("wizardStep");

            int index = WizardSteps.IndexOf(wizardStep);
            if (index == -1) {
                throw new ArgumentException(SR.GetString(SR.Wizard_Step_Not_In_Wizard));
            }

            ActiveStepIndex = index;
        }
Ejemplo n.º 22
0
 private WizardStepType GetStepType(WizardStepBase step) {
     int index = WizardSteps.IndexOf(step);
     return GetStepType(step, index);
 }
Ejemplo n.º 23
0
		public WizardStepType GetStepType (WizardStepBase wizardStep, int index)
		{
			if (wizardStep.StepType == WizardStepType.Auto) {
				if ((index == WizardSteps.Count - 1) || 
						(WizardSteps.Count > 1 && 
						WizardSteps[WizardSteps.Count - 1].StepType == WizardStepType.Complete && 
						index == WizardSteps.Count - 2))
					return WizardStepType.Finish;
				else if (index == 0)
					return WizardStepType.Start;
				else
					return WizardStepType.Step;
			} else
				return wizardStep.StepType;
			 
		}
 internal string GetRegionName(WizardStepBase step)
 {
     if ((step.Title != null) && (step.Title.Length > 0))
     {
         return step.Title;
     }
     if ((step.ID != null) && (step.ID.Length > 0))
     {
         return step.ID;
     }
     int num = step.Wizard.WizardSteps.IndexOf(step) + 1;
     return ("[step (" + num + ")]");
 }
Ejemplo n.º 25
0
		public WizardStepType GetStepType (WizardStepBase wizardStep, int index)
		{
			if (wizardStep.StepType == WizardStepType.Auto) {
				if (index == 0)
					return WizardStepType.Start;
				else if (index == WizardSteps.Count - 1)
					return WizardStepType.Finish;
				else
					return WizardStepType.Step;
			} else
				return wizardStep.StepType;
			 
		}
Ejemplo n.º 26
0
 public void MoveTo(WizardStepBase wizardStep)
 {
 }
Ejemplo n.º 27
0
 public WizardStepType GetStepType(WizardStepBase wizardStep, int index)
 {
     return(default(WizardStepType));
 }
 public void MoveTo(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     int index = this.WizardSteps.IndexOf(wizardStep);
     if (index == -1)
     {
         throw new ArgumentException(System.Web.SR.GetString("Wizard_Step_Not_In_Wizard"));
     }
     this.ActiveStepIndex = index;
 }
 public void Remove(WizardStepBase wizardStep)
 {
 }
 public bool Contains(WizardStepBase wizardStep)
 {
     return(default(bool));
 }
Ejemplo n.º 31
0
 public void Insert(int index, WizardStepBase wizardStep)
 {
     AddAt(index, wizardStep);
 }
 private void SetWizardStepContent(WizardStepBase step, string content, IDesignerHost host)
 {
     Control[] controlArray = null;
     if ((content != null) && (content.Length > 0))
     {
         controlArray = ControlParser.ParseControls(host, content);
     }
     step.Controls.Clear();
     if (controlArray != null)
     {
         foreach (Control control in controlArray)
         {
             step.Controls.Add(control);
         }
     }
 }
Ejemplo n.º 33
0
 public WizardTopSideBarItemContainer(WizardStepBase step)
 {
     Step = step;
 }
Ejemplo n.º 34
0
		public bool Contains (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			return list.Contains (wizardStep);
		}
Ejemplo n.º 35
0
        public WizardStepType GetStepType(WizardStepBase wizardStep, int index) {
            if (wizardStep.StepType == WizardStepType.Auto) {

                // If it's the only step or a Complete step is after current step, then make it Finish step
                if (WizardSteps.Count == 1 ||
                    (index < WizardSteps.Count - 1 &&
                    WizardSteps[index + 1].StepType == WizardStepType.Complete)) {
                    return WizardStepType.Finish;
                }

                // First one is the start step
                if (index == 0) {
                    return WizardStepType.Start;
                }

                // Last one is the finish step
                if (index == WizardSteps.Count - 1) {
                    return WizardStepType.Finish;
                }

                return WizardStepType.Step;
            }

            return wizardStep.StepType;
        }
 public void AddAt(int index, WizardStepBase wizardStep)
 {
 }
Ejemplo n.º 37
0
        public void Add(WizardStepBase wizardStep) {
            // 
            if (wizardStep == null) {
                throw new ArgumentNullException("wizardStep");
            }

            wizardStep.PreventAutoID();
            RemoveIfAlreadyExistsInWizard(wizardStep);

            wizardStep.Owner = _wizard;
            Views.Add(wizardStep);
            AddTemplatedWizardStep(wizardStep);

            NotifyWizardStepsChanged();
        }
 public void Insert(int index, WizardStepBase wizardStep)
 {
 }
Ejemplo n.º 39
0
        public int IndexOf(WizardStepBase wizardStep) {
            if (wizardStep == null) {
                throw new ArgumentNullException("wizardStep");
            }

            return Views.IndexOf(wizardStep);
        }
 public int IndexOf(WizardStepBase wizardStep)
 {
     return(default(int));
 }
Ejemplo n.º 41
0
 private static void RemoveIfAlreadyExistsInWizard(WizardStepBase wizardStep) {
     if (wizardStep.Owner != null) {
         wizardStep.Owner.WizardSteps.Remove(wizardStep);
     }
 }
 public void CopyTo(WizardStepBase[] array, int index)
 {
     this.Views.CopyTo(array, index);
 }
Ejemplo n.º 43
0
		public int IndexOf (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			return list.IndexOf (wizardStep);
		}
 internal WizardSelectableRegion(WizardDesigner designer, string name, WizardStepBase wizardStep) : base(designer, name, true)
 {
     this._wizardStep = wizardStep;
 }
Ejemplo n.º 45
0
		public void Remove (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			list.Remove (wizardStep);
			wizard.UpdateViews ();
		}
 public WizardStepEditableRegion(WizardDesigner designer, WizardStepBase wizardStep) : base(designer, designer.GetRegionName(wizardStep), false)
 {
     this._wizardStep = wizardStep;
     base.EnsureSize = true;
 }
 public void Remove(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     this.Views.Remove(wizardStep);
     wizardStep.Owner = null;
     TemplatedWizardStep item = wizardStep as TemplatedWizardStep;
     if (item != null)
     {
         this._wizard.TemplatedSteps.Remove(item);
     }
     this.NotifyWizardStepsChanged();
 }
Ejemplo n.º 48
0
		public void MoveTo (WizardStepBase wizardStep)
		{
			if (wizardStep == null)
				throw new ArgumentNullException ("wizardStep");
			
			int i = WizardSteps.IndexOf (wizardStep);
			if (i == -1)
				throw new ArgumentException ("The provided wizard step does not belong to this wizard.");
			
			ActiveStepIndex = i;
		}
Ejemplo n.º 49
0
		public void CopyTo (WizardStepBase[] array, int index)
		{
			list.CopyTo (array, index);
		}
 public void Add(WizardStepBase wizardStep)
 {
 }