예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.Title = cmFeatureDto.Name;

            var featureUC = new FeatureEditorUC(cmFeatureDto, this);

            editorUIPanel.Children.Add(featureUC);
        }
예제 #2
0
        private void TreeConfiguration_NodeSelected(object sender, RoutedEventArgs e)
        {
            configUIPanel.Children.Clear(); // mcbtodo: check to see if there are any unsaved changes before doing this.

            var attachedTag = treeConfig.GetSelectedTreeViewTag();

            if (attachedTag?.Dto == null)
            {
                return;
            }

            switch (attachedTag.DtoTypeName)
            {
            case nameof(CMDataStoreDto):
                var dataStoreConfigUc = new DataStoreConfigUC(this, attachedTag.Dto as CMDataStoreDto);
                configUIPanel.Children.Add(dataStoreConfigUc);
                break;

            case nameof(CMSystemDto):
                var systemConfigUc = new SystemConfigUC(this, attachedTag.Dto as CMSystemDto);
                configUIPanel.Children.Add(systemConfigUc);
                break;

            case nameof(CMFeatureDto):
                var featureTemplateConfigUc = new FeatureEditorUC(attachedTag.Dto as CMFeatureDto, null);
                configUIPanel.Children.Add(featureTemplateConfigUc);
                break;

            case nameof(CMTaskTypeDto):
                var taskTypeUc = new TaskTypeConfigUC(this, attachedTag.Dto as CMTaskTypeDto);
                configUIPanel.Children.Add(taskTypeUc);
                break;

            default:
                break;
            }
        }