public void can_replace_arg() { var args = new Args(); args.AddOrReplace("arg1", "A"); args.AddOrReplace("arg1", "B"); Assert.AreEqual("B", args["arg1"]); }
public override void ResumeFrom(string wizardName, Args args) { if (wizardName == "LeftList") leftList.Items.Add(args["Value"].ToString()); if (wizardName == "RightList") rightList.Items.Add(args["Value"].ToString()); }
public void can_add_colection_of_args_to_a_step_in_constructor() { var args = new Args(); args.AddOrReplace("arg1", "A"); args.AddOrReplace("arg2", "B"); var step = new WizardStep(args); Assert.AreEqual(args, step.Args); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var argsForStep2 = new Args(); argsForStep2.AddOrReplace("arg1", "abcdef"); argsForStep2.AddOrReplace("arg2", "bcdef"); argsForStep2.AddOrReplace("arg3", "cdef"); argsForStep2.AddOrReplace("arg4", "efghi"); argsForStep2.AddOrReplace("arg5", "fghijkl"); IWizardView view = new SimpleWizardView(); var controller = new WizardController(view); var wizard = new Wizard(); wizard.AddStep(new Step1(argsForStep2)) .AddStep(new Step2(argsForStep2)); controller.Start(wizard); Application.Run(view as Form); }
public override void ResumeFrom(string wizardName, Args args) { listBox1.Items.Add(args["Value"].ToString()); }
public Step1(Args args) : base(args) { InitializeComponent(); }
public WizardEventArgs(Args arguments) { Arguments = arguments; }
public void Unload(Args args) { var arguments = new WizardEventArgs(args); if (Unloaded != null) Unloaded(this, arguments); }
public virtual void ResumeFrom(string wizardName, Args args) { }
public WizardStep(Args args) { InitializeComponent(); _args = args; }
public void can_create_empty_args() { var args = new Args(); Assert.AreEqual(0, args.Count ); }
public override void ResumeFrom(string wizardName, Args args) { lstCourses.Items.Add(string.Format("{0} [{1}]",args["Title"], args["Code"])); }