public CreateAssociationDlg(Model model, Schema fromSchema)
 {
     this.model = model;
     this.fromSchema = fromSchema;
     InitializeComponent();
     PopulateSemanticTypes();
 }
        public SemanticDesigner(Model model)
        {
            this.model = model;
            InitializeComponent();

            new PlanView(tbPlan);
            new LogView(tbLog);
            assocDataView = new AssociatedDataView(model, lblAssociatedData, dgvAssociationData);
            assocView = new AssociationView(model, dgvAssociations, this);
            semanticView = new SemanticView(lblSemanticType, dgvSemanticData);
            semanticController = new SemanticController(model, this);
            semanticTreeView = new SemanticTreeView(model, tvTypes);

            // TODO: Put all local event handlers into the semanticTreeView or create a semanticTreeController.
            tvTypes.AfterSelect += semanticController.AfterSelectEvent;
            tvTypes.AfterSelect += OnSemanticTypeSelected;
            dgvSemanticData.SelectionChanged += semanticController.SelectionChangedEvent;
            btnMainView.Click += semanticController.MoveToMainView;

            collectionView = new CollectionView(lblCollectionName, dgvCollectionData);
            collectionController = new CollectionController(model);
            tvTypes.AfterSelect += collectionController.AfterSelectEvent;

            Program.serviceManager.Get<ISemanticProcessor>().Register<AssociationViewMembrane>(this);

            LoadSchema();
        }
 public SemanticTreeView(Model model, TreeView tv)
 {
     this.model = model;
     this.tv = tv;
     Program.serviceManager.Get<ISemanticProcessor>().Register<SemanticTreeMembrane>(this);
     tv.NodeMouseClick += OnNodeMouseClick;
 }
 protected void PopulateSchemas(Model model)
 {
     List<Schema> schemas = new List<Schema>();
     model.Schemata.ForEach(s=>AddSchema(s, schemas));
     // Sort and add to listbox.
     object[] schemaObjects = schemas.OrderBy(s => s.Name).ToArray();
     lbSchemas.Items.AddRange(schemaObjects);
 }
 public AssociatedDataView(Model model, Label label, DataGridView view)
 {
     this.model = model;
     Program.serviceManager.RegisterSingleton<IAssociatedDataViewService>(this);
     Program.serviceManager.Get<ISemanticProcessor>().Register<AssociatedDataViewMembrane>(this);
     this.label = label;
     this.dgView = view;
 }
 public AssociationView(Model model, DataGridView view, SemanticDesigner mainView)
 {
     this.model = model;
     this.view = view;
     this.mainView = mainView;
     // Program.serviceManager.Get<ISemanticProcessor>().Register<AssociationViewMembrane>(this);
     view.SelectionChanged += OnSelectionChanged;
 }
        static void Main()
        {
            Bootstrap();
            Model model = new Model();
            model.InitializeCoreSchemata();
            model.OpenDatabase("marc");

            // General controller.
            Controller controller = new Controller(model);
            controller.InstantiateMissingLookups();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SemanticDesigner view = new SemanticDesigner(model);

            Application.Run(view);
        }
 public AddExistingSubtypeDlg(Model model)
 {
     InitializeComponent();
     PopulateSchemas(model);
 }
 public Controller(Model model)
 {
     this.model = model;
 }
 public SemanticController(Model model, SemanticDesigner mainView)
 {
     this.model = model;
     this.mainView = mainView;
     currentValues = new Dictionary<string, string>();
 }