private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (lvFormats.SelectedItem == null) { SetHint("请选择一种文件类型!"); return; } SelectedFormat = (FormattedHeader)lvFormats.SelectedItem; this.Close(); }
public PlateInfo(string plateName, FormattedHeader selectedFormat, Dictionary <CellPosition, string> predefinedBarcodes, bool wholePlate = false) { name = plateName; string merged = wholePlate ? "\t\tmerged" : ""; FileFormat = selectedFormat; PlateDescription = plateName + PlateLayoutDefFile.plateDef + merged; this.wholePlate = wholePlate; int wellCount = wholePlate ? 96 : 48; if (predefinedBarcodes == null) { predefinedBarcodes = new Dictionary <CellPosition, string>(); } PredefinedBarcodes = predefinedBarcodes; checkDocPath = ""; InitDefinitions(wellCount); }
private void SplitPlate() { SetHint(""); if (lstboxPlates.SelectedItem == null) { SetHint("请先选中一块板子!"); return; } Utility.SaveDataGridView(dataGridView, curPlateInfo); var srcPlate = (PlateInfo)lstboxPlates.SelectedItem; FormattedHeader formattedHeader = srcPlate.FileFormat; PlateInfo firstHalf = new PlateInfo(srcPlate.Name + "_1", formattedHeader, null, false); PlateInfo secondHalf = new PlateInfo(srcPlate.Name + "_2", formattedHeader, null, false); firstHalf.SplitFrom(srcPlate, true); secondHalf.SplitFrom(srcPlate, false); plates.Add(firstHalf); plates.Add(secondHalf); SetHint("切分完成", false); }
private void btnOk_Click(object sender, RoutedEventArgs e) { if (firstPlate == null || secondPlate == null) { SetHint("请选中两块板子做Merge!"); return; } if (firstPlate.SampleDescription != secondPlate.SampleDescription) { SetHint("两块板的Assay类型不一样,您可以通过颜色区分。"); return; } bool containsValSecondHalf = SecondHalfContainsValue(firstPlate); if (containsValSecondHalf) { SetHint("第一块板整版都设置过条码,不能Merge!"); return; } containsValSecondHalf = SecondHalfContainsValue(secondPlate); if (containsValSecondHalf) { SetHint("第二块板整版都设置过条码,不能Merge!"); return; } FormattedHeader formattedHeader = new FormattedHeader(firstPlate.SampleDescription); MergedPlate = new PlateInfo(firstPlate.Name + "_" + secondPlate.Name, formattedHeader, null, true); MergedPlate.MergeFrom(firstPlate, true); MergedPlate.MergeFrom(secondPlate, false); this.DialogResult = true; this.Close(); }