Exemplo n.º 1
0
        public static Win32.WS UpdateStyle(Win32.WS style, TitleBarStyle settings)
        {
            if (settings.ShowTitleBar)
            {
                style |= Win32.WS.WS_CAPTION;
            }
            else
            {
                style &= ~Win32.WS.WS_CAPTION;
            }

            if (settings.ShowSizingBorder)
            {
                style |= Win32.WS.WS_THICKFRAME;
            }
            else
            {
                style &= ~Win32.WS.WS_THICKFRAME;
            }

            return(style);
        }
Exemplo n.º 2
0
        public void SetWindowTitleMAtch(string match, TitleBarStyle style)
        {
            var regex = new Regex(match);

            Rules.Add(new TitleBarRule(window => regex.IsMatch(window.Title), style));
        }
Exemplo n.º 3
0
 public void SetWindowTitle(string title, TitleBarStyle style)
 {
     Rules.Add(new TitleBarRule(window => window.Title == title, style));
 }
Exemplo n.º 4
0
 public void SetWindowProcessName(string processName, TitleBarStyle style)
 {
     Rules.Add(new TitleBarRule(window => window.ProcessName == processName, style));
 }
Exemplo n.º 5
0
 public void SetWindowClass(string windowClass, TitleBarStyle style)
 {
     Rules.Add(new TitleBarRule(window => window.Class == windowClass, style));
 }
Exemplo n.º 6
0
 public TitleBarPluginConfig(TitleBarStyle defaultStyle)
 {
     DefaultStyle = defaultStyle;
     Rules        = new List <TitleBarRule>();
 }
Exemplo n.º 7
0
 public TitleBarRule(Func <IWindow, bool> matcher, TitleBarStyle style)
 {
     Matcher = matcher;
     Style   = style;
 }