Example #1
0
        private DesignOptionsRequestData CreateRequestData()
        {
            DesignOptionsRequestData requestData = new DesignOptionsRequestData();

            requestData.viewsAmount    = decimal.ToInt32(this.numericUpDownViewNum.Value);
            requestData.scaleName      = this.comboBoxScales.SelectedItem.ToString();
            requestData.titleBlockName = this.comboBoxTitleBlocks.SelectedItem.ToString();

            for (int r = 0; r < this.dataGridViewDesignOptions.Rows.Count; r++)
            {
                DataGridViewRow curRow         = this.dataGridViewDesignOptions.Rows[r];
                string          curSetName     = curRow.Cells[0].Value.ToString();
                string          curOptionName  = curRow.Cells[1].Value.ToString();
                string          curViewName    = curRow.Cells[2].Value.ToString();
                string          curLevelName   = curRow.Cells[3].Value.ToString();
                string          curSheetNumber = curRow.Cells[4].Value.ToString();
                string          curSheetName   = curRow.Cells[5].Value.ToString();

                requestData.optionsInfos.Add(new Tuple <string, string, string, string, string, string>(curSetName, curOptionName, curViewName, curLevelName, curSheetNumber, curSheetName));
            }

            return(requestData);
        }
Example #2
0
        private void buttonCreateDesignOptions_Click(object sender, EventArgs e)
        {
            if (validateDesignOptionsData())
            {
                try
                {
                    DesignOptionsRequestData requestData = CreateRequestData();

                    if (requestData != null)
                    {
                        DesignOptionsRequestHandler handler = new DesignOptionsRequestHandler(requestData);
                        ExternalEvent exEvent = ExternalEvent.Create(handler);
                        exEvent.Raise();

                        this.Close();
                        this.Dispose();
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }
 public DesignOptionsRequestHandler(DesignOptionsRequestData requestData)
 {
     this.requestData = requestData;
     this.myRequest   = new KbBimstoreRequest();
 }