Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void CloseSetup()
        {
            if (_dialog == null)
            {
                return;
            }

            _dialog.Dispose();
            _dialog = null;
        }
Ejemplo n.º 3
0
        public void CloseSetup()
        {
            if (_dialog == null) {
                return;
            }

            _dialog.Dispose();
            _dialog = null;
        }
Ejemplo n.º 4
0
        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;
        }