|
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
|
|
|
|
|
I've got a solution of multiple C# projects. I've added WizardBase as a project and made a reference to it on my working project.
I create a new form, add the wizard control to it. Add some steps and run the project. It all works fine! It's really a great control
But when I alter anything of the look-and-feel of the control, for example change the color of the shadow of the subtitle I get a run-time error on starting the form:
System.IO.FileNotFoundException<br />
Filename: WizardBase, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null<br />
bij System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)<br />
bij System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)<br />
bij System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)<br />
bij System.Type.GetType(String typeName, Boolean throwOnError)<br />
bij System.Resources.ResourceReader.FindType(Int32 typeIndex)<br />
bij System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)<br />
bij System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)<br />
bij System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)<br />
bij System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)<br />
bij System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)<br />
bij System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)<br />
bij System.Resources.ResourceManager.GetObject(String name)<br />
bij ... .frmManageDataSourcesWizard.InitializeComponent() in frmManageDataSourcesWizard.Designer.cs:line 81
Line 81 is this.welcomeStep.SubtitleAppearence = ((WizardBase.TextAppearence)(resources.GetObject("welcomeStep.SubtitleAppearence")));
It looks like instead of adding the changes it want to read a resource file which does not exists.
After reseting the subtitle again everything works fine.
I don't know if the WizardBase project is the trouble or my own solution, but I would really like to know how to fix this.
Thanks
Paul
The Netherlands
|
|
|
|
|
Hi,
From exception what i can infer is the dll is not there in the application directory. Please try putting the dll manually in the application folder.
Regards,
Manish
|
|
|
|
|
Whenever I set the LeftPair colors to anything, I get an error
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.'
All of the other Pair properties do not give this error.
|
|
|
|
|
The reason for this is assemble is cashed in VS. This Can be fixed in two ways.
1. Build the solution and restart the visual studio.
2. Add static reference to the Wizard projet . i.e. Use dll instead of project reference.
|
|
|
|
|
This did not work for me.
"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
|
|
|
|
|
The reason is the event handler attached in the constructor StartStep():
leftPair.AppearenceChanged += leftPair_AppearenceChanged;
Simply comment this line. This action breaks design time update in case you change LeftPair values, but the same behavior is present in other ColorPair settings
|
|
|
|
|
Hi,
These two things seem to solve the problem:
1. Mark the StartStep class as [System.Serializable].
2. The InitializeComponent() of the wizard's parent did not have a line for LeftPair. Adding the following seems to 'reset' the designer:
this.startStep1.LeftPair = ((WizardBase.ColorPair)(resources.GetObject("startStep1.LeftPair")));
I am not sure if this is a solution, but seems to work for now. I am using VS2008/C#.
|
|
|
|
|
this.startStep1.LeftPair = ((WizardBase.ColorPair)(resources.GetObject("startStep1.LeftPair")));</blockquote>
Exactly where does that line need to go?
Thanks
|
|
|
|
|
The only sollution I found was to do this programatically.
StartStep.LeftPair.BackColor1 = Color.Black;
StartStep.LeftPair.BackColor2 = Color.White;
StartStep.LeftPair.Gradient = 180;
And I put this code in the start of my code.
|
|
|
|
|
Hi there,
I need to implement a wizard which doesn't follow a straight navigation rule. The current step may decide which step follows.
Is there a way to do so with this control?
I think WizardControl should ask the current WizardStep if it knows its follower, or even better a WizardControl should inspect a xml-navigation-rule before setting the next step.
Thanks
|
|
|
|
|
Yes, This can be achieved by setting the value of step index.
|
|
|
|
|