public void Load(string iFilename) { IEnumerator enumerator = null; XmlDocument xmlDocument = new XmlDocument(); try { xmlDocument.Load(iFilename); try { enumerator = xmlDocument.SelectNodes("//Trans/TransInfo").GetEnumerator(); while (enumerator.MoveNext()) { Transition.Transition transition = new Transition.Transition((XmlElement)enumerator.Current); this.i_Transitions.Add(transition.HashKey, transition); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } } catch (Exception exception) { ProjectData.SetProjectError(exception); Interaction.MsgBox(string.Format("XMLFile:{0}", iFilename), MsgBoxStyle.OKOnly, null); ProjectData.ClearProjectError(); } }
public void Add(Transition.Transition iValue) { try { this.i_Transitions.Add(iValue.HashKey, iValue); } catch (Exception exception) { ProjectData.SetProjectError(exception); Interaction.MsgBox(exception.Message, MsgBoxStyle.OKOnly, null); ProjectData.ClearProjectError(); } }
public void Display(ListBox iList) { IEnumerator enumerator = null; iList.Items.Clear(); try { enumerator = this.i_Transitions.Values.GetEnumerator(); while (enumerator.MoveNext()) { Transition.Transition current = (Transition.Transition)enumerator.Current; iList.Items.Add(current); } } finally { if (enumerator is IDisposable) { ((IDisposable)enumerator).Dispose(); } } }
public void Remove(Transition.Transition iValue) { this.i_Transitions.Remove(iValue.HashKey); }