设置父窗体颜色
This commit is contained in:
parent
8247b802c7
commit
27086aa1dc
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AntdUI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
@ -13,8 +14,10 @@ namespace AntdUIDemo.Controls
|
||||
{
|
||||
public partial class SystemSet : UserControl
|
||||
{
|
||||
public SystemSet()
|
||||
private Window Window;
|
||||
public SystemSet(Window _window)
|
||||
{
|
||||
Window = _window;
|
||||
InitializeComponent();
|
||||
//初始化下拉框
|
||||
InitSelectItems();
|
||||
@ -50,14 +53,14 @@ namespace AntdUIDemo.Controls
|
||||
if (value)
|
||||
{
|
||||
AntdUI.Config.IsLight = true;
|
||||
BackColor = Color.White;
|
||||
ForeColor = Color.Black;
|
||||
Window.BackColor = Color.White;
|
||||
Window.ForeColor = Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
AntdUI.Config.IsDark = true;// 设置为深色模式
|
||||
BackColor = Color.Black;
|
||||
ForeColor = Color.White;
|
||||
Window.BackColor = Color.Black;
|
||||
Window.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ namespace AntdUIDemo
|
||||
private void ButtonSZ_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
using (var form = new SystemSet())
|
||||
using (var form = new SystemSet(this))
|
||||
{
|
||||
AntdUI.Modal.open(new AntdUI.Modal.Config(this, "系统设置", form, TType.Info)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user