Beispiel #1
0
 ////////////////初期化
 //コンストラクタ
 public Sequence()
 {
     Division lastDivision = new Division(this);
     lastDivision.isLast = true;
     divisions.Add(lastDivision);
     textSequenceName = new TextBox() { Text="Sequence"+uniqueId};
     textSampleRate = new TextBox() { Text="1000"};
     uniqueId++;
 }
Beispiel #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;
        }