Beispiel #1
0
        void AddNote()
        {
            var builder = new NoteBuilder(this.myMachine.CurrentOwner, this.myMachine);
            var note    = ModelManager.NotesService.AddNote(builder);

            this.myParent.ShowNotiz(note);
        }
Beispiel #2
0
 public MidiReader()
 {
     noteBuilder = new NoteBuilder();
     openNotes   = new Dictionary <int, Tuple <MidiEvent, Note> >();
     pitches     = new Dictionary <int, string>()
     {
         { 0, "c" },
         { 1, "c" },
         { 2, "d" },
         { 3, "d" },
         { 4, "e" },
         { 5, "f" },
         { 6, "f" },
         { 7, "g" },
         { 8, "g" },
         { 9, "a" },
         { 10, "a" },
         { 11, "b" }
     };
     SemitonValues = new List <int>()
     {
         1,
         3,
         6,
         8,
         10,
     };
 }
Beispiel #3
0
 public SetOctaveCommand(ref NoteBuilder noteBuilder, ref NoteBuilderResources noteBuilderResources) : base(ref noteBuilder, ref noteBuilderResources)
 {
     NoteBuilder          = noteBuilder;
     NoteBuilderResources = noteBuilderResources;
     chain.Add('\'', increaseOctave);
     chain.Add(',', decreaseOctave);
 }
        private ReplayerHudPanel CreateHudPanel(ReplayerViewModel viewModel, int zeroBasedSeatNumber)
        {
            var player = viewModel.PlayersCollection[zeroBasedSeatNumber];

            player.Parent = new HudElementViewModel {
                Seat = zeroBasedSeatNumber
            };

            var panel = new ReplayerHudPanel
            {
                DataContext = player
            };

            panel.Height = double.NaN;
            panel.Width  = double.NaN;

            var playerNotes = dataService.GetPlayerNotes(player.Name, viewModel.CurrentHand.PokersiteId);

            player.NoteToolTip = NoteBuilder.BuildNote(playerNotes);
            player.Parent.IsXRayNoteVisible = playerNotes.Any(x => x.IsAutoNote);

            var contextMenu = CreateContextMenu(viewModel.CurrentHand.PokersiteId, player.Name, player);

            contextMenu.EventName = "MouseRightButtonUp";

            RadContextMenu.SetContextMenu(panel, contextMenu);

            return(panel);
        }
Beispiel #5
0
        private void AddNote()
        {
            var builder = new NoteBuilder(this.myKunde, this.myKunde, this.myKunde.Kontaktlist.FirstOrDefault(k => k.MainContactFlag == true).Nummer);
            var note    = ModelManager.NotesService.AddNote(builder);
            var nv      = new NotizView(note, myKunde);

            nv.Show();
        }
Beispiel #6
0
        void AddNote()
        {
            var currentUser = ModelManager.UserService.CurrentUser as ILinkedItem;
            var builder     = new NoteBuilder(currentUser, this.mySelectedBestellung as ILinkedItem);
            var newNote     = ModelManager.NotesService.AddNote(builder);
            var nv          = new Views.NotizView(newNote, this.mySelectedBestellung);

            nv.Show();
        }
