Ejemplo n.º 1
0
        private void CreateHalvRegistersBox()
        {
            //register number
            int i = 0;

            foreach (string name in HalvRegistersName)
            {
                //data
                Label label = new Label();
                label.Location    = new Point(HalvRegisterPositionX, ElementPositionY(i));
                label.Name        = name;
                label.TextAlign   = ContentAlignment.MiddleCenter;
                label.Size        = new Size(RegisterWidth, ElementsHeight);
                label.BorderStyle = BorderStyle.FixedSingle;
                LabelsList.Add(name, label);
                Form.Controls.Add(label);

                //label
                label             = new Label();
                label.Location    = new Point(HalvRegistersLabelPositionX, ElementPositionY(i));
                label.Size        = new Size(LabelWidth, ElementsHeight);
                label.TextAlign   = ContentAlignment.MiddleCenter;
                label.BorderStyle = BorderStyle.FixedSingle;
                label.Text        = name;
                label.Name        = name + "Label";
                LabelsList.Add(name + "Label", label);
                Form.Controls.Add(label);
                //increase register number
                i++;
            }
        }
Ejemplo n.º 2
0
        private void CreateNumInfoBox()
        {
            //number
            int i = 1;

            foreach (string name in Inputs)
            {
                //data
                Label label = new Label();
                label.Location    = new Point(InputPositionX, ElementPositionY(i));
                label.Name        = name;
                label.TextAlign   = ContentAlignment.MiddleCenter;
                label.Size        = new Size(InputWidth, ElementsHeight);
                label.Text        = "0";
                label.BorderStyle = BorderStyle.FixedSingle;
                LabelsList.Add(name, label);
                Form.Controls.Add(label);

                //label
                label             = new Label();
                label.Location    = new Point(InputsLabelPositionX, ElementPositionY(i));
                label.Size        = new Size(LabelWidth, ElementsHeight);
                label.TextAlign   = ContentAlignment.MiddleCenter;
                label.BorderStyle = BorderStyle.FixedSingle;
                label.Text        = name;
                label.Name        = name + "Label";
                LabelsList.Add(name + "Label", label);
                Form.Controls.Add(label);
                //increase number
                i++;
            }
        }
Ejemplo n.º 3
0
        protected void UpdateAll(LiveSplitState state)
        {
            if (Split != null)
            {
                RecreateLabels();

                NameLabel.Text = Split.Name;

                var splitIndex = state.Run.IndexOf(Split);
                if (splitIndex < state.CurrentSplitIndex)
                {
                    NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.BeforeNamesColor : state.LayoutSettings.TextColor;
                }
                else
                {
                    if (Split == state.CurrentSplit)
                    {
                        NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.CurrentNamesColor : state.LayoutSettings.TextColor;
                    }
                    else
                    {
                        NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.AfterNamesColor : state.LayoutSettings.TextColor;
                    }
                }

                foreach (var label in LabelsList)
                {
                    var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));
                    UpdateColumn(state, label, column);
                }
            }
        }
Ejemplo n.º 4
0
        internal void Parse(LabelsList CurrentLabels)
        {
            List <string> ListOfLabels = new List <string>();

            foreach (string[] LabelArray in CurrentLabels)
            {
                if (LabelArray.Length == 0)
                {
                    throw new FormatException("The array of label data was not in the expected format.");
                }
                ListOfLabels.Add(LabelArray[0]);
                TorrentLabel NewTorrentLabel = GetByLabel(LabelArray[0]);
                if (NewTorrentLabel == null)
                {
                    NewTorrentLabel = new TorrentLabel(LabelArray);
                    _torrentLabelCollectionInternal.Add(NewTorrentLabel);
                    CallCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, NewTorrentLabel));
                }
                else
                {
                    NewTorrentLabel.SetValuesFromStringArray(LabelArray);
                }
            }
            RemoveWhereLabelCodeIsNotInList(ListOfLabels);
        }
Ejemplo n.º 5
0
        public void SetLabels(string labels)
        {
            LabelsList.Replace(
                labels.SmartSplit("|")
                .Select(l => new Label(l)));

            EventBroker.Publish(AppEvents.MessageLabelsUpdated, this);
        }
