Exemple #1
0
        public override async Task Refresh( )
        {
            await base.Refresh( );

            AppearanceChanged.OnNext(RawAppearance);
            ParametersChanged.OnNext(RawParameters);
            ResolutionChanged.OnNext(RawResolution);
            DeviceNameChanged.OnNext(RawDeviceName);
        }
Exemple #2
0
        private void appearaceComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ResourceDictionary dict = new ResourceDictionary();

            if (appearaceComboBox.SelectedIndex == 0)
            {
                dict.Source = new Uri("Resources/LightColor.xaml", UriKind.Relative);
            }
            else
            {
                dict.Source = new Uri("Resources/DarkColor.xaml", UriKind.Relative);
            }
            Application.Current.Resources.Clear();
            Application.Current.Resources.MergedDictionaries.Add(dict);

            AppearanceChanged?.Invoke(appearaceComboBox.SelectedIndex == 0 ? Appearance.Light : Appearance.Dark);
        }
Exemple #3
0
        protected virtual void OnProcessDelta(Delta d)
        {
            if (d.HasFlag(Delta.Appearance))
            {
                AppearanceChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Position))
            {
                PositionChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Attributes))
            {
                AttributesChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Properties))
            {
                PropertiesChanged.Raise(this);
            }
        }
Exemple #4
0
 protected virtual void OnAppearanceChanged(EventArgs e)
 {
     AppearanceChanged?.Invoke(this, e);
 }