Пример #1
0
		public void Add (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			wizardStep.SetWizard (wizard);
			list.Add (wizardStep);
			wizard.UpdateViews ();
		}
Пример #2
0
 private static void RemoveIfAlreadyExistsInWizard(WizardStepBase wizardStep)
 {
     if (wizardStep.Owner != null)
     {
         wizardStep.Owner.WizardSteps.Remove(wizardStep);
     }
 }
Пример #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 ();
		}
Пример #4
0
        int IList.Add(object value)
        {
            WizardStepBase stepAndVerify = GetStepAndVerify(value);

            stepAndVerify.PreventAutoID();
            this.Add(stepAndVerify);
            return(this.IndexOf(stepAndVerify));
        }
Пример #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);
 }
Пример #7
0
 public bool Contains(WizardStepBase wizardStep)
 {
     if (wizardStep == null)
     {
         throw new ArgumentNullException("wizardStep");
     }
     return(list.Contains(wizardStep));
 }
Пример #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);
     }
 }
Пример #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);
        }
Пример #11
0
        private void AddTemplatedWizardStep(WizardStepBase wizardStep)
        {
            TemplatedWizardStep item = wizardStep as TemplatedWizardStep;

            if (item != null)
            {
                this._wizard.TemplatedSteps.Add(item);
                this._wizard.RegisterCustomNavigationContainers(item);
            }
        }
Пример #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();
 }
Пример #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();
 }
Пример #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();
        }
Пример #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();
        }
Пример #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;
 }
Пример #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();
        }
Пример #20
0
 private void AddTemplatedWizardStep(WizardStepBase wizardStep) {
     var templatedWizardStep = wizardStep as TemplatedWizardStep;
     if (templatedWizardStep != null) {
         _wizard.TemplatedSteps.Add(templatedWizardStep);
         _wizard.RegisterCustomNavigationContainers(templatedWizardStep);
     }
 }
Пример #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;
        }
Пример #22
0
 private WizardStepType GetStepType(WizardStepBase step) {
     int index = WizardSteps.IndexOf(step);
     return GetStepType(step, index);
 }
Пример #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 + ")]");
 }
Пример #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;
			 
		}
Пример #26
0
 public void MoveTo(WizardStepBase wizardStep)
 {
 }
Пример #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));
 }
Пример #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);
         }
     }
 }
Пример #33
0
 public WizardTopSideBarItemContainer(WizardStepBase step)
 {
     Step = step;
 }
Пример #34
0
		public bool Contains (WizardStepBase wizardStep)
		{
			if (wizardStep == null) throw new ArgumentNullException ("wizardStep");
			return list.Contains (wizardStep);
		}
Пример #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)
 {
 }
Пример #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)
 {
 }
Пример #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));
 }
Пример #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);
 }
Пример #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;
 }
Пример #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();
 }
Пример #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;
		}
Пример #49
0
		public void CopyTo (WizardStepBase[] array, int index)
		{
			list.CopyTo (array, index);
		}
 public void Add(WizardStepBase wizardStep)
 {
 }