public Control Setup() { var programList = _setupNode.SelectNodes("Programs/Program"); if (programList == null) { return(null); } var num = 0; var programs = new string[programList.Count][]; foreach (var node in programList.Cast <XmlNode>().Where(node => node.Attributes != null)) { // Already checked in the LINQ // ReSharper disable PossibleNullReferenceException programs[num++] = new[] { node.InnerText, node.Attributes["params"].Value, node.Attributes["trigger"].Value }; // ReSharper restore PossibleNullReferenceException } _dialog = new SetupDialog(programs); return(_dialog); }
public void CloseSetup() { if (_dialog == null) { return; } _dialog.Dispose(); _dialog = null; }
public Control Setup() { var programList = _setupNode.SelectNodes("Programs/Program"); if (programList == null) { return null; } var num = 0; var programs = new string[programList.Count][]; foreach (var node in programList.Cast<XmlNode>().Where(node => node.Attributes != null)) { // Already checked in the LINQ // ReSharper disable PossibleNullReferenceException programs[num++] = new[] {node.InnerText, node.Attributes["params"].Value, node.Attributes["trigger"].Value}; // ReSharper restore PossibleNullReferenceException } _dialog = new SetupDialog(programs); return _dialog; }