コード例 #1
0
 /// <summary>
 /// "Edit Grouping" button pushed.
 /// </summary>
 private void button2_Click(object sender, EventArgs e)
 {
     if (Payload.AllParameterImpressions != null)
     {
         EditGroupingForm egf = new EditGroupingForm(
             Payload.AllParameterImpressions, Payload.Grouping);
         egf.ShowDialog();
         Payload.Grouping = egf.Grouping;
     }
     else
     {
         //Request Revit for parameter information
         AsyncGatherParameterData asGPD = new AsyncGatherParameterData(Payload);
         ThisApp.asyncCommand = asGPD;
         m_ExEvent.Raise();
         Payload.GetParameterDataOperationComplete += GetParameterDataOperationComplete;
         button2.Text = "Loading parameter data...";
     }
 }
コード例 #2
0
        /// <summary>
        /// Select button pushed.
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            Grouping grouping = mySettings.Default.GroupingSettings;

            if (grouping == null)
            {
                EditGroupingForm egf = new EditGroupingForm(Payload.AllParameterImpressions, null);
                egf.ShowDialog();
                Payload.Grouping = egf.Grouping;
            }

            Payload.CategoriesToSearch = checkedListBox2.CheckedItems.OfType <string>().ToList();
            if (!subscribedToSnSOperationComplete)
            {
                Payload.SnSOperationComplete    += UpdateTreeView;
                subscribedToSnSOperationComplete = true;
            }

            AsyncSelectByFilters asSBF = new AsyncSelectByFilters(Payload);

            ThisApp.asyncCommand = asSBF;
            m_ExEvent.Raise();
        }