Beispiel #7
0
        private void HandleNote(MidiEvent midiEvent, ChannelMessage previousChannelMessage)
        {
            double lengthOfNote       = CalculatePartOfBar(_previousNoteAbsoluteTicks, midiEvent.AbsoluteTicks);
            double availableLengthBar = EasyTimeSignature.Top - _notesOfBarReached;

            while (lengthOfNote > 0)
            {
                // Get note
                int         midiKeyNote = previousChannelMessage.Data1;
                NoteBuilder noteBuilder = NoteBuilderDictionary[midiKeyNote % 12];

                int distance = midiKeyNote - _previousMidiKey;
                _previousMidiKey = midiKeyNote;
                while (distance < -6)
                {
                    noteBuilder.DecreaseOctave();
                    distance += 8;
                }

                while (distance > 6)
                {
                    noteBuilder.IncreaseOctave();
                    distance -= 8;
                }

                // Get duration
                int  duration;
                int  dots;
                bool isTied;
                HandleDuration(lengthOfNote, availableLengthBar, out lengthOfNote, out availableLengthBar, out duration, out dots, out isTied);

                // Create note and add
                noteBuilder.Duration((DurationType)duration);
                noteBuilder.IsDotted(dots);
                noteBuilder.IsTied(isTied);

                if (NoteIsTied)
                {
                    noteBuilder.IsTied();
                    NoteIsTied = false;
                }

                AddToPiece(noteBuilder.Build());

                // Check bar
                if (availableLengthBar == 0)
                {
                    availableLengthBar = EasyTimeSignature.Top;
                }

                _notesOfBarReached = EasyTimeSignature.Top - availableLengthBar;
            }

            _previousNoteAbsoluteTicks = midiEvent.AbsoluteTicks;
        }
Beispiel #8
0
        public override bool Execute(string s)
        {
            int  parseInt;
            bool parseSuccess = int.TryParse(s, out parseInt);

            if (!parseSuccess)
            {
                return(false);
            }
            NoteBuilder.SetDuration(NoteBuilderResources.GetDuration(s));
            return(true);
        }
Beispiel #9
0
        private void LoadNote()
        {
            playerNoteEntities = player != null?
                                 dataService.GetPlayerNotes(player.PlayerId).ToList() :
                                     null;

            if (playerNoteEntities != null)
            {
                Note         = NoteBuilder.BuildNote(playerNoteEntities);
                initialNotes = Note;
            }
        }
Beispiel #10
0
 public override bool Execute(string s)
 {
     foreach (char c in s)
     {
         if (c == '~')
         {
             NoteBuilder.SetTilde();
             return(true);
         }
     }
     return(false);
 }
 public override bool Execute(string s)
 {
     foreach (char c in s)
     {
         if (c == '.')
         {
             NoteBuilder.AddPoint();
             return(true);
         }
     }
     return(false);
 }
Beispiel #12
0
 public override bool Execute(string s)
 {
     foreach (char c in s)
     {
         if (char.IsLetter(c))
         {
             NoteBuilder.SetPitch(NoteBuilderResources.GetPitch(c.ToString()));
             return(true);
         }
     }
     return(false);
 }
        public void NotePropertiesIsCorrect()
        {
            //Arrange
            var builder = new NoteBuilder();
            //Act
            var note = builder.WithDefaultValues();

            //Assert
            Assert.Equal(note.Title, builder.TestTitle);
            Assert.Equal(note.Body, builder.TestBody);
            Assert.Equal(note.DateTime, builder.TestDateTime);
        }
Beispiel #14
0
        public static void Main(string[] args)
        {
            NoteBuilder builder = new NoteBuilder(120);

            builder.Add(new Note(NoteType.Quarter, 100, MidiNote.C4));
            builder.Add(new Note(NoteType.Quarter, 90, MidiNote.D4));
            builder.Add(new Note(NoteType.Quarter, 90, MidiNote.E4));
            builder.Add(new Note(NoteType.Quarter, 100, MidiNote.F4));

            builder.Add(new Note(NoteType.Half, 127, Chords.CDur));
            builder.Add(new Note(NoteType.Half, 127, Chords.CMoll));

            builder.Save("test.mid");
        }
