Пример #1
0
 public void AddLine(CLine Line, bool updateTimings)
 {
     _Lines.Add(Line);
     if (updateTimings)
     {
         UpdateTimings();
     }
 }
Пример #2
0
 public bool InsertLine(CLine Line, int Index)
 {
     if (_Lines.Count >= Index)
     {
         _Lines.Insert(Index, Line);
         UpdateTimings();
         return(true);
     }
     return(false);
 }
Пример #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;
 }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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);
        }
Пример #7
0
 public void AddLine(CLine Line)
 {
     AddLine(Line, true);
 }
Пример #8
0
 public bool InsertLine(CLine Line, int Index)
 {
     if (_Lines.Count >= Index)
     {
         _Lines.Insert(Index, Line);
         UpdateTimings();
         return true;
     }
     return false;
 }
Пример #9
0
 public void AddLine(CLine Line, bool updateTimings)
 {
     _Lines.Add(Line);
     if (updateTimings)
     {
         UpdateTimings();
     }
 }
Пример #10
0
 public void AddLine(CLine Line)
 {
     AddLine(Line, true);
 }
Пример #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;
        }
Пример #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);
        }
Пример #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);
            }
        }
Пример #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);
     }
 }
Пример #15
0
 public void AddLine(CLine Line)
 {
     _Lines.Add(Line);
     UpdateTimings();
 }
Пример #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;
 }
Пример #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);
            }
        }