public override void SetPlugInInfo(IPlugInContainer container, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmctreeview, CServerControl sc) { Hostinfo hn = ctx as Hostinfo; base.SetPlugInInfo(container, pi, treeNode, lmctreeview, sc); bEnableActionMenu = false; plugin = pi as FileShareManagerIPlugIn; hn = plugin.HostInfo; Refresh(); }
public override void SetPlugInInfo( IPlugInContainer container, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmctreeview, CServerControl sc ) { base.SetPlugInInfo(container, pi, treeNode, lmctreeview, sc); bEnableActionMenu = false; plugin = pi as FileBrowserIPlugIn; Refresh(); }
/// <summary> /// Sets the Plugin information to base /// List the all child nodes, then refreshes the listview with the all child treenodes. /// </summary> /// <param name="ccontainer"></param> /// <param name="pi"></param> /// <param name="treeNode"></param> /// <param name="lmctreeview"></param> public override void SetPlugInInfo(IPlugInContainer ccontainer, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmctreeview, CServerControl sc) { if (treeNode.sc != null) { smallimagelist = treeNode.sc.manage.manageImageList as ImageList; Lagreimagelist = treeNode.sc.manage.manageLargeImageList as ImageList; } base.SetPlugInInfo(ccontainer, pi, treeNode, lmctreeview, sc); if (treeNode != null) { Refresh(); } }
public virtual void SetPlugInInfo(IPlugInContainer container, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmcTreeview, CServerControl sc) { this.container = container; this.pi = pi; this.treeNode = treeNode; this.lmctreeview = lmcTreeview; if (treeNode != null) { treeNode.PluginPage = this; } // disable if necessary if (ShowInDisabledState) { DisableForWindows(); } }
/// <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(); } }
/// <summary> /// Sets the Plugin information to base /// List the all child nodes, then refreshes the listview with the all child treenodes. /// </summary> /// <param name="ccontainer"></param> /// <param name="pi"></param> /// <param name="treeNode"></param> /// <param name="lmctreeview"></param> public override void SetPlugInInfo(IPlugInContainer ccontainer, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmctreeview, CServerControl sc) { base.SetPlugInInfo(ccontainer, pi, treeNode, lmctreeview, sc); bEnableActionMenu = false; ADUCDirectoryNode node = treeNode as ADUCDirectoryNode; plugin = pi as ADUCPlugin; plugin.aducPagelvChildNodes = lvChildNodes; ctx = (IContext)plugin.HostInfo; if (node != null) { SetCaption(node.DistinguishedName); RefreshlvChildNodes(node); } else { RefreshlvChildNodes(treeNode); string sADUC = "Active Directory Users && Computers"; SetCaption(sADUC); } }
public override void SetPlugInInfo(IPlugInContainer container, IPlugIn pi, LACTreeNode treeNode, LWTreeView lmctreeview, CServerControl sc) { base.SetPlugInInfo(container, pi, treeNode, lmctreeview, sc); bEnableActionMenu = false; ShowHeaderPane(true); plugin = pi as RegistryViewerPlugin; SetListviewColumns(); Refresh(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LMCMainForm)); this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components); this.menuItem_File = new System.Windows.Forms.MenuItem(); this.menuItem_New = new System.Windows.Forms.MenuItem(); this.menuItem_Open = new System.Windows.Forms.MenuItem(); this.menuItem_Save = new System.Windows.Forms.MenuItem(); this.menuItem_SaveAs = new System.Windows.Forms.MenuItem(); this.addremove_plugin = new System.Windows.Forms.MenuItem(); this.menuItem_Close = new System.Windows.Forms.MenuItem(); this.menuItem_Help = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem12 = new System.Windows.Forms.MenuItem(); this.menuItem_About = new System.Windows.Forms.MenuItem(); this.statusBar1 = new System.Windows.Forms.StatusBar(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.pivotPanel = new System.Windows.Forms.Panel(); this.navTree = new Likewise.LMC.ServerControl.LWTreeView(); this.panel1 = new System.Windows.Forms.Panel(); this.imageListLarge24 = new System.Windows.Forms.ImageList(this.components); this.splitter1 = new System.Windows.Forms.Splitter(); this.imageListLarge32 = new System.Windows.Forms.ImageList(this.components); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.sc = new Likewise.LMC.ServerControl.CServerControl(); this.pivotPanel.SuspendLayout(); this.SuspendLayout(); // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem_File, this.menuItem_Help}); // // menuItem_File // this.menuItem_File.Index = 0; this.menuItem_File.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem_New, this.menuItem_Open, this.menuItem_Save, this.menuItem_SaveAs, this.addremove_plugin, this.menuItem_Close}); this.menuItem_File.Text = "&File"; // // menuItem_New // this.menuItem_New.Index = 0; this.menuItem_New.Shortcut = System.Windows.Forms.Shortcut.CtrlN; this.menuItem_New.Text = "&New"; this.menuItem_New.Click += new System.EventHandler(this.menuItem_New_Click); // // menuItem_Open // this.menuItem_Open.Index = 1; this.menuItem_Open.Shortcut = System.Windows.Forms.Shortcut.CtrlO; this.menuItem_Open.Text = "&Open..."; this.menuItem_Open.Click += new System.EventHandler(this.menuItem_Open_Click); // // menuItem_Save // this.menuItem_Save.Index = 2; this.menuItem_Save.Shortcut = System.Windows.Forms.Shortcut.CtrlS; this.menuItem_Save.Text = "&Save"; this.menuItem_Save.Click += new System.EventHandler(this.menuItem_Save_Click); // // menuItem_SaveAs // this.menuItem_SaveAs.Index = 3; this.menuItem_SaveAs.Text = "Save &As..."; this.menuItem_SaveAs.Click += new System.EventHandler(this.menuItem_SaveAs_Click); // // addremove_plugin // this.addremove_plugin.Index = 4; this.addremove_plugin.Text = "Add/Re&move Plug-in..."; this.addremove_plugin.Click += new System.EventHandler(this.Menu_addremoveplugin_clicked); // // menuItem_Close // this.menuItem_Close.Index = 5; this.menuItem_Close.Text = "E&xit"; this.menuItem_Close.Click += new System.EventHandler(this.menuItem_Exit_Click); // // menuItem_Help // this.menuItem_Help.Index = 1; this.menuItem_Help.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem3, this.menuItem12, this.menuItem_About}); this.menuItem_Help.Text = "&Help"; // // menuItem3 // this.menuItem3.Index = 0; this.menuItem3.Text = "&Technical Support"; this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); // // menuItem12 // this.menuItem12.Index = 1; this.menuItem12.Text = "-"; // // menuItem_About // this.menuItem_About.Index = 2; this.menuItem_About.Text = "&About Likewise Management Console"; this.menuItem_About.Click += new System.EventHandler(this.menuItem_About_Click); // // statusBar1 // this.statusBar1.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.statusBar1.Location = new System.Drawing.Point(0, 549); this.statusBar1.Name = "statusBar1"; this.statusBar1.ShowPanels = true; this.statusBar1.Size = new System.Drawing.Size(792, 22); this.statusBar1.TabIndex = 0; // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, ""); this.imageList1.Images.SetKeyName(1, ""); this.imageList1.Images.SetKeyName(2, ""); this.imageList1.Images.SetKeyName(3, ""); this.imageList1.Images.SetKeyName(4, ""); this.imageList1.Images.SetKeyName(5, ""); this.imageList1.Images.SetKeyName(6, ""); this.imageList1.Images.SetKeyName(7, "back.bmp"); this.imageList1.Images.SetKeyName(8, ""); this.imageList1.Images.SetKeyName(9, ""); this.imageList1.Images.SetKeyName(10, ""); this.imageList1.Images.SetKeyName(11, ""); this.imageList1.Images.SetKeyName(12, ""); this.imageList1.Images.SetKeyName(13, ""); this.imageList1.Images.SetKeyName(14, ""); this.imageList1.Images.SetKeyName(15, "BlockedOrganizationalUnit.ico"); // // pivotPanel // this.pivotPanel.AutoScroll = true; this.pivotPanel.Controls.Add(this.navTree); this.pivotPanel.Controls.Add(this.panel1); this.pivotPanel.Dock = System.Windows.Forms.DockStyle.Left; this.pivotPanel.Location = new System.Drawing.Point(0, 0); this.pivotPanel.Name = "pivotPanel"; this.pivotPanel.Size = new System.Drawing.Size(231, 549); this.pivotPanel.TabIndex = 0; // // navTree // this.navTree.BorderStyle = System.Windows.Forms.BorderStyle.None; this.navTree.Dock = System.Windows.Forms.DockStyle.Fill; this.navTree.HideSelection = false; this.navTree.Location = new System.Drawing.Point(0, 16); this.navTree.Name = "navTree"; this.navTree.Size = new System.Drawing.Size(231, 533); this.navTree.TabIndex = 0; this.navTree.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCollapse); this.navTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); this.navTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick); this.navTree.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterExpand); // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.Window; this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(231, 16); this.panel1.TabIndex = 1; // // imageListLarge24 // this.imageListLarge24.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListLarge24.ImageStream"))); this.imageListLarge24.TransparentColor = System.Drawing.SystemColors.MenuBar; this.imageListLarge24.Images.SetKeyName(0, "back-lgr.ico"); this.imageListLarge24.Images.SetKeyName(1, "next-lgr.ico"); this.imageListLarge24.Images.SetKeyName(2, "reload-lgr.ico"); // // splitter1 // this.splitter1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitter1.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.splitter1.Location = new System.Drawing.Point(231, 0); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(8, 549); this.splitter1.TabIndex = 2; this.splitter1.TabStop = false; this.splitter1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitter1_SplitterMoved); // // imageListLarge32 // this.imageListLarge32.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListLarge32.ImageStream"))); this.imageListLarge32.TransparentColor = System.Drawing.SystemColors.MenuBar; this.imageListLarge32.Images.SetKeyName(0, "back-lgr.ico"); this.imageListLarge32.Images.SetKeyName(1, "next-lgr.ico"); this.imageListLarge32.Images.SetKeyName(2, "reload-lgr.ico"); // // openFileDialog // this.openFileDialog.DefaultExt = "lmc"; this.openFileDialog.FileName = "openFileDialog"; this.openFileDialog.Filter = "Likewise Management Cosole(*.lmc)|*.lmc"; this.openFileDialog.ReadOnlyChecked = true; this.openFileDialog.ShowReadOnly = true; // // sc // this.sc.ApplicationDirectory = "C:\\Program Files\\Likewise\\Enterprise"; this.sc.AutoScroll = true; this.sc.BackColor = System.Drawing.SystemColors.Window; this.sc.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.sc.Dock = System.Windows.Forms.DockStyle.Fill; this.sc.ForeColor = System.Drawing.SystemColors.WindowText; this.sc.Location = new System.Drawing.Point(239, 0); this.sc.Margin = new System.Windows.Forms.Padding(2); this.sc.Name = "sc"; this.sc.Size = new System.Drawing.Size(553, 549); this.sc.TabIndex = 1; // // LMCMainForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.SystemColors.MenuBar; this.ClientSize = new System.Drawing.Size(792, 571); this.Controls.Add(this.sc); this.Controls.Add(this.splitter1); this.Controls.Add(this.pivotPanel); this.Controls.Add(this.statusBar1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Menu = this.mainMenu1; this.MinimumSize = new System.Drawing.Size(800, 600); this.Name = "LMCMainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Likewise Management Console"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LMCMainForm_FormClosing); this.pivotPanel.ResumeLayout(false); this.ResumeLayout(false); }
public Manage(CServerControl sc) : this() { Logger.Log("Manage.Manage", Logger.manageLogLevel); sCredentialsFilePath = Path.Combine(Application.UserAppDataPath, @"LMCCredentials.ini"); manageStaticImageList = this.manageImageList; manageStaticLargeImageList = this.manageLargeImageList; this.sc = sc; }