private void cmdEdit_Click(object sender, EventArgs e) { if (lstRoute.SelectedIndices.Count > 0) { int k = lstRoute.SelectedIndices[0]; string strKey = mapKey[k]; TempNode tt = mapTmpNode[strKey]; frmRouting routing = new frmRouting(); routing.ID = strKey; routing.DigitMask = tt.NodeValue; routing.Description = tt.NodeText; routing.ShowDialog(); if (routing.DigitMask.Trim().Length > 0) { tt.NodeText = routing.Description.Trim(); tt.NodeValue = routing.DigitMask.Trim(); tt.Status = 2; mapTmpNode[strKey] = tt; string strTmpVal = String.Format("{0}\t{1}", new object[] { tt.NodeText, tt.NodeValue }); lstRoute.Items[k] = strTmpVal; } } }
private void cmdDelete_Click(object sender, EventArgs e) { for (int i = lstNodes.SelectedItems.Count - 1; i >= 0; i--) { TempNode tn = FindNode(lstNodes.SelectedItems[i].ToString()); if (tn != null) { tn.Status = 3; } lstNodes.Items.Remove(lstNodes.SelectedItems[i]); } }
private void cmdDelete_Click(object sender, EventArgs e) { for (int i = lstRoute.SelectedItems.Count - 1; i >= 0; i--) { string[] strTmp = lstRoute.SelectedItems[i].ToString().Split(new string[] { "\t" }, StringSplitOptions.None); TempNode tn = FindNode(strTmp[0]); if (tn != null) { tn.Status = 3; } lstRoute.Items.Remove(lstRoute.SelectedItems[i]); } }
private void frmProps_Load(object sender, EventArgs e) { if (icon != null) { this.Text = Properties.Resources.ActivityName + " Properties"; txtLabel.Text = icon.Description; ArrayList lst = icon.Nodes; foreach (Node n in lst) { if (icon.PrimaryNode.NodeName != n.NodeName) { TempNode tt = new TempNode(); tt.NodeName = n.NodeName; tt.NodeText = n.Text; tt.NodeValue = n.NodeValue; mapTmpNode[n.NodeName] = tt; lstNodes.Items.Add(n.Text); } } Dictionary <string, Page> mapPage = GraphContainer.Instance.Pages; Dictionary <string, Page> .Enumerator ee = mapPage.GetEnumerator(); while (ee.MoveNext()) { KeyValuePair <string, Page> item = ee.Current; if (icon.DocID != item.Value.DocID) { int j = lstPage.Items.Add(item.Value.FlowName); mapKey[item.Value.Entry.EntryNode.NodeName] = j; mapFlowName[item.Value.FlowName] = item.Key; } } if (GraphContainer.Instance.NodeRelationship.ContainsKey(icon.Nodes[0] as Node)) { Node toNode = GraphContainer.Instance.NodeRelationship[icon.Nodes[0] as Node]; if (mapKey.ContainsKey(toNode.NodeName)) { lstPage.SelectedIndex = mapKey[toNode.NodeName]; } } if (icon.Values().ContainsKey("arguments")) { txtArguments.Text = icon.Values()["arguments"]; } } }
private void cmdAdd_Click(object sender, EventArgs e) { if (txtResult.Text.Trim().Length > 0) { string strKey = System.Guid.NewGuid().ToString(); TempNode tt = new TempNode(); tt.NodeName = strKey; tt.NodeText = txtResult.Text.Trim(); tt.Status = 1; mapTmpNode[strKey] = tt; lstNodes.Items.Add(tt.NodeText); txtResult.Text = ""; } }
private void frmProps_Load(object sender, EventArgs e) { if (icon != null) { ArrayList lst = icon.Nodes; foreach (Node n in lst) { TempNode tt = new TempNode(); tt.NodeName = n.NodeName; tt.NodeText = n.Text; mapTmpNode[n.NodeName] = tt; listBox1.Items.Add(n.Text); } textBox2.Text = icon.Description; } }
private void cmdDelete_Click(object sender, EventArgs e) { if (lstNodes.Items.Count > 1) { for (int i = lstNodes.SelectedItems.Count - 1; i >= 0; i--) { TempNode tn = FindNode(lstNodes.SelectedItems[i].ToString()); if (tn != null) { tn.Status = 3; } lstNodes.Items.Remove(lstNodes.SelectedItems[i]); } } else { MessageBox.Show("At least one node presented for the Start."); } }
private void frmProps_Load(object sender, EventArgs e) { if (icon != null) { this.Text = Properties.Resources.ActivityName + " Properties"; ArrayList lst = icon.Nodes; foreach (Node n in lst) { TempNode tt = new TempNode(); tt.NodeName = n.NodeName; tt.NodeText = n.Text; tt.NodeValue = n.NodeValue; mapTmpNode[n.NodeName] = tt; lstNodes.Items.Add(n.Text); } } }
private TempNode FindNode(string strText) { TempNode tn = null; Dictionary <string, TempNode> .Enumerator en = mapTmpNode.GetEnumerator(); while (en.MoveNext()) { KeyValuePair <string, TempNode> val = en.Current; if (val.Value.NodeText == strText) { tn = val.Value; break; } } return(tn); }
private void cmdAdd_Click(object sender, EventArgs e) { frmRouting routing = new frmRouting(); routing.ShowDialog(); if (routing.DigitMask.Trim().Length > 0) { string strKey = System.Guid.NewGuid().ToString(); TempNode tt = new TempNode(); tt.NodeName = strKey; tt.NodeText = routing.Description.Trim(); tt.NodeValue = routing.DigitMask.Trim(); tt.Status = 1; mapTmpNode[strKey] = tt; string strTmpVal = String.Format("{0}\t{1}", new object[] { tt.NodeText, tt.NodeValue }); int j = lstRoute.Items.Add(strTmpVal); mapKey[j] = tt.NodeName; } }
private void frmProps_Load(object sender, EventArgs e) { this.Text = Properties.Resources.ActivityName + " Properties"; try { if (icon != null) { if (icon.Values().ContainsKey("var")) { txtVar.Text = icon.Values()["var"]; } else { txtVar.Text = ""; } ArrayList lst = icon.Nodes; foreach (Node n in lst) { TempNode tt = new TempNode(); tt.NodeName = n.NodeName; tt.NodeText = n.Text; tt.NodeValue = n.NodeValue; mapTmpNode[n.NodeName] = tt; string strTmpVal = String.Format("{0}\t{1}", new object[] { tt.NodeText, tt.NodeValue }); int j = lstRoute.Items.Add(strTmpVal); mapKey[j] = tt.NodeName; } txtLabel.Text = icon.Description; } } catch (Exception ex) { } }
private void frmProps_Load(object sender, EventArgs e) { this.Text = Properties.Resources.ActivityName + " Properties"; try { if (icon != null) { ArrayList lst = icon.Nodes; foreach (Node n in lst) { TempNode tt = new TempNode(); tt.NodeName = n.NodeName; tt.NodeText = n.Text; tt.NodeValue = n.NodeValue; mapTmpNode[n.NodeName] = tt; string strTmpVal = String.Format("{0}\t{1}", new object[] { tt.NodeText, tt.NodeValue }); int j = lstRoute.Items.Add(strTmpVal); mapKey[j] = tt.NodeName; } txtLabel.Text = icon.Description; if (icon.Values().ContainsKey("maxdigit")) { numDigits.Value = Convert.ToInt32(icon.Values()["maxdigit"]); } else { numDigits.Value = 1; } if (icon.Values().ContainsKey("retry")) { numRetry.Value = Convert.ToInt32(icon.Values()["retry"]); } else { numRetry.Value = 3; } if (icon.Values().ContainsKey("silent")) { numSilent.Value = Convert.ToInt32(icon.Values()["silent"]); } else { numSilent.Value = 5; } if (icon.Values().ContainsKey("entrymsg")) { txtMsg.Text = icon.Values()["entrymsg"]; } else { txtMsg.Text = ""; } if (icon.Values().ContainsKey("invalidmsg")) { txtInvalidMsg.Text = icon.Values()["invalidmsg"]; } else { txtInvalidMsg.Text = ""; } if (icon.Values().ContainsKey("noinputmsg")) { txtNoInput.Text = icon.Values()["noinputmsg"]; } else { txtNoInput.Text = ""; } if (icon.Values().ContainsKey("globaltimeout")) { if (icon.Values()["globaltimeout"].Length > 0) { nodeGlobalTimeout = GraphContainer.Instance.Nodes[icon.Values()["globaltimeout"]]; } else { nodeGlobalTimeout = null; } } else { nodeGlobalTimeout = null; } if (icon.Values().ContainsKey("globalinvalid")) { if (icon.Values()["globalinvalid"].Length > 0) { nodeGlobalInvalid = GraphContainer.Instance.Nodes[icon.Values()["globalinvalid"]]; } else { nodeGlobalInvalid = null; } } else { nodeGlobalInvalid = null; } Dictionary <string, Page> mapPage = GraphContainer.Instance.Pages; Dictionary <string, Page> .Enumerator ee = mapPage.GetEnumerator(); while (ee.MoveNext()) { KeyValuePair <string, Page> item = ee.Current; if (icon.DocID != item.Value.DocID) { int j = lstGlobalTimeout.Items.Add(item.Value.FlowName); mapKeyGlobalTimeout[item.Value.Entry.EntryNode.NodeName] = j; mapGlobalTimeoutFlowName[item.Value.FlowName] = item.Key; int k = lstGlobalInvalid.Items.Add(item.Value.FlowName); mapKeyGlobalInvalid[item.Value.Entry.EntryNode.NodeName] = k; mapGlobalInvalidFlowName[item.Value.FlowName] = item.Key; } } if (nodeGlobalTimeout != null) { lstGlobalTimeout.SelectedIndex = mapKeyGlobalTimeout[nodeGlobalTimeout.NodeName]; } if (nodeGlobalInvalid != null) { lstGlobalInvalid.SelectedIndex = mapKeyGlobalInvalid[nodeGlobalInvalid.NodeName]; } } } catch (Exception ex) { } }