Ejemplo n.º 6
0
        public void ThenOnlyTheFilteredLabelsShouldBeReturnInTheResponse()
        {
            response.StatusCode.Should().Be(200);
            List <LabelsList> mylabels = LabelsList.Deserialize(response);

            for (int i = 0; i < mylabels.Count; i++)
            {
                Console.WriteLine(mylabels[i].id, mylabels[i].idBoard, mylabels[i].name, mylabels[i].color);
            }
        }
Ejemplo n.º 7
0
        protected void UpdateAll(LiveSplitState state)
        {
            RecreateLabels();

            foreach (var label in LabelsList)
            {
                var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));
                label.Text      = column.Name;
                label.ForeColor = Settings.LabelsColor;
            }
        }
Ejemplo n.º 8
0
        public void AddLabel(Label label, bool post)
        {
            var mailbox = VirtualMailBox.Current;

            using (mailbox.Labels.ReaderLock)
            {
                string key = label.Labelname.ToLower();

                if (!mailbox.Labels.ContainsKey(key))
                {
                    mailbox.Labels.Add(key, new List <Label>());

                    if (label.LabelType == LabelType.Custom)
                    {
                        EventBroker.Publish(AppEvents.LabelCreated, key);
                    }
                }

                if (LabelsList.Any(l => l.Equals(label)))
                {
                    return;
                }

                label.Messages.Add(this);

                mailbox.Labels[key].Add(label);

                LabelsList.Add(label);

                if (post)
                {
                    PostLabels.Add(label);

                    SendLabels = String.Join("|", PostLabels.Select(s => s.ToString()).ToArray());

                    EnqueueCloudNotification(ModifyAction.Label, String.Concat("%2B", label.Labelname));                     // + (url encoded)
                }
            }

            // Recreate and save labels list
            Labels = String.Join("|", LabelsList.Select(s => s.ToString()).ToArray());

            AsyncUpdateQueue.Enqueue(this);

            OnPropertyChanged("IsTodo");
            OnPropertyChanged("IsWaitingFor");
            OnPropertyChanged("IsSomeday");

            EventBroker.Publish(AppEvents.MessageUpdated);
            EventBroker.Publish(AppEvents.MessageLabelsUpdated, this);
        }
Ejemplo n.º 9
0
 protected void RecreateLabels()
 {
     if (ColumnsList != null && LabelsList.Count != ColumnsList.Count())
     {
         LabelsList.Clear();
         foreach (var column in ColumnsList)
         {
             LabelsList.Add(new SimpleLabel
             {
                 HorizontalAlignment = StringAlignment.Far
             });
         }
     }
 }
Ejemplo n.º 10
0
        public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            UpdateAll(state);

            Cache.Restart();
            Cache["ColumnsCount"] = ColumnsList.Count();
            foreach (var label in LabelsList)
            {
                Cache["Columns" + LabelsList.IndexOf(label) + "Text"] = label.Text;
            }

            if (invalidator != null && Cache.HasChanged || FrameCount > 1)
            {
                invalidator.Invalidate(0, 0, width, height);
            }
        }
Ejemplo n.º 11
0
        protected void UpdateAll(LiveSplitState state)
        {
            if (Split != null)
            {
                RecreateLabels();

                if (Settings.AutomaticAbbreviations)
                {
                    if (NameLabel.Text != Split.Name || NameLabel.AlternateText == null || !NameLabel.AlternateText.Any())
                    {
                        NameLabel.AlternateText = Split.Name.GetAbbreviations().ToList();
                    }
                }
                else if (NameLabel.AlternateText?.Any() == true)
                {
                    NameLabel.AlternateText.Clear();
                }

                NameLabel.Text = Split.Name;

                var splitIndex = state.Run.IndexOf(Split);
                if (splitIndex < state.CurrentSplitIndex)
                {
                    NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.BeforeNamesColor : state.LayoutSettings.TextColor;
                }
                else
                {
                    if (Split == state.CurrentSplit)
                    {
                        NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.CurrentNamesColor : state.LayoutSettings.TextColor;
                    }
                    else
                    {
                        NameLabel.ForeColor = Settings.OverrideTextColor ? Settings.AfterNamesColor : state.LayoutSettings.TextColor;
                    }
                }

                foreach (var label in LabelsList)
                {
                    var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));
                    UpdateColumn(state, label, column);
                }
            }
        }
