Ejemplo n.º 1
0
 public static void SelectHeuristic(IList<string> colNames, MultiListSelectorControl mls)
 {
     char guessedType = GuessSilacType(colNames);
     for (int i = 0; i < colNames.Count; i++){
         if (StringUtils.categoricalColDefaultNames.Contains(colNames[i].ToLower())){
             mls.SetSelected(2, i, true);
             continue;
         }
         if (StringUtils.textualColDefaultNames.Contains(colNames[i].ToLower())){
             mls.SetSelected(3, i, true);
             continue;
         }
         if (StringUtils.numericColDefaultNames.Contains(colNames[i].ToLower())){
             mls.SetSelected(1, i, true);
             continue;
         }
         if (StringUtils.multiNumericColDefaultNames.Contains(colNames[i].ToLower())){
             mls.SetSelected(4, i, true);
             continue;
         }
         switch (guessedType){
             case 's':
                 if (colNames[i].StartsWith("Norm. Intensity")){
                     mls.SetSelected(0, i, true);
                 }
                 break;
             case 'd':
                 if (colNames[i].StartsWith("Ratio H/L Normalized ")){
                     mls.SetSelected(0, i, true);
                 }
                 break;
         }
     }
 }
 public override object CreateControl()
 {
     control = new MultiListSelectorControl();
     control.Init(Values, Bins);
     control.SelectedIndices = Value;
     return control;
 }
Ejemplo n.º 3
0
 private void Deselect_OnClick(object sender, EventArgs e)
 {
     parameters.Clear();
     object[] os = new object[listBox1.SelectedItems.Count];
     listBox1.SelectedItems.CopyTo(os, 0);
     foreach (object o in os)
     {
         listBox1.Items.Remove(o);
     }
     foreach (object o in os)
     {
         MultiListSelectorControl.AllListBox.Items.Add(o);
     }
     MultiListSelectorControl.SelectionHasChanged(this, e);
 }
Ejemplo n.º 4
0
        public static void SelectHeuristic(IList <string> colNames, MultiListSelectorControl mls)
        {
            char guessedType = GuessSilacType(colNames);

            for (int i = 0; i < colNames.Count; i++)
            {
                if (StringUtils.categoricalColDefaultNames.Contains(colNames[i].ToLower()))
                {
                    mls.SetSelected(2, i, true);
                    continue;
                }
                if (StringUtils.textualColDefaultNames.Contains(colNames[i].ToLower()))
                {
                    mls.SetSelected(3, i, true);
                    continue;
                }
                if (StringUtils.numericColDefaultNames.Contains(colNames[i].ToLower()))
                {
                    mls.SetSelected(1, i, true);
                    continue;
                }
                if (StringUtils.multiNumericColDefaultNames.Contains(colNames[i].ToLower()))
                {
                    mls.SetSelected(4, i, true);
                    continue;
                }
                switch (guessedType)
                {
                case 's':
                    if (colNames[i].StartsWith("Norm. Intensity"))
                    {
                        mls.SetSelected(0, i, true);
                    }
                    break;

                case 'd':
                    if (colNames[i].StartsWith("Ratio H/L Normalized "))
                    {
                        mls.SetSelected(0, i, true);
                    }
                    break;
                }
            }
        }
Ejemplo n.º 5
0
 public static void SelectExact(ICollection<string> colNames, IList<string> colTypes, MultiListSelectorControl mls)
 {
     for (int i = 0; i < colNames.Count; i++){
         switch (colTypes[i]){
             case "E":
                 mls.SetSelected(0, i, true);
                 break;
             case "N":
                 mls.SetSelected(1, i, true);
                 break;
             case "C":
                 mls.SetSelected(2, i, true);
                 break;
             case "T":
                 mls.SetSelected(3, i, true);
                 break;
             case "M":
                 mls.SetSelected(4, i, true);
                 break;
         }
     }
 }
Ejemplo n.º 6
0
        public static void SelectExact(ICollection <string> colNames, IList <string> colTypes, MultiListSelectorControl mls)
        {
            for (int i = 0; i < colNames.Count; i++)
            {
                switch (colTypes[i])
                {
                case "E":
                    mls.SetSelected(0, i, true);
                    break;

                case "N":
                    mls.SetSelected(1, i, true);
                    break;

                case "C":
                    mls.SetSelected(2, i, true);
                    break;

                case "T":
                    mls.SetSelected(3, i, true);
                    break;

                case "M":
                    mls.SetSelected(4, i, true);
                    break;
                }
            }
        }