Example #1
0
 public void Open(string fileName = null)
 {
     if (string.IsNullOrEmpty(fileName))
     {
         fileName = this.GetOpenFileName(FileExt, DefaultFilter);
     }
     if (fileName == null)
     {
         return;
     }
     ContextManager.File = Actions.File.Load(fileName);
     if (!string.IsNullOrEmpty(ContextManager.File.Url))
     {
         var v = new BrowserDocument(this);
         Application.DoEvents();
         v.Context.LoadUrl(ContextManager.File.Url);
     }
 }
Example #2
0
        private void OwnerWindow_MdiChildActivate(object sender, EventArgs e)
        {
            BrowserDocument browserDoc = null;

            if (OwnerWindow.ActiveMdiChild is UI.TextDocument textDoc)
            {
                if (textDoc != null && textDoc.Action != null)
                {
                    SelectedActions = new[] { textDoc.Action as Actions.Action }
                }
                ;
                else
                {
                    List.SelectedItems.Clear();
                }
            }
            else if (OwnerWindow.ActiveMdiChild is UI.BrowserDocument bd)
            {
                browserDoc = bd;
            }
            BrowserDoc = browserDoc;
        }