|
I got the same problem. When I tried to add new event handler for NextButtonClick in "Design" mode it created a method signature that caused a compiler error:
private void wizardControl_NextButtonClick(object sender)
Apparently, there should be two parameters. I can't figure out what type should I provide for second parameter (it is generic, right). So I just changed it like this:
private void wizardControl_NextButtonClick(object sender, CancelEventArgs e)
It works for me BUT there is a problem. Every time when VS regenerate MyClass.Designer.cs, it just removes this handler from the auto-generated code. So I have to add this event every time I want to build the application and remove new generated method stub from source code. Needless to say that it is a pain in the ... It is sad but I don't have time to fix it. I'll try to do it later. May be next week.
P.S. To skip a step(s) I use something like this:
wizardControl.CurrentStepIndex = numberOfStepYouWannaGoTo;
Hope it helps!
P.P.S. I work in Visual Studio 2008.
|
|
|
|
|
I haven't had any issues with _NextButtonClick. When .Enabled and .Visible are True, the event is not firing for you at all?
The way I use it is pass the stepindex to a validation method and should validation fail, I return an error which in turn cancels the move to the next step.
This is the code in my Click event:
If ValidateStep(tArgs.Value.CurrentStepIndex) Then
tArgs.Cancel = True
End If
Within the validationstep, I move to the appropriate next step (if not the sequential) as indicated in the other post.
|
|
|
|
|
Hi For using NextButton click please use
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<wizardcontrol> tArgs)<br />
{<br />
<br />
}</wizardcontrol>
This thing i will fix in next update.
For screen jump or using different paths use something like this
wizardControl1.CurrentStepIndex = 2;
stepindex should be less than or equal to total pages.
Regards,
Manish
|
|
|
|
|
I have tried this already. It didn't work for me. Here is what I get:
Error 23: Using the generic type 'WizardBase.GenericCancelEventArgs<t>' requires '1' type arguments
Apparently, I need to provide some Type for the GenericCancelEventArgs. So the following should do the trick:
<br />
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<WizardBase.WizardControl> tArgs)<br />
{<br />
}<br />
<br />
Thanks.
P.S. I believe you meant something like this. Be aware of using <> in code block...
modified on Monday, March 17, 2008 5:13 PM
|
|
|
|
|
Hello,
I try to use this great tool but NextButtonClick Event still doesn't work for me.
I tried this too:
<br />
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<wizardbase.wizardcontrol> tArgs)<br />
{<br />
<br />
}<br />
</wizardbase.wizardcontrol>
but this is what I get:
Error 1: The type or namespace name 'GenericCancelEventArgs' could not be found (are you missing a using directive or an assembly reference?)
I'm begginer in C#, can anyone help me?
Thank you
Martin
|
|
|
|
|
Hi Martin,
Try this: WizardBase.GenericCancelEventArgs<WizardBase.WizardControl> tArgs
And make sure you have WizardBase in references of your project.
Hope it helps.
Machines work, people should think.
|
|
|
|
|
Hi MadStudent,
yes, now it works Thank's a lot for your help!
Martin
|
|
|
|
|
Yo,
I just had the same problem and its quite an easy fix. Didn't bother to look WHY it does it, but the fix is to put something similar to the following line in your windows constructor:
wizardControl1.NextButtonClick += new WizardBase.GenericCancelEventHandler<wizardbase.wizardcontrol>(wizardControl1_NextButtonClick);
where wizardControl1_NextButtonClick is the name of your event handler of course, but the method signature should be:
private void wizardControl1_NextButtonClick(object sender, CancelEventArgs e)
{
}
Then, when Visual Studio removes the event handler, your constructor just slaps it back in again at runtime.
You need to make sure the designer DOSN'T have the event handler set up though, or it'll run it twice.
|
|
|
|
|
|
Hi
Your tool looks great, but I could not make it work.
"Step 1: Add a reference to Wizarddemo.dll". Where could I get this file?
When I open the project it gives me the error: "Unable to find assembly 'WizardBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
Do you have an idea what it could be?
Thank you.
|
|
|
|
|
For 1
If you build the provided solution you will get the Wizarddemo.dll
Problem 2
Please rebuild solution and reopen the designer you will not get error "Unable to find assembly 'WizardBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.""
|
|
|
|
|
I think it should be "wizardbase.dll"
|
|
|
|
|
Hi ,
keep it guy...realy one of the best work(as a indivisual) i have ever seen. just amazing effort
Manoj Sahu
|
|
|
|
|
UPDATE: I found the solution and am leaving this here in hopes I save someone else some time. The solution is to create a BindingManagerBase object for EACH step that has bound controls and then increment the .Position property on all of them. This keeps the controls on the different steps in synch. Without this, the controls on Steps 2-x will not update when you change the .Position property.
Dim WizStep1 As WizardBase.WizardStep = Me.wizContract.WizardSteps(0)
Dim WizStep2 As WizardBase.WizardStep = Me.wizContract.WizardSteps(1)
Dim WizStep3 As WizardBase.WizardStep = Me.wizContract.WizardSteps(2)
MyBM1= WizStep1.BindingContext(MyDataTable)
MyBM2= WizStep1.BindingContext(MyDataTable)
MyBM3= WizStep1.BindingContext(MyDataTable)
.
.
.
MyBM1.Positon=MyRecordNumber
MyBM2.Positon=MyRecordNumber
MyBM3.Positon=MyRecordNumber
My Original query follows:
-----------------------------------------------------------------------------
I have a 3 step Wizard, each step has a few standard controls each bound to the same Datasource (ADO.Net Datatable).
All binding is done via code - the datatable populated via a stored procedure. I am not using any of the native data controls.
I create a BindingManager set to the parent object's bindingcontext for the datasource ie:
Private MyBM as BindingManagerBase
.
.
MyBM = Me.BindingContext(MyDataTable)
All of the controls are bound using:
MyControl.DataBindings.Add("PropName", MyDataTable, "ColumnName")
To change the record in the datatable, I set the .Position property of MyBM.
I have used this methodology for years and never had an issue binding controls on Windows forms
With the wizard control however, I have noticed the following.
Setting MyBM to the BindingContext of the parent does not work. It does work when using the .BindingContext of a separately bound control on the same step.
Controls on other steps do NOT get their value set.
I tried putting a bound control on the parent form and bind to that .BindingContext but that does not work either - it only works if it is on the same STEP of the Wizard. (and yes, I also tried the .BindingContext of the Wizard Control)
I'm guessing it has to with the scope of the .BindingContext / controls on the steps, but I would have thought using the parent form/control would have worked as it does with standard forms/user controls.
Has anyone used the wizard with bound objects / have any suggestions?
modified on Friday, February 15, 2008 3:16 PM
|
|
|
|
|
I have found one issue with bound controls that I have yet to resolve -
Binding controls on a 'Finish' Step.
I can successfully, bind a Start or Intermediate step, but using the methods mentioned above, they do not work if the control is on a Finish step.
Anyone else using this wizard with bound controls / have any ideas?
|
|
|
|
|
I successfully added the reference in my project to WizardBase.dll, however, there is no WizardBase group under my toolbox. Did I miss something?
|
|
|
|
|
I had to add the control to the toolbar by myself too. Create a new toolbar and then "Choose Items..." and there select the WizardBase.dll
|
|
|
|
|
If you don't agree to the EULA, shouldn't something different happen compared to when you do agree to it?
|
|
|
|
|
I have been using your initial release (May 2007) and it works very well. While trying to upgrade/replace with your latest release (2/2/08), I am receiving some errors.
When simply replacing the DLL with an existing executable, I receive the following error:
System.MissingMethodException: Method not found: 'WizardBase.WizardStepCollection WizardBase.WizardControl.get_WizardSteps()'.
Within the IDE when the project loads, I receive several errors as well on invalid property names (specifically the step .TitleFont and .SubtitleFont properties).
I attempted to use them separately (renaming the new DLL, placing it in a separate project with same as well as different filename), but apparently they share the same GUID / info, so that isn't possible.
If I REM those property names within the .Designer module, it compiles and works properly. Also, resetting a property, forcing the .Designer module to be recreated also resolves the issue (as those properties are removed). However, ideally - I would prefer not to have to modify/recompile every module that utilizes the DLL. Not a big deal, just thought I would mention it - and perhaps save others using the original code a few minutes when they upgrade.
Otherwise, thank you very much for creating this - it works very well and has saved us a lot of time & effort.
modified on Monday, February 11, 2008 1:31 PM
|
|
|
|
|
Hi ,
The control is not backward compatible.
I will work on this.
Regards,
Manish
|
|
|
|
|
Why always I'm getting this error:
The control System.Windows.Forms.Panel has thrown an unhandled exception in the designer and has benn disbled.
Exception:
Type 'WizardBase.StartStep' in Assembly 'WizardBase', Version 1.0.1.0, Culture=neutrl, PublicKeyToken=null is non marked as serializable.
Stack trace:
at system.Windwos.Forms.Panel.OnResize(EventArgs eventargs)
Help me please.
Thanks.
|
|
|
|
|
HCan you provide me exact repro. That will actuaqlly help me out to figure out the problem.
Regards,
Manish
|
|
|
|
|
This error occurs when i do this:
1) drag the control onto a user control;
2) Set the dock property of the control to Fill;
3) clear the bindingimage an the icon on the firts page;
4) set a new value for the leftpanel apparence the gradiend properties from the smart tag panel;
now select the user control and resize it. Tell me if an error occurs. If no the problem is just fo me and something is wrong on my pc. I'm using VS2008, SCSF, ad Resharp.
Thanks
|
|
|
|
|
Hi, did you try the above steps? Have you got any error?
Thanks.
|
|
|
|
|
Were you able to resolve this?
I too am using this control with SCSF and VS2008. When I dragged the control on to a UserControl (View) and set dock to fill. I get a design-time error from Visual Studio after I change the LeftPair.BackColor property:
Code Generation for property 'LeftPair' failed. Error was: 'Type 'WizardBase.StartStep' in Assembly 'WizardBase, Version 1.0.1.0,Culture=neutral, PublicKeyToken=null' is not marked as serializable'.
Any suggestions?
|
|
|
|