Beispiel #1
0
        public void Show(IDocument document)
        {
            KVDocument kvdoc = document as KVDocument;

            if (kvdoc != null)
            {
                controlHostService.Show(kvdoc.DisplayControl);
            }
        }
Beispiel #2
0
        public void Close(IDocument document)
        {
            KVDocument kvdoc = document as KVDocument;

            if (kvdoc != null)
            {
                controlHostService.UnregisterControl(kvdoc.DisplayControl);
            }
        }
Beispiel #3
0
        public void Save(IDocument document, Uri uri)
        {
            KVDocument kvdoc = document as KVDocument;

            if (kvdoc != null)
            {
                kvdoc.Save();
            }
        }
Beispiel #4
0
        public bool Close(Control control)
        {
            KVDocument document = control.Tag as KVDocument;

            if (document != null)
            {
                return(documentService.Close(document));
            }

            return(true);
        }
Beispiel #5
0
        public IDocument Open(Uri uri)
        {
            KVDocument KVDoc = new KVDocument(uri);

            controlHostService.RegisterControl(KVDoc.DisplayControl, KVDoc.ControlInfo, this);

            KVDoc.KVTreeView.SelectionChanged += KVTreeView_SelectionChanged;
            KVDoc.OnRightClick += Control_MouseUp;

            return(KVDoc);
        }