Exemplo n.º 1
0
        public void OpenModel(string name)
        {
            Text  = name;
            Model = new AgentModel();
            Model.Open(name);
            //

            /*var form = new ContextExplorer();
             * form.MdiParent = MdiParent;
             * form.Present(Model);*/
            new ContextExplorerPresenter(Model, ContextGraphPanel, ClauseListBox);
        }
Exemplo n.º 2
0
        //
        public ContextExplorerPresenter(AgentModel model, ContextGraphPanel control, ListBox listView)
            : base(model)
        {
            Model   = model;
            Control = control;
            //
            ClauseListView = listView;

            /*ClauseListView.Items.Add("one");
             * ClauseListView.Items.Add("two");
             * ClauseListView.Items.Add("three");*/
            //
            Panel = new ContextGraphPanelWpf();
            control.ElementHost.Child = Panel;
            Canvas       = (ContextGraphCanvas)Panel.FindName("graphCanvas");
            CanvasViewer = (Wpf.ScrollViewer)Panel.FindName("canvasViewer");
            CanvasZoomer = (Wpf.Slider)Panel.FindName("canvasZoomer");
            CanvasZoomer.ValueChanged += OnCanvasZoomerValue;
            //
            model.Brain.ObserveContextCreated(OnContextCreated);
        }