Пример #1
0
        private void ShowMappingWindow(MappingModel mappingModel)
        {
            XmlElement newMapping = mConfiguration.ConfigXml.CreateElement(MappingName);

            IElementConfiguration elementConfiguration = new ElementConfiguration(mConfiguration, mappingModel.Node, newMapping);

            ElementWindow elementWindow = new ElementWindow(elementConfiguration,
                                                            DefinitionFactory.Create(MappingDescriptor.Mapping, elementConfiguration),
                                                            WindowSizeLocationFactory.Create(MappingDescriptor.Mapping),
                                                            new AddSaveStrategy <MappingModel>(mappingModel, model => Mappings.Add(model), newMapping));

            mMessageBoxService.ShowWindow(elementWindow);
        }
Пример #2
0
        private void ShowFilterWindow(FilterModel filterModel)
        {
            XmlElement newFilter = mConfiguration.ConfigXml.CreateElementWithAttribute("filter", "type", filterModel.Descriptor.TypeNamespace);

            IElementConfiguration configuration = new ElementConfiguration(mConfiguration, filterModel.Node, newFilter);

            ISaveStrategy saveStrategy = new AddSaveStrategy <FilterModel>(filterModel, Add, newFilter);

            Window filterWindow = new ElementWindow(configuration,
                                                    DefinitionFactory.Create(filterModel.Descriptor, configuration),
                                                    WindowSizeLocationFactory.Create(filterModel.Descriptor),
                                                    saveStrategy);

            mMessageBoxService.ShowWindow(filterWindow);
        }
Пример #3
0
        private void ShowParamWindow(ParamModel paramModel)
        {
            XmlElement newParam = mConfiguration.ConfigXml.CreateElement(ParamDescriptor.Param.ElementName);

            IElementConfiguration configuration = new ElementConfiguration(mConfiguration, paramModel.Node, newParam);

            ISaveStrategy saveStrategy = new AddSaveStrategy <ParamModel>(paramModel, AddModel, newParam);

            Window paramWindow = new ElementWindow(configuration,
                                                   DefinitionFactory.Create(ParamDescriptor.Param, configuration),
                                                   WindowSizeLocationFactory.Create(ParamDescriptor.Param),
                                                   saveStrategy);

            mMessageBoxService.ShowWindow(paramWindow);
        }