Browse Source

Add "Switch Layout" stress test.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5538 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
6f0b7e852a
  1. 44
      src/Tools/StressTest/StressTest/UserControl.xaml
  2. 15
      src/Tools/StressTest/StressTest/UserControl.xaml.cs

44
src/Tools/StressTest/StressTest/UserControl.xaml

@ -4,22 +4,34 @@
<ScrollViewer> <ScrollViewer>
<StackPanel> <StackPanel>
<StackPanel Orientation="Horizontal"><Label>Repetitions:</Label><TextBox Name="repetitionsTextBox" Text="1" Width="40"/></StackPanel> <StackPanel Orientation="Horizontal"><Label>Repetitions:</Label><TextBox Name="repetitionsTextBox" Text="1" Width="40"/></StackPanel>
<Button <Expander Header="Editor" IsExpanded="True">
Content="Open File" <StackPanel>
Height="23" <Button
Click="openFileButton_Click" /> Content="Open File"
<Button Height="23"
Content="Type Comment in C# File" Click="openFileButton_Click" />
Height="23" <Button
Click="TypeTextButton_Click" /> Content="Type Comment in C# File"
<Button Height="23"
Content="Erasing Text in C# code" Click="TypeTextButton_Click" />
Height="23" <Button
Click="EraseTextButton_Click" /> Content="Erasing Text in C# code"
<Button Height="23"
Content="Typing C# code" Click="EraseTextButton_Click" />
Height="23" <Button
Click="TypeCodeButton_Click" /> Content="Typing C# code"
Height="23"
Click="TypeCodeButton_Click" />
</StackPanel>
</Expander>
<Expander Header="Workbench" IsExpanded="True">
<StackPanel>
<Button
Content="Switch Layout"
Height="23"
Click="SwitchLayoutButton_Click" />
</StackPanel>
</Expander>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
</UserControl> </UserControl>

15
src/Tools/StressTest/StressTest/UserControl.xaml.cs

@ -136,5 +136,20 @@ namespace StressTest
} }
vc.WorkbenchWindow.CloseWindow(true); vc.WorkbenchWindow.CloseWindow(true);
} }
void SwitchLayoutButton_Click(object sender, RoutedEventArgs e)
{
Run("Switch Layout", SwitchLayout());
}
IEnumerable<DispatcherPriority> SwitchLayout()
{
for (int i = 0; i < Repetitions; i++) {
LayoutConfiguration.CurrentLayoutName = "Debug";
yield return DispatcherPriority.SystemIdle;
LayoutConfiguration.CurrentLayoutName = "Default";
yield return DispatcherPriority.SystemIdle;
}
}
} }
} }
Loading…
Cancel
Save