private void gridLineStyle_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            var format = gridLineStyle.SelectedObject as PageWidthMarkerFormat;

            if (format != null)
            {
                if (e.ChangedItem.PropertyDescriptor.Name == "Position")
                {
                    if (ActiveTheme != null)
                    {
                        if (ActiveTheme.LineFormats.ContainsKey(format.GetFormatIndex()))
                        {
                            format.Position = (int)e.OldValue;
                            MessageBox.Show(ResourceLoader.LoadString("PageWidthExists"), ResourceLoader.LoadString("Title"));
                            return;
                        }
                        ActiveTheme.LineFormats.Remove(format.FormatIndex.Value);
                        format.FormatIndex = format.GetFormatIndex();
                        ActiveTheme.LineFormats[format.FormatIndex.Value] = format;
                    }
                    lstLocations.FormattingEnabled = false;
                    lstLocations.FormattingEnabled = true;
                }

                linePreview.ForeColor          = format.LineColor;
                linePreview.GlowColor          = format.LineColor;
                linePreview.Style              = format.LineStyle;
                linePreviewHighlight.ForeColor = format.HighlightStyle.HasFlag(LineStyle.Glow) ? format.LineColor : format.HighlightColor;
                linePreviewHighlight.GlowColor = format.HighlightColor;
                linePreviewHighlight.Style     = format.HighlightStyle;
            }

            OnThemeChanged(ActiveTheme);
        }
 public ResourceCategoryAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }
 public ResourceDisplayNameAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }
 public ResourceDescriptionAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }