Example #1
0
 public Node(Channel _parent)
 {
     parent = _parent;
     foreach (string str in Enum.GetNames(typeof(NodeType))) {
         Combo_type.Items.Add(str);
     }
     Combo_type.SelectedIndex = 0;
     Text_value.TextChanged += (s, e) => TextChanged();
     Combo_type.DropDownClosed += (s, e) => ComboChanged();
 }
Example #2
0
        //読み込み
        public void fromSeq(string str)
        {
            int tempDivisionCount;
            int tempChannelCount;
            int lineCount=0;
            string[] strs = str.Split(separator.ToCharArray());

            tempDivisionCount = int.Parse(strs[0].Trim()); lineCount++;
            divisions.Clear();
            for (int divisionCount=0; divisionCount < tempDivisionCount; divisionCount++) {
                Division label = new Division(this);
                label.fromSeq(strs[lineCount+divisionCount]);
                divisions.Add(label);
            }
            lineCount += tempDivisionCount;

            tempChannelCount = int.Parse(strs[lineCount].Trim()); lineCount++;
            channels.Clear();
            for (int channelCount = 0; channelCount < tempChannelCount; channelCount++) {
                Channel ch = new Channel(this,tempDivisionCount);
                ch.fromSeq(strs[lineCount + channelCount]);
                channels.Add(ch);
            }
            lineCount += tempChannelCount;
        }