コード例 #1
0
 protected void PCs_TextChanged(object sender, EventArgs e)
 {
     if (int.Parse(PCs.Text) > FeatureList.GetSelectedIndices().Count())
     {
         Warning.Text = "Cannot extract more principal components than selected features";
     }
     else
     {
         Warning.Text = "";
     }
 }
コード例 #2
0
        protected void Next_Click(object sender, EventArgs e)
        {
            if (int.Parse(PCs.Text) > FeatureList.GetSelectedIndices().Count() || PCs.Text.Equals("") || int.Parse(PCs.Text) < 1)
            {
                return;
            }
            Analysis        analysis = (Analysis)Session["analysis"];
            ParameterStream stream   = ParameterStream.getStream(Session);

            String[] features = new String[FeatureList.GetSelectedIndices().Count()];
            for (int i = 0; i < FeatureList.GetSelectedIndices().Count(); i++)
            {
                features[i] = FeatureList.Items[FeatureList.GetSelectedIndices()[i]].Text;
            }
            stream.set("selectedFeatures", features);
            stream.set("numberOfPCs", int.Parse(PCs.Text));

            analysis.next(Response, Session);
        }