Example #1
0
 public void AddLine(CLine Line, bool updateTimings)
 {
     _Lines.Add(Line);
     if (updateTimings)
     {
         UpdateTimings();
     }
 }
Example #2
0
 public bool InsertLine(CLine Line, int Index)
 {
     if (_Lines.Count >= Index)
     {
         _Lines.Insert(Index, Line);
         UpdateTimings();
         return(true);
     }
     return(false);
 }
Example #3
0
 public CLine(CLine line)
 {
     foreach (CNote note in line._Notes)
     {
         _Notes.Add(new CNote(note));
     }
     _StartBeat         = line._StartBeat;
     _EndBeat           = line._EndBeat;
     _PerfectLine       = line._PerfectLine;
     _MinBeat           = line._MinBeat;
     _MaxBeat           = line._MaxBeat;
     _VisibleInTimeLine = line._VisibleInTimeLine;
 }
Example #4
0
        private void NewSentence(int Player, int Start)
        {
            CLines lines = Notes.GetLines(Player);
            CLine  line  = new CLine();

            line.StartBeat = Start;
            if (lines.LineCount == 0)
            {
                lines.AddLine(line);
            }
            else
            {
                lines.AddLine(line);
            }
        }
Example #5
0
        private void ParseNote(int Player, ENoteType NoteType, int Start, int Length, int Tone, string Text)
        {
            CNote  note  = new CNote(Start, Length, Tone, Text, NoteType);
            CLines lines = this.Notes.GetLines(Player);

            if (lines.LineCount == 0)
            {
                CLine line = new CLine();
                line.AddNote(note);
                lines.AddLine(line, false);
            }
            else
            {
                lines.AddNote(note, lines.LineCount - 1, false);
            }
        }
Example #6
0
        public bool IsPerfect(CLine CompareLine)
        {
            if (_Notes.Count == 0)
            {
                return(false);
            }

            if (_Notes.Count != CompareLine.NoteCount)
            {
                return(false);
            }

            if (CompareLine.Points == 0)
            {
                return(false);
            }

            _PerfectLine = (this.Points == CompareLine.Points);
            return(_PerfectLine);
        }
Example #7
0
 public void AddLine(CLine Line)
 {
     AddLine(Line, true);
 }
Example #8
0
 public bool InsertLine(CLine Line, int Index)
 {
     if (_Lines.Count >= Index)
     {
         _Lines.Insert(Index, Line);
         UpdateTimings();
         return true;
     }
     return false;
 }
Example #9
0
 public void AddLine(CLine Line, bool updateTimings)
 {
     _Lines.Add(Line);
     if (updateTimings)
     {
         UpdateTimings();
     }
 }
Example #10
0
 public void AddLine(CLine Line)
 {
     AddLine(Line, true);
 }
Example #11
0
        public bool IsPerfect(CLine CompareLine)
        {
            if (_Notes.Count == 0)
                return false;

            if (_Notes.Count != CompareLine.NoteCount)
                return false;

            if (CompareLine.Points == 0)
                return false;

            _PerfectLine = (this.Points == CompareLine.Points);
            return _PerfectLine;
        }
Example #12
0
        public virtual void AddLine(int ID, CLine[] Line, int LineNr, int Player)
        {
            if (Line == null)
                return;

            int n = FindPlayerLine(ID);
            if (n == -1)
                return;

            if (LineNr == _PlayerNotes[n].LineNr)
                return;

            SPlayerNotes notes = _PlayerNotes[n];

            if (Line.Length == 0 || Line.Length <= LineNr)
                return;

            notes.Lines = Line;
            notes.LineNr = LineNr;
            notes.GoldenStars.Clear();
            notes.Flares.Clear();
            notes.PerfectNoteEffect.Clear();

            _PlayerNotes.RemoveAt(n);
            _PlayerNotes.Add(notes);
        }
Example #13
0
        private void ParseNote(int Player, ENoteType NoteType, int Start, int Length, int Tone, string Text)
        {
            CNote note = new CNote(Start, Length, Tone, Text, NoteType);
            CLines lines = this.Notes.GetLines(Player);

            if (lines.LineCount == 0)
            {
                CLine line = new CLine();
                line.AddNote(note);
                lines.AddLine(line);
            }
            else
            {
                lines.AddNote(note, lines.LineCount - 1);
            }
        }
Example #14
0
 private void NewSentence(int Player, int Start)
 {
     CLines lines = Notes.GetLines(Player);
     CLine line = new CLine();
     line.StartBeat = Start;
     if (lines.LineCount == 0)
     {
         lines.AddLine(line);
     }
     else
     {
         lines.AddLine(line);
     }
 }
Example #15
0
 public void AddLine(CLine Line)
 {
     _Lines.Add(Line);
     UpdateTimings();
 }
Example #16
0
 public CLine(CLine line)
 {
     foreach (CNote note in line._Notes)
     {
         _Notes.Add(new CNote(note));
     }
     _StartBeat = line._StartBeat;
     _EndBeat = line._EndBeat;
     _PerfectLine = line._PerfectLine;
     _MinBeat = line._MinBeat;
     _MaxBeat = line._MaxBeat;
     _VisibleInTimeLine = line._VisibleInTimeLine;
 }
Example #17
0
        public void SetLine(CLine Line)
        {
            _Notes.Clear();

            _width = 0f;
            foreach (CNote note in Line.Notes)
            {
                SNote n = new SNote();

                n.Text = note.Text;
                n.StartBeat = note.StartBeat;
                n.EndBeat = note.EndBeat;
                n.Duration = note.Duration;
                n.Type = note.NoteType;

                _Text.Text = note.Text;
                _Text.Style = EStyle.Bold;

                if (n.Type == ENoteType.Freestyle)
                    _Text.Style = EStyle.BoldItalic;

                RectangleF rect = CDraw.GetTextBounds(_Text);
                _width += rect.Width;
                _Notes.Add(n);
            }
        }