コード例 #1
0
 private void OnOperatingSystemSettingsChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if ((e.Category == UserPreferenceCategory.Color) || (e.Category == UserPreferenceCategory.VisualStyle))
     {
         base.ContainingTheme.AmbientPropertyChanged(System.Workflow.ComponentModel.Design.AmbientProperty.OperatingSystemSetting);
         WorkflowTheme.FireThemeChange();
     }
 }
コード例 #2
0
 public TerminateDesignerTheme(WorkflowTheme theme) : base(theme)
 {
     this.ForeColor       = Color.FromArgb(0xff, 0, 0, 0);
     this.BorderColor     = Color.FromArgb(0xff, 0x79, 0x73, 0xa5);
     this.BorderStyle     = DashStyle.Solid;
     this.BackColorStart  = Color.FromArgb(0xff, 0xff, 0xe8, 0xdf);
     this.BackColorEnd    = Color.FromArgb(0xff, 0xff, 0xb3, 0x95);
     this.BackgroundStyle = LinearGradientMode.Horizontal;
 }
コード例 #3
0
 public ThrowDesignerTheme(WorkflowTheme theme) : base(theme)
 {
     this.ForeColor       = Color.FromArgb(0xff, 0, 0, 0);
     this.BorderColor     = Color.FromArgb(0xff, 200, 0x2d, 0x11);
     this.BorderStyle     = DashStyle.Solid;
     this.BackColorStart  = Color.FromArgb(0xff, 0xfb, 0xd7, 0xd0);
     this.BackColorEnd    = Color.FromArgb(0xff, 0xf3, 0x85, 0x72);
     this.BackgroundStyle = LinearGradientMode.Horizontal;
 }
コード例 #4
0
 internal void UpdateFont()
 {
     if (this.useDefaultFont)
     {
         bool readOnly = base.ReadOnly;
         base.ReadOnly = false;
         this.FontName = WorkflowTheme.GetDefaultFont().FontFamily.Name;
         base.ReadOnly = readOnly;
     }
 }
コード例 #5
0
 public ThrowDesignerTheme(WorkflowTheme theme)
     : base(theme)
 {
     this.ForeColor       = Color.FromArgb(0xFF, 0x00, 0x00, 0x00);
     this.BorderColor     = Color.FromArgb(0xFF, 0xC8, 0x2D, 0x11);
     this.BorderStyle     = DashStyle.Solid;
     this.BackColorStart  = Color.FromArgb(0xFF, 0xFB, 0xD7, 0xD0);
     this.BackColorEnd    = Color.FromArgb(0xFF, 0xF3, 0x85, 0x72);
     this.BackgroundStyle = LinearGradientMode.Horizontal;
 }
コード例 #6
0
 public SuspendDesignerTheme(WorkflowTheme theme)
     : base(theme)
 {
     this.ForeColor       = Color.FromArgb(0xFF, 0x00, 0x00, 0x00);
     this.BorderColor     = Color.FromArgb(0xFF, 0xA5, 0x79, 0x73);
     this.BorderStyle     = DashStyle.Solid;
     this.BackColorStart  = Color.FromArgb(0xFF, 0xFF, 0xFF, 0xDF);
     this.BackColorEnd    = Color.FromArgb(0xFF, 0xFF, 0xFF, 0x95);
     this.BackgroundStyle = LinearGradientMode.Horizontal;
 }
コード例 #7
0
 public SequenceDesignerTheme(WorkflowTheme theme) : base(theme)
 {
     this.ShowDropShadow    = false;
     this.ConnectorStartCap = LineAnchor.None;
     this.ConnectorEndCap   = LineAnchor.ArrowAnchor;
     this.ForeColor         = Color.FromArgb(0xff, 0, 0, 0x73);
     this.BorderColor       = Color.FromArgb(0xff, 0xe0, 0xe0, 0xe0);
     this.BorderStyle       = DashStyle.Dash;
     this.BackColorStart    = Color.FromArgb(0, 0, 0, 0);
     this.BackColorEnd      = Color.FromArgb(0, 0, 0, 0);
 }
