Пример #1
0
        private void cmdLoad_Click(object sender, EventArgs e)
        {
            MetaDataStore       store = null;
            FolderBrowserDialog dlg   = new FolderBrowserDialog();

            dlg.ShowNewFolderButton = false;
            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                string directory = dlg.SelectedPath;

                try
                {
                    store = MetaDataStoreLoader.Load(directory);
                    txtMetaDataStoreLocation.Text = directory;
                    this.OnMetadataStoreLoaded(store);
                }
                catch (CoreCommonException ex)
                {
                    MessageBox.Show(ex.Message, "Application error");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "System error");
                }
            }
        }
Пример #2
0
        private static void Run(string[] args)
        {
            // For now, lets assume the modelstore path is provided as first and only argument. If left out, switch to demo data mode
            MetaDataStore m;

            if (args.Count() > 0)
            {
                string path = args[0];
                m = MetaDataStoreLoader.Load(path);
                System.Console.WriteLine("Finished loading modelstore from " + path);
            }
            else
            {
                m = DemoDataUtil.GetModelStore(3, true);
                System.Console.WriteLine("Demo data modelstore loaded.");
            }

            System.Console.WriteLine("Contained packages: " + m.Packages.Count().ToString());
        }