Exemplo n.º 1
0
 // Token: 0x06000019 RID: 25 RVA: 0x00004610 File Offset: 0x00002810
 public void FillTextBox(HeXML_Details HeXML_Details, string Title)
 {
     this.Clear();
     this._HeXML_Details = HeXML_Details;
     if (this._HeXML_Details != null)
     {
         List <string> list = this._HeXML_Details.Get_Protocol(Title);
         if (list.Count != 0)
         {
             this.textBox.Lines = list.ToArray();
         }
         this.textBox.Select(0, 0);
     }
 }
 // Token: 0x0600002A RID: 42 RVA: 0x00004F1C File Offset: 0x0000311C
 private void TSB_ImportHeXML_Click(object sender, EventArgs e)
 {
     this.toolStrip.Enabled = false;
     this.uc_HeXML_DetailTreeview.Enabled = false;
     if (this._List_Object.Count != 0)
     {
         RevitDocument revitDocument          = new RevitDocument();
         List <string> listExisting_UniqueIDs = revitDocument.Get_FamilyParameterValue(revitDocument.MeasurementFamilyPointTypName, HeXML_Point_Strings.FamilyParameterName_UniqueID, this._commandData.Application.ActiveUIDocument.Document);
         HeXML_Details heXML_Details;
         if (this._UnitConverter == RevitDocument.UnitConverter.FeetToMeter)
         {
             heXML_Details = new HeXML_Details(HeXML_Details.UnitConverter.FeetToMeter);
         }
         else if (this._UnitConverter == RevitDocument.UnitConverter.MeterToFeet)
         {
             heXML_Details = new HeXML_Details(HeXML_Details.UnitConverter.MeterToFeet);
         }
         else
         {
             heXML_Details = new HeXML_Details(HeXML_Details.UnitConverter.None);
         }
         heXML_Details.Detect_Details(this._List_Object, listExisting_UniqueIDs);
         heXML_Details.Get_HeXMLPoints();
         listExisting_UniqueIDs = revitDocument.Get_FamilyParameterValue(revitDocument.MeasurementFamilyPointTypName, HeXML_Point_Strings.FamilyParameterName_UniqueID, this._commandData.Application.ActiveUIDocument.Document);
         HeXML_Details heXML_Details2 = null;
         if (this._UnitConverterIntern == RevitDocument.UnitConverter.FeetToMeter)
         {
             heXML_Details2 = new HeXML_Details(HeXML_Details.UnitConverter.FeetToMeter);
         }
         if (this._UnitConverterIntern == RevitDocument.UnitConverter.MeterToFeet)
         {
             heXML_Details2 = new HeXML_Details(HeXML_Details.UnitConverter.MeterToFeet);
         }
         if (this._UnitConverterIntern == RevitDocument.UnitConverter.None)
         {
             heXML_Details2 = new HeXML_Details(HeXML_Details.UnitConverter.None);
         }
         heXML_Details2.Detect_Details(this._List_Object, listExisting_UniqueIDs);
         List <HeXML_Point> heXMLPoints = heXML_Details2.Get_HeXMLPoints();
         if (heXMLPoints.Count != 0 || heXML_Details.List_HeXML_Point_Index_Fail.Count != 0)
         {
             revitDocument.ToolStripProgressBar = this.toolStripProgressBar;
             revitDocument.ToolStripStatusLabel = this.toolStripStatus;
             Path.GetDirectoryName(Assembly.GetAssembly(typeof(frm_HeXML_Import)).Location) + "\\" + revitDocument.MeasurementFamilyPointPath;
             this.toolStripStatus.Text = "Status: Loads the family";
             Application.DoEvents();
             Family family = null;
             if (family == null)
             {
                 family = revitDocument.Get_Family(revitDocument.MeasurementFamilyPointName, this._commandData.Application.ActiveUIDocument.Document);
             }
             this.toolStripProgressBar.Visible = true;
             revitDocument.Set_HeXMLPoints(family, heXMLPoints, this._commandData.Application.ActiveUIDocument.Document, this.HeXML_Import);
             this.toolStripProgressBar.Visible = false;
             this.toolStripStatus.Text         = "Status: The points were imported";
             frm_Report frm_Report = new frm_Report();
             frm_Report.FillTextBox(heXML_Details, "Protocol Import HeXML");
             frm_Report.ShowDialog();
             this.uc_HeXML_DetailTreeview.Clear();
             base.Close();
         }
     }
     this.Check_Controls();
     this.toolStrip.Enabled = true;
     this.uc_HeXML_DetailTreeview.Enabled = true;
 }