Beispiel #1
0
        public ClassicMapMainWindow(string dbSource, TemplateDescription templateName)
        {
            InitializeComponent();

            MainGrid.DataContext = this;

            _templateName   = templateName;
            ClassicDbSource = "(local)";
            TemplateName    = templateName.Template.Name;
            TemplateType    = templateName.Template.ModuleType.ToString();
            WebDbSource     = dbSource;
            _webDataFactory = new DataFactory(WebDbSource);
            _browserDialog  = new FolderBrowserDialog();
            _transformRules = new LoadTransformRules();
        }
Beispiel #2
0
        private void RetrieveMappingsButton_Click(object sender, RoutedEventArgs e)
        {
            var xmlPath = Path.Combine(Environment.CurrentDirectory, "TransformRules.xml");

            if (!File.Exists(xmlPath))
            {
                if (_browserDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                {
                    return;
                }

                xmlPath = Path.Combine(_browserDialog.SelectedPath, " TransformRules.xml");
            }

            LoadTransformRules.LoadRules(xmlPath);
            _transformRulesCollection = LoadTransformRules.TransformRulesCollection;
        }