|
Well, I've started a complete rewrite. It's gonna take a while because I've never done a designer-integrated control before. IMHO, that's where most of the problems lie in the existing code, so designer integration may have to wait or even be abandoned because backward compatibility will be an issue, not to mention forward compatibility.
I'm leaning toward the control-as-a-template idea, and am designing the base classes that provide the basic/common functionality. When the programmer creates a control from the template, he'll be able to make normal changes n the designer, but special settings may be restricted to being manually added - I simply don't know yet.
Anyway, I'll post an article when it's ready.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Help why do I get this error??????
"No overload for 'wizardControl1_NextButtonClick' matches delegate 'WizardBase.GenericCancelEventHandler<WizardBase.WizardControl>"
on this line of code
<code>this.wizardControl1.NextButtonClick += new WizardBase.GenericCancelEventHandler<WizardBase.WizardControl>(this.wizardControl1_NextButtonClick);</code>
|
|
|
|
|
I HAVE THA SAME ERROR. Can some one help?
|
|
|
|
|
help me please... same error occurs..
|
|
|
|
|
reply reference.(2page)
thanks!
================================================================
Re: NextButtonClick Event [modified] MadStudent 7:21 29 Feb '08
================================================================
|
|
|
|
|
No answer to this question until now? I have the same error. Please help.
|
|
|
|
|
try this:
private void wizardControl1_NextButtonClick(object sender, GenericCancelEventArgs<WizardBase.WizardControl> tArgs)
Regards,
Lenny
|
|
|
|
|
do this
private void wizardControl1_NextButtonClick(object sender, EventArgs e)
|
|
|
|
|
You've provided absolutely no explanatory text, there's almost no comments in the code, and that 2nd comment is exasperated by the fact that you're not responding to questions/bug reports.
|
|
|
|
|
Hello,
It's a nice control but why is not it possible to design step at design time? They look different at runtime and design time.
To be more precise, I need to click 'next step' from the smart tag to design next step, selecting instance of WizardBase.IntermidiateStep from dropdown box of properties window doesn't change to next step in designer.
|
|
|
|
|
When i click in the next button i get this error:
Message="The step must be well formed, so there cannot be a Finishstep without a Startstep."
Source="WizardBase"
any idea?
|
|
|
|
|
I had the same problem. I had to comment out some code to make it work again. Set a breakpoint on the error and comment out the code that causes the error. It's some kind of check but leaving it out doesn't hurt the functionality.
|
|
|
|
|
I am trying to direct the wizard to optional pages depending on whether or not a checkbox is checked on page 1 (index 0).
private void wizardControl1_NextButtonClick(object sender, WizardBase.GenericCancelEventArgs<WizardBase.WizardControl> tArgs)
{
if (checkBox1.Checked != true)
{
wizardControl1.CurrentStepIndex=2;
}
}
If the checkbox is checked, pressing the Next button moves to the next page as expected, however, if the checkbox is unchecked, the above code runs. I assume that setting the CurrentStepIndex - 2 should move focus to the third page - and there is a third - but instead of that, I get the following error...
Error Message: The step must be well formed, so there cannot be a Finishstep without a Startstep.uasi
|
|
|
|
|
I'm having the same problem, but nobody seems to care
|
|
|
|
|
Hi,
we added shortcuts and tootips to the wizard. It seems to work fine intially. Later on, i found that there is an issue.
Usually, the tooltip does not show up on the first step, when i go to the 2nd or 3rd step. It start working ; and once it start working, it works even on the first step.
The shortcut also work strangely, some time it works and sometime it does not. It may work on one step and would not work on the other step.
Are you aware of these issues ? what am i suppose to do. My project is almost finish and i need these features i.e. shortcuts and tooltips for sure. Please provide me with an update or something. Thanks,
Regards,
Osman
|
|
|
|
|
I went to put together a basic wizard form. I'd read the issue already mentioned that people had had errors about serialization with the LeftPair, but found myself wanting to change that value. I'd built the project and had used only a DLL reference to the resulting DLL and still had the same issue previously mentioned. I tried bringing it into the same solution, still no go. I can't modify that value or the data fails to save. I tried playing with Serialization attributes and figuring out what the true cause was, finally threw up my hands saying, the point of using a pre-built wizard control was to save time, not use it up. So I put that aside and looked at some other things.
I quickly noticed having changed the subtitle text to be more than one line that for the first line the shadow was on target, but the following line it rendered with a different offset. Back and forth it went every other line. I debugged and found that it was using floating math for each line independently. So one line would offset the shadow to 31.75 and the next to 31.19 causing a full pixel rounding difference on each line. To fix this, it needs to pre-compute a fixed size offset that all lines will use to get the text to render consistently.
I also noticed an odd coding pattern:
int Property
{
get { return base.Property; }
set
{
base.Property = value;
base.Property = 0;
}
}
I believe the author was a user of ReSharper (a good thing), and didn't want to see the warning about the lack of use of value, but wanted to force the property to a fixed value so didn't want to use the value provided. Elsewhere the author used the ReSharper "exclude warning" pragmas to accomplish the same thing, so I wonder why not here as well rather than double assignment.
Later I closed and re-opened my form, and boom, exception on load about reference to the DLL. Try to load the form again, it works. It was an intermittent issue. It sounded a lot like the one earlier post regarding having changed the sub-title.
All in all, the implementation looks really nice, but it just doesn't feel finished yet. There are too many little points I would feel the need to debug to put this into an application I would use and attempt to maintain. I wish this implementation the best, but am personally not ready to use it in its current state.
|
|
|
|
|
One more thing I thinkg would be great would be to put the Localizable attribute to the Title, Subtitle, etc members. I've just spent half an hours translating my form to realize it didn't keep the changes everywhere...
Anyway, I post this as a warning to anyone using this code. Don't forget to add the Localizable attribute if you're to work in multiple languages!
|
|
|
|
|
I love this example and am trying to design a multi-pane control based using this control as an example of the right way to do things. However... I am not understanding the following code...
protected override void OnSet(int index, object oldValue, object newValue)
{
GenericChangeEventArgs<T> e = new GenericChangeEventArgs<T>((T)oldValue, (T)newValue);
if (Changing != null)
{
Changing(index, e);
if (e.Cancel)
{
return;
}
}
base.OnSet(index, oldValue, newValue);
}
What does If (Changing != null) really do. If I translate this to VB.Net I get
Protected Overloads Overrides Sub OnSet(ByVal index As Integer, ByVal oldValue As Object, ByVal newValue As Object)
Dim e As New GenericChangeEventArgs(Of T)(DirectCast(oldValue, T), DirectCast(newValue, T))
If Changing IsNot Nothing Then
RaiseEvent Changing(index, e)
If e.Cancel Then Exit Sub
End If
MyBase.OnSet(index, oldValue, newValue)
End Sub ' (ByVal index As Integer, ByVal oldValue As Object, ByVal newValue As Object)
Where the line "If Changing IsNot Nothing Then" generates a compiler error...
Error 1 'Public Event Changing(index As Integer, e As GenericChangeEventArgs(Of T))' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event. C:\My Projects\VB.Net\etc\ezWizard\ezWizard\Collection\GenericCollection.vb 347 10 ezWizard
I would greatly appriciate any help anyone could give me. Anyone understand C# and VB.Net?
Keith Alan Yerian
|
|
|
|
|
That's common use, when there are no event handler associated with an event, the event is null and will throw a NullReferenceException if you remove this check. VB.NET does this automatically in the RaiseEvent shortcut.
|
|
|
|
|
First, this is a great control. Designer support is just awesome (I'm using this control in the project as is as well as using it to figure out how to make a preferences screen that works in the designer).
I just have one question. What is the StepIndex property of the WizardStep class for? I tried listening to the CurrentStepIndexChanged event on the WizardControl, and then comparing wizard.CurrentStepIndex to pageChooseSource.StepIndex so that I can tell when the pageChooseSource is just being shown and react accordingly.
Unfortunately, pageChooseSource.StepIndex is always -1 (at least, when the steps are added in the designer). Actually, the value is -1 for all the steps on the wizard, including custom and not custom steps. I wondered if this was a problem with he control or I simply misunderstand the purpose of the StepIndex property...
Also, I think it would be useful to have some xml docs on the classes and methods... From looking in your code, I've found the exact same region directives as those I use in my own code and even Description attributes (which is more documentation than I write), but most public properties in WizardStep and WizardControl don't have xml docs so we don't know their purpose.
|
|
|
|
|
Hi,
In first place, congratulations, wonderfull wizard.
I need to pass to the next step being used a button created by me. I would like to make the same thing that the NextButton makes but without using it. He would have as?
Hope it helps!
Thanks,
Vítor
|
|
|
|
|
Great work!
I did find room for an improvement, though.
Currently you can use NextClicked and CurrentStepIndexChanged event to handle loading values in a specific step and to validate if the values entered are valid.
However, in my opinion it makes a lot more sense to make this events on the WizardStep. By adding the events:
StepLoad
StepClose
StepClosing
I find it more intuitive. I call the first two events in the WizardControl's OnChangeCurrentStepIndex. The StepClosing event is called from the WizardControl's OnNextButtonClick, and if the implementer of the event set Cancel=true it does not change the step.
If you find this to be an improvement send me an email and I'll send you my code changes.
|
|
|
|
|
First: great piece of code !!!
But, when in designer mode in Visual Studio, when I add a new IntermediateStep and immediately delete it again, the user interface in designer mode doesn't correctly update. I get a complete grey pane and not the expected next wizard step.
Thanks,
Serge Desmedt
Hungry for Knowledge
|
|
|
|
|
Hi
this is really a wonderfull wizard. But is there any way to add/remove steps in run time??
Param
|
|
|
|
|
Hi ,
Even if i decline the License Agreement,I am able to click Next Button.
Kindly help me to fix the above issue.
Thanks,
Lavanya
Lavanya
|
|
|
|
|