|
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?
|
|
|
|
|
I receive the same error. every some time it is popping up :
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.'
I'm using VS 2005
|
|
|
|
|
I am pretty new, but it seems this Wizard Control can save me a lot of time if I can figure out how to use it. Is there any documentation available, or do I need to figure it out on my own? Thanks!
|
|
|
|
|
dysert wrote: documentation available
It would be helpful if you described what you are having trouble understanding. How to use the control seemed pretty simple and straight forward to me from reading the article. The author might update the article with the information you require but he will need to know where you are having trouble understanding.
Just a suggestion.
[Edit] Ah I see where you might have some confusion. The screen shots could probably use some explanation of what the screen shot is in relation to the designer.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Thanks for the prompt reply. Remember I'm just a beginner at this stuff, so the things that may be obvious to the folks here in Codeproject aren't necessarily obvious to a newbie.
For instance, I need to know how to intercept the NextButtonClick event so that I can write some code to do real work when the user clicks the Next button. By looking at the source code for the demo I see what he's done for the Finish button and the Eula button, but when I tried to replicate it in my project I never intercepted the event. Perhaps a code snippet to show how to use a method that will display a MessageBox when the event fires would be good. (Again, I see how it's done in the demo, but despite seeing that I can't get it working in my project.)
For another instance, I don't even know at this point how to add other controls on top of the Wizard control. (I want to display ddlb's, radio buttons, etc., and still have the Back, Next, Cancel buttons available for navigation.) And if I could add another control I wouldn't be sure how to access it, depending where in the navigation stream the user is.
Thanks!
|
|
|
|