コード例 #1
0
        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);
        }
コード例 #2
0
 public ResourceCategoryAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }
コード例 #3
0
 public ResourceDisplayNameAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }
コード例 #4
0
 public ResourceDescriptionAttribute(string resourceId)
     : base(ResourceLoader.LoadString(resourceId))
 {
 }