// Token: 0x0600010E RID: 270 RVA: 0x00007090 File Offset: 0x00005290 private void WaitForStop() { AmServiceMonitor.Tracer.TraceDebug <string>((long)this.GetHashCode(), "WaitForStop({0}) called", this.ServiceName); using (PrivilegeControl privilegeControl = new PrivilegeControl()) { Exception arg; if (!privilegeControl.TryEnable("SeDebugPrivilege", out arg)) { AmServiceMonitor.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "WaitForStop({0}) failed to set debug priv: {1}", this.ServiceName, arg); } this.WaitForStopInternal(); } AmServiceMonitor.Tracer.TraceDebug <string>((long)this.GetHashCode(), "WaitForStop({0}) exits", this.ServiceName); }
protected override void ProcessRecord() { var privControl = new PrivilegeControl(); this.WriteObject(privControl.GetPrivileges(), true); }
private void TvSiteMapNodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode selectedNode = e.Node; selectedNode.TreeView.SelectedNode = selectedNode; var collec = (Dictionary <string, string>)selectedNode.Tag; TreeNodeHelper.AddContextMenu(e.Node, this); Control existingControl = panelContainer.Controls.Count > 0 ? panelContainer.Controls[0] : null; if (existingControl != null) { panelContainer.Controls.Remove(existingControl); existingControl.Dispose(); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); } switch (selectedNode.Text.Split(' ')[0]) { case "SiteMap": { var ctrl = new SiteMapControl(collec); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "Area": { if (collec.Count == 0) { collec.Add("Id", string.Format("tempId_{0}", DateTime.Now.Ticks)); } var ctrl = new AreaControl(collec, webResourcesImageCache, webResourcesHtmlCache, Service); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "SubArea": { if (collec.Count == 0) { collec.Add("Id", string.Format("tempId_{0}", DateTime.Now.Ticks)); } var ctrl = new SubAreaControl(collec, entityCache, webResourcesImageCache, webResourcesHtmlCache, Service); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "Group": { if (collec.Count == 0) { collec.Add("Id", string.Format("tempId_{0}", DateTime.Now.Ticks)); } var ctrl = new GroupControl(collec); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "Privilege": { var ctrl = new PrivilegeControl(collec); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "Description": { var ctrl = new DescriptionControl(collec); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; case "Title": { var ctrl = new TitleControl(collec); ctrl.Saved += CtrlSaved; panelContainer.Controls.Add(ctrl); ctrl.BringToFront(); if (existingControl != null) { panelContainer.Controls.Remove(existingControl); } tsbItemSave.Visible = true; } break; default: { panelContainer.Controls.Clear(); tsbItemSave.Visible = false; } break; } ManageMenuDisplay(); }