Example #1
0
 private void UseMaximizedSettingsCheckBox_Changed(object sender, RoutedEventArgs e)
 {
     if (!WindowInitialized)
     {
         return;
     }
     TT.Options.Settings.UseDifferentSettingsWhenMaximized = UseMaximizedSettingsCheckBox.IsChecked ?? false;
     Taskbars.UpdateAllSettings();
 }
Example #2
0
        private void UpdateAllSettings()
        {
            SetAccentState((AccentState)AccentStateComboBox.SelectedItem);
            SetTaskbarColor(GradientColorPicker.SelectedColor ?? Color.FromArgb(255, 255, 255, 255));
            SetAccentFlags(ColorizeBlurCheckBox.IsChecked ?? false);
            WindowsAccentColorCheckBox_Changed(null, null);
            SetWindowsAccentAlpha((byte)WindowsAccentAlphaSlider.Value);

            Taskbars.UpdateAllSettings();
        }
Example #3
0
        private void ApplyToAllTaskbars()
        {
            Taskbars.Bars = new List <Taskbar>();

            while (RunApplyTask)
            {
                if (FindTaskbarHandles)
                {
                    Taskbars.Bars.Add(new Taskbar(Externals.FindWindow("Shell_TrayWnd", null)));
                    //TaskbarList.Add(FindWindow(null, "Pins view"));
                    IntPtr otherBars = IntPtr.Zero;

                    //IntPtr cortana = FindWindowEx(hWndList[0], IntPtr.Zero, "TrayDummySearchControl", null);
                    //hWndList.Add(cortana);

                    while (true)
                    {
                        otherBars = Externals.FindWindowEx(IntPtr.Zero, otherBars, "Shell_SecondaryTrayWnd", "");
                        if (otherBars == IntPtr.Zero)
                        {
                            break;
                        }
                        else
                        {
                            Taskbars.Bars.Add(new Taskbar(otherBars));
                        }
                    }

                    FindTaskbarHandles = false;

                    App.Current.Dispatcher.Invoke(() => UpdateAllSettings());
                }

                if (Taskbars.MaximizedStateChanged)
                {
                    Taskbars.UpdateMaximizedState();
                    Taskbars.UpdateAllSettings();
                }

                foreach (Taskbar taskbar in Taskbars.Bars)
                {
                    Taskbars.ApplyStyles(taskbar);
                }

                Thread.Sleep(10);
            }
        }