Beispiel #15
0
        private MusicElement CreateMusicElement(string token)
        {
            NoteType noteType;

            Enum.TryParse(token.Substring(0, 1).ToUpper(), out noteType);

            var dots         = token.Count(c => c == '.');
            var number       = int.Parse(Regex.Match(token, @"\d+").Value);
            var durationType = (DurationType)number;

            if (new Regex(@"[a-g][,'eis]*[0-9]+[.]*").IsMatch(token))
            {
                var builder = new NoteBuilder(noteType);

                // Octave
                var increaseOctaves = token.Count(c => c == '\'');
                var decreaseOctaves = token.Count(c => c == ',') * -1;
                builder.ChangeOctave(increaseOctaves + decreaseOctaves);

                // Sharp or flat
                if (token.Contains("is"))
                {
                    builder = builder.Sharp();
                }
                else if (token.Contains("token"))
                {
                    builder = builder.Flat();
                }

                if (token.Contains("~"))
                {
                    builder = builder.IsTied();
                }

                builder.AddDots(dots).Duration(durationType);

                return(builder.Build());
            }

            if (new Regex(@"r.*?[0-9][.]*").IsMatch(token))
            {
                var builder = new RestBuilder();

                builder.AddDots(dots).Duration(durationType);

                return(builder.Build());
            }

            return(null);
        }
        public override bool Execute(string s)
        {
            //TODO
            if (s == "es")
            {
                NoteBuilder.SetMole(MoleOrCross.Mole);
                return(true);
            }
            if (s == "is")
            {
                NoteBuilder.SetMole(MoleOrCross.Cross);
                return(true);
            }
            NoteBuilder.SetMole(MoleOrCross.None);

            return(false);
        }
        private void SetNoteSound(ChannelMessage channelMessage)
        {
            Pitch       pitch;
            Octave      octave;
            MoleOrCross mole;

            helper.GetPitch(previousMidiKey, channelMessage.Data1, out pitch, out octave, out mole);

            // Append the new note.
            noteBuilder = new NoteBuilder();
            noteBuilder.SetPitch(pitch);
            noteBuilder.SetOctave(octave);
            noteBuilder.SetMole(mole);

            previousMidiKey     = channelMessage.Data1;
            startedNoteIsClosed = false;
        }
Beispiel #18
0
        void AddNote()
        {
            NoteBuilder builder = null;

            if (this.activeGrid == this.dgvTourKunden && this.mySelectedKunde != null)
            {
                if (this.mySelectedKunde != null)
                {
                    builder = new NoteBuilder(this.mySelectedKunde, this.mySelectedKunde, this.mySelectedKunde.Kontaktlist.FirstOrDefault(k => k.MainContactFlag == true).Nummer);
                    var note = ModelManager.NotesService.AddNote(builder);
                    var nv   = new NotizView(note, mySelectedKunde);
                    nv.ShowDialog(this);
                }
            }
            else if (this.activeGrid == this.dgvInteressenten && this.mySelectedProspect != null)
            {
                builder = new NoteBuilder(this.mySelectedProspect, this.mySelectedProspect);
                var note = ModelManager.NotesService.AddNote(builder);
                var nv   = new NotizView(note, this.mySelectedProspect);
                nv.ShowDialog(this);
            }
        }
Beispiel #19
0
        private void Clear()
        {
            symbols     = new Symbol[2];
            prefPitch   = "";
            noteBuilder = new NoteBuilder();
            cleffs      = new Dictionary <string, Clef.Key>
            {
                ["treble"] = Clef.Key.G,
                ["bass"]   = Clef.Key.F,
                ["alto"]   = Clef.Key.C
            };
            pitchModifiers = new Dictionary <string, Semitone.SEMITONE>
            {
                ["s"]  = Semitone.SEMITONE.MAJOR,
                ["es"] = Semitone.SEMITONE.MAJOR,
                ["is"] = Semitone.SEMITONE.MINOR,
                [""]   = Semitone.SEMITONE.NORMAL
            };
            octaveModifier = new Dictionary <char, int>
            {
                ['\''] = 1,
                [',']  = -1
            };

            parserFunctions = new Dictionary <LilypondTokenKind, Delegate>
            {
                [LilypondTokenKind.Relative]    = new Func <LilypondToken, LilypondToken>(FindRelative),
                [LilypondTokenKind.Time]        = new Func <LilypondToken, LilypondToken>(FindTimeSignature),
                [LilypondTokenKind.Tempo]       = new Func <LilypondToken, LilypondToken>(FindTempo),
                [LilypondTokenKind.Note]        = new Func <LilypondToken, LilypondToken>(SetNextNote),
                [LilypondTokenKind.Rest]        = new Func <LilypondToken, LilypondToken>(SetNextRest),
                [LilypondTokenKind.Clef]        = new Func <LilypondToken, LilypondToken>(FindClef),
                [LilypondTokenKind.Repeat]      = new Func <LilypondToken, LilypondToken>(SetRepeat),
                [LilypondTokenKind.Alternative] = new Func <LilypondToken, LilypondToken>(SetAlternitive),
            };
        }