Ejemplo n.º 12
0
        public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            if (Split != null)
            {
                UpdateAll(state);
                NeedUpdateAll = false;

                IsActive = (state.CurrentPhase == TimerPhase.Running ||
                            state.CurrentPhase == TimerPhase.Paused) &&
                           state.CurrentSplit == Split;

                Cache.Restart();
                Cache["Icon"] = Split.Icon;
                if (Cache.HasChanged)
                {
                    if (Split.Icon == null)
                    {
                        FrameCount = 0;
                    }
                    else
                    {
                        FrameCount = Split.Icon.GetFrameCount(new FrameDimension(Split.Icon.FrameDimensionsList[0]));
                    }
                }
                Cache["DisplayIcon"]  = DisplayIcon;
                Cache["SplitName"]    = NameLabel.Text;
                Cache["IsActive"]     = IsActive;
                Cache["NameColor"]    = NameLabel.ForeColor.ToArgb();
                Cache["ColumnsCount"] = ColumnsList.Count();
                foreach (var label in LabelsList)
                {
                    Cache["Columns" + LabelsList.IndexOf(label) + "Text"]  = label.Text;
                    Cache["Columns" + LabelsList.IndexOf(label) + "Color"] = label.ForeColor.ToArgb();
                }

                if (invalidator != null && Cache.HasChanged || FrameCount > 1)
                {
                    invalidator.Invalidate(0, 0, width, height);
                }
            }
        }
Ejemplo n.º 13
0
        private void CreateInputBox()
        {
            //data
            Input             = new TextBox();
            Input.Location    = new Point(InputPositionX, ElementPositionY(0));
            Input.Name        = "Request";
            Input.Text        = "Mov ax, bx";
            Input.TextAlign   = HorizontalAlignment.Center;
            Input.Size        = new Size(InputWidth, ElementsHeight);
            Input.BorderStyle = BorderStyle.FixedSingle;
            Form.Controls.Add(Input);

            //label
            Label label = new Label();

            label.Location    = new Point(InputsLabelPositionX, ElementPositionY(0));
            label.Size        = new Size(LabelWidth, ElementsHeight);
            label.TextAlign   = ContentAlignment.MiddleCenter;
            label.BorderStyle = BorderStyle.FixedSingle;
            label.Text        = "Req";
            label.Name        = "Request Label";
            LabelsList.Add("Request Label", label);
            Form.Controls.Add(label);
        }
Ejemplo n.º 14
0
        public void RemoveLabel(Label label, bool post)
        {
            LabelsList.Remove(label);

            label.Messages.Remove(this);

            if (post)
            {
                // If label allready is in post but has
                // not been posted yet, remove it
                if (PostLabels.Contains(label))
                {
                    PostLabels.Remove(label);
                }
                else
                {
                    PostLabels.Add(label);
                }

                SendLabels = String.Join("|", PostLabels.Select(s => s.ToString()).ToArray());

                EnqueueCloudNotification(ModifyAction.Label, String.Concat("-", label.Labelname));
            }

            // Recreate and save labels list
            Labels = String.Join("|", LabelsList.Select(s => s.ToString()).ToArray());

            AsyncUpdateQueue.Enqueue(this);

            OnPropertyChanged("IsTodo");
            OnPropertyChanged("IsWaitingFor");
            OnPropertyChanged("IsSomeday");

            EventBroker.Publish(AppEvents.MessageUpdated);
            EventBroker.Publish(AppEvents.MessageLabelsUpdated, this);
        }
