private void InitTreeNodes(WfApplicationCollection applications) { DeluxeTreeNode rootNode = new DeluxeTreeNode(TreeRootText, TreeRootText) { NodeOpenImg = "../images/computer.gif", NodeCloseImg = "../images/computer.gif", Expanded = true }; AddDefaultTreeNode(rootNode); foreach (WfApplication app in applications) { DeluxeTreeNode node = new DeluxeTreeNode(app.Name, app.CodeName) { ToolTip = app.CodeName, NodeOpenImg = "../images/accomplished.gif", NodeCloseImg = "../images/accomplished.gif", ChildNodesLoadingType = ChildNodesLoadingTypeDefine.LazyLoading }; rootNode.Nodes.Add(node); } tree.Nodes.Add(rootNode); }
private ListItem[] ToOptions(WfApplicationCollection apps) { var result = new ListItem[apps.Count + 1]; result[0] = new ListItem("全部", string.Empty); int i = 1; foreach (var item in apps) { result[i++] = new ListItem(item.Name, item.CodeName); } return(result); }
public void LoadAllProgramsInApplicationsTest() { WfApplicationCollection applications = WfApplicationAdapter.Instance.LoadAll(); foreach (WfApplication app in applications) { Console.WriteLine("App: CodeName={0}, Name={1}", app.CodeName, app.Name); WfProgramInApplicationCollection programs = WfApplicationAdapter.Instance.LoadProgramsByApplication(app.CodeName); programs.ForEach(prog => Console.WriteLine("CodeName={0}, Name={1}", prog.CodeName, prog.Name)); Console.WriteLine(); } }
public WfClientApplicationCollection ServerToClient(WfApplicationCollection server) { server.NullCheck("server"); WfClientApplicationCollection client = new WfClientApplicationCollection(); foreach (WfApplication serverItem in server) { WfClientApplication clientItem = null; this.ServerToClient(serverItem, ref clientItem); client.Add(clientItem); } return client; }
public WfClientApplicationCollection ServerToClient(WfApplicationCollection server) { server.NullCheck("server"); WfClientApplicationCollection client = new WfClientApplicationCollection(); foreach (WfApplication serverItem in server) { WfClientApplication clientItem = null; this.ServerToClient(serverItem, ref clientItem); client.Add(clientItem); } return(client); }
public void LoadAllApplicationsTest() { WfApplicationCollection applications = WfApplicationAdapter.Instance.LoadAll(); applications.ForEach(app => Console.WriteLine("CodeName={0}, Name={1}", app.CodeName, app.Name)); }