~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to samples/CodonCreation/ReadTestCodonCommand.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
// SharpDevelop samples
 
2
// Copyright (c) 2006, AlphaSierraPapa
 
3
// All rights reserved.
 
4
//
 
5
// Redistribution and use in source and binary forms, with or without modification, are
 
6
// permitted provided that the following conditions are met:
 
7
//
 
8
// - Redistributions of source code must retain the above copyright notice, this list
 
9
//   of conditions and the following disclaimer.
 
10
//
 
11
// - Redistributions in binary form must reproduce the above copyright notice, this list
 
12
//   of conditions and the following disclaimer in the documentation and/or other materials
 
13
//   provided with the distribution.
 
14
//
 
15
// - Neither the name of the SharpDevelop team nor the names of its contributors may be used to
 
16
//   endorse or promote products derived from this software without specific prior written
 
17
//   permission.
 
18
//
 
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
 
20
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 
21
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 
22
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
23
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
24
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 
25
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 
26
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
27
 
 
28
using ICSharpCode.Core;
 
29
using System;
 
30
using System.Collections.Generic;
 
31
using System.Drawing;
 
32
using System.Text;
 
33
using System.Windows.Forms;
 
34
 
 
35
namespace CodonCreation
 
36
{
 
37
        public class ReadTestCodonCommand : AbstractMenuCommand
 
38
        {
 
39
                public override void Run()
 
40
                {
 
41
                        List<TestCodon> testCodons = AddInTree.BuildItems<TestCodon>("/Samples/CodonCreation", this);
 
42
                        
 
43
                        StringBuilder message = new StringBuilder();
 
44
                        foreach (TestCodon codon in testCodons) {
 
45
                                message.AppendFormat("{0} ", codon.Text);
 
46
                        }
 
47
                        MessageBox.Show(message.ToString(), "TestCodon");
 
48
                }
 
49
        }
 
50
}
 
51