-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainForm.cs
143 lines (111 loc) · 3.97 KB
/
MainForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* Created by SharpDevelop.
* User: Paulo C. C. & Valmir C. B.
* Date: 12/23/2006
* Time: 12:04 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace msmsCluster
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm
{
[STAThread]
public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
InitializeComponent();
InitializeFormVariables();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
private void dTA2MS2ToolStripMenuItem1_Click(object sender, EventArgs e)
{
FormDTA2MS2 form = new FormDTA2MS2();
form.ShowDialog();
}
private void buttonStartStep3_Click(object sender, EventArgs e)
{
this.toolStripStatusLabel2.Text = "Working...(Feature Selection)";
this.mainFormToWorkingMode(true);
featureSelection fs = new featureSelection(this.textBoxBrowseSparseMatrix.Text);
if (this.comboBoxFeatureSelection.Text.Equals("T-Test"))
{
fs.tTest();
}
else
{
MessageBox.Show("Please enter a valid feature selection method.", "Error");
}
this.toolStripStatusLabel2.Text = "Working...(Parsing results)";
resultAnalyzer rAnalyzer = new resultAnalyzer(fs.FRanking);
this.richTextBoxResults.Text = rAnalyzer.rankList();
this.dataGridViewResults.DataSource = rAnalyzer.rankTable();
this.dataGridViewResults.Update();
this.toolStripStatusLabel2.Text = "Done!";
this.mainFormToWorkingMode(false);
}
private void buttonLoadIndex_Click(object sender, EventArgs e)
{
this.openFileDialog1.ShowDialog();
this.textBoxBrowseIndex.Text = this.openFileDialog1.FileName;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void buttonBrowseSparseMatrix_Click(object sender, EventArgs e)
{
this.openFileDialog1.ShowDialog();
this.textBoxBrowseSparseMatrix.Text = this.openFileDialog1.FileName;
}
private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
{
this.Close();
}
//-------------------
private void mainFormToWorkingMode(bool mode)
{
if (mode) //The program is working so we should lock up all possible controls
{
this.buttonStartStep3.Enabled = false;
this.buttonContinueStep3.Enabled = false;
this.buttonSaveLog.Enabled = false;
this.buttonApplyStep2.Enabled = false;
this.buttonBrowseIndex.Enabled = false;
this.buttonBrowseSparseMatrix.Enabled = false;
this.buttonStopStep3.Enabled = true;
}
else //Lets free up the controls
{
this.buttonStartStep3.Enabled = true;
this.buttonContinueStep3.Enabled = true;
this.buttonSaveLog.Enabled = true;
this.buttonApplyStep2.Enabled = true;
this.buttonBrowseIndex.Enabled = true;
this.buttonBrowseSparseMatrix.Enabled = true;
this.buttonStopStep3.Enabled = false;
}
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}