internal void EndDispatch(SwDocument doc) { lock (m_Lock) { m_DocsDispatchQueue.Remove(doc); var index = m_ModelsDispatchQueue.FindIndex(d => m_Comparer.Equals(d, doc.Model)); if (index != -1) { m_ModelsDispatchQueue.RemoveAt(index); } if (doc is SwUnknownDocument) { doc = (SwDocument)(doc as SwUnknownDocument).GetSpecific(); } Dispatched?.Invoke(doc); if (!m_DocsDispatchQueue.Any()) { DispatchAllModels(); } } }
internal void EndDispatch(SwDocument doc) { lock (m_Lock) { m_DocsDispatchQueue.Remove(doc); var index = m_ModelsDispatchQueue.FindIndex(d => m_Comparer.Equals(d, doc.Model)); if (index != -1) { m_Logger.Log($"Removing '{doc.Title}' from the dispatch queue"); m_ModelsDispatchQueue.RemoveAt(index); } if (doc.IsCommitted) { if (doc is SwUnknownDocument) { doc = (SwDocument)(doc as SwUnknownDocument).GetSpecific(); } else { doc.AttachEvents(); } NotifyDispatchedSafe(doc); } if (!m_DocsDispatchQueue.Any()) { DispatchAllModels(); } } }
internal SwModelViewTab(ModelViewTabCreator <TControl> ctrlCreator, ModelViewManager modelViewManager, SwDocument doc, ISwApplication app, IXLogger logger) : base(doc, app, logger) { m_CtrlCreator = ctrlCreator; m_ModelViewMgr = modelViewManager; }
internal SwCustomPropertiesCollection(SwDocument doc, string confName) { m_Doc = doc; m_EventsHelper = new CustomPropertiesEventsHelper(doc.App.Sw, doc); m_ConfName = confName; }
internal SwConfigurationCustomPropertiesCollection(SwDocument doc, string confName) : base(doc) { m_EventsHelper = new CustomPropertiesEventsHelper(doc.App.Sw, doc); m_ConfName = confName; m_EventsHandlers = new List <EventsHandler <PropertyValueChangedDelegate> >(); }
private void NotifyDispatchedSafe(SwDocument doc) { try { m_Logger.Log($"Dispatched '{doc.Title}'", LoggerMessageSeverity_e.Debug); Dispatched?.Invoke(doc); } catch (Exception ex) { m_Logger.Log($"Unhandled exception while dispatching the document '{doc.Title}'", LoggerMessageSeverity_e.Error); m_Logger.Log(ex); } }
private void NotifyDispatchedSafe(SwDocument doc) { try { m_Logger.Log($"Dispatched '{doc.Title}'"); Dispatched?.Invoke(doc); } catch (Exception ex) { m_Logger.Log($"Unhandled exception while dispatching the document '{doc.Title}'"); m_Logger.Log(ex); } }
internal void EndDispatch(SwDocument doc) { lock (m_Lock) { m_DocsDispatchQueue.Remove(doc); var index = m_ModelsDispatchQueue.FindIndex( d => string.Equals(d.Path, doc.Path, StringComparison.CurrentCultureIgnoreCase) || string.Equals(d.Title, doc.Title, StringComparison.CurrentCultureIgnoreCase)); if (index != -1) { m_Logger.Log($"Removing '{doc.Title}' from the dispatch queue", LoggerMessageSeverity_e.Debug); m_ModelsDispatchQueue.RemoveAt(index); } else { m_Logger.Log($"Document '{doc.Title}' is not in the dispatch queue", LoggerMessageSeverity_e.Warning); } if (doc.IsCommitted) { if (doc is SwUnknownDocument) { doc = (SwDocument)(doc as SwUnknownDocument).GetSpecific(); } else { doc.AttachEvents(); } NotifyDispatchedSafe(doc); } if (!m_DocsDispatchQueue.Any()) { DispatchAllModels(); } } }
internal SwFeatureMgrTab(FeatureManagerTabCreator <TControl> ctrlCreator, SwDocument doc, IXLogger logger) : base(doc, logger) { m_ModelViewMgr = doc.Model.ModelViewManager; m_CtrlCreator = ctrlCreator; switch (doc.Model) { case PartDoc part: part.FeatureManagerTabActivatedNotify += OnFeatureManagerTabActivated; break; case AssemblyDoc assm: assm.FeatureManagerTabActivatedNotify += OnFeatureManagerTabActivated; break; case DrawingDoc drw: drw.FeatureManagerTabActivatedNotify += OnFeatureManagerTabActivated; break; } }
internal void BeginDispatch(SwDocument doc) { m_DocsDispatchQueue.Add(doc); }
internal NewSelectionEventHandler(SwDocument doc) : base(doc) { }
internal StreamWriteAvailableEventsHandler(SwDocument doc) : base(doc) { m_Doc = doc; }
internal SwMacroFeature(SwDocument doc, IFeatureManager featMgr, IFeature feat, bool created) : base(doc, feat, created) { m_Doc = doc; m_FeatMgr = featMgr; }
internal SwFeatureManager(SwDocument doc) { Document = doc; m_ParamsParser = new MacroFeatureParametersParser(doc.App.Sw); }
internal SwFeatureMgrTab(FeatureManagerTabCreator <TControl> ctrlCreator, SwDocument doc, ISwApplication app, IXLogger logger) : base(doc, app, logger) { m_ModelViewMgr = doc.Model.ModelViewManager; m_CtrlCreator = ctrlCreator; }
protected SwCustomPropertiesCollection(SwDocument doc, ISwApplication app) { m_Doc = doc; m_App = app; }
internal SwFeatureManager(SwDocument doc, ISwApplication app) { m_App = app; Document = doc; m_ParamsParser = new MacroFeatureParametersParser(app); }
internal SwFeatureManager(SwDocument model, IFeatureManager featMgr, ISldWorks app) { m_Model = model; m_ParamsParser = new MacroFeatureParametersParser(app); m_FeatMgr = featMgr; }
protected SwCustomPropertiesCollection(SwDocument doc) { m_Doc = doc; }
internal StreamWriteAvailableEventsHandler(SwDocument doc, ISwApplication app) : base(doc, app) { }
internal SwDocumentDimensionsCollection(SwDocument model) { m_Doc = model; }
internal SwMacroFeature(IFeature feat, SwDocument doc, ISwApplication app, bool created) : base(feat, doc, app, created) { m_FeatMgr = doc.Model.FeatureManager; }
internal SwFileCustomPropertiesCollection(SwDocument doc, ISwApplication app) : base("", doc, app) { }
internal NewSelectionEventHandler(SwDocument doc, ISwApplication app) : base(doc, app) { }
internal StreamReadAvailableEventsHandler(SwDocument doc) : base(doc) { m_Doc = doc; m_Is3rdPartyStreamLoaded = false; }
internal DocumentSavingEventHandler(SwDocument doc, ISwApplication app) : base(doc, app) { }
internal SwFileCustomPropertiesCollection(SwDocument doc) : base(doc, "") { }
internal DocumentRebuildEventsHandler(SwDocument doc, ISwApplication app) : base(doc, app) { }
internal StorageReadAvailableEventsHandler(SwDocument doc, ISwApplication app) : base(doc, app) { m_Is3rdPartyStorageLoaded = false; }
internal SwMacroFeature(SwDocument model, IFeatureManager featMgr, IFeature feat, bool created) : base(model.Model, feat, created) { m_Model = model; m_FeatMgr = featMgr; }