Esempio n. 1
0
        public void OpenWideList(object parameter)
        {
            ViewModelApplication.CurrentCategory = Category;
            if (parameter == null)
            {
                ViewModelApplication.AnalysisWideMenuVisible = true;
                ViewModelApplication.LibraryWideMenuVisible  = true;
                return;
            }

            var analysisparameter = (AnalysisListCategoryItemViewModel)parameter;

            AnalysisViewModel analysisviewmodel = new AnalysisViewModel();

            //if (LibraryItem)
            //{
            //    analysisviewmodel.LibrarySpaceVisible = true;
            //    analysisviewmodel.AnalysisSubListVisible = false;
            //    ViewModelEquipmentManagement.OpenContentsList(analysisviewmodel);

            //    analysisviewmodel.TitleName = analysisparameter.Name;
            //    analysisviewmodel.CurrentContent = analysisparameter.Content;


            //    // Open library data

            //    ViewModelEquipmentManagement.OpenLibraryData(analysisviewmodel);
            //}
        }
        /// <summary>
        /// When the content list item is clicked, anlaysiswork page is update
        /// </summary>
        /// <param name="parameter">Analysis content</param>
        public void AnalysisContentClick(object parameter)
        {
            if (parameter == null)
            {
                return;
            }

            var analysisparameter = (AnalysisSubListItemViewModel)parameter;

            var analysisviewmodel = new AnalysisViewModel
            {
                TitleName = analysisparameter.AnalysisName,
                AnalysisSubListVisible = true,
                CurrentContent         = analysisparameter.Contents,
                Items = new List <AnalysisSubListItemViewModel>
                {
                    new AnalysisSubListItemViewModel
                    {
                        AnalysisName = analysisparameter.AnalysisName,
                        Name         = analysisparameter.AnalysisName,
                        Contents     = AnalysisContent.Unit,
                        IsSelected   = analysisparameter.Contents == AnalysisContent.Unit
                    },
                    new AnalysisSubListItemViewModel
                    {
                        AnalysisName = analysisparameter.AnalysisName,
                        Name         = "Geometry",
                        Contents     = AnalysisContent.Geometry,
                        IsSelected   = analysisparameter.Contents == AnalysisContent.Geometry
                    },
                    new AnalysisSubListItemViewModel
                    {
                        AnalysisName = analysisparameter.AnalysisName,
                        Name         = "Loads",
                        Contents     = AnalysisContent.Loads,
                        IsSelected   = analysisparameter.Contents == AnalysisContent.Loads
                    },
                    new AnalysisSubListItemViewModel
                    {
                        AnalysisName = analysisparameter.AnalysisName,
                        Name         = "Analysis",
                        Contents     = AnalysisContent.parameter,
                        IsSelected   = analysisparameter.Contents == AnalysisContent.parameter
                    },
                    new AnalysisSubListItemViewModel
                    {
                        AnalysisName = analysisparameter.AnalysisName,
                        Name         = "Result",
                        Contents     = AnalysisContent.Result,
                        IsSelected   = analysisparameter.Contents == AnalysisContent.Result
                    },
                },
            };

            // Get analysis content List and data
            ViewModelApplication.GoToPage(ApplicationPage.Analysis, analysisviewmodel);
        }
Esempio n. 3
0
        public void OpenAnalysisData(object parameter)
        {
            IsSelected = true;

            var analysisparameter = (AnalysisListCategoryViewModel)parameter;

            if (AnalysisList == null)
            {
                AnalysisList = new AnalysisViewModel();
            }

            AnalysisList.TitleName = analysisparameter.Name;
            AnalysisList.AnalysisSubListVisible = true;
            AnalysisList.CurrentContent         = AnalysisContent.Unit;
            AnalysisList.Items = new List <AnalysisSubListItemViewModel>
            {
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = analysisparameter.Name,
                    Name         = analysisparameter.Name,
                    Contents     = AnalysisContent.Unit,
                    IsSelected   = true
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = analysisparameter.Name,
                    Name         = "Geometry",
                    Contents     = AnalysisContent.Geometry,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = analysisparameter.Name,
                    Name         = "Loads",
                    Contents     = AnalysisContent.Loads,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = analysisparameter.Name,
                    Name         = "Analysis",
                    Contents     = AnalysisContent.parameter,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = analysisparameter.Name,
                    Name         = "Result",
                    Contents     = AnalysisContent.Result,
                    IsSelected   = false
                },
            };

            // Get contents List and data
            //ViewModelEquipmentManagement.OpenContentsList(AnalysisList);
        }
        /// <summary>
        /// Create new analysis data
        /// </summary>
        private void CreateAnalysisData()
        {
            if (AnalysisList == null)
            {
                AnalysisList = new AnalysisViewModel();
            }

            //AnalysisList.TitleName = analysisparameter.Name;
            AnalysisList.AnalysisSubListVisible = true;
            AnalysisList.CurrentContent         = AnalysisContent.Unit;
            AnalysisList.CurrentAction          = AnalysisAction.Create;
            AnalysisList.Items = new List <AnalysisSubListItemViewModel>
            {
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = "",
                    Name         = "",
                    Contents     = AnalysisContent.Unit,
                    IsSelected   = true
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = "",
                    Name         = "Geometry",
                    Contents     = AnalysisContent.Geometry,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = "",
                    Name         = "Loads",
                    Contents     = AnalysisContent.Loads,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = "",
                    Name         = "Analysis",
                    Contents     = AnalysisContent.parameter,
                    IsSelected   = false
                },
                new AnalysisSubListItemViewModel
                {
                    AnalysisName = "",
                    Name         = "Result",
                    Contents     = AnalysisContent.Result,
                    IsSelected   = false
                },
            };

            // Get contents List and data
            //ViewModelEquipmentManagement.OpenContentsList(AnalysisList);
        }
Esempio n. 5
0
        /// <summary>
        /// If click the library data(material, laminate) It open detail data
        /// </summary>
        /// <param name="parameter"></param>
        public void OpenLibraryData(AnalysisViewModel parameter)
        {
            if (parameter == null)
            {
                return;
            }

            ViewModelApplication.LibraryWideMenuVisible  = parameter.LibrarySpaceVisible;
            ViewModelApplication.AnalysisWideMenuVisible = parameter.AnalysisSubListVisible;

            var analysisviewmodel = parameter;

            // Get analysis contents list and data
            ViewModelApplication.GoToLibrary(ApplicationPage.Library, analysisviewmodel);
        }
Esempio n. 6
0
        /// <summary>
        /// If click the analysis data, open sub lists <see cref="AnalysisSubListItemViewModel"/>
        /// </summary>
        /// <param name="parameter"></param>
        public void OpenContentsList(AnalysisViewModel parameter)
        {
            if (parameter == null)
            {
                return;
            }

            var analysisviewmodel = parameter;

            AnalysisSubListVisible = parameter.AnalysisSubListVisible;
            CurrentAction          = parameter.CurrentAction;
            CurrentContent         = parameter.CurrentContent;

            Items = parameter.Items;

            // Get analysis contents list and data
            ViewModelApplication.GoToPage(ApplicationPage.Analysis, analysisviewmodel);
        }
Esempio n. 7
0
 public void ClearList(AnalysisViewModel parameter)
 {
     parameter.Items.Clear();
 }