namespace HStation.WinFrmUI
|
{
|
public partial class XhsProjectSimulationAnalysisCtrl : DevExpress.XtraEditors.XtraUserControl
|
{
|
public XhsProjectSimulationAnalysisCtrl()
|
{
|
InitializeComponent();
|
}
|
|
private List<XhsProjectSimulationAnalysisViewModel> _allBindingList;
|
|
public void SetBindingData(Model.RevitModel revitModel)
|
{
|
_allBindingList = new List<XhsProjectSimulationAnalysisViewModel>();
|
this.xhsProjectSimulationAnalysisViewModelBindingSource.DataSource = _allBindingList;
|
var allRevitParterList = revitModel.GetAllParters();
|
foreach (var revitParter in allRevitParterList)
|
{
|
if (revitParter.PropStatusList != null && revitParter.PropStatusList.Count > 0)
|
{
|
foreach (var revitParterPropStatus in revitParter.PropStatusList)
|
{
|
if (revitParterPropStatus.PropStatus == HStation.Revit.ePropStatus.Error)
|
{
|
// hasRevitPropError = true;
|
}
|
switch (revitParterPropStatus.PropStatus)
|
{
|
case Revit.ePropStatus.Error:
|
{
|
_allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParter.Name, Description = revitParterPropStatus.StatusInfo });
|
}
|
break;
|
|
case Revit.ePropStatus.Lack:
|
{
|
_allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo });
|
}
|
break;
|
|
case Revit.ePropStatus.Abnormal:
|
{
|
_allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo });
|
}
|
break;
|
|
default: break;
|
}
|
}
|
}
|
}
|
this.xhsProjectSimulationAnalysisViewModelBindingSource.ResetBindings(false);
|
}
|
}
|
}
|