No, I 've been working in Clarion but SoftVelocity is behind in bringing out
their .NET version. It's a GREAT tool but lagging a bit in this regard...
they say it's comming but not sure when it will be gold and I need it now.
I added the code but ran into an error:
StartBehaviourR, Q and S are not declared. I thought the Enum is the
delcaration for them.
Robert
Public Class frmRSQMain
Public Enum StartBehavior
StartBehaviorR
StartBehaviorS
StartBehaviorQ
End Enum
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Public Sub New(ByVal behavior As StartBehavior)
I nitializeComponent()
Select Case behavior
Case StartBehaviorR <--------------- Error here
Me.Text = "Rental"
Me.GradientFormHeader1.DetailText = "Add, Modify Rentals..."
lblRSQNumber.Text = "Rental No."
lblRSQDate.Text = "Rental Date"
lblRSQNumber2.Text = "Rental No."
lblRSQStartDate.Text = "Rental Start"
lblSubTotal.Text = "Rental SubTotal"
btnRentalList.Text = "Rental List"
Case StartBehaviorQ <--------------- Error here
Me.Text = "Quote"
Me.GradientFormHeader1.DetailText = "Add, Modify Quote..."
lblRSQNumber.Text = "Quote No."
lblRSQDate.Text = "Quote Date"
lblRSQNumber2.Text = "Quote No."
lblRSQStartDate.Text = "Quote Start"
lblSubTotal.Text = "Quote SubTotal"
btnRentalList.Text = "Quote List"
Case StartBehaviorS <--------------- Error here
Me.Text = "Sales"
Me.GradientFormHeader1.DetailText = "Add, Modify Sales..."
lblRSQNumber.Text = "Sales No."
lblRSQDate.Text = "Sales Date"
lblRSQNumber2.Text = "Sales No."
lblRSQStartDate.Text = "Sales Start"
lblSubTotal.Text = "Sales SubTotal"
btnRentalList.Text = "Sales List"
End Select
End Sub
Looking at your code again I see something that may help you out:
Change your code to this:
Public Class frmRSQMain
Public Enum FormBehavior
Rental
Sales
Quote
End Enum
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Public Sub New(ByVal behavior As FormBehavior)
InitializeComponent()
Me.Text = behavior.ToString()
Me.GradientFormHeader1.DetailText = String.Format("Add, Modify
{0}...", behavior.ToString())
lblRSQNumber.Text = String.Format("{0} No.",
behavior.ToString())
lblRSQDate.Text = String.Format("{0} Date",
behavior.ToString())
lblRSQNumber2.Text = String.Format("{0} No.",
behavior.ToString())
lblRSQStartDate.Text = String.Format("{0} Start",
behavior.ToString())
lblSubTotal.Text = String.Format("{0} SubTotal",
behavior.ToString())
btnRentalList.Text = String.Format("{0} List",
behavior.ToString())
End Sub
End Class
It seems to me all you were doing was changing labels based on the
enum, this will do it without the select case.
Thanks,
Seth Rowe