コード例 #1
0
 /// <summary>
 /// Displays Rhino's check list box.
 /// </summary>
 /// <param name="title">The dialog title.</param>
 /// <param name="message">The dialog message.</param>
 /// <param name="items">A list of items to show.</param>
 /// <param name="checkState">A list of true/false boolean values.</param>
 /// <returns>An array or boolean values determining if the user checked the corresponding box. On error, null.</returns>
 public static bool[] ShowCheckListBox(string title, string message, System.Collections.IList items, System.Collections.Generic.IList <bool> checkState)
 {
     bool[] rc = null;
     if (items != null && items.Count > 0 && checkState != null && checkState.Count == items.Count)
     {
         ListBoxForm dlg = new ListBoxForm(title, message, items, checkState);
         if (dlg.ShowDialog(RhinoApp.MainWindow()) == System.Windows.Forms.DialogResult.OK)
         {
             rc = dlg.GetCheckedItemStates();
         }
     }
     return(rc);
 }
コード例 #2
0
ファイル: Dialogs.cs プロジェクト: jackieyin2015/rhinocommon
 /// <summary>
 /// Displays Rhino's check list box.
 /// </summary>
 /// <param name="title">The dialog title.</param>
 /// <param name="message">The dialog message.</param>
 /// <param name="items">A list of items to show.</param>
 /// <param name="checkState">A list of true/false boolean values.</param>
 /// <returns>An array or boolean values determining if the user checked the corresponding box. On error, null.</returns>
 public static bool[] ShowCheckListBox(string title, string message, System.Collections.IList items, IList<bool> checkState)
 {
   bool[] rc = null;
   if (items != null && items.Count > 0 && checkState != null && checkState.Count == items.Count)
   {
     ListBoxForm dlg = new ListBoxForm(title, message, items, checkState);
     if (dlg.ShowDialog(RhinoApp.MainWindow()) == System.Windows.Forms.DialogResult.OK)
       rc = dlg.GetCheckedItemStates();
   }
   return rc;
 }