Exemplo n.º 1
0
        /// <summary>
        /// Opens a document for editing from the id of a macro
        /// </summary>
        /// <param name="d">The file declaration</param>
        public void OpenMacroForEditing(FileDeclaration d)
        {
            if (d == null)
            {
                return;
            }

            DocumentViewModel dvm = DockManager.GetDocument(d);

            if (dvm != null)
            {
                DockManager.ActiveContent = dvm;
                return;
            }

            DocumentModel model = DocumentModel.Create(d);

            if (model != null)
            {
                DocumentViewModel viewModel = DocumentViewModel.Create(model);
                DockManager.AddDocument(viewModel);
                ChangeActiveDocument(viewModel);
            }
        }
Exemplo n.º 2
0
 public override void Show()
 {
     DockManager.AddDocument(this);
 }