/// <summary> /// The preferred constructor /// </summary> /// <param name="container">Back reference to the PlugInContainer</param> /// <param name="el">Reference to the log being viewed</param> public LogPropertiesPage(IPlugInContainer container, EventLogRecord el, IPlugIn plgin, StandardPage parentPage) : this() { this.pageID = "LogProperities"; this._container = container; this.el = el; this._plugin = plgin as EventlogPlugin; this._parentPage = parentPage; }
public EventPropertiesDlg(IPlugInContainer container, StandardPage parentPage, EventlogPlugin plugin, ListView lvEvents) : base(container, parentPage) { InitializeComponent(); btnApply.Visible = false; btnCancel.Visible = false; btnOK.Location = btnApply.Location; this.Text = "Event Properties"; _plugin = plugin; _container = container; _eventsListView = lvEvents; InitializePages(); }
public EventPropertiesDlg(IPlugInContainer container, StandardPage parentPage, EventlogPlugin plugin,ListView lvEvents) : base(container, parentPage) { InitializeComponent(); btnApply.Visible = false; btnCancel.Visible = false; btnOK.Location = btnApply.Location; this.Text = "Event Properties"; _plugin = plugin; _container = container; _eventsListView = lvEvents; InitializePages(); }
public LogPropertiesDlg(IPlugInContainer container, StandardPage parentPage, EventlogPlugin plugin, ListView lvEvents, EventLogRecord el, EventFilter ef, string pageID) : base(container, parentPage) { InitializeComponent(); btnApply.Enabled = true; this.DataChanged = true; _plugin = plugin; _container = container; this._parentPage = parentPage; _eventsListView = lvEvents; _el = el; _ef = ef; sShowPage = pageID; if (parentPage != null && parentPage.LMCTree != null && parentPage.LMCTree.SelectedNode != null && !String.IsNullOrEmpty(parentPage.LMCTree.SelectedNode.Text)) { this.Text = parentPage.LMCTree.SelectedNode.Text + " " + "Properties"; } InitializePages(); }
/// <summary> /// Called when the page is about to be displayed /// </summary> public override void SetPlugInInfo(IPlugInContainer ccontainer, IPlugIn ppi, LACTreeNode ttreeNode, LWTreeView llmctreeview, CServerControl sc) { treeNode = ttreeNode; // let the base do its thing base.SetPlugInInfo(ccontainer, ppi, ttreeNode, llmctreeview, sc); plugin = ppi as EventlogPlugin; ctx = (IContext)plugin.HostInfo; lactreeNode = ttreeNode; Hostinfo hn = ctx as Hostinfo; if (hn != null && !String.IsNullOrEmpty(hn.hostName) && hn.IsConnectionSuccess) { if (plugin.eventLogHandle == null || plugin.eventLogHandle.Handle == IntPtr.Zero) { plugin.OpenEventLog(hn.hostName); } this.lblCaption.Text = String.Format("EventViewer for {0}", hn.hostName); } else { this.lblCaption.Text = Properties.Resources.sTitleEventsPage; return; } if (memberType == EventViewerNodeType.LOG && !String.IsNullOrEmpty(hn.hostName)) { try { FillComboWithLogCount(); } catch (Exception e) { Logger.LogException("EventViewerControl.SetPlugInInfo", e); container.ShowError("Unable to open the event log; eventlog server may be disabled"); } } else if (memberType == EventViewerNodeType.PLUGIN && !String.IsNullOrEmpty(hn.hostName) && hn.IsConnectionSuccess) { InitializePluginNodeControl(); } }