コード例 #8
0
 public InvokeWorkflowDesignerTheme(WorkflowTheme theme)
     : base(theme)
 {
     this.ShowDropShadow    = false;
     this.ConnectorStartCap = LineAnchor.None;
     this.ConnectorEndCap   = LineAnchor.ArrowAnchor;
     this.ForeColor         = Color.FromArgb(0xFF, 0x00, 0x00, 0x00);
     this.BorderColor       = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0);
     this.BorderStyle       = System.Drawing.Drawing2D.DashStyle.Dash;
     this.BackColorStart    = Color.FromArgb(0x00, 0x00, 0x00, 0x00);
     this.BackColorEnd      = Color.FromArgb(0x00, 0x00, 0x00, 0x00);
 }
コード例 #9
0
 public FaultHandlerActivityDesignerTheme(WorkflowTheme theme)
     : base(theme)
 {
     this.ShowDropShadow    = false;
     this.ConnectorStartCap = LineAnchor.None;
     this.ConnectorEndCap   = LineAnchor.ArrowAnchor;
     this.ForeColor         = Color.FromArgb(0xFF, 0x00, 0x00, 0x00);
     this.BorderColor       = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0);
     this.BorderStyle       = DashStyle.Dash;
     this.BackColorStart    = Color.FromArgb(0x00, 0x00, 0x00, 0x00);
     this.BackColorEnd      = Color.FromArgb(0x00, 0x00, 0x00, 0x00);
 }
コード例 #10
0
 private void ApplySystemColors()
 {
     this.DropIndicatorColor     = SystemColors.HotTrack;
     this.SelectionForeColor     = SystemColors.Highlight;
     this.SelectionPatternColor  = SystemColors.Highlight;
     this.ForeColor              = SystemColors.WindowText;
     this.CommentIndicatorColor  = SystemColors.GrayText;
     this.ReadonlyIndicatorColor = SystemColors.GrayText;
     this.BackColor              = SystemColors.Window;
     this.GridColor              = SystemColors.InactiveBorder;
     this.FontName = WorkflowTheme.GetDefaultFont().FontFamily.Name;
 }
コード例 #11
0
        private void OnCreateTheme(object sender, EventArgs e)
        {
            ThemeConfigurationDialog dialog = new ThemeConfigurationDialog(this.serviceProvider);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                WorkflowTheme theme = dialog.ComposedTheme.Clone();
                if (theme != null)
                {
                    WorkflowTheme.CurrentTheme = theme;
                    WorkflowTheme.SaveThemeSettingToRegistry();
                }
            }
        }
 public FaultHandlersActivityDesignerTheme(WorkflowTheme theme) : base(theme)
 {
     this.ShowDropShadow     = false;
     this.ConnectorStartCap  = LineAnchor.None;
     this.ConnectorEndCap    = LineAnchor.None;
     this.ForeColor          = Color.FromArgb(0xff, 0, 0, 0);
     this.BorderColor        = Color.FromArgb(0xff, 0xe0, 0xe0, 0xe0);
     this.BorderStyle        = DashStyle.Dash;
     this.BackColorStart     = Color.FromArgb(0x35, 0xff, 0xb0, 0xb0);
     this.BackColorEnd       = Color.FromArgb(0x35, 0xff, 0xe0, 0xe0);
     base.PreviewForeColor   = Color.FromArgb(0xff, 240, 240, 240);
     base.PreviewBorderColor = Color.FromArgb(0xff, 0x6b, 0x6d, 0x6b);
     base.PreviewBackColor   = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
 }
