Esempio n. 1
0
        LayerFrame Keystrokes(KeystrokesSettings Settings)
        {
            var control = Text(Settings, "Keystrokes");

            var visibilityProp = Settings
                                 .ObserveProperty(M => M.SeparateTextFile)
                                 .Select(M => M ? Visibility.Collapsed : Visibility.Visible)
                                 .ToReadOnlyReactivePropertySlim();

            control.BindOne(VisibilityProperty, visibilityProp);

            return(control);
        }
Esempio n. 2
0
        void InitOverlaySettings()
        {
            if (Keystrokes == null)
            {
                Keystrokes = new KeystrokesSettings();
            }

            if (Clicks == null)
            {
                Clicks = new MouseClickSettings();
            }

            if (WebcamOverlay == null)
            {
                WebcamOverlay = new WebcamOverlaySettings
                {
                    HorizontalAlignment = Alignment.End
                };
            }
        }
Esempio n. 3
0
        LayerFrame Keystrokes(KeystrokesSettings Settings)
        {
            var control = Text(Settings, "Keystrokes");

            void SetVisibility()
            {
                control.Visibility = Settings.SeparateTextFile ? Visibility.Collapsed : Visibility;
            }

            SetVisibility();

            Settings.PropertyChanged += (S, E) =>
            {
                switch (E.PropertyName)
                {
                case nameof(Settings.SeparateTextFile):
                    SetVisibility();
                    break;
                }
            };

            return(control);
        }
Esempio n. 4
0
 LayerFrame Keystrokes(KeystrokesSettings Settings)
 {
     return(Text(Settings, "Keystrokes"));
 }