Example #1
0
        private void setingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetSettings(true);

            Settings setCheck = new Settings();

            setCheck.Load();
            InternalProfilesManager.RemoveProfilesFile();
            foreach (var item in profiles)
            {
                item.ClearProfiles();
                item.LoadProfiles();
                if (item.GetMode().Contains(setCheck.mode))
                {
                    item.AddInternalProfiles();
                }
            }
        }
Example #2
0
        public AdvancedVersion(Form parent = null)
        {
            InitializeComponent();
            this.parent = parent;
            InternalProfilesManager.RemoveProfilesFile();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();

            System.OperatingSystem osinfo = System.Environment.OSVersion;
            DebugClass.WriteMessage("system: " + osinfo.VersionString + " " + Environment.Is64BitOperatingSystem);
            profiles = InternalProfilesManager.InitProfiles();

            manager.beginJob  = AddItemToList;
            manager.updateJob = UpdateListBox;
            manager.message   = ErrorMessage;


            TimeInterval.InitTimer(UpdateProgress);

/*            this.toolsToolStripMenuItem.DropDownItems.Remove(this.best5ToolStripMenuItem);
 *          this.toolsToolStripMenuItem.DropDownItems.Remove(this.compareBest5ToolStripMenuItem);
 *          this.toolsToolStripMenuItem.DropDownItems.Remove(this.best5RmsdCenterToolStripMenuItem);*/


            /*string[] dirs = Directory.GetDirectories("Y:\\casp10","T065*");
             * foreach (var item in dirs)
             * {
             *  string[] Files = Directory.GetFiles(item);
             *  List<string> ddd = new List<string>(Files);
             *
             *
             *  Rmsd rmsd = new Rmsd(ddd, "", false, PDB.PDBMODE.ONLY_CA);
             *  List <string> kk =new List<string>();
             *  foreach(var nn in Files)
             *  {
             *      string[] aux = nn.Split(Path.DirectorySeparatorChar);
             *      kk.Add(aux[aux.Length - 1]);
             *  }
             *  string []aa=item.Split(Path.DirectorySeparatorChar);
             *  rmsd.DistStat(kk,aa[aa.Length-1]);
             * }*/
            /* List <string> ddd=new List<string>();
             * ddd.Add("y:\\TASSER_decoys\\1af7.pdb");
             * ddd.Add("y:\\TASSER_decoys\\1af7\\d1216.pdb");
             * DistanceMeasure maxsub = new MaxSub(ddd, "", false);
             *
             * double cc = maxsub.GetDistance("1af7.pdb","d1216.pdb");*/

            try
            {
                manager.opt.ReadDefaultFile();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message);
            }

            Settings setCheck = new Settings();

            try
            {
                setCheck.Load();
                if (!Directory.Exists(setCheck.profilesDir))
                {
                    MessageBox.Show("Directory for generated profiles:" + setCheck.profilesDir + " cannot be found\n You must provide correct directory!");
                    SetSettings(false);
                }
            }
            catch
            {
                MessageBox.Show("First you have to set options!");
                SetSettings(false);
            }
            foreach (var item in Enum.GetValues(typeof(INPUTMODE)))
            {
                comboBox1.Items.Add(item);
            }
            comboBox1.SelectedItem = setCheck.mode;

            foreach (var item in manager.opt.dataDir)
            {
                listBox1.Items.Add((string)item);
            }

            foreach (var item in manager.opt.dcdFiles)
            {
                listBox1.Items.Add(item);
            }

            foreach (var item in manager.opt.profileFiles)
            {
                listBox1.Items.Add(item + " profiles");
            }

            if (manager.opt.profileFiles.Count > 0)
            {
                radioButton1.Enabled = false;
                radioButton2.Enabled = false;
                radioButton3.Enabled = false;
                radioButton4.Checked = true;
            }

            SetDataDirOptions();
        }
Example #3
0
 public StartForm()
 {
     InitializeComponent();
     InternalProfilesManager.RemoveProfilesFile();
     List <InternalProfileBase> profiles = InternalProfilesManager.InitProfiles();
 }