Ejemplo n.º 15
0
        private void DrawGeneral(Graphics g, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            if (Settings.BackgroundGradient == ExtendedGradientType.Alternating)
            {
                g.FillRectangle(new SolidBrush(
                                    Settings.BackgroundColor
                                    ), 0, 0, width, height);
            }

            MeasureTimeLabel.Text  = TimeFormatter.Format(new TimeSpan(24, 0, 0));
            MeasureDeltaLabel.Text = DeltaTimeFormatter.Format(new TimeSpan(0, 9, 0, 0));

            MeasureTimeLabel.Font          = state.LayoutSettings.TimesFont;
            MeasureTimeLabel.IsMonospaced  = true;
            MeasureDeltaLabel.Font         = state.LayoutSettings.TimesFont;
            MeasureDeltaLabel.IsMonospaced = true;

            MeasureTimeLabel.SetActualWidth(g);
            MeasureDeltaLabel.SetActualWidth(g);

            if (Settings.SplitTimesAccuracy != CurrentAccuracy)
            {
                TimeFormatter   = new RegularSplitTimeFormatter(Settings.SplitTimesAccuracy);
                CurrentAccuracy = Settings.SplitTimesAccuracy;
            }
            if (Settings.DeltasAccuracy != CurrentDeltaAccuracy || Settings.DropDecimals != CurrentDropDecimals)
            {
                DeltaTimeFormatter   = new DeltaSplitTimeFormatter(Settings.DeltasAccuracy, Settings.DropDecimals);
                CurrentDeltaAccuracy = Settings.DeltasAccuracy;
                CurrentDropDecimals  = Settings.DropDecimals;
            }

            foreach (var label in LabelsList)
            {
                label.ShadowColor = state.LayoutSettings.ShadowsColor;
                label.Y           = 0;
                label.Height      = height;
            }
            MinimumWidth = 10f;

            if (ColumnsList.Count() == LabelsList.Count)
            {
                var curX = width - 7;
                foreach (var label in LabelsList.Reverse())
                {
                    var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));

                    var labelWidth = 0f;
                    if (column.Type == ColumnType.DeltaorSplitTime || column.Type == ColumnType.SegmentDeltaorSegmentTime)
                    {
                        labelWidth = Math.Max(MeasureDeltaLabel.ActualWidth, MeasureTimeLabel.ActualWidth);
                    }
                    else if (column.Type == ColumnType.Delta || column.Type == ColumnType.SegmentDelta)
                    {
                        labelWidth = MeasureDeltaLabel.ActualWidth;
                    }
                    else
                    {
                        labelWidth = MeasureTimeLabel.ActualWidth;
                    }
                    curX       -= labelWidth + 5;
                    label.Width = labelWidth;
                    label.X     = curX + 5;

                    label.Font      = state.LayoutSettings.TextFont;
                    label.HasShadow = state.LayoutSettings.DropShadows;
                    label.Draw(g);
                }
            }
        }
Ejemplo n.º 16
0
 public bool HasLabel(string label)
 {
     return(LabelsList.Any(l => l.Labelname.ToLower() == label));
 }