Beispiel #20
0
 private bool increaseOctave()
 {
     NoteBuilder.IncreaseOctave();
     return(true);
 }
Beispiel #21
0
 public SetDurationCommand(ref NoteBuilder noteBuilder, ref NoteBuilderResources noteBuilderResources) : base(ref noteBuilder, ref noteBuilderResources)
 {
     NoteBuilder          = noteBuilder;
     NoteBuilderResources = noteBuilderResources;
 }
        public static ScorePartwiseMusicXML GetScorePartwise()
        {
            var partBuilder = new ScorePartwisePartBuilder();
            //---
            var measureBuilder = new ScorePartwisePartMeasureBuilder();

            measureBuilder.AddBaseAttributes(
                new MeasureItems.AttributesMusicXML
            {
                Divisions          = 32,
                DivisionsSpecified = true,
                Clef = new List <MeasureItems.Attributes.ClefMusicXML>
                {
                    new MeasureItems.Attributes.ClefMusicXML
                    {
                        Sign = MeasureItems.Attributes.ClefSignMusicXML.G,
                        Line = "2"
                    }
                },
                Key = new List <MeasureItems.Attributes.KeyMusicXML>
                {
                    new MeasureItems.Attributes.KeyMusicXML
                    {
                        Items            = new object[] { 2.ToString() },
                        ItemsElementName = new MeasureItems.Attributes.KeyChoiceTypes[] { MeasureItems.Attributes.KeyChoiceTypes.fifths },
                        Number           = "1"
                    }
                },
                Time = new List <MeasureItems.Attributes.TimeMusicXML>
                {
                    new MeasureItems.Attributes.TimeMusicXML
                    {
                        Number = "1",
                        Items  = new object[]
                        {
                            4.ToString(),
                            4.ToString()
                        },
                        ItemsElementName = new MeasureItems.Attributes.TimeChoiceTypeMusicXML[]
                        {
                            MeasureItems.Attributes.TimeChoiceTypeMusicXML.beats,
                            MeasureItems.Attributes.TimeChoiceTypeMusicXML.beattype
                        }
                    }
                }
            });
            var note1 = new NoteMusicXML
            {
                Items = new object[] { new PitchMusicXML
                                       {
                                           Octave = "4",
                                           Step   = Helpers.SimpleTypes.StepMusicXML.C
                                       }, 128 },
                ItemsElementName = new NoteChoiceTypeMusicXML[] { NoteChoiceTypeMusicXML.pitch, NoteChoiceTypeMusicXML.duration },
                Voice            = "1",
                Stem             = new MeasureItems.NoteItems.StemMusicXML
                {
                    Value = MeasureItems.NoteItems.StemValueMusicXML.up
                }
            };

            measureBuilder.AddNote(note1);
            partBuilder.AddMeasure(measureBuilder.Build());
            //===
            var r = new Random();

            for (int i = 0; i < 32; i++)
            {
                var measureBuilder2 = new ScorePartwisePartMeasureBuilder();
                for (int j = 0; j < 8; j++)
                {
                    int          randChord    = r.Next(5) + 2;
                    ChordBuilder chordBuilder = new ChordBuilder();
                    for (int k = 0; k < randChord; k++)
                    {
                        var randOctave = 3 + j % (r.Next(3) + 1);
                        var builder    = new NoteBuilder();
                        var step       = (Helpers.SimpleTypes.StepMusicXML)r.Next(7); //random step
                        var noteX      = builder
                                         .SetStem(randOctave > 4 ? MeasureItems.NoteItems.StemValueMusicXML.down : MeasureItems.NoteItems.StemValueMusicXML.up)
                                         .SetVoice(1)
                                         .SetPitch(step, randOctave)
                                         .SetDuration(16)
                                         .Build();
                        chordBuilder.AddNote(noteX);
                    }
                    measureBuilder2.AddChord(chordBuilder.Build());
                }
                partBuilder.AddMeasure(measureBuilder2.Build());
            }
            var scoreBuilder = new ScorePartwiseBuilder();

            return(scoreBuilder.AddPart(partBuilder.Build(), "Part 0").Build());
        }