コード例 #13
0
 public AmbientTheme(WorkflowTheme theme) : base(theme)
 {
     this.showConfigErrors       = true;
     this.dropIndicatorColor     = System.Drawing.Color.Green;
     this.selectionForeColor     = System.Drawing.Color.Blue;
     this.selectionPatternColor  = System.Drawing.Color.DarkGray;
     this.foreColor              = System.Drawing.Color.Gray;
     this.backColor              = System.Drawing.Color.White;
     this.commentIndicatorColor  = System.Drawing.Color.FromArgb(0x31, 0xc6, 0x69);
     this.readonlyIndicatorColor = System.Drawing.Color.Gray;
     this.watermarkAlignment     = DesignerContentAlignment.BottomRight;
     this.watermarkImagePath     = string.Empty;
     this.gridStyle              = DashStyle.Dash;
     this.gridColor              = System.Drawing.Color.FromArgb(0xc0, 0xc0, 0xc0);
     this.fontName           = WorkflowTheme.GetDefaultFont().FontFamily.Name;
     this.designerStyle      = System.Workflow.ComponentModel.Design.DesignerSize.Medium;
     this.drawRounded        = true;
     this.showDesignerBorder = true;
 }
コード例 #14
0
        public static WorkflowTheme LoadThemeSettingFromRegistry()
        {
            WorkflowTheme theme = null;
            RegistryKey   key   = Registry.CurrentUser.OpenSubKey(RegistryKeyPath);

            if (key != null)
            {
                ThemeType standardThemeType = ThemeType.Default;
                try
                {
                    object obj2 = key.GetValue("ThemeType");
                    if (obj2 is string)
                    {
                        standardThemeType = (ThemeType)Enum.Parse(typeof(ThemeType), (string)obj2, true);
                    }
                    if (standardThemeType == ThemeType.UserDefined)
                    {
                        obj2 = key.GetValue("ThemeFilePath");
                        string path = (obj2 is string) ? ((string)obj2) : string.Empty;
                        if (File.Exists(path) && Path.GetExtension(path).Equals("*.wtm".Replace("*", ""), StringComparison.Ordinal))
                        {
                            theme = Load(path);
                        }
                    }
                }
                catch
                {
                }
                finally
                {
                    if (theme == null)
                    {
                        if (standardThemeType == ThemeType.UserDefined)
                        {
                            standardThemeType = ThemeType.Default;
                        }
                        theme = CreateStandardTheme(standardThemeType);
                    }
                    key.Close();
                }
            }
            return(theme);
        }
コード例 #15
0
        public WorkflowTheme Clone()
        {
            WorkflowTheme theme = null;
            DesignerSerializationManager serializationManager = new DesignerSerializationManager();

            using (serializationManager.CreateSession())
            {
                ThemeSerializationProvider provider = new ThemeSerializationProvider();
                StringWriter output = new StringWriter(new StringBuilder(), CultureInfo.InvariantCulture);
                StringReader input  = null;
                try
                {
                    ((IDesignerSerializationManager)serializationManager).AddSerializationProvider(provider);
                    WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer();
                    using (XmlWriter writer2 = Helpers.CreateXmlWriter(output))
                    {
                        serializer.Serialize(serializationManager, writer2, this);
                    }
                    input = new StringReader(output.ToString());
                    using (XmlReader reader2 = XmlReader.Create(input))
                    {
                        theme = serializer.Deserialize(serializationManager, reader2) as WorkflowTheme;
                    }
                }
                finally
                {
                    ((IDesignerSerializationManager)serializationManager).RemoveSerializationProvider(provider);
                    input.Close();
                    output.Close();
                }
            }
            if (theme != null)
            {
                theme.filePath = this.filePath;
                foreach (DesignerTheme theme2 in theme.DesignerThemes)
                {
                    theme2.Initialize();
                }
            }
            return(theme);
        }
コード例 #16
0
 protected DesignerTheme(WorkflowTheme theme)
 {
     this.workflowTheme = theme;
 }
コード例 #17
0
 public ActivityPreviewDesignerTheme(WorkflowTheme theme) : base(theme)
 {
     this.previewForeColor   = Color.WhiteSmoke;
     this.previewBackColor   = Color.White;
     this.previewBorderColor = Color.Gray;
 }