public RpartSimple(Form parent, Settings set, ResultWindow results, string fileName = null) { InitializeComponent(); this.parent = parent; dialog = folderBrowserDialog1; if (set.mode == INPUTMODE.USER_DEFINED) { dialog = openFileDialog1; label1.Text = "Choose user defined file with profiles"; } this.Location = parent.Location; this.set = set; if (fileName != null) { opt.ReadOptionFile(fileName); SetProfileOptions(); } this.results = results; if (opt.hash.profileName != null) { tree.LoadProfiles(opt.hash.profileName); label9.Text = tree.GetStringActiveProfiles(); } }
void SetProfileOptions() { if (set.mode == INPUTMODE.USER_DEFINED) { if (opt.profileFiles.Count > 0) { textBox1.Text = opt.profileFiles[0]; } } else if (opt.dataDir.Count > 0) { textBox1.Text = opt.dataDir[0]; } opt.clusterAlgorithm.Clear(); opt.clusterAlgorithm.Add(ClusterAlgorithm.uQlustTree); label3.Text = opt.hash.profileName; relevantC.Value = opt.hash.relClusters; distanceControl1.distDef = opt.hierarchical.distance; distanceControl1.profileName = opt.hierarchical.hammingProfile; if (opt.hash.combine) { radioButton1.Checked = true; } else { Hash.Checked = true; } switch (set.mode) { case INPUTMODE.USER_DEFINED: distanceControl1.HideRmsdLike = true; distanceControl1.distDef = DistanceMeasures.COSINE; break; case INPUTMODE.PROTEIN: case INPUTMODE.RNA: distanceControl1.HideCosine = true; break; } if (opt.hash.profileName != null) { tree.LoadProfiles(opt.hash.profileName); label9.Text = tree.GetStringActiveProfiles(); } }