/// <summary> /// Changing the editor style menu item handler /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> private void OnChangeEditorStyle(object sender, EventArgs e) { try { MenuItem subItem = (MenuItem)sender; string caption = ((Gtk.Label)(subItem.Children[0])).LabelProp; foreach (CheckMenuItem item in ((Menu)subItem.Parent).Children) { item.Activated -= OnChangeEditorStyle; // stop recursion item.Active = (string.Compare(caption, ((Gtk.Label)item.Children[0]).LabelProp, true) == 0); item.Activated += OnChangeEditorStyle; } Utility.Configuration.Settings.EditorStyleName = caption; textEditor.Options.ColorScheme = caption; textEditor.QueueDraw(); StyleChanged?.Invoke(this, EventArgs.Empty); } catch (Exception err) { ShowError(err); } }
// TODO: доработать светлую тему /// <summary> /// Установить светлую тему. НЕ ДОРАБОТАНО /// </summary> public static void SetLightColorTheme() { ColorService.SetNewBrush("BackgroundColorBrush", ColorService.WhiteColor); ColorService.SetNewBrush("PrimaryTextColorBrush", ColorService.DarkColor); //ColorService.SetNewBrush("TextColorBrush", ColorService.WhiteColor); StyleChanged?.Invoke(null, EventArgs.Empty); }
/// <param name="e"></param> /// <summary> /// Handles bevel style changed events. /// </summary> protected virtual void OnStyleChanged(EventArgs e) { if (StyleChanged != null) { StyleChanged.Invoke(this, e); } }
/// <summary>Установить главный цвет (включая тёмный и светлый)</summary> public static void SetPrimaryColor(Color color) { ColorService.SetNewBrush("PrimaryColorBrush", color); ColorService.SetNewBrush("DarkPrimaryColorBrush", ColorService.Darken(color, 1.2)); ColorService.SetNewBrush("LightPrimaryColorBrush", ColorService.Lighten(color, 1.5)); StyleChanged?.Invoke(null, EventArgs.Empty); }
public void ProcStyleChanged() { #if __IOS__ iOS.Style.SetStyle(); #endif StyleChanged?.InvokeOnMainThread(this); }
private void Notifier_StyleChanged(object sender, EventArgs e) { StyleChanged?.Invoke(this, e); }
public void SetWindowStyle(Style style) { currentWindowStyle = style; userSettings.windowStyle = currentWindowStyle.styleName; StyleChanged?.Invoke(this, currentWindowStyle); }
public void SetWindowStyle(int styleIndex) //Used { currentWindowStyle = loadedStyles[styleIndex]; userSettings.windowStyle = currentWindowStyle.styleName; StyleChanged?.Invoke(this, currentWindowStyle); }
/// <summary> /// Method called when <see cref="Style"/> has changed, to invoke <see cref="E:SharpMap.Layers.Layer.StyleChanged"/> /// </summary> /// <param name="eventArgs">The arguments associated with the event</param> protected virtual void OnStyleChanged(EventArgs eventArgs) { StyleChanged?.Invoke(this, eventArgs); }
public static void SetStyle(Style style) { Default = style; StyleChanged?.Invoke(style, style); }
protected void OnStyleChanged(StyleChangedEventArgs e) { StyleChanged?.Invoke(this, new StyleChangedEventArgs(e)); }
protected void OnStyleChanged(IShowedClass source, string propertyName) { StyleChanged?.Invoke(this, new StyleChangedEventArgs(source, propertyName)); }
/// <summary> /// This is called when a property changes in the OdgeComponent's StyleSheet, /// or when setting OdgeComponent.Style to a new StyleSheet. /// </summary> public virtual void OnStyleChanged() { StyleChanged?.Invoke(this, EventArgs.Empty); }
protected void OnStyleChanged() { StyleChanged?.Invoke(); }
private void Field_PropertyChanged(object sender, PropertyChangedEventArgs e) { StyleChanged?.Invoke(this, EventArgs.Empty); }
/// <summary>Установить цвет акцента</summary> public static void SetAccentColor(Color color) { ColorService.SetNewBrush("AccentColorBrush", color); StyleChanged?.Invoke(null, EventArgs.Empty); }
protected virtual void OnStyleChanged() => StyleChanged?.Invoke(this, EventArgs.Empty);