// Properties.
public int FirstNumber { get; set; }
public int SecondNumber { get; set; }
public int Result { get; set; }
public MathOperation Operation { get; set; }
public MathWF()
{
InitializeComponent();
// Set default Operation to addition.
Operation = MathOperation.Add;
}
...
}
Now, using the WF designer, add a new Code activity named GetNumericalInput that is
mapped to a method named GetNumbInput(), by setting the ExecuteCode value via the Properties
window. Within this method, prompt the user to enter two numerical values that are assigned to
your FirstNumber and SecondNumber properties:
public sealed partial class MathWF : SequentialWorkflowActivity
{
...
private void GetNumbInput(object sender, EventArgs e)
{
Do'stlaringiz bilan baham: |