public DatabaseParam(Database[] databases) : base(null) { _count = databases.Length; Value = databases; Default = databases; }
public DatabasePanel(Database[] value) { _count = value.Length; InitializeComponent(); Value = value; }
public override void Clear() { Value = new Database[_count]; }
private static void ParseDatabase(StreamWriter writer, Database db, string status, int progress, ProcessInfo processInfo) { if (db.File == null || !File.Exists(db.File)){ return; } StreamReader reader = new StreamReader(db.File); string line; Regex regex = new Regex(db.SearchExpression); while ((line = reader.ReadLine()) != null){ if (line.StartsWith(">")){ string identifier = regex.Match(line).Groups[1].Value; object[] items = new object[]{ db.File, db.Source, db.Species, db.Taxid, db.Version, db.Prefix == null ? identifier : db.Prefix + identifier }; lock (writer){ writer.WriteLine(StringUtils.Concat("\t", items)); } } } reader.Close(); lock (processInfo){ processInfo.Progress(progress); processInfo.Status(status); } }