Ejemplo n.º 17
0
        private void DrawGeneral(Graphics g, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            if (NeedUpdateAll)
            {
                UpdateAll(state);
            }

            if (Settings.BackgroundGradient == ExtendedGradientType.Alternating)
            {
                g.FillRectangle(new SolidBrush(
                                    state.Run.IndexOf(Split) % 2 + (Settings.ShowColumnLabels ? 1 : 0) == 1
                    ? Settings.BackgroundColor2
                    : Settings.BackgroundColor
                                    ), 0, 0, width, height);
            }

            MeasureTimeLabel.Text  = TimeFormatter.Format(new TimeSpan(24, 0, 0));
            MeasureDeltaLabel.Text = DeltaTimeFormatter.Format(new TimeSpan(0, 9, 0, 0));

            MeasureTimeLabel.Font          = state.LayoutSettings.TimesFont;
            MeasureTimeLabel.IsMonospaced  = true;
            MeasureDeltaLabel.Font         = state.LayoutSettings.TimesFont;
            MeasureDeltaLabel.IsMonospaced = true;

            MeasureTimeLabel.SetActualWidth(g);
            MeasureDeltaLabel.SetActualWidth(g);

            NameLabel.ShadowColor = state.LayoutSettings.ShadowsColor;
            foreach (var label in LabelsList)
            {
                label.SetActualWidth(g);
                label.ShadowColor = state.LayoutSettings.ShadowsColor;
            }
            MinimumWidth  = CalculateLabelsWidth() + IconWidth + 10;
            MinimumHeight = 0.85f * (g.MeasureString("A", state.LayoutSettings.TimesFont).Height + g.MeasureString("A", state.LayoutSettings.TextFont).Height);

            if (Settings.SplitTimesAccuracy != CurrentAccuracy)
            {
                TimeFormatter   = new RegularSplitTimeFormatter(Settings.SplitTimesAccuracy);
                CurrentAccuracy = Settings.SplitTimesAccuracy;
            }
            if (Settings.DeltasAccuracy != CurrentDeltaAccuracy || Settings.DropDecimals != CurrentDropDecimals)
            {
                DeltaTimeFormatter   = new DeltaSplitTimeFormatter(Settings.DeltasAccuracy, Settings.DropDecimals);
                CurrentDeltaAccuracy = Settings.DeltasAccuracy;
                CurrentDropDecimals  = Settings.DropDecimals;
            }

            if (Split != null)
            {
                if (mode == LayoutMode.Vertical)
                {
                    NameLabel.VerticalAlignment = StringAlignment.Center;
                    NameLabel.Y      = 0;
                    NameLabel.Height = height;
                    foreach (var label in LabelsList)
                    {
                        label.VerticalAlignment = StringAlignment.Center;
                        label.Y      = 0;
                        label.Height = height;
                    }
                }
                else
                {
                    NameLabel.VerticalAlignment = StringAlignment.Near;
                    NameLabel.Y      = 0;
                    NameLabel.Height = 50;
                    foreach (var label in LabelsList)
                    {
                        label.VerticalAlignment = StringAlignment.Far;
                        label.Y      = height - 50;
                        label.Height = 50;
                    }
                }

                if (IsActive)
                {
                    var currentSplitBrush = new LinearGradientBrush(
                        new PointF(0, 0),
                        Settings.CurrentSplitGradient == GradientType.Horizontal
                        ? new PointF(width, 0)
                        : new PointF(0, height),
                        Settings.CurrentSplitTopColor,
                        Settings.CurrentSplitGradient == GradientType.Plain
                        ? Settings.CurrentSplitTopColor
                        : Settings.CurrentSplitBottomColor);
                    g.FillRectangle(currentSplitBrush, 0, 0, width, height);
                }

                if (DisplayIcon)
                {
                    var icon   = Split.Icon ?? NoIconImage;
                    var shadow = (Split.Icon != null) ? ShadowImage : NoIconShadow;

                    /*if (DateTime.Now.Date.Month == 4 && DateTime.Now.Date.Day == 1)
                     * {
                     *  icon = LiveSplit.Web.Share.TwitchEmoteResolver.Resolve("Kappa", true, false, false);
                     *  shadow = null;
                     * }*/

                    if (OldImage != icon)
                    {
                        ImageAnimator.Animate(icon, (s, o) => { });
                        ImageAnimator.Animate(shadow, (s, o) => { });
                        OldImage = icon;
                    }

                    var drawWidth    = Settings.IconSize;
                    var drawHeight   = Settings.IconSize;
                    var shadowWidth  = Settings.IconSize * (5 / 4f);
                    var shadowHeight = Settings.IconSize * (5 / 4f);
                    if (icon.Width > icon.Height)
                    {
                        var ratio = icon.Height / (float)icon.Width;
                        drawHeight   *= ratio;
                        shadowHeight *= ratio;
                    }
                    else
                    {
                        var ratio = icon.Width / (float)icon.Height;
                        drawWidth   *= ratio;
                        shadowWidth *= ratio;
                    }

                    ImageAnimator.UpdateFrames(shadow);
                    if (Settings.IconShadows && shadow != null)
                    {
                        g.DrawImage(
                            shadow,
                            7 + (Settings.IconSize * (5 / 4f) - shadowWidth) / 2 - 0.7f,
                            (height - Settings.IconSize) / 2.0f + (Settings.IconSize * (5 / 4f) - shadowHeight) / 2 - 0.7f,
                            shadowWidth,
                            shadowHeight);
                    }

                    ImageAnimator.UpdateFrames(icon);

                    g.DrawImage(
                        icon,
                        7 + (Settings.IconSize - drawWidth) / 2,
                        (height - Settings.IconSize) / 2.0f + (Settings.IconSize - drawHeight) / 2,
                        drawWidth,
                        drawHeight);
                }

                NameLabel.Font      = state.LayoutSettings.TextFont;
                NameLabel.X         = 5 + IconWidth;
                NameLabel.HasShadow = state.LayoutSettings.DropShadows;

                if (ColumnsList.Count() == LabelsList.Count)
                {
                    var curX  = width - 7;
                    var nameX = width - 7;
                    foreach (var label in LabelsList.Reverse())
                    {
                        var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));

                        var labelWidth = 0f;
                        if (column.Type == ColumnType.DeltaorSplitTime || column.Type == ColumnType.SegmentDeltaorSegmentTime)
                        {
                            labelWidth = Math.Max(MeasureDeltaLabel.ActualWidth, MeasureTimeLabel.ActualWidth);
                        }
                        else if (column.Type == ColumnType.Delta || column.Type == ColumnType.SegmentDelta)
                        {
                            labelWidth = MeasureDeltaLabel.ActualWidth;
                        }
                        else
                        {
                            labelWidth = MeasureTimeLabel.ActualWidth;
                        }
                        label.Width = labelWidth + 20;
                        curX       -= labelWidth + 5;
                        label.X     = curX - 15;

                        label.Font         = state.LayoutSettings.TimesFont;
                        label.HasShadow    = state.LayoutSettings.DropShadows;
                        label.IsMonospaced = true;
                        label.Draw(g);

                        if (!String.IsNullOrEmpty(label.Text))
                        {
                            nameX = curX + labelWidth + 5 - label.ActualWidth;
                        }
                    }
                    NameLabel.Width = (mode == LayoutMode.Horizontal ? width - 10 : nameX) - IconWidth;
                    NameLabel.Draw(g);
                }
            }
            else
            {
                DisplayIcon = Settings.DisplayIcons;
            }
        }
