Пример #1
0
        public ValidationViewModel()
        {
            IsWorking         = false;
            SelectRequirement = new SelectFileCommand(RequirementFileInfo, this);
            SelectSubmission  = new SelectFileCommand(SubmissionFileInfo, this)
            {
                IncludeIfc = true
            };
            SelectReport = new SelectReportFileCommand(ReportFileInfo, this);


            ExportOnValidated = false;
            OpenOnExported    = false;

            Validate          = new ValidateCommand(this);
            ExportFacility    = new FacilitySaveCommand(this);
            ValidateAndSave   = new ValidateAndSaveCommand(this);
            SaveModelFacility = new SubmittedFacilitySaveCommand(this);
        }
        public VerificationViewModel()
        {
            IsWorking = false;

            // verification
            RequirementFileInfo = new SourceFile(this, "RequirementFileSource");
            SubmissionFileInfo  = new SourceFile(this, "SubmissionFileSource");
            ReportFileInfo      = new SourceFile(this, "ReportFileSource");

            // COBie compliance
            ComplianceSourceFileInfo = new SourceFile(this, "ComplianceSourceString");
            ComplianceReportFileInfo = new SourceFile(this, "ComplianceReportFile");
            ComplianceFixedFileInfo  = new SourceFile(this, "FixedCobie");

            // model conversion to cobie
            BimFileInfo          = new SourceFile(this, "BimFileSource");
            COBieToWriteFileInfo = new SourceFile(this, "COBieToWrite");

            // for verification
            SelectRequirement = new SelectInputFileCommand(RequirementFileInfo, this)
            {
                AllowCompressedSchemas = true
            };
            SelectModelSubmission = new SelectInputFileCommand(SubmissionFileInfo, this)
            {
                IncludeBIM = true
            };
            SelectReport = new SelectOutputFileCommand(ReportFileInfo, this);

            // for COBie Conversion
            SelectBimSubmission = new SelectInputFileCommand(BimFileInfo, this)
            {
                IncludeBIM = true, AllowCompressedSchemas = true, IncludeCobie = false
            };
            SelectCOBieToWrite = new SelectOutputFileCommand(COBieToWriteFileInfo, this)
            {
                COBieSchemas = false
            };
            SaveBimToCobie = new ConvertoCobieCommand(this);

            // compliance report
            SelectComplianceCobie = new SelectInputFileCommand(ComplianceSourceFileInfo, this)
            {
                IncludeCobieSchemas = false, AllowCompressedSchemas = false
            };
            SelectComplianceReport = new SelectOutputFileCommand(ComplianceReportFileInfo, this)
            {
                TextFormat = true, COBieSchemas = false, COBieSpreadSheet = false
            };
            SelectComplianceFixed = new SelectOutputFileCommand(ComplianceFixedFileInfo, this)
            {
                COBieSchemas = false
            };

            ComplianceReportCommand  = new RelayCommand(RunComplianceReport, CanRunComplianceReport);
            ComplianceImproveCommand = new RelayCommand(FixCobie, CanRunComplianceImprove);

            Verify         = new ValidateCommand(this);
            ExportFacility = new FacilitySaveCommand(this);
            VerifyAndSave  = new ValidateAndSaveCommand(this);
        }