/// <summary> /// This method would create combo field for the Blast parameter dialog, /// It will use the fieldname (which is the parameter name) /// and stackpanel to be added. The values for the combo box are /// pulled from the metadata obtained from BioHPC web service interface. /// </summary> /// <param name="fieldName">field name</param> /// <param name="parentPanel">Stack panel, the field will be added to this stackpanel</param> private void CreateComboFromBioHPC(string fieldName, StackPanel parentPanel) { TextBlock block = new TextBlock(); block.Margin = new Thickness(0, 5, 5, 0); block.TextWrapping = TextWrapping.Wrap; block.Text = fieldName; parentPanel.Children.Add(block); ComboBox combo = new ComboBox(); combo.HorizontalAlignment = HorizontalAlignment.Left; combo.IsSynchronizedWithCurrentItem = true; combo.Margin = new Thickness(0, 5, 5, 0); combo.Tag = fieldName; combo.Width = 100; BioHPCBlastHandler mysvc = new BioHPCBlastHandler(); combo.ItemsSource = mysvc.GetServiceMetadata(fieldName); switch (fieldName) { case FILTER: combo.SelectedIndex = 0; break; case MATRIXNAME: combo.SelectedIndex = 3; break; default: combo.SelectedIndex = 0; break; } parentPanel.Children.Add(combo); }
public void ValidateGetServiceMetadata() { BioHPCBlastHandler service = null; try { service = new BioHPCBlastHandler(); service.Configuration = new ConfigParameters(); service.Configuration.EmailAddress = Constants.EmailForWS; service.Configuration.Password = ""; string kind = BioHPCBlastHandler.MetadataFilter; IList <string> info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataDatabasesDna; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataDatabasesProt; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataFormats; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataMatrices; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataPrograms; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); } finally { if (service != null) { ((IDisposable)service).Dispose(); } } }
public void ValidateGetServiceMetadata() { BioHPCBlastHandler service = null; try { service = new BioHPCBlastHandler(); service.Configuration = new ConfigParameters(); service.Configuration.EmailAddress = Constants.EmailForWS; service.Configuration.Password = ""; string kind = BioHPCBlastHandler.MetadataFilter; IList<string> info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataDatabasesDna; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataDatabasesProt; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataFormats; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataMatrices; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); kind = BioHPCBlastHandler.MetadataPrograms; info = service.GetServiceMetadata(kind); Assert.IsNotNull(info); } finally { if (service != null) ((IDisposable)service).Dispose(); } }