예제 #1
0
        protected override void Show()
        {
            Debug.Assert(Control != null, "The OCX control for the node is null.");
            Debug.Assert(Control is EventStatusEditor, "The OCX control is not an EventStatusEditor.");

            using (new LongRunningMonitor(Snapin))
            {
                EventStatusEditor editor = (EventStatusEditor)Control;
                editor.ReadOnly = IsReadOnly;
                editor.DisplayEventStatus(m_source);
            }
        }
예제 #2
0
        protected override void Show()
        {
            Debug.Assert(Control != null, "The OCX control for the node is null.");

            EventStatusEditor editor = Control as EventStatusEditor;

            if (editor == null)
            {
                throw new System.ApplicationException("The OCX control is not a '"
                                                      + typeof(EventStatusEditor).FullName + "' control. This may happen when the '"
                                                      + typeof(EventStatusEditor).Assembly.FullName + "' assembly fails to register for COM interop.");
            }

            using (new LongRunningMonitor(Snapin))
            {
                editor.ReadOnly = IsReadOnly;
                editor.DisplayEventStatus(m_catalogue);
            }
        }