private void HideCursorStateChanged(object sender, ReactiveEventArgs <bool> state) { Gtk.Application.Invoke(delegate { _hideCursorOnIdle = state.NewValue; if (_hideCursorOnIdle) { _lastCursorMoveTime = Stopwatch.GetTimestamp(); } else { Window.Cursor = null; } }); }
private void OnDockedModeChange(object sender, ReactiveEventArgs <bool> e) { if (e.NewValue != State.DockedMode) { State.DockedMode = e.NewValue; PerformanceState.PerformanceMode = State.DockedMode ? PerformanceMode.Boost : PerformanceMode.Default; AppletState.Messages.Enqueue(MessageInfo.OperationModeChanged); AppletState.Messages.Enqueue(MessageInfo.PerformanceModeChanged); AppletState.MessageEvent.ReadableEvent.Signal(); SignalDisplayResolutionChange(); // Reconfigure controllers Device.Hid.RefreshInputConfig(ConfigurationState.Instance.Hid.InputConfig.Value); } }
private static void Update(object sender, ReactiveEventArgs <bool> evnt) { if (evnt.OldValue != evnt.NewValue) { // If the integration was active, disable it and unload everything if (evnt.OldValue) { _discordClient?.Dispose(); _discordClient = null; } // If we need to activate it and the client isn't active, initialize it if (evnt.NewValue && _discordClient == null) { _discordClient = new DiscordRpcClient(CliendId); _discordClient.Initialize(); _discordClient.SetPresence(_discordPresenceMain); } } }
private static void Update(object sender, ReactiveEventArgs <bool> e) { if (e.OldValue != e.NewValue) { // If the integration was active, disable it and unload everything if (e.OldValue) { DiscordClient?.Dispose(); DiscordClient = null; } // If we need to activate it and the client isn't active, initialize it if (e.NewValue && DiscordClient == null) { DiscordClient = new DiscordRpcClient("568815339807309834"); DiscordClient.Initialize(); DiscordClient.SetPresence(DiscordPresence); } } }
private static void LogValueChange <T>(object sender, ReactiveEventArgs <T> eventArgs, string valueName) { Common.Logging.Logger.Info?.Print(LogClass.Configuration, $"{valueName} set to: {eventArgs.NewValue}"); }
private static void ReloadEnableFsAccessLog(object sender, ReactiveEventArgs <bool> e) { Logger.SetEnable(LogLevel.AccessLog, e.NewValue); }
private static void ReloadEnableGuest(object sender, ReactiveEventArgs <bool> e) { Logger.SetEnable(LogLevel.Guest, e.NewValue); }
public void DSU_Toggled(object sender, ReactiveEventArgs <bool> args) { CloseClients(); }
public void DSU_Port_Updated(object sender, ReactiveEventArgs <int> args) { CloseClients(); }
public void DSU_Host_Updated(object sender, ReactiveEventArgs <string> args) { CloseClients(); }
private void ThemeChanged_Event(object sender, ReactiveEventArgs <string> e) { ApplyConfiguredTheme(); }
private void CustomThemeChanged_Event(object sender, ReactiveEventArgs <bool> e) { ApplyConfiguredTheme(); }