public void changeStep(int stepId) { MainStackPanel.Children.Clear(); switch (stepId) { case 0: { Globals.CurrentElection = null; Globals.CurrentParty = null; Globals.CurrentVoter = null; Globals.CurrenttrackingCode = null; var uc = new EnteranceUserControl(this); MainStackPanel.Children.Add(uc); break; } case 1: { Globals.CurrenttrackingCode = null; var uc = new Step1UserControl(this); MainStackPanel.Children.Add(uc); break; } case 2: { var uc = new Step2UserControl(this); MainStackPanel.Children.Add(uc); break; } case 3: { var uc = new Step3UserControl(this); MainStackPanel.Children.Add(uc); break; } case 4: { Globals.CurrentParty = null; Globals.CurrentVoter = null; var uc = new Step4UserControl(this); MainStackPanel.Children.Add(uc); break; } } }
public void changeStep(int stepId) { MainStackPanel.Children.Clear(); switch (stepId) { case 0: { Globals.CurrentElection = null; Globals.CurrentParty = null; Globals.CurrentVoter = null; Globals.CurrenttrackingCode = null; var uc = new EnteranceUserControl(this); MainStackPanel.Children.Add(uc); break; } case 1 : { Globals.CurrenttrackingCode = null; var uc = new Step1UserControl(this); MainStackPanel.Children.Add(uc); break; } case 2: { var uc = new Step2UserControl(this); MainStackPanel.Children.Add(uc); break; } case 3: { var uc = new Step3UserControl(this); MainStackPanel.Children.Add(uc); break; } case 4: { Globals.CurrentParty = null; Globals.CurrentVoter = null; var uc = new Step4UserControl(this); MainStackPanel.Children.Add(uc); break; } } }