Beispiel #23
0
        private void Save()
        {
            if (!HasNotes)
            {
                if (player == null)
                {
                    CloseAction?.Invoke();
                    return;
                }

                // check if notes exist because notes might be added on another table
                var notes = dataService.GetPlayerNotes(player.PlayerId);

                var manualNote = notes.FirstOrDefault(x => !x.IsAutoNote);

                if (manualNote == null)
                {
                    manualNote = new Playernotes
                    {
                        PlayerId    = player.PlayerId,
                        PokersiteId = player.PokersiteId,
                        Timestamp   = DateTime.UtcNow
                    };

                    playerNoteEntities.Add(manualNote);
                }

                manualNote.Note = Note;

                dataService.Store(manualNote);

                CloseAction?.Invoke();

                return;
            }

            // no auto
            if (playerNoteEntities.All(x => !x.IsAutoNote))
            {
                if (string.IsNullOrEmpty(Note))
                {
                    dataService.DeletePlayerNotes(playerNoteEntities);
                    playerNoteEntities.Clear();
                }
                else
                {
                    var manualNote = playerNoteEntities.FirstOrDefault();
                    manualNote.Note = Note;

                    dataService.Store(manualNote);
                }

                CloseAction?.Invoke();

                return;
            }

            var newNotes       = NoteBuilder.ParseNotes(Note);
            var manualNoteText = newNotes.Item1;

            // no auto
            if (string.IsNullOrEmpty(newNotes.Item2))
            {
                // delete auto notes if exists
                var notesToDelete = playerNoteEntities.Where(x => x.IsAutoNote).ToArray();
                dataService.DeletePlayerNotes(notesToDelete);

                notesToDelete.ForEach(x => playerNoteEntities.Remove(x));
            }
            else
            {
                // check if any auto notes
                if (playerNoteEntities.Any(x => x.IsAutoNote))
                {
                    var oldNotes = NoteBuilder.ParseNotes(initialNotes);

                    // if auto note were changed, then make them all manual
                    if (newNotes.Item2 != oldNotes.Item2)
                    {
                        // delete all auto notes because we move them to manual
                        var notesToDelete = playerNoteEntities.Where(x => x.IsAutoNote).ToArray();
                        dataService.DeletePlayerNotes(notesToDelete);
                        notesToDelete.ForEach(x => playerNoteEntities.Remove(x));

                        manualNoteText = Note;
                    }
                }
                else
                {
                    manualNoteText = Note;
                }
            }

            // no manual
            if (string.IsNullOrEmpty(manualNoteText))
            {
                // delete manual notes if exists
                var notesToDelete = playerNoteEntities.Where(x => !x.IsAutoNote).ToArray();
                dataService.DeletePlayerNotes(notesToDelete);
                notesToDelete.ForEach(x => playerNoteEntities.Remove(x));
            }
            else
            {
                var manualNote = playerNoteEntities.FirstOrDefault(x => !x.IsAutoNote);

                if (manualNote == null)
                {
                    if (player == null)
                    {
                        CloseAction?.Invoke();
                        return;
                    }

                    manualNote = new Playernotes
                    {
                        PlayerId    = player.PlayerId,
                        PokersiteId = player.PokersiteId,
                        Timestamp   = DateTime.UtcNow
                    };

                    playerNoteEntities.Add(manualNote);
                }

                manualNote.Note = manualNoteText;

                dataService.Store(manualNote);
            }


            CloseAction?.Invoke();
        }
