예제 #1
0
        private void HideCursorStateChanged(object sender, ReactiveEventArgs <bool> state)
        {
            Gtk.Application.Invoke(delegate
            {
                _hideCursorOnIdle = state.NewValue;

                if (_hideCursorOnIdle)
                {
                    _lastCursorMoveTime = Stopwatch.GetTimestamp();
                }
                else
                {
                    Window.Cursor = null;
                }
            });
        }
예제 #2
0
파일: Horizon.cs 프로젝트: lwave28/Ryujinx
        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);
            }
        }
예제 #3
0
        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);
                }
            }
        }
예제 #5
0
 private static void LogValueChange <T>(object sender, ReactiveEventArgs <T> eventArgs, string valueName)
 {
     Common.Logging.Logger.Info?.Print(LogClass.Configuration, $"{valueName} set to: {eventArgs.NewValue}");
 }
예제 #6
0
 private static void ReloadEnableFsAccessLog(object sender, ReactiveEventArgs <bool> e)
 {
     Logger.SetEnable(LogLevel.AccessLog, e.NewValue);
 }
예제 #7
0
 private static void ReloadEnableGuest(object sender, ReactiveEventArgs <bool> e)
 {
     Logger.SetEnable(LogLevel.Guest, e.NewValue);
 }
예제 #8
0
 public void DSU_Toggled(object sender, ReactiveEventArgs <bool> args)
 {
     CloseClients();
 }
예제 #9
0
 public void DSU_Port_Updated(object sender, ReactiveEventArgs <int> args)
 {
     CloseClients();
 }
예제 #10
0
 public void DSU_Host_Updated(object sender, ReactiveEventArgs <string> args)
 {
     CloseClients();
 }
예제 #11
0
 private void ThemeChanged_Event(object sender, ReactiveEventArgs <string> e)
 {
     ApplyConfiguredTheme();
 }
예제 #12
0
 private void CustomThemeChanged_Event(object sender, ReactiveEventArgs <bool> e)
 {
     ApplyConfiguredTheme();
 }