Esempio n. 1
0
        public Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
        {
            application = commandData.Application.Application;
            doc         = commandData.Application.ActiveUIDocument.Document;
            StoreOriginalVisibility(doc.ActiveView);

            CommandForm commandForm = new CommandForm();

            if (DialogResult.OK == commandForm.ShowDialog())
            {
                analysisCat = commandForm.SelectedAnalysisCategory;
                commandForm.Close();

                mainForm = new MainForm(doc, analysisCat);
                if (mainForm.FoundStyles)
                {
                    if (DialogResult.OK == mainForm.ShowDialog())
                    {
                        DisplayManinForm();
                    }
                }
            }
            return(Result.Succeeded);
        }
Esempio n. 2
0
 private bool ValidCategory(AnalysisCategory category)
 {
     return(category == AnalysisCategory.Webpage || category == AnalysisCategory.Text);
 }
        /// <summary>
        /// Get Analysis list data
        /// </summary>
        /// <param name="category">Analysis category</param>
        private void GetAnalysisListData(AnalysisCategory category)
        {
            //if (AnalysisDatas != null)
            //    return;

            ViewModelApplication.CurrentCategory = category;

            IsDataExpanded = true;

            IsExecutionExpanded = true;

            if (category == AnalysisCategory.PlainStrengthAnalysis)
            {
                AnalysisDatas = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Plain Analysis 01",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Plain Analysis 02",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Plain Analysis 03",
                        CanExpand = false
                    },
                };

                AnalysisExecutions = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Parameter",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Result",
                        CanExpand = false
                    },
                };
            }
            else if (category == AnalysisCategory.CompositeRadiusAnalysis)
            {
                AnalysisDatas = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Radius Analysis 01",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Radius Analysis 02",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Radius Analysis 03",
                        CanExpand = false
                    },
                };

                AnalysisExecutions = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Parameter",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Result",
                        CanExpand = false
                    },
                };
            }
            else if (category == AnalysisCategory.SandwichPanelAnalysis)
            {
                AnalysisDatas = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Sandwich Analysis 01",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Sandwich Analysis 02",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Sandwich Analysis 03",
                        CanExpand = false
                    },
                };

                AnalysisExecutions = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Parameter",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Result",
                        CanExpand = false
                    },
                };
            }
            else if (category == AnalysisCategory.JointAnalysis)
            {
                AnalysisDatas = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Joint Analysis 01",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Joint Analysis 02",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Joint Analysis 03",
                        CanExpand = false
                    },
                };

                AnalysisExecutions = new List <AnalysisListCategoryViewModel>
                {
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Parameter",
                        CanExpand = false
                    },
                    new AnalysisListCategoryViewModel
                    {
                        Name      = "Analysis Result",
                        CanExpand = false
                    },
                };
            }
        }
        /// <summary>
        /// Get Analysis list data
        /// </summary>
        /// <param name="category">Analysis category</param>
        private void GetLibraryListData(AnalysisCategory category)
        {
            //if (AnalysisDatas != null)
            //    return;

            //if (category == AnalysisCategory.Materials)
            //{
            //    AnalysisDatas = new List<AnalysisListCategoryViewModel>
            //    {
            //        new AnalysisListCategoryViewModel
            //        {
            //            Name = "Ply material",
            //            AnalysisList = new ObservableCollection<AnalysisListCategoryItemViewModel>
            //            {
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Ply material 01",
            //                    Content = AnalysisContent.Material
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Ply material 02",
            //                    Content = AnalysisContent.Material
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Ply material 03",
            //                    Content = AnalysisContent.Material
            //                }
            //            },
            //            CanExpand = true
            //        },
            //        new AnalysisListCategoryViewModel
            //        {
            //            Name = "Core material",
            //            AnalysisList = new ObservableCollection<AnalysisListCategoryItemViewModel>
            //            {
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Core material 01",
            //                    Content = AnalysisContent.Material
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Core material 02",
            //                    Content = AnalysisContent.Material
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Core material 03",
            //                    Content = AnalysisContent.Material
            //                }
            //            },
            //            CanExpand = true
            //        }
            //    };
            //}
            //else if (category == AnalysisCategory.Laminate)
            //{
            //    AnalysisDatas = new List<AnalysisListCategoryViewModel>
            //    {
            //        new AnalysisListCategoryViewModel
            //        {
            //            Name = "Laminate Data",
            //            AnalysisList = new ObservableCollection<AnalysisListCategoryItemViewModel>
            //            {
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Laminate 01",
            //                    Content = AnalysisContent.Laminate
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Laminate 02",
            //                    Content = AnalysisContent.Laminate
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Laminate 03",
            //                    Content = AnalysisContent.Laminate
            //                }
            //            },
            //            CanExpand = true
            //        },
            //    };
            //}
            //else if (category == AnalysisCategory.Fastener)
            //{
            //    AnalysisDatas = new List<AnalysisListCategoryViewModel>
            //    {
            //        new AnalysisListCategoryViewModel
            //        {
            //            Name = "Fastener Data",
            //            AnalysisList = new ObservableCollection<AnalysisListCategoryItemViewModel>
            //            {
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Fastener 01",
            //                    Content = AnalysisContent.Fastener
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Fastener 02",
            //                    Content = AnalysisContent.Fastener
            //                },
            //                new AnalysisListCategoryItemViewModel
            //                {
            //                    Name = "Fastener 03",
            //                    Content = AnalysisContent.Fastener
            //                }
            //            },
            //            CanExpand = true
            //        }
            //    };
            //}
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisDrilldownOption"/> class.
 /// </summary>
 /// <param name="analysis">Analysis</param>
 /// <param name="category">Category</param>
 public AnalysisDrilldownOption(Analysis analysis, AnalysisCategory category)
     : base(analysis)
 {
     this.Category = category;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisDrillupOption"/> class.
 /// </summary>
 /// <param name="analysis">Analysis</param>
 /// <param name="removeCategory">Remove category</param>
 /// <param name="isBack">Is back</param>
 public AnalysisDrillupOption(Analysis analysis, AnalysisCategory removeCategory, bool isBack)
     : base(analysis)
 {
     this.IsBack         = isBack;
     this.RemoveCategory = removeCategory;
 }
Esempio n. 7
0
 public IAnalyzerService GetService(AnalysisCategory category)
 {
     return(_services.First(x => x.GetCategory() == category));
 }
Esempio n. 8
0
 private void bttnCustom_Click(object sender, EventArgs e)
 {
     analysisCategory  = AnalysisCategory.Custom;
     this.DialogResult = DialogResult.OK;
 }
Esempio n. 9
0
 private void bttnInterior_Click(object sender, EventArgs e)
 {
     analysisCategory  = AnalysisCategory.InteriorDesign;
     this.DialogResult = DialogResult.OK;
 }
Esempio n. 10
0
 private void bttnArchitecture_Click(object sender, EventArgs e)
 {
     analysisCategory  = AnalysisCategory.Architecture;
     this.DialogResult = DialogResult.OK;
 }
Esempio n. 11
0
 private void bttnUrban_Click(object sender, EventArgs e)
 {
     analysisCategory  = AnalysisCategory.UrbanPlanning;
     this.DialogResult = DialogResult.OK;
 }