示例#1
0
 private static void OnBcDocDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     if (LinkedDocument == null)
     {
         ExpireGH();
     }
 }
示例#2
0
 private static void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     Debug.WriteLine($"DocumentManager_DocumentDestroyed cmd={cmd}");
     if (cmd == "CLOSE" && System.IO.Path.IsPathRooted(e.FileName))
     {
         RemoveTabs();
     }
 }
示例#3
0
 private void OnDocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     if (CADProxy.Document == null)
     {
         CADKitPalette.Visible = false;
     }
     drawingScale = "";
 }
 private static void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     if (TOCPalette._ps != null && Application.DocumentManager.Count == 1)
     {
         bool showTOC = TOCPalette._showTOC;
         TOCPalette._ps.Visible = (false);
         TOCPalette._showTOC    = showTOC;
     }
 }
示例#5
0
 static void OnDocumentDestroyed(object sender, DocumentDestroyedEventArgs args)
 {
     // If there are many documents, and one of them is about to be closed, the MdiActiveDocument is null.
     // We should test the Count, if the value is 1, that means the last document is going to close.
     if (Application.DocumentManager.Count == 1)
     {
         AllPaletteSets.ClosePalettes();
     }
 }
 private void callback_DocumentDestroyed(Object sender, DocumentDestroyedEventArgs e)
 {
     try
     {
         WriteLine(String.Format("DocumentDestroyed - {0}", e.FileName));
     }
     catch (System.Exception ex)
     {
         Helper.Message(ex);
     }
 }
示例#7
0
        private void DocumentManagerOnDocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
        {
            // 将失效的文档从集合中删除
            var docsToBeRemove = _bindedDocuments.Where(doc => doc.IsDisposed).ToList();

            //
            foreach (var doc in docsToBeRemove)
            {
                _bindedDocuments.Remove(doc);
            }
        }
 public void docDestroyed(object obj,
                          DocumentDestroyedEventArgs acDocDesEvtArgs)
 {
     // Determine if the menu item already exists and the number of documents open
     if (Application.DocumentManager.Count == 1 && acApMenuItem == null)
     {
         // Add the event handler to watch for when the application menu is opened
         // AdWindows.dll must be referenced to the project
         ComponentManager.ApplicationMenu.Opening +=
             new EventHandler <EventArgs>(ApplicationMenu_Opening);
     }
 }
示例#9
0
        private void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
        {
            var doc = (sender as DocumentCollection).CurrentDocument;

            Assertion.Assert(doc != null);

            try
            {
                doc.CommandWillStart -= Doc_CommandWillStart;
                doc.CommandEnded     -= Doc_CommandEnded;
            }
            catch (System.Exception ex)
            {
                Utils.WriteDebugMessage(ex);
            }
        }
示例#10
0
 // Чертеж закрыт
 void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     try
     {
         foreach (var lbi in Drawings.Items.Cast <ListBoxItem>().Where(
                      lbi => lbi.ToolTip.ToString() == e.FileName))
         {
             Drawings.Items.Remove(lbi);
             break;
         }
     }
     catch
     {
         // ignored
     }
 }
示例#11
0
        /// <summary>
        /// 文档关闭时的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static private void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
        {
            if (!Project.CheckValiad())
            {
                return;
            }

            Project.Instance.DisposeSampleDoc(e.FileName);
            //var propertyCtl = Project.Instance.GetActivePropCtl(e.FileName);
            //if (propertyCtl != null)
            //    propertyCtl.GetPaletteSet().Visible = false;

            //var treelistCtl = Project.Instance.GetActiveTreeLst(e.FileName);
            //if (treelistCtl != null)
            //    treelistCtl.Visible = false;

            //var gridlistCtl = Project.Instance.GetActiveGridList(e.FileName);
            //if (gridlistCtl != null)
            //    gridlistCtl.GetPaletteSet().Visible = false;
        }
示例#12
0
 void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     ObjectOverrule.RemoveOverrule(RXClass.GetClass(typeof(Entity)), this);
 }
示例#13
0
文件: Setup.cs 项目: 15831944/AutoIME
 private static void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     _config.Switch2DefaultIME();
 }
示例#14
0
 private static void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     eventer?.Finish(EventType.Close, e?.FileName, sn);
 }
示例#15
0
 private void _dwgManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     try
     {
         //_logger.Log("DEBUG: destroyed. not 1 . COUNT = " + Application.DocumentManager.Count, Microsoft.Practices.Prism.Logging.Category.Debug, Microsoft.Practices.Prism.Logging.Priority.Low);
         if (Application.DocumentManager.Count == 1)
         {
             //_logger.Log("DEBUG: destroyed. Visible = false . COUNT = " + Application.DocumentManager.Count, Microsoft.Practices.Prism.Logging.Category.Debug, Microsoft.Practices.Prism.Logging.Priority.Low);
             _ps.Visible = false;
         }
     }
     catch (System.Exception ex)
     {
         LufsGenplan.AcadApp.AcaEd.WriteMessage("\nERROR: Commands._dwgManager_DocumentDestroyed() " + ex + "\n");
     }
 }
示例#16
0
 /// <summary>
 /// Runs when a drawing is closed.
 /// </summary>
 public static void UnLoadDWG(object s, DocumentDestroyedEventArgs e)
 {
     //TODO: Impliment logging features and code cleanup.
 }
示例#17
0
 private void callback_DocumentDestroyed(Object sender, DocumentDestroyedEventArgs e)
 {
     try
     {
         WriteLine(String.Format("DocumentDestroyed - {0}", e.FileName));
     }
     catch (System.Exception ex)
     {
         Helper.Message(ex);
     }
 }
示例#18
0
        private void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
        {
            string fileName = e.FileName;

            Project.Instance.OpenedDocs.Remove(fileName);
        }
 // Чертеж закрыт
 private void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     GetDocuments();
     CheckUnused();
 }
示例#20
0
 void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     ObjectOverrule.RemoveOverrule(RXClass.GetClass(typeof(Entity)), this);
 }
 private void DocumentManager_DocumentDestroyed(object sender, DocumentDestroyedEventArgs e)
 {
     GetCurrentDocLayouts();
 }