Beispiel #1
0
 /// <summary>
 /// Добавить элемент в список
 /// </summary>
 /// <param name="I"></param>
 public void AddItem(OptionListItem I)
 {
     mStorage.Add(I);
 }
Beispiel #2
0
        private void LoadOption(Options.OptionList O, CONF.XmlLoad Base, CONF.XmlLoad X)
        {
            var I = new Options.OptionListItem(Base.GetAttribute("label"));
            I.Default = (Base.GetAttribute("default") != null);

            while (X.Read())
            {
                switch (X.ElementName)
                {
                    case "value":
                        string N = X.GetAttribute("name");
                        string V = X.GetAttribute("val");

                        if(N != null) I.setString(N, V);
                        break;
                }
            }

            X.Close();
            O.AddItem(I);
        }
Beispiel #3
0
        private List<Tool.Options.OptionListItem> getOptions()
        {
            var R = new List<Tool.Options.OptionListItem>();
            Array.ForEach(ToolOptionsCB, CB => { if (CB.Visible && CB.SelectedItem != null) R.Add(CB.SelectedItem as Tool.Options.OptionListItem); });

            foreach(var TB in ToolOptionsTB)
            {
                if (TB.Visible)
                {
                    var O = TB.Tag as Tool.Options.OptionText;
                    var I = new Tool.Options.OptionListItem(O.Name);
                    I.setString(O.ParamName, TB.Text);

                    R.Add(I);
                }
            }
            return R;
        }