Ejemplo n.º 18
0
        private void DrawGeneral(Graphics g, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            if (NeedUpdateAll)
            {
                UpdateAll(state);
            }

            int splitIndex = state.Run.IndexOf(Split) % 7;

            if (IsActive)
            {
                switch (splitIndex)
                {
                case 0:
                    img = Properties.Resources.row_0_s;
                    break;

                case 1:
                    img = Properties.Resources.row_1_s;
                    break;

                case 2:
                    img = Properties.Resources.row_2_s;
                    break;

                case 3:
                    img = Properties.Resources.row_3_s;
                    break;

                case 4:
                    img = Properties.Resources.row_4_s;
                    break;

                case 5:
                    img = Properties.Resources.row_5_s;
                    break;

                case 6:
                    img = Properties.Resources.row_6_s;
                    break;

                default:
                    img = Properties.Resources.row_0_s;
                    break;
                }
            }
            else
            {
                switch (splitIndex)
                {
                case 0:
                    img = Properties.Resources.row_0;
                    break;

                case 1:
                    img = Properties.Resources.row_1;
                    break;

                case 2:
                    img = Properties.Resources.row_2;
                    break;

                case 3:
                    img = Properties.Resources.row_3;
                    break;

                case 4:
                    img = Properties.Resources.row_4;
                    break;

                case 5:
                    img = Properties.Resources.row_5;
                    break;

                case 6:
                    img = Properties.Resources.row_6;
                    break;

                default:
                    img = Properties.Resources.row_0;
                    break;
                }
            }

            g.DrawImage(img, 0, 0, width, height);

            MeasureTimeLabel.Text  = TimeFormatter.Format(new TimeSpan(24, 0, 0));
            MeasureDeltaLabel.Text = DeltaTimeFormatter.Format(new TimeSpan(0, 9, 0, 0));

            MeasureTimeLabel.Font          = state.LayoutSettings.TimesFont;
            MeasureTimeLabel.IsMonospaced  = true;
            MeasureDeltaLabel.Font         = state.LayoutSettings.TimesFont;
            MeasureDeltaLabel.IsMonospaced = true;

            MeasureTimeLabel.SetActualWidth(g);
            MeasureDeltaLabel.SetActualWidth(g);

            NameLabel.ShadowColor  = state.LayoutSettings.ShadowsColor;
            NameLabel.OutlineColor = state.LayoutSettings.TextOutlineColor;
            foreach (var label in LabelsList)
            {
                label.ShadowColor  = state.LayoutSettings.ShadowsColor;
                label.OutlineColor = state.LayoutSettings.TextOutlineColor;
            }

            if (Settings.SplitTimesAccuracy != CurrentAccuracy)
            {
                TimeFormatter   = new RegularSplitTimeFormatter(Settings.SplitTimesAccuracy);
                CurrentAccuracy = Settings.SplitTimesAccuracy;
            }
            if (Settings.DeltasAccuracy != CurrentDeltaAccuracy || Settings.DropDecimals != CurrentDropDecimals)
            {
                DeltaTimeFormatter   = new DeltaSplitTimeFormatter(Settings.DeltasAccuracy, Settings.DropDecimals);
                CurrentDeltaAccuracy = Settings.DeltasAccuracy;
                CurrentDropDecimals  = Settings.DropDecimals;
            }

            if (Split != null)
            {
                if (mode == LayoutMode.Vertical)
                {
                    NameLabel.VerticalAlignment = StringAlignment.Center;
                    NameLabel.Y      = 0;
                    NameLabel.Height = height;
                    foreach (var label in LabelsList)
                    {
                        label.VerticalAlignment = StringAlignment.Center;
                        label.Y      = 0;
                        label.Height = height;
                    }
                }
                else
                {
                    NameLabel.VerticalAlignment = StringAlignment.Near;
                    NameLabel.Y      = 0;
                    NameLabel.Height = 50;
                    foreach (var label in LabelsList)
                    {
                        label.VerticalAlignment = StringAlignment.Far;
                        label.Y      = height - 50;
                        label.Height = 50;
                    }
                }

                if (IsActive)
                {
                    g.DrawImage(SplitCursor, 2, ((height - 24f) / 2.0f), 30f, 24f);
                }

                NameLabel.Font      = state.LayoutSettings.TextFont;
                NameLabel.X         = IsActive ? 35 : 5;
                NameLabel.HasShadow = state.LayoutSettings.DropShadows;

                if (ColumnsList.Count() == LabelsList.Count)
                {
                    var curX  = width - 12;
                    var nameX = width - 7;
                    foreach (var label in LabelsList.Reverse())
                    {
                        var column = ColumnsList.ElementAt(LabelsList.IndexOf(label));

                        var labelWidth = 0f;
                        if (column.Type == ColumnType.DeltaorSplitTime || column.Type == ColumnType.SegmentDeltaorSegmentTime)
                        {
                            labelWidth = Math.Max(MeasureDeltaLabel.ActualWidth, MeasureTimeLabel.ActualWidth);
                        }
                        else if (column.Type == ColumnType.Delta || column.Type == ColumnType.SegmentDelta)
                        {
                            labelWidth = MeasureDeltaLabel.ActualWidth;
                        }
                        else
                        {
                            labelWidth = MeasureTimeLabel.ActualWidth;
                        }

                        label.Width = labelWidth + 20;
                        curX       -= labelWidth + 5;
                        label.X     = curX - 15;

                        label.Font         = state.LayoutSettings.TimesFont;
                        label.HasShadow    = state.LayoutSettings.DropShadows;
                        label.OutlineColor = state.LayoutSettings.TextOutlineColor;

                        label.IsMonospaced = true;
                        label.Draw(g);

                        if (!string.IsNullOrEmpty(label.Text))
                        {
                            nameX = curX + labelWidth + 5 - label.ActualWidth;
                        }
                    }

                    NameLabel.Width = (mode == LayoutMode.Horizontal ? width - 10 : width * 0.4f);
                    NameLabel.Draw(g);
                }
            }
        }