~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Tools/StressTest/StressTest/StressTestMenuCommand.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// <file>
 
2
//     <copyright see="prj:///doc/copyright.txt"/>
 
3
//     <license see="prj:///doc/license.txt"/>
 
4
//     <owner name="Daniel Grunwald"/>
 
5
//     <version>$Revision$</version>
 
6
// </file>
 
7
 
 
8
using System;
 
9
using System.Linq;
 
10
using ICSharpCode.Core;
 
11
using ICSharpCode.SharpDevelop.Gui;
 
12
 
 
13
namespace StressTest
 
14
{
 
15
        public sealed class StressTestMenuCommand : AbstractMenuCommand
 
16
        {
 
17
                public override void Run()
 
18
                {
 
19
                        StressTestViewContent vc = WorkbenchSingleton.Workbench.ViewContentCollection.OfType<StressTestViewContent>().FirstOrDefault();
 
20
                        if (vc != null)
 
21
                                vc.WorkbenchWindow.SelectWindow();
 
22
                        else
 
23
                                WorkbenchSingleton.Workbench.ShowView(new StressTestViewContent());
 
24
                }
 
25
        }
 
26
        
 
27
        sealed class StressTestViewContent : AbstractViewContent
 
28
        {
 
29
                UserControl ctl = new UserControl();
 
30
                
 
31
                public override object Control {
 
32
                        get { return ctl; }
 
33
                }
 
34
                
 
35
                public StressTestViewContent()
 
36
                {
 
37
                        this.TitleName = "Stress Test";
 
38
                }
 
39
        }
 
40
}