国际化支持中,目前已支持首页,Button按钮,FloatButon按钮,Icon图标
In the internationalization support, the homepage, button, FloatButon button, and Icon icon are currently supported
126
Languages/Localizer_en-US.cs
Normal file
@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AntdUIDemo.Languages
|
||||
{
|
||||
public class Localizer_enus : AntdUI.ILocalization
|
||||
{
|
||||
public string GetLocalizedString(string key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case "search":
|
||||
return "Search";
|
||||
case "welcome":
|
||||
return "Welcome to the AntdUI Demo";
|
||||
case "home":
|
||||
return "Home";
|
||||
case "closeall":
|
||||
return "Close all tabs";
|
||||
#region systemset
|
||||
case "systemset":
|
||||
return "System Settings";
|
||||
case "baseset":
|
||||
return "Basic Settings";
|
||||
case "messageconfig":
|
||||
return "Message configuration";
|
||||
case "animationon":
|
||||
return "Turn on animation";
|
||||
case "shadowon":
|
||||
return "Enable shadow";
|
||||
case "scrollbarhide":
|
||||
return "Hide scrollbar";
|
||||
case "showinwindow":
|
||||
return "Show in window";
|
||||
case "windowOffsetXY":
|
||||
return "WindowOffsetXY";
|
||||
case "tip":
|
||||
return "Tip";
|
||||
case "switchsuccess":
|
||||
return "Switch successful.";
|
||||
#endregion
|
||||
|
||||
#region Button
|
||||
case "Button.Text":
|
||||
return "Button";
|
||||
case "Button.Description":
|
||||
return "To trigger an operation.";
|
||||
case "type":
|
||||
return "Type";
|
||||
case "wave":
|
||||
return "Wave";
|
||||
case "loading":
|
||||
return "Loading";
|
||||
case "ghost":
|
||||
return "Ghost";
|
||||
case "border":
|
||||
return "Border";
|
||||
case "icon":
|
||||
return "Icon";
|
||||
case "arrow":
|
||||
return "Arrow";
|
||||
case "join":
|
||||
return "Join";
|
||||
case "gradient":
|
||||
return "Gradient";
|
||||
case "toggle":
|
||||
return "Toggle";
|
||||
#endregion
|
||||
|
||||
#region FloatButton
|
||||
case "FloatButton.Text":
|
||||
return "FloatButton";
|
||||
case "FloatButton.Description":
|
||||
return "A button that floats at the top of the page.";
|
||||
case "FloatButton.Tip":
|
||||
return "FloatButton does not have a toolbox control and is called code.";
|
||||
case "control_option":
|
||||
return "Control Options";
|
||||
case "button_option":
|
||||
return "Button Options";
|
||||
case "open":
|
||||
return "Open";
|
||||
case "close":
|
||||
return "Close";
|
||||
case "reset":
|
||||
return "Reset";
|
||||
#endregion
|
||||
|
||||
#region Icon
|
||||
case "Icon.Text":
|
||||
return "Icon";
|
||||
case "Icon.Description":
|
||||
return "Semantic vector graphics.";
|
||||
case "Icon.Tip":
|
||||
return "Icon does not have a toolbox control and is used for Svg property assignments.";
|
||||
case "outlined":
|
||||
return "Outlined";
|
||||
case "filled":
|
||||
return "Filled";
|
||||
case "directionalicon":
|
||||
return "Directional icons";
|
||||
case "suggestionicon":
|
||||
return "Suggestion Icon";
|
||||
case "editingicon":
|
||||
return "Editing Icons";
|
||||
case "dataicon":
|
||||
return "Data icons";
|
||||
case "brand":
|
||||
return "Brand and logo";
|
||||
case "universal":
|
||||
return "Universal Icons for Websites";
|
||||
case "copysuccess":
|
||||
return "Copy successful!";
|
||||
case "copyfail":
|
||||
return "Copy failed!";
|
||||
#endregion
|
||||
default:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
49
MainWindow.Designer.cs
generated
@ -29,9 +29,10 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||
AntdUI.Tabs.StyleCard styleCard6 = new AntdUI.Tabs.StyleCard();
|
||||
AntdUI.Tabs.StyleCard styleCard2 = new AntdUI.Tabs.StyleCard();
|
||||
this.titlebar = new AntdUI.PageHeader();
|
||||
this.input_search = new AntdUI.Input();
|
||||
this.dropdown_translate = new AntdUI.Dropdown();
|
||||
this.button_color = new AntdUI.Button();
|
||||
this.buttonSZ = new AntdUI.Button();
|
||||
this.pageHeader1 = new AntdUI.PageHeader();
|
||||
@ -49,6 +50,7 @@
|
||||
// titlebar
|
||||
//
|
||||
this.titlebar.Controls.Add(this.input_search);
|
||||
this.titlebar.Controls.Add(this.dropdown_translate);
|
||||
this.titlebar.Controls.Add(this.button_color);
|
||||
this.titlebar.Controls.Add(this.buttonSZ);
|
||||
this.titlebar.DividerShow = true;
|
||||
@ -59,7 +61,7 @@
|
||||
this.titlebar.ShowButton = true;
|
||||
this.titlebar.ShowIcon = true;
|
||||
this.titlebar.Size = new System.Drawing.Size(1024, 40);
|
||||
this.titlebar.SubText = "Demo 1.8.4";
|
||||
this.titlebar.SubText = "Demo";
|
||||
this.titlebar.TabIndex = 0;
|
||||
this.titlebar.Text = "AntdUI";
|
||||
//
|
||||
@ -68,12 +70,28 @@
|
||||
this.input_search.AllowClear = true;
|
||||
this.input_search.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.input_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F);
|
||||
this.input_search.Location = new System.Drawing.Point(580, 0);
|
||||
this.input_search.LocalizationPlaceholderText = "search";
|
||||
this.input_search.Location = new System.Drawing.Point(530, 0);
|
||||
this.input_search.Name = "input_search";
|
||||
this.input_search.PlaceholderText = "输入关键字搜索...";
|
||||
this.input_search.PlaceholderText = "搜索";
|
||||
this.input_search.PrefixSvg = "SearchOutlined";
|
||||
this.input_search.Size = new System.Drawing.Size(200, 40);
|
||||
this.input_search.TabIndex = 2;
|
||||
this.input_search.TabIndex = 4;
|
||||
//
|
||||
// dropdown_translate
|
||||
//
|
||||
this.dropdown_translate.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.dropdown_translate.Ghost = true;
|
||||
this.dropdown_translate.IconSvg = "TranslationOutlined";
|
||||
this.dropdown_translate.Items.AddRange(new object[] {
|
||||
"简体中文",
|
||||
"English"});
|
||||
this.dropdown_translate.Location = new System.Drawing.Point(730, 0);
|
||||
this.dropdown_translate.Name = "dropdown_translate";
|
||||
this.dropdown_translate.Size = new System.Drawing.Size(50, 40);
|
||||
this.dropdown_translate.TabIndex = 3;
|
||||
this.dropdown_translate.Trigger = AntdUI.Trigger.Hover;
|
||||
this.dropdown_translate.WaveSize = 0;
|
||||
//
|
||||
// button_color
|
||||
//
|
||||
@ -128,15 +146,15 @@
|
||||
//
|
||||
// tabs
|
||||
//
|
||||
this.tabs.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.tabs.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabs.Gap = 20;
|
||||
this.tabs.Location = new System.Drawing.Point(50, 40);
|
||||
this.tabs.Location = new System.Drawing.Point(70, 40);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.Pages.Add(this.tabPage);
|
||||
this.tabs.Size = new System.Drawing.Size(974, 560);
|
||||
styleCard6.Closable = true;
|
||||
this.tabs.Style = styleCard6;
|
||||
this.tabs.Size = new System.Drawing.Size(954, 560);
|
||||
styleCard2.Closable = true;
|
||||
this.tabs.Style = styleCard2;
|
||||
this.tabs.TabIndex = 9;
|
||||
this.tabs.Type = AntdUI.TabType.Card;
|
||||
//
|
||||
@ -147,9 +165,9 @@
|
||||
this.tabPage.Location = new System.Drawing.Point(3, 40);
|
||||
this.tabPage.Name = "tabPage";
|
||||
this.tabPage.ReadOnly = true;
|
||||
this.tabPage.Size = new System.Drawing.Size(968, 517);
|
||||
this.tabPage.Size = new System.Drawing.Size(948, 517);
|
||||
this.tabPage.TabIndex = 1;
|
||||
this.tabPage.Text = "首页";
|
||||
this.tabPage.Text = "主页";
|
||||
//
|
||||
// panel_content
|
||||
//
|
||||
@ -158,7 +176,7 @@
|
||||
this.panel_content.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel_content.Name = "panel_content";
|
||||
this.panel_content.Radius = 0;
|
||||
this.panel_content.Size = new System.Drawing.Size(968, 517);
|
||||
this.panel_content.Size = new System.Drawing.Size(948, 517);
|
||||
this.panel_content.TabIndex = 4;
|
||||
//
|
||||
// menu
|
||||
@ -170,7 +188,7 @@
|
||||
this.menu.Indent = true;
|
||||
this.menu.Location = new System.Drawing.Point(0, 40);
|
||||
this.menu.Name = "menu";
|
||||
this.menu.Size = new System.Drawing.Size(50, 560);
|
||||
this.menu.Size = new System.Drawing.Size(70, 560);
|
||||
this.menu.TabIndex = 8;
|
||||
this.menu.Unique = true;
|
||||
//
|
||||
@ -200,12 +218,13 @@
|
||||
private AntdUI.PageHeader titlebar;
|
||||
private AntdUI.Button buttonSZ;
|
||||
private AntdUI.Button button_color;
|
||||
private AntdUI.Input input_search;
|
||||
private AntdUI.PageHeader pageHeader1;
|
||||
private AntdUI.Button button_collapse;
|
||||
private AntdUI.Tabs tabs;
|
||||
private AntdUI.TabPage tabPage;
|
||||
private AntdUI.Panel panel_content;
|
||||
private AntdUI.Menu menu;
|
||||
private AntdUI.Dropdown dropdown_translate;
|
||||
private AntdUI.Input input_search;
|
||||
}
|
||||
}
|
||||
160
MainWindow.cs
@ -1,5 +1,6 @@
|
||||
using AntdUI;
|
||||
using AntdUIDemo.Controls;
|
||||
using AntdUIDemo.Languages;
|
||||
using AntdUIDemo.Models;
|
||||
using AntdUIDemo.Utils;
|
||||
using AntdUIDemo.Views;
|
||||
@ -14,29 +15,43 @@ namespace AntdUIDemo
|
||||
public partial class MainWindow : AntdUI.Window
|
||||
{
|
||||
private UserControl currControl;
|
||||
private bool isUpdatingTabs = false;
|
||||
private bool isUpdatingTabs = false;//用于阻止Tabs更新
|
||||
private bool isLight = true;
|
||||
// 定义一个语言切换事件
|
||||
public event EventHandler LanguageChanged;
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
//加载菜单
|
||||
LoadMenu();
|
||||
//加载欢迎页
|
||||
//初始化数据
|
||||
InitData();
|
||||
//绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
// 触发事件
|
||||
protected virtual void OnLanguageChanged(EventArgs e)
|
||||
{
|
||||
LanguageChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
dropdown_translate.SelectedValue = dropdown_translate.Items[0];
|
||||
//根据系统亮暗初始化一次
|
||||
isLight = ThemeHelper.IsLightMode();
|
||||
button_color.Toggle = !isLight;
|
||||
ThemeHelper.SetColorMode(this, isLight);
|
||||
//初始化消息弹出位置
|
||||
Config.ShowInWindow = true;
|
||||
|
||||
UserControl control = new Wellcome { Dock = DockStyle.Fill };
|
||||
AutoDpi(control);
|
||||
panel_content.Controls.Add(control);
|
||||
|
||||
//global
|
||||
tabs.Pages[0].Text = AntdUI.Localization.Get("home", "主页");
|
||||
}
|
||||
|
||||
private void BindEventHandler()
|
||||
@ -46,40 +61,79 @@ namespace AntdUIDemo
|
||||
input_search.TextChanged += Input_search_textchanged;
|
||||
menu.SelectChanged += Menu_SelectChanged;
|
||||
button_collapse.Click += Button_collapse_Click;
|
||||
tabs.Click += Tabs_Click;
|
||||
tabs.SelectedIndexChanged += Tabs_SelectedIndexChanged;
|
||||
dropdown_translate.SelectedValueChanged += Dropdown_translate_SelectedValueChanged;
|
||||
//监听系统深浅色变化
|
||||
SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged;
|
||||
}
|
||||
|
||||
private void Tabs_SelectedIndexChanged(object sender, IntEventArgs e)
|
||||
private void Tabs_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (isUpdatingTabs) return;
|
||||
var text = tabs.SelectedTab?.Text; // 使用安全导航操作符,防止 SelectedTab 为 null
|
||||
if (string.IsNullOrEmpty(text)) // 检查 text 是否为 null 或空
|
||||
// 强制转换 EventArgs 为 MouseEventArgs
|
||||
MouseEventArgs mouseEventArgs = e as MouseEventArgs;
|
||||
|
||||
if (mouseEventArgs != null)
|
||||
{
|
||||
return; // 如果 text 为空,直接退出方法
|
||||
}
|
||||
//首页
|
||||
if (text == "首页")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var rootIndex = 0;
|
||||
var subIndex = 0;
|
||||
var menuItemsCopy = menu.Items.ToList(); // 创建副本
|
||||
for (int i = 0; i < menuItemsCopy.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < menuItemsCopy[i].Sub.Count; j++)
|
||||
if (mouseEventArgs.Button == MouseButtons.Right)
|
||||
{
|
||||
if (menuItemsCopy[i].Sub[j].Tag.ToString() == text)
|
||||
string closeall = AntdUI.Localization.Get("closeall", "关闭所有选项卡");
|
||||
var menulist = new AntdUI.IContextMenuStripItem[]
|
||||
{
|
||||
rootIndex = i;
|
||||
subIndex = j;
|
||||
break;
|
||||
}
|
||||
new AntdUI.ContextMenuStripItem(closeall)
|
||||
{
|
||||
IconSvg= "CloseOutlined"
|
||||
}
|
||||
};
|
||||
|
||||
AntdUI.ContextMenuStrip.open(tabs, item =>
|
||||
{
|
||||
if (item.Text == closeall)
|
||||
{
|
||||
// 只清除从第二个页面开始的控件
|
||||
for (int i = 1; i < tabs.Pages.Count; i++)
|
||||
{
|
||||
tabs.Pages[i].Controls.Clear();
|
||||
}
|
||||
|
||||
// 移除除了第一个页面之外的所有页面
|
||||
if (tabs.Pages.Count > 1)
|
||||
{
|
||||
tabs.Pages.RemoveRange(1, tabs.Pages.Count - 1); // 从索引1开始,移除后面的所有页面
|
||||
}
|
||||
tabs.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
}, menulist);
|
||||
}
|
||||
}
|
||||
menu.SelectIndex(rootIndex, subIndex, true);
|
||||
}
|
||||
|
||||
private void Dropdown_translate_SelectedValueChanged(object sender, ObjectNEventArgs e)
|
||||
{
|
||||
dropdown_translate.SelectedValue = e.Value;
|
||||
if (e.Value.ToString() == "English")
|
||||
{
|
||||
AntdUI.Localization.Provider = new Localizer_enus();
|
||||
AntdUI.Localization.SetLanguage("en-US");
|
||||
}
|
||||
else
|
||||
{
|
||||
AntdUI.Localization.Provider = null;
|
||||
AntdUI.Localization.SetLanguage("zh-CN");
|
||||
}
|
||||
tabs.Pages[0].Text = AntdUI.Localization.Get("home", "主页");
|
||||
|
||||
Refresh();
|
||||
LoadMenu();
|
||||
SelectMenu();
|
||||
//通知子窗口
|
||||
OnLanguageChanged(EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void Tabs_SelectedIndexChanged(object sender, IntEventArgs e)
|
||||
{
|
||||
SelectMenu();
|
||||
}
|
||||
|
||||
private void Button_collapse_Click(object sender, EventArgs e)
|
||||
@ -90,7 +144,7 @@ namespace AntdUIDemo
|
||||
}
|
||||
else
|
||||
{
|
||||
menu.Width = (int)(50 * Config.Dpi);
|
||||
menu.Width = (int)(70 * Config.Dpi);
|
||||
}
|
||||
button_collapse.Toggle = !button_collapse.Toggle;
|
||||
menu.Collapsed = !menu.Collapsed;
|
||||
@ -126,7 +180,8 @@ namespace AntdUIDemo
|
||||
{
|
||||
using (var form = new SystemSet(this))
|
||||
{
|
||||
AntdUI.Modal.open(new AntdUI.Modal.Config(this, "系统设置", form, TType.Info)
|
||||
string title = AntdUI.Localization.Get("systemset", "系统设置");
|
||||
AntdUI.Modal.open(new AntdUI.Modal.Config(this, title, form, TType.Info)
|
||||
{
|
||||
CloseIcon = true,
|
||||
BtnHeight = 0,
|
||||
@ -138,10 +193,23 @@ namespace AntdUIDemo
|
||||
{
|
||||
menu.Items.Clear();
|
||||
|
||||
foreach (var rootItem in DataUtil.MenuItems)
|
||||
string lang = AntdUI.Localization.CurrentLanguage;
|
||||
var menuItems = DataUtil.MenuItems_zhcn;
|
||||
var menuIcons = DataUtil.MenuIcons_zhcn;
|
||||
if (lang.StartsWith("en"))
|
||||
{
|
||||
menuItems = DataUtil.MenuItems_enus;
|
||||
menuIcons = DataUtil.MenuIcons_enus;
|
||||
}
|
||||
|
||||
foreach (var rootItem in menuItems)
|
||||
{
|
||||
var rootKey = rootItem.Key.ToLower();
|
||||
var rootMenu = new AntdUI.MenuItem { Text = rootItem.Key, IconSvg = DataUtil.MenuIcons.TryGetValue(rootItem.Key, out var icon) ? icon : "UnorderedListOutlined" };
|
||||
var rootMenu = new AntdUI.MenuItem
|
||||
{
|
||||
Text = rootItem.Key,
|
||||
IconSvg = menuIcons.TryGetValue(rootItem.Key, out var icon) ? icon : "UnorderedListOutlined",
|
||||
};
|
||||
bool rootVisible = false; // 用于标记是否显示根节点
|
||||
|
||||
foreach (var item in rootItem.Value)
|
||||
@ -170,6 +238,37 @@ namespace AntdUIDemo
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectMenu()
|
||||
{
|
||||
if (isUpdatingTabs) return;
|
||||
var text = tabs.SelectedTab?.Text; // 使用安全导航操作符,防止 SelectedTab 为 null
|
||||
if (string.IsNullOrEmpty(text)) // 检查 text 是否为 null 或空
|
||||
{
|
||||
return; // 如果 text 为空,直接退出方法
|
||||
}
|
||||
//首页
|
||||
if (text == AntdUI.Localization.Get("home", "主页"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var rootIndex = 0;
|
||||
var subIndex = 0;
|
||||
var menuItemsCopy = menu.Items.ToList(); // 创建副本
|
||||
for (int i = 0; i < menuItemsCopy.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < menuItemsCopy[i].Sub.Count; j++)
|
||||
{
|
||||
if (menuItemsCopy[i].Sub[j].Tag.ToString() == text)
|
||||
{
|
||||
rootIndex = i;
|
||||
subIndex = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
menu.SelectIndex(rootIndex, subIndex, true);
|
||||
}
|
||||
|
||||
private void Menu_SelectChanged(object sender, MenuSelectEventArgs e)
|
||||
{
|
||||
string name = (string)e.Value.Tag;
|
||||
@ -185,7 +284,9 @@ namespace AntdUIDemo
|
||||
{
|
||||
if (tab is AntdUI.TabPage existingTab && existingTab.Text == name)
|
||||
{
|
||||
isUpdatingTabs = true;
|
||||
tabs.SelectedTab = existingTab; // 直接跳转到已存在的 TabPage
|
||||
isUpdatingTabs = false;
|
||||
currControl = existingTab.Controls.Count > 0 ? existingTab.Controls[0] as UserControl : null;
|
||||
return;
|
||||
}
|
||||
@ -203,6 +304,7 @@ namespace AntdUIDemo
|
||||
break;
|
||||
case "Icon":
|
||||
control = new IconDemo(this);
|
||||
this.LanguageChanged += ((IconDemo)control).OnLanguageChanged;
|
||||
break;
|
||||
case "Divider":
|
||||
control = new DividerDemo();
|
||||
|
||||
@ -4,7 +4,7 @@ namespace AntdUIDemo.Models
|
||||
{
|
||||
public class DataUtil
|
||||
{
|
||||
public static readonly Dictionary<string, List<MenuItems>> MenuItems = new Dictionary<string, List<MenuItems>>()
|
||||
public static readonly Dictionary<string, List<MenuItems>> MenuItems_zhcn = new Dictionary<string, List<MenuItems>>()
|
||||
{
|
||||
{ "通用", new List<MenuItems>
|
||||
{
|
||||
@ -19,8 +19,7 @@ namespace AntdUIDemo.Models
|
||||
new MenuItems { Text = "FlowPanel 流动布局", Tag = "FlowPanel"},
|
||||
new MenuItems { Text = "GridPanel 网格布局", Tag = "GridPanel"},
|
||||
new MenuItems { Text = "Panel 面板", Tag = "Panel"},
|
||||
new MenuItems { Text = "StackPanel 堆叠布局", Tag = "StackPanel"},
|
||||
//new MenuItems { Text = "VirtualPanel 虚拟布局", Tag = "VirtualPanel"}
|
||||
new MenuItems { Text = "StackPanel 堆叠布局", Tag = "StackPanel"}
|
||||
}
|
||||
},
|
||||
{ "导航", new List<MenuItems>
|
||||
@ -99,7 +98,7 @@ namespace AntdUIDemo.Models
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly Dictionary<string, string> MenuIcons = new Dictionary<string, string>
|
||||
public static readonly Dictionary<string, string> MenuIcons_zhcn = new Dictionary<string, string>
|
||||
{
|
||||
{ "通用", "AppstoreOutlined" },
|
||||
{ "布局", "LayoutOutlined" },
|
||||
@ -111,6 +110,112 @@ namespace AntdUIDemo.Models
|
||||
{ "其它", "SettingOutlined" }
|
||||
};
|
||||
|
||||
public static readonly Dictionary<string, List<MenuItems>> MenuItems_enus = new Dictionary<string, List<MenuItems>>()
|
||||
{
|
||||
{ "General", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Button" , Tag = "Button"},
|
||||
new MenuItems { Text = "FloatButton", Tag = "FloatButton"},
|
||||
new MenuItems { Text = "Icon", Tag = "Icon"},
|
||||
}
|
||||
},
|
||||
{ "Layout", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Divider", Tag = "Divider" },
|
||||
new MenuItems { Text = "FlowPanel", Tag = "FlowPanel"},
|
||||
new MenuItems { Text = "GridPanel", Tag = "GridPanel"},
|
||||
new MenuItems { Text = "Panel", Tag = "Panel"},
|
||||
new MenuItems { Text = "StackPanel", Tag = "StackPanel"}
|
||||
}
|
||||
},
|
||||
{ "Navigation", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Breadcrumb", Tag = "Breadcrumb"},
|
||||
new MenuItems { Text = "Dropdown", Tag = "Dropdown"},
|
||||
new MenuItems { Text = "Menu", Tag = "Menu"},
|
||||
new MenuItems { Text = "Pagination", Tag = "Pagination"},
|
||||
new MenuItems { Text = "Steps", Tag = "Steps"}
|
||||
}
|
||||
},
|
||||
{ "Data Entry", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Checkbox", Tag = "Checkbox"},
|
||||
new MenuItems { Text = "ColorPicker", Tag = "ColorPicker"},
|
||||
new MenuItems { Text = "DatePicker", Tag = "DatePicker"},
|
||||
new MenuItems { Text = "DatePickerRange", Tag = "DatePickerRange"},
|
||||
new MenuItems { Text = "Input", Tag = "Input"},
|
||||
new MenuItems { Text = "InputNumber", Tag = "InputNumber"},
|
||||
new MenuItems { Text = "Radio", Tag = "Radio"},
|
||||
new MenuItems { Text = "Rate", Tag = "Rate"},
|
||||
new MenuItems { Text = "Select", Tag = "Select"},
|
||||
new MenuItems { Text = "SelectMultiple", Tag = "SelectMultiple"},
|
||||
new MenuItems { Text = "Slider", Tag = "Slider"},
|
||||
new MenuItems { Text = "SliderRange", Tag = "SliderRange"},
|
||||
new MenuItems { Text = "Switch", Tag = "Switch"},
|
||||
new MenuItems { Text = "TimePicker", Tag = "TimePicker"},
|
||||
new MenuItems { Text = "UploadDragger", Tag = "UploadDragger"}
|
||||
}
|
||||
},
|
||||
{ "Data Display", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Avatar", Tag = "Avatar"},
|
||||
new MenuItems { Text = "Badge", Tag = "Badge"},
|
||||
new MenuItems { Text = "Calendar", Tag = "Calendar"},
|
||||
new MenuItems { Text = "Carousel", Tag = "Carousel"},
|
||||
new MenuItems { Text = "Collapse", Tag = "Collapse"},
|
||||
new MenuItems { Text = "Label", Tag = "Label"},
|
||||
new MenuItems { Text = "LabelTime", Tag = "LabelTime"},
|
||||
new MenuItems { Text = "Popover", Tag = "Popover"},
|
||||
new MenuItems { Text = "Preview", Tag = "Preview"},
|
||||
new MenuItems { Text = "Segmented", Tag = "Segmented"},
|
||||
new MenuItems { Text = "Table", Tag = "Table"},
|
||||
new MenuItems { Text = "Tabs", Tag = "Tabs"},
|
||||
new MenuItems { Text = "Tag", Tag = "Tag"},
|
||||
new MenuItems { Text = "Timeline", Tag = "Timeline"},
|
||||
new MenuItems { Text = "Tooltip", Tag = "Tooltip"},
|
||||
new MenuItems { Text = "Tree", Tag = "Tree"}
|
||||
}
|
||||
},
|
||||
{ "Feedback", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Alert", Tag = "Alert"},
|
||||
new MenuItems { Text = "Drawer", Tag = "Drawer"},
|
||||
new MenuItems { Text = "Message", Tag = "Message"},
|
||||
new MenuItems { Text = "Modal", Tag = "Modal"},
|
||||
new MenuItems { Text = "Notification", Tag = "Notification"},
|
||||
new MenuItems { Text = "Progress", Tag = "Progress"},
|
||||
new MenuItems { Text = "Spin", Tag = "Spin"}
|
||||
}
|
||||
},
|
||||
{ "Chat", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "ChatList", Tag = "ChatList"},
|
||||
new MenuItems { Text = "MsgList", Tag = "MsgList"}
|
||||
}
|
||||
},
|
||||
{ "Other", new List<MenuItems>
|
||||
{
|
||||
new MenuItems { Text = "Battery", Tag = "Battery" },
|
||||
new MenuItems { Text = "ContextMenuStrip", Tag = "ContextMenuStrip" },
|
||||
new MenuItems { Text = "Image3D", Tag = "Image3D" },
|
||||
new MenuItems { Text = "PageHeader", Tag= "PageHeader"},
|
||||
new MenuItems { Text = "Signal", Tag = "Signal" }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly Dictionary<string, string> MenuIcons_enus = new Dictionary<string, string>
|
||||
{
|
||||
{ "General", "AppstoreOutlined" },
|
||||
{ "Layout", "LayoutOutlined" },
|
||||
{ "Navigation", "CompressOutlined" },
|
||||
{ "Data Entry", "EditOutlined" },
|
||||
{ "Data Display", "BarChartOutlined" },
|
||||
{ "Feedback", "NotificationOutlined" },
|
||||
{ "Chat", "MessageOutlined" },
|
||||
{ "Other", "SettingOutlined" }
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using AntdUIDemo.Utils;
|
||||
using System;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AntdUIDemo
|
||||
|
||||
174
README-en.md
Normal file
@ -0,0 +1,174 @@
|
||||
<div align="center">
|
||||
|
||||
<img height="100" src="assets/logo.png">
|
||||
|
||||
<h1>AntdUI Demo</h1>
|
||||
|
||||
This project is developed based on `Winform .NET Framework 4.8`, and is a demo project of [AntdUI](https://gitee.com/antdui/AntdUI), the current version is `1.8.4`
|
||||
|
||||
</div>
|
||||
|
||||
English | <a href="README.md">中文</a>
|
||||
|
||||
## ✅ Quick Start
|
||||
|
||||
>1. Git clone or download the project directly
|
||||
>2. Open this project using Visual Studio
|
||||
>3. If the computer does not have the .NET Framework 4.8 installed, edit the project file to set the TargetFramework property to install the target framework for yourself, refer to [AntdUI Compatible Framework](https://www.nuget.org/packages/AntdUI#supportedframeworks-body-tab)
|
||||
>4. Compile and run
|
||||
|
||||
## ⚠️ Precautions
|
||||
- COMPUTER SCREEN RESOLUTION IS LOWER THAN 1920×1080 (1080P) Please use a screen with a resolution greater than or equal to 1080P
|
||||
- If `TargetFramework` is set to `net6.0-windows7.0` or later, you can directly open the form interface and display the following prompt
|
||||

|
||||
- If the `TargetFramework` is set to `net48` or lower, and the computer screen resolution is greater than 1080P or the scaling is not at 100%, it is essential to open the project using one of the following methods. For detailed reasons, please refer to [Fix HDPI/scaling issues with Windows Forms Designer in Visual Studio](https://learn.microsoft.com/zh-cn/visualstudio/designers/disable-dpi-awareness?view=vs-2022):
|
||||
1. Use the command `devenv /noScale` to start Visual Studio and click on `File - Open - Project/Solution`, as shown below.
|
||||

|
||||

|
||||
2. Directly open the project, and when prompted on the window page, click **Restart Visual Studio with 100% zoom** as shown below.
|
||||

|
||||
|
||||
## System Settings
|
||||
- ✅ Support light/dark mode and automatically switch with the system
|
||||
- ✅ Support enabling/disabling animation effects
|
||||
- ✅ Support enabling/disabling shadow effects
|
||||
- ✅ Support for displaying/hiding the scrollbar
|
||||
- ✅ Support setting the message/notification display position
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Control Demo
|
||||
|
||||
### General
|
||||
#### Button
|
||||

|
||||
#### FloatButton
|
||||

|
||||
#### Icon
|
||||

|
||||
|
||||
### Layout
|
||||
#### Divider
|
||||

|
||||
#### FlowPanel
|
||||

|
||||
#### GridPanel
|
||||

|
||||
#### Panel
|
||||

|
||||
#### StackPanel
|
||||

|
||||
|
||||
### Navigation
|
||||
#### Breadcrumb
|
||||

|
||||
#### Dropdown
|
||||

|
||||
#### Menu
|
||||

|
||||
#### Pagination
|
||||

|
||||
#### Steps
|
||||

|
||||
|
||||
### Data Entry
|
||||
#### Checkbox
|
||||

|
||||
#### ColorPicker
|
||||

|
||||
#### DatePicker
|
||||

|
||||
#### DatePickerRange
|
||||

|
||||
#### Input
|
||||

|
||||
#### InputNumber
|
||||

|
||||
#### Radio
|
||||

|
||||
#### Rate
|
||||

|
||||
#### Select
|
||||

|
||||
#### SelectMultiple
|
||||

|
||||
#### Slider
|
||||

|
||||
#### SliderRange
|
||||

|
||||
#### Switch
|
||||

|
||||
#### TimePicker
|
||||

|
||||
#### UploadDragger
|
||||

|
||||
|
||||
### Data Display
|
||||
#### Avatar
|
||||

|
||||
#### Badge
|
||||

|
||||
#### Calendar
|
||||

|
||||
#### Carousel
|
||||

|
||||
#### Collapse
|
||||

|
||||
#### Label
|
||||

|
||||
#### LabelTime
|
||||

|
||||
#### Popover
|
||||

|
||||
#### Preview
|
||||

|
||||
#### Segmented
|
||||

|
||||
#### Table
|
||||

|
||||
#### Tabs
|
||||

|
||||
#### Tag
|
||||

|
||||
#### Timeline
|
||||

|
||||
#### Tooltip
|
||||

|
||||
#### Tree
|
||||

|
||||
|
||||
### Feedback
|
||||
#### Alert
|
||||

|
||||
#### Drawer
|
||||

|
||||
#### Message
|
||||

|
||||
#### Modal
|
||||

|
||||
#### Notification
|
||||

|
||||
#### Progress
|
||||

|
||||
#### Spin
|
||||

|
||||
|
||||
### Chat
|
||||
#### ChatList
|
||||

|
||||
#### MsgList
|
||||

|
||||
|
||||
### Other
|
||||
#### Battery
|
||||

|
||||
#### ContextMenuStrip
|
||||

|
||||
#### Image3D
|
||||

|
||||
#### PageHeader
|
||||

|
||||
#### Signal
|
||||

|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
中文 | <a href="README-en.md">English</a>
|
||||
|
||||
## ✅ 快速开始
|
||||
|
||||
>1. git clone 或者直接下载本项目
|
||||
|
||||
25
Views/ButtonDemo.Designer.cs
generated
@ -126,6 +126,8 @@
|
||||
this.header1.DividerShow = true;
|
||||
this.header1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.header1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.header1.LocalizationDescription = "Button.Description";
|
||||
this.header1.LocalizationText = "Button.Text";
|
||||
this.header1.Location = new System.Drawing.Point(0, 0);
|
||||
this.header1.Name = "header1";
|
||||
this.header1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
||||
@ -181,6 +183,7 @@
|
||||
this.button_toggle3.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.button_toggle3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.button_toggle3.IconPosition = AntdUI.TAlignMini.Right;
|
||||
this.button_toggle3.LocalizationText = "search";
|
||||
this.button_toggle3.Location = new System.Drawing.Point(175, 3);
|
||||
this.button_toggle3.Name = "button_toggle3";
|
||||
this.button_toggle3.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
@ -200,6 +203,7 @@
|
||||
this.button_toggle2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.button_toggle2.IconPosition = AntdUI.TAlignMini.Right;
|
||||
this.button_toggle2.IconSvg = resources.GetString("button_toggle2.IconSvg");
|
||||
this.button_toggle2.LocalizationText = "search";
|
||||
this.button_toggle2.Location = new System.Drawing.Point(89, 3);
|
||||
this.button_toggle2.Name = "button_toggle2";
|
||||
this.button_toggle2.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
@ -221,6 +225,7 @@
|
||||
// label10
|
||||
//
|
||||
this.label10.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label10.LocalizationText = "toggle";
|
||||
this.label10.Location = new System.Drawing.Point(3, 711);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(744, 24);
|
||||
@ -282,6 +287,7 @@
|
||||
// label9
|
||||
//
|
||||
this.label9.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label9.LocalizationText = "gradient";
|
||||
this.label9.Location = new System.Drawing.Point(3, 631);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(744, 24);
|
||||
@ -387,6 +393,7 @@
|
||||
// label8
|
||||
//
|
||||
this.label8.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label8.LocalizationText = "join";
|
||||
this.label8.Location = new System.Drawing.Point(3, 551);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(744, 24);
|
||||
@ -412,10 +419,11 @@
|
||||
this.button28.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button28.Ghost = true;
|
||||
this.button28.IconSvg = resources.GetString("button28.IconSvg");
|
||||
this.button28.Location = new System.Drawing.Point(347, 3);
|
||||
this.button28.LocalizationText = "search";
|
||||
this.button28.Location = new System.Drawing.Point(367, 3);
|
||||
this.button28.Name = "button28";
|
||||
this.button28.ShowArrow = true;
|
||||
this.button28.Size = new System.Drawing.Size(80, 38);
|
||||
this.button28.Size = new System.Drawing.Size(100, 38);
|
||||
this.button28.TabIndex = 11;
|
||||
this.button28.Text = "搜索";
|
||||
this.button28.Type = AntdUI.TTypeMini.Primary;
|
||||
@ -425,10 +433,11 @@
|
||||
this.button27.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button27.Ghost = true;
|
||||
this.button27.IconSvg = resources.GetString("button27.IconSvg");
|
||||
this.button27.LocalizationText = "search";
|
||||
this.button27.Location = new System.Drawing.Point(261, 3);
|
||||
this.button27.Name = "button27";
|
||||
this.button27.ShowArrow = true;
|
||||
this.button27.Size = new System.Drawing.Size(80, 38);
|
||||
this.button27.Size = new System.Drawing.Size(100, 38);
|
||||
this.button27.TabIndex = 10;
|
||||
this.button27.Text = "搜索";
|
||||
this.button27.Type = AntdUI.TTypeMini.Primary;
|
||||
@ -472,6 +481,7 @@
|
||||
// label7
|
||||
//
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label7.LocalizationText = "arrow";
|
||||
this.label7.Location = new System.Drawing.Point(3, 471);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(744, 24);
|
||||
@ -498,6 +508,7 @@
|
||||
this.button21.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button21.Ghost = true;
|
||||
this.button21.IconSvg = resources.GetString("button21.IconSvg");
|
||||
this.button21.LocalizationText = "search";
|
||||
this.button21.Location = new System.Drawing.Point(307, 3);
|
||||
this.button21.Name = "button21";
|
||||
this.button21.Size = new System.Drawing.Size(80, 38);
|
||||
@ -523,6 +534,7 @@
|
||||
this.button19.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button19.Ghost = true;
|
||||
this.button19.IconSvg = resources.GetString("button19.IconSvg");
|
||||
this.button19.LocalizationText = "search";
|
||||
this.button19.Location = new System.Drawing.Point(177, 3);
|
||||
this.button19.Name = "button19";
|
||||
this.button19.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
@ -547,6 +559,7 @@
|
||||
//
|
||||
this.button23.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button23.IconSvg = resources.GetString("button23.IconSvg");
|
||||
this.button23.LocalizationText = "search";
|
||||
this.button23.Location = new System.Drawing.Point(47, 3);
|
||||
this.button23.Name = "button23";
|
||||
this.button23.Size = new System.Drawing.Size(80, 38);
|
||||
@ -566,6 +579,7 @@
|
||||
// label6
|
||||
//
|
||||
this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label6.LocalizationText = "icon";
|
||||
this.label6.Location = new System.Drawing.Point(3, 391);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(744, 24);
|
||||
@ -660,6 +674,7 @@
|
||||
// label5
|
||||
//
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label5.LocalizationText = "border";
|
||||
this.label5.Location = new System.Drawing.Point(3, 311);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(744, 24);
|
||||
@ -748,6 +763,7 @@
|
||||
// label4
|
||||
//
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label4.LocalizationText = "ghost";
|
||||
this.label4.Location = new System.Drawing.Point(3, 231);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(744, 24);
|
||||
@ -867,6 +883,7 @@
|
||||
// label12
|
||||
//
|
||||
this.label12.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label12.LocalizationText = "loading";
|
||||
this.label12.Location = new System.Drawing.Point(3, 157);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(744, 24);
|
||||
@ -950,6 +967,7 @@
|
||||
// label11
|
||||
//
|
||||
this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label11.LocalizationText = "wave";
|
||||
this.label11.Location = new System.Drawing.Point(3, 77);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(744, 24);
|
||||
@ -1039,6 +1057,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label3.LocalizationText = "type";
|
||||
this.label3.Location = new System.Drawing.Point(3, 3);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(744, 24);
|
||||
|
||||
@ -89,7 +89,7 @@ namespace AntdUIDemo.Views
|
||||
}
|
||||
if (!string.IsNullOrEmpty(iconsvg))
|
||||
{
|
||||
tooltipText.AppendLine($"IconSvg: 参见IconSvg属性");
|
||||
tooltipText.AppendLine($"IconSvg: See IconSvg Properties");
|
||||
}
|
||||
if (backactive != null)
|
||||
{
|
||||
@ -110,7 +110,7 @@ namespace AntdUIDemo.Views
|
||||
tooltipText.AppendLine($"ToggleType: {toggletype}");
|
||||
if (!string.IsNullOrEmpty(toggleiconsvg))
|
||||
{
|
||||
tooltipText.AppendLine($"ToggleIconSvg: 参见ToggleIconSvg属性");
|
||||
tooltipText.AppendLine($"ToggleIconSvg: See ToggleIconSvg Properties");
|
||||
}
|
||||
}
|
||||
if (loading)
|
||||
|
||||
80
Views/FloatButtonDemo.Designer.cs
generated
@ -31,6 +31,9 @@
|
||||
this.header1 = new AntdUI.PageHeader();
|
||||
this.stackPanel1 = new AntdUI.StackPanel();
|
||||
this.stackPanel2 = new AntdUI.StackPanel();
|
||||
this.buttonCZ = new AntdUI.Button();
|
||||
this.buttonClose = new AntdUI.Button();
|
||||
this.buttonOpen = new AntdUI.Button();
|
||||
this.stackPanel8 = new AntdUI.StackPanel();
|
||||
this.switch_enabled = new AntdUI.Switch();
|
||||
this.label18 = new AntdUI.Label();
|
||||
@ -70,9 +73,6 @@
|
||||
this.label10 = new AntdUI.Label();
|
||||
this.label4 = new AntdUI.Label();
|
||||
this.label3 = new AntdUI.Label();
|
||||
this.buttonOpen = new AntdUI.Button();
|
||||
this.buttonCZ = new AntdUI.Button();
|
||||
this.buttonClose = new AntdUI.Button();
|
||||
this.stackPanel1.SuspendLayout();
|
||||
this.stackPanel2.SuspendLayout();
|
||||
this.stackPanel8.SuspendLayout();
|
||||
@ -89,6 +89,8 @@
|
||||
this.header1.DividerShow = true;
|
||||
this.header1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.header1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.header1.LocalizationDescription = "FloatButton.Description";
|
||||
this.header1.LocalizationText = "FloatButton.Text";
|
||||
this.header1.Location = new System.Drawing.Point(0, 0);
|
||||
this.header1.Name = "header1";
|
||||
this.header1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
||||
@ -127,6 +129,42 @@
|
||||
this.stackPanel2.TabIndex = 28;
|
||||
this.stackPanel2.Text = "stackPanel2";
|
||||
//
|
||||
// buttonCZ
|
||||
//
|
||||
this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonCZ.LocalizationText = "reset";
|
||||
this.buttonCZ.Location = new System.Drawing.Point(165, 3);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonCZ.TabIndex = 7;
|
||||
this.buttonCZ.Text = "重 置";
|
||||
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
|
||||
this.buttonCZ.WaveSize = 0;
|
||||
//
|
||||
// buttonClose
|
||||
//
|
||||
this.buttonClose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonClose.LocalizationText = "close";
|
||||
this.buttonClose.Location = new System.Drawing.Point(84, 3);
|
||||
this.buttonClose.Name = "buttonClose";
|
||||
this.buttonClose.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonClose.TabIndex = 6;
|
||||
this.buttonClose.Text = "关 闭";
|
||||
this.buttonClose.Type = AntdUI.TTypeMini.Error;
|
||||
this.buttonClose.WaveSize = 0;
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonOpen.LocalizationText = "open";
|
||||
this.buttonOpen.Location = new System.Drawing.Point(3, 3);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonOpen.TabIndex = 5;
|
||||
this.buttonOpen.Text = "打 开";
|
||||
this.buttonOpen.Type = AntdUI.TTypeMini.Success;
|
||||
this.buttonOpen.WaveSize = 0;
|
||||
//
|
||||
// stackPanel8
|
||||
//
|
||||
this.stackPanel8.Controls.Add(this.switch_enabled);
|
||||
@ -340,6 +378,7 @@
|
||||
// label11
|
||||
//
|
||||
this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.label11.LocalizationText = "button_option";
|
||||
this.label11.Location = new System.Drawing.Point(3, 147);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(744, 24);
|
||||
@ -561,6 +600,7 @@
|
||||
// label4
|
||||
//
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.label4.LocalizationText = "control_option";
|
||||
this.label4.Location = new System.Drawing.Point(3, 3);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(744, 24);
|
||||
@ -571,6 +611,7 @@
|
||||
//
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.label3.LocalizationText = "FloatButton.Tip";
|
||||
this.label3.Location = new System.Drawing.Point(0, 74);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 6);
|
||||
@ -578,39 +619,6 @@
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "FloatButton没有工具箱控件,使用代码方式调用。";
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonOpen.Location = new System.Drawing.Point(3, 3);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonOpen.TabIndex = 5;
|
||||
this.buttonOpen.Text = "打 开";
|
||||
this.buttonOpen.Type = AntdUI.TTypeMini.Success;
|
||||
this.buttonOpen.WaveSize = 0;
|
||||
//
|
||||
// buttonCZ
|
||||
//
|
||||
this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonCZ.Location = new System.Drawing.Point(165, 3);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonCZ.TabIndex = 7;
|
||||
this.buttonCZ.Text = "重 置";
|
||||
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
|
||||
this.buttonCZ.WaveSize = 0;
|
||||
//
|
||||
// buttonClose
|
||||
//
|
||||
this.buttonClose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonClose.Location = new System.Drawing.Point(84, 3);
|
||||
this.buttonClose.Name = "buttonClose";
|
||||
this.buttonClose.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonClose.TabIndex = 6;
|
||||
this.buttonClose.Text = "关 闭";
|
||||
this.buttonClose.Type = AntdUI.TTypeMini.Error;
|
||||
this.buttonClose.WaveSize = 0;
|
||||
//
|
||||
// FloatButtonDemo
|
||||
//
|
||||
this.Controls.Add(this.stackPanel1);
|
||||
|
||||
@ -104,9 +104,9 @@ namespace AntdUIDemo.Views
|
||||
new FloatButton.ConfigBtn("button1","",true)
|
||||
{
|
||||
// isSvg设置为true,text参数会赋值给IconSvg,否则赋值给Text,所以需要单独设置Text
|
||||
Text = "SVG图片",
|
||||
Text = "SVG Picture",
|
||||
IconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M511.878001 1023.989c-62.999385 0-124.098788-11.699886-181.698225-34.999658-55.699456-22.49978-105.798967-54.499468-148.798547-95.599067-43.099579-40.9996-76.899249-88.899132-100.599018-142.198611-24.59976-55.29946-36.999639-114.098886-36.999639-174.698294 0-76.79925 20.699798-152.498511 59.899415-219.197859 37.799631-64.099374 92.299099-119.098837 157.498462-158.598451 14.699856-8.999912 33.899669-4.299958 42.899581 10.499897 8.999912 14.699856 4.299958 33.899669-10.499897 42.899581-56.399449 34.199666-103.498989 81.599203-136.19867 137.098661-33.599672 56.999443-51.1995 121.798811-51.1995 187.39817 0 102.498999 41.99959 199.098056 118.298845 271.697347 76.699251 73.099286 178.798254 113.298894 287.497192 113.298893s210.797941-40.299606 287.497193-113.298893c76.299255-72.799289 118.298845-169.198348 118.298844-271.797346 0-130.298728-68.699329-250.797551-183.798205-322.296852-14.599857-9.099911-19.099813-28.299724-9.999902-42.99958 9.099911-14.599857 28.299724-19.099813 42.99958-9.999903 64.099374 39.799611 117.498853 94.599076 154.59849 158.398453 38.399625 66.099354 58.699427 140.998623 58.699427 217.09788 0 60.599408-12.499878 119.398834-36.999639 174.698294-23.699769 53.299479-57.499438 101.199012-100.599017 142.198612-42.99958 40.899601-93.099091 73.099286-148.798547 95.599066-57.799436 23.099774-118.998838 34.79966-181.998223 34.79966zM511.878001 506.394055c-17.199832 0-31.199695-13.899864-31.199695-31.199696v-443.995664c0-17.199832 13.899864-31.199695 31.199695-31.199695 17.199832 0 31.199695 13.899864 31.199696 31.199695v443.895665c0.099999 17.199832-13.999863 31.299694-31.199696 31.299695z\"></path></svg>",
|
||||
Tooltip = "SVG图片按钮",
|
||||
Tooltip = "SVG Button",
|
||||
Round = switch_round.Checked,
|
||||
Type = (TTypeMini)select_type.SelectedValue,
|
||||
Radius = (int)input_radius.Value,
|
||||
@ -119,8 +119,8 @@ namespace AntdUIDemo.Views
|
||||
// 使用资源图片
|
||||
new FloatButton.ConfigBtn("button2", Properties.Resources.关闭)
|
||||
{
|
||||
Text = "资源图片",
|
||||
Tooltip = "资源图片按钮",
|
||||
Text = "Resource Picture",
|
||||
Tooltip = "Resource Picture Button",
|
||||
Round = switch_round.Checked,
|
||||
Type = (TTypeMini)select_type.SelectedValue,
|
||||
Radius = (int)input_radius.Value,
|
||||
@ -131,9 +131,9 @@ namespace AntdUIDemo.Views
|
||||
Loading = switch_loading.Checked,
|
||||
},
|
||||
// 使用文本
|
||||
new FloatButton.ConfigBtn("button3", "文本")
|
||||
new FloatButton.ConfigBtn("button3", "Text")
|
||||
{
|
||||
Tooltip = "文本按钮",
|
||||
Tooltip = "Text Button",
|
||||
Round = switch_round.Checked,
|
||||
Type = (TTypeMini)select_type.SelectedValue,
|
||||
Radius = (int)input_radius.Value,
|
||||
|
||||
7
Views/IconDemo.Designer.cs
generated
@ -47,6 +47,8 @@
|
||||
this.header1.DividerShow = true;
|
||||
this.header1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.header1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.header1.LocalizationDescription = "Icon.Description";
|
||||
this.header1.LocalizationText = "Icon.Text";
|
||||
this.header1.Location = new System.Drawing.Point(0, 0);
|
||||
this.header1.Name = "header1";
|
||||
this.header1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
||||
@ -102,9 +104,11 @@
|
||||
this.txt_search.AllowClear = true;
|
||||
this.txt_search.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.txt_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F);
|
||||
this.txt_search.LocalizationPlaceholderText = "search";
|
||||
this.txt_search.LocalizationText = "";
|
||||
this.txt_search.Location = new System.Drawing.Point(420, 0);
|
||||
this.txt_search.Name = "txt_search";
|
||||
this.txt_search.PlaceholderText = "输入关键字搜索...";
|
||||
this.txt_search.PlaceholderText = "搜索";
|
||||
this.txt_search.PrefixSvg = "SearchOutlined";
|
||||
this.txt_search.Size = new System.Drawing.Size(324, 38);
|
||||
this.txt_search.TabIndex = 19;
|
||||
@ -113,6 +117,7 @@
|
||||
//
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.label3.LocalizationText = "Icon.Tip";
|
||||
this.label3.Location = new System.Drawing.Point(0, 74);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Padding = new System.Windows.Forms.Padding(10, 0, 10, 6);
|
||||
|
||||
@ -18,6 +18,13 @@ namespace AntdUIDemo.Views
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
// 处理父窗体发来的事件
|
||||
public void OnLanguageChanged(object sender, EventArgs e)
|
||||
{
|
||||
//global
|
||||
InitData();
|
||||
}
|
||||
|
||||
private void BindEventHandler()
|
||||
{
|
||||
segmented1.SelectIndexChanged += segmented1_SelectIndexChanged;
|
||||
@ -45,50 +52,60 @@ namespace AntdUIDemo.Views
|
||||
vpanel.Items.Clear();
|
||||
txt_search.Text = "";
|
||||
vpanel.Items.AddRange(svgs);
|
||||
|
||||
//global
|
||||
segmented1.Items[0].Text = AntdUI.Localization.Get("outlined", "线框风格");
|
||||
segmented1.Items[1].Text = AntdUI.Localization.Get("filled", "实底风格");
|
||||
}
|
||||
|
||||
Dictionary<string, List<VItem>> GetData()
|
||||
{
|
||||
var dir = new Dictionary<string, List<VItem>>(AntdUI.SvgDb.Custom.Count);
|
||||
var tmp = new List<VItem>(AntdUI.SvgDb.Custom.Count);
|
||||
string directionalicon = AntdUI.Localization.Get("directionalicon", "方向性图标");
|
||||
string suggestionicon = AntdUI.Localization.Get("suggestionicon", "提示建议性图标");
|
||||
string editingicon = AntdUI.Localization.Get("editingicon", "编辑类图标");
|
||||
string dataicon = AntdUI.Localization.Get("dataicon", "数据类图标");
|
||||
string brand = AntdUI.Localization.Get("brand", "品牌和标识");
|
||||
string universal = AntdUI.Localization.Get("universal", "网站通用图标");
|
||||
if (segmented1.SelectIndex == 0)
|
||||
{
|
||||
foreach (var it in AntdUI.SvgDb.Custom)
|
||||
{
|
||||
if (it.Key == "QuestionOutlined")
|
||||
{
|
||||
dir.Add("方向性图标", new List<VItem>(tmp));
|
||||
dir.Add(directionalicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "EditOutlined")
|
||||
{
|
||||
dir.Add("提示建议性图标", new List<VItem>(tmp));
|
||||
dir.Add(suggestionicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AreaChartOutlined")
|
||||
{
|
||||
dir.Add("编辑类图标", new List<VItem>(tmp));
|
||||
dir.Add(editingicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AndroidOutlined")
|
||||
{
|
||||
dir.Add("数据类图标", new List<VItem>(tmp));
|
||||
dir.Add(dataicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AccountBookOutlined")
|
||||
{
|
||||
dir.Add("品牌和标识", new List<VItem>(tmp));
|
||||
dir.Add(brand, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "StepBackwardFilled")
|
||||
{
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
dir.Add(universal, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
return dir;
|
||||
}
|
||||
tmp.Add(new VItem(it.Key, it.Value));
|
||||
}
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
dir.Add(universal, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else
|
||||
@ -99,32 +116,32 @@ namespace AntdUIDemo.Views
|
||||
if (it.Key == "StepBackwardFilled") isadd = true;
|
||||
else if (it.Key == "QuestionCircleFilled")
|
||||
{
|
||||
dir.Add("方向性图标", new List<VItem>(tmp));
|
||||
dir.Add(directionalicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "EditFilled")
|
||||
{
|
||||
dir.Add("提示建议性图标", new List<VItem>(tmp));
|
||||
dir.Add(suggestionicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "PieChartFilled")
|
||||
{
|
||||
dir.Add("编辑类图标", new List<VItem>(tmp));
|
||||
dir.Add(editingicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AndroidFilled")
|
||||
{
|
||||
dir.Add("数据类图标", new List<VItem>(tmp));
|
||||
dir.Add(dataicon, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AccountBookFilled")
|
||||
{
|
||||
dir.Add("品牌和标识", new List<VItem>(tmp));
|
||||
dir.Add(brand, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
if (isadd) tmp.Add(new VItem(it.Key, it.Value));
|
||||
}
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
dir.Add(universal, new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
return dir;
|
||||
@ -219,10 +236,12 @@ namespace AntdUIDemo.Views
|
||||
|
||||
private void vpanel_ItemClick(object sender, AntdUI.VirtualItemEventArgs e)
|
||||
{
|
||||
string copysuccess = AntdUI.Localization.Get("copysuccess", "复制成功");
|
||||
string copyfail = AntdUI.Localization.Get("copyfail", "复制失败");
|
||||
if (e.Item is VItem item)
|
||||
{
|
||||
if (AntdUI.Helper.ClipboardSetText(this, item.Key)) AntdUI.Message.success(window, item.Key + " 复制成功");
|
||||
else AntdUI.Message.error(window, item.Key + " 复制失败");
|
||||
if (AntdUI.Helper.ClipboardSetText(this, item.Key)) AntdUI.Message.success(window, item.Key + " " + copysuccess);
|
||||
else AntdUI.Message.error(window, item.Key + " " + copyfail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
30
Views/SubView/SystemSet.Designer.cs
generated
@ -73,6 +73,7 @@
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.Pages.Add(this.tabPage1);
|
||||
this.tabs.Pages.Add(this.tabPage2);
|
||||
this.tabs.SelectedIndex = 1;
|
||||
this.tabs.Size = new System.Drawing.Size(598, 396);
|
||||
this.tabs.Style = styleLine1;
|
||||
this.tabs.TabIndex = 0;
|
||||
@ -82,7 +83,7 @@
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.stackPanel1);
|
||||
this.tabPage1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
|
||||
this.tabPage1.Location = new System.Drawing.Point(90, 6);
|
||||
this.tabPage1.Location = new System.Drawing.Point(-502, -384);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Size = new System.Drawing.Size(502, 384);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
@ -115,7 +116,7 @@
|
||||
//
|
||||
this.switch_scrollbar.CheckedText = "";
|
||||
this.switch_scrollbar.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.switch_scrollbar.Location = new System.Drawing.Point(129, 3);
|
||||
this.switch_scrollbar.Location = new System.Drawing.Point(189, 3);
|
||||
this.switch_scrollbar.Name = "switch_scrollbar";
|
||||
this.switch_scrollbar.Size = new System.Drawing.Size(60, 26);
|
||||
this.switch_scrollbar.TabIndex = 1;
|
||||
@ -125,9 +126,10 @@
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.LocalizationText = "scrollbarhide";
|
||||
this.label4.Location = new System.Drawing.Point(3, 3);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(120, 26);
|
||||
this.label4.Size = new System.Drawing.Size(180, 26);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "隐藏滚动条";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@ -147,7 +149,7 @@
|
||||
this.switch_shadow.Checked = true;
|
||||
this.switch_shadow.CheckedText = "";
|
||||
this.switch_shadow.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.switch_shadow.Location = new System.Drawing.Point(129, 3);
|
||||
this.switch_shadow.Location = new System.Drawing.Point(189, 3);
|
||||
this.switch_shadow.Name = "switch_shadow";
|
||||
this.switch_shadow.Size = new System.Drawing.Size(60, 26);
|
||||
this.switch_shadow.TabIndex = 1;
|
||||
@ -157,9 +159,10 @@
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.LocalizationText = "shadowon";
|
||||
this.label3.Location = new System.Drawing.Point(3, 3);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(120, 26);
|
||||
this.label3.Size = new System.Drawing.Size(180, 26);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "启用阴影";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@ -179,7 +182,7 @@
|
||||
this.switch_animation.Checked = true;
|
||||
this.switch_animation.CheckedText = "";
|
||||
this.switch_animation.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.switch_animation.Location = new System.Drawing.Point(129, 3);
|
||||
this.switch_animation.Location = new System.Drawing.Point(189, 3);
|
||||
this.switch_animation.Name = "switch_animation";
|
||||
this.switch_animation.Size = new System.Drawing.Size(60, 26);
|
||||
this.switch_animation.TabIndex = 1;
|
||||
@ -189,9 +192,10 @@
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.LocalizationText = "animationon";
|
||||
this.label2.Location = new System.Drawing.Point(3, 3);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(120, 26);
|
||||
this.label2.Size = new System.Drawing.Size(180, 26);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "开启动画";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@ -200,7 +204,7 @@
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.stackPanel6);
|
||||
this.tabPage2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.tabPage2.Location = new System.Drawing.Point(-502, -384);
|
||||
this.tabPage2.Location = new System.Drawing.Point(90, 6);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Size = new System.Drawing.Size(502, 384);
|
||||
this.tabPage2.TabIndex = 0;
|
||||
@ -230,7 +234,7 @@
|
||||
//
|
||||
// input_offset
|
||||
//
|
||||
this.input_offset.Location = new System.Drawing.Point(129, 3);
|
||||
this.input_offset.Location = new System.Drawing.Point(189, 3);
|
||||
this.input_offset.Name = "input_offset";
|
||||
this.input_offset.Size = new System.Drawing.Size(60, 26);
|
||||
this.input_offset.TabIndex = 1;
|
||||
@ -239,9 +243,10 @@
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.LocalizationText = "windowOffsetXY";
|
||||
this.label6.Location = new System.Drawing.Point(3, 3);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(120, 26);
|
||||
this.label6.Size = new System.Drawing.Size(180, 26);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "边界偏移量";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@ -260,7 +265,7 @@
|
||||
//
|
||||
this.switch_showinwindow.CheckedText = "";
|
||||
this.switch_showinwindow.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.switch_showinwindow.Location = new System.Drawing.Point(129, 3);
|
||||
this.switch_showinwindow.Location = new System.Drawing.Point(189, 3);
|
||||
this.switch_showinwindow.Name = "switch_showinwindow";
|
||||
this.switch_showinwindow.Size = new System.Drawing.Size(60, 26);
|
||||
this.switch_showinwindow.TabIndex = 1;
|
||||
@ -270,9 +275,10 @@
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.LocalizationText = "showinwindow";
|
||||
this.label5.Location = new System.Drawing.Point(3, 3);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(120, 26);
|
||||
this.label5.Size = new System.Drawing.Size(180, 26);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "窗口内弹出";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
|
||||
@ -37,6 +37,11 @@ namespace AntdUIDemo.Controls
|
||||
switch_scrollbar.Checked = Config.ScrollBarHide;
|
||||
switch_showinwindow.Checked = Config.ShowInWindow;
|
||||
input_offset.Value = Config.NoticeWindowOffsetXY;
|
||||
|
||||
//global
|
||||
tabs.Pages[0].Text = AntdUI.Localization.Get("baseset", "基本设置");
|
||||
tabs.Pages[1].Text = AntdUI.Localization.Get("messageconfig", "消息配置");
|
||||
|
||||
}
|
||||
|
||||
#region 事件
|
||||
@ -53,8 +58,10 @@ namespace AntdUIDemo.Controls
|
||||
private void Switch_showinwindow_CheckedChanged(object sender, BoolEventArgs e)
|
||||
{
|
||||
AntdUI.Config.ShowInWindow = e.Value;
|
||||
AntdUI.Message.success(Window, "切换成功!", autoClose: 1);
|
||||
AntdUI.Notification.success(Window, "提示", "切换成功!", autoClose: 1);
|
||||
string text = AntdUI.Localization.Get("switchsuccess", "切换成功!");
|
||||
string tip = AntdUI.Localization.Get("tip", "提示");
|
||||
AntdUI.Message.success(Window, text, autoClose: 1);
|
||||
AntdUI.Notification.success(Window, tip, text, autoClose: 1);
|
||||
}
|
||||
|
||||
private void Switch_scrollbar_CheckedChanged(object sender, BoolEventArgs e)
|
||||
|
||||
2
Views/SubView/Wellcome.Designer.cs
generated
@ -35,13 +35,13 @@
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 20F);
|
||||
this.label1.LocalizationText = "welcome";
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(750, 150);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "欢迎使用 AntdUI Demo";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.label1.TooltipConfig = null;
|
||||
//
|
||||
// Wellcome
|
||||
//
|
||||
|
||||
BIN
assets/screenshots/Button-en.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 154 KiB |
BIN
assets/screenshots/Dark-en.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 72 KiB |
BIN
assets/screenshots/Demo-en.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 72 KiB |
BIN
assets/screenshots/FloatButton-en.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 153 KiB |
BIN
assets/screenshots/Icon-en.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 159 KiB |
BIN
assets/screenshots/SystemSet-en.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 108 KiB |