Beispiel #24
0
 public SetPitchCommand(ref NoteBuilder noteBuilder, ref NoteBuilderResources noteBuilderResources) : base(ref noteBuilder, ref noteBuilderResources)
 {
     NoteBuilder          = noteBuilder;
     NoteBuilderResources = noteBuilderResources;
 }
Beispiel #25
0
 public BuilderCommand(ref NoteBuilder noteBuilder, ref NoteBuilderResources noteBuilderResources)
 {
 }
Beispiel #26
0
 private bool decreaseOctave()
 {
     NoteBuilder.DecreaseOctave();
     return(true);
 }
 public SetMoleOrCrossCommand(ref NoteBuilder noteBuilder, ref NoteBuilderResources noteBuilderResources) : base(ref noteBuilder, ref noteBuilderResources)
 {
     NoteBuilder          = noteBuilder;
     NoteBuilderResources = noteBuilderResources;
 }
        private void LoadHUD(HudDragCanvas dgCanvas, ReplayerViewModel viewModel, HudLayoutInfoV2 activeLayout)
        {
            var seats = (int)CurrentCapacity;

            var hudPanelService = ServiceLocator.Current.GetInstance <IHudPanelService>(ReplayerPokerSite.ToString());

            var nonToolLayoutStats = activeLayout
                                     .HudPlayerTypes
                                     .SelectMany(x => x.Stats)
                                     .Select(x => x.Stat)
                                     .Concat(activeLayout
                                             .HudBumperStickerTypes
                                             .SelectMany(x => x.Stats)
                                             .Select(x => x.Stat))
                                     .Concat(new[] { Stat.TotalHands })
                                     .Distinct()
                                     .ToArray();

            var hudElements = new List <HudElementViewModel>();

            var hudElementCreator = ServiceLocator.Current.GetInstance <IHudElementViewModelCreator>();

            var hudElementCreationInfo = new HudElementViewModelCreationInfo
            {
                GameType      = EnumGameType.CashHoldem,
                HudLayoutInfo = activeLayout,
                PokerSite     = ReplayerPokerSite
            };

            for (var i = 0; i < seats; i++)
            {
                var replayerPlayer = viewModel.PlayersCollection[i];

                hudElementCreationInfo.SeatNumber = i + 1;

                if ((int)activeLayout.TableType < hudElementCreationInfo.SeatNumber)
                {
                    continue;
                }

                var hudElement = hudElementCreator.Create(hudElementCreationInfo);

                if (string.IsNullOrEmpty(replayerPlayer.Name))
                {
                    if (hudElement != null)
                    {
                        EmptySeats.Add(hudElement);
                    }
                    continue;
                }

                var player = dataService.GetPlayer(replayerPlayer.Name, viewModel.CurrentHand.PokersiteId);

                if (player == null)
                {
                    if (hudElement != null)
                    {
                        EmptySeats.Add(hudElement);
                    }
                    continue;
                }

                if (hudElement == null ||
                    !playerIndicators.TryGetValue(replayerPlayer.Name, out HudIndicators playerData))
                {
                    continue;
                }

                hudElement.PlayerId   = player.PlayerId;
                hudElement.PlayerName = replayerPlayer.Name;
                hudElement.TotalHands = playerData.TotalHands;

                var playerNotes = dataService.GetPlayerNotes(player.PlayerId);
                hudElement.NoteToolTip       = NoteBuilder.BuildNote(playerNotes);
                hudElement.IsXRayNoteVisible = playerNotes.Any(x => x.IsAutoNote);

                var graphTools = hudElement.Tools.OfType <HudGraphViewModel>().ToArray();

                foreach (var graphTool in graphTools)
                {
                    graphTool.StatSessionCollection = new ReactiveList <decimal>();
                }

                var heatMapTools = hudElement.Tools.OfType <HudHeatMapViewModel>()
                                   .Concat(hudElement.Tools.OfType <HudGaugeIndicatorViewModel>()
                                           .SelectMany(x => x.GroupedStats)
                                           .SelectMany(x => x.Stats)
                                           .Where(x => x.HeatMapViewModel != null)
                                           .Select(x => x.HeatMapViewModel))
                                   .ToArray();

                heatMapTools.ForEach(x =>
                {
                    var heatMapKey = playerData.HeatMaps.Keys
                                     .ToArray()
                                     .FirstOrDefault(p => p.Stat == x.BaseStat.Stat);

                    if (heatMapKey != null)
                    {
                        x.HeatMap = playerData.HeatMaps[heatMapKey];
                    }
                });

                var gaugeIndicatorTools = hudElement.Tools.OfType <HudGaugeIndicatorViewModel>().ToArray();

                hudElement.SessionMoneyWonCollection = new ObservableCollection <decimal>();

                var activeLayoutHudStats = hudElement.ToolsStatInfoCollection
                                           .Concat(heatMapTools.Select(x => x.BaseStat))
                                           .Concat(gaugeIndicatorTools.Select(x => x.BaseStat))
                                           .ToList();

                var extraStats = (from nonToolLayoutStat in nonToolLayoutStats
                                  join activateLayoutHudStat in activeLayoutHudStats on nonToolLayoutStat equals activateLayoutHudStat.Stat into grouped
                                  from extraStat in grouped.DefaultIfEmpty()
                                  where extraStat == null
                                  select new StatInfo
                {
                    Stat = nonToolLayoutStat
                }).ToArray();

                activeLayoutHudStats.AddRange(extraStats);

                StatsProvider.UpdateStats(activeLayoutHudStats);

                foreach (var statInfo in activeLayoutHudStats)
                {
                    var propertyName = StatsProvider.GetStatProperyName(statInfo.Stat);

                    if (!string.IsNullOrEmpty(propertyName))
                    {
                        if (playerData.TotalHands < statInfo.MinSample)
                        {
                            statInfo.IsNotVisible = true;
                        }

                        statInfo.AssignStatInfoValues(playerData, propertyName);
                    }
                    else if (!(statInfo is StatInfoBreak) && statInfo.Stat != Stat.PlayerInfoIcon)
                    {
                        continue;
                    }
                }

                hudElement.StatInfoCollection = activeLayoutHudStats;

                var isNoteIconSet = false;

                foreach (var toolViewModel in hudElement.Tools.Where(x => x is IHudNonPopupToolViewModel).ToArray())
                {
                    if (!isNoteIconSet && toolViewModel is HudPlainStatBoxViewModel && !(toolViewModel is HudFourStatsBoxViewModel))
                    {
                        (toolViewModel as HudPlainStatBoxViewModel).IsNoteIconEnabled = true;
                        isNoteIconSet = true;
                    }

                    var panel = hudPanelService.Create(toolViewModel);

                    if (panel != null)
                    {
                        dgCanvas.Children.Add(panel);

                        Canvas.SetLeft(panel, toolViewModel.Position.X);
                        Canvas.SetTop(panel, toolViewModel.Position.Y);
                    }
                }

                hudElements.Add(hudElement);
            }

            hudLayoutsService.SetPlayerTypeIcon(hudElements, activeLayout);
        }