Esempio n. 1
0
        public void Checker_NewSeperationEvents(object sender, SeparationEventArgs e)
        {
            if (e.SeparationObjects != null)
            {
                foreach (var separationObject in e.SeparationObjects)
                {
                    // Input to file
                    string input =
                        $"Separation occured at {Convert.ToString(separationObject.TimeOfOcccurence, Thread.CurrentThread.CurrentCulture)} between tracks: {separationObject.Tag1}, {separationObject.Tag2}";

                    StreamWriter writer;

                    using (writer = File.AppendText(FilePath))
                    {
                        writer.WriteLine(input);
                    }
                }
            }
            else if (e.SeparationObject != null)
            {
                // Input to file
                string input =
                    $"Separation occured at {Convert.ToString(e.SeparationObject.TimeOfOcccurence, Thread.CurrentThread.CurrentCulture)} between tracks: {e.SeparationObject.Tag1}, {e.SeparationObject.Tag2}";

                StreamWriter writer;

                using (writer = File.AppendText(FilePath))
                {
                    writer.WriteLine(input);
                }
            }
        }
Esempio n. 2
0
 public void Checker_SeperationEvents(object sender, SeparationEventArgs e)
 {
     foreach (var separationObject in e.SeparationObjects)
     {
         // $ for at gøre kompile hurtigere
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine($"{separationObject.Tag1} and {separationObject.Tag2} are in conflict");
     }
 }
Esempio n. 3
0
        private void OnNewSeparationEvent(SeparationEventArgs newEvents)
        {
            var handler = NewSeperationEvents;

            handler?.Invoke(this, newEvents);
        }
Esempio n. 4
0
        private void OnSeparationEvent(SeparationEventArgs conflictedList)
        {
            var handler = SeperationEvents;

            handler?.Invoke(this, conflictedList);
        }