diff --git a/README.md b/README.md index 8b23f787..cc9002de 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,10 @@ Step 4:enjoy coding ## Latest examples +### Poptip + +![Poptip](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Poptip.gif) + ### Divider ![Divider](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Divider.png) @@ -81,12 +85,12 @@ Step 4:enjoy coding ![FloatingBlock](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/FloatingBlock.gif) +## History publication + ### HoneycombPanel ![HoneycombPanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/HoneycombPanel.png) -## History publication - ### RunningBlock ![RunningBlock](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/RunningBlock.gif) diff --git a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj index 9b2ac39f..055fd6d1 100644 --- a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj +++ b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj @@ -436,6 +436,9 @@ Resources\Img\LeftMainContent\DottedSplitter_16x.png + + Resources\Img\LeftMainContent\PopupCursor_16x.png + diff --git a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj index 76b42023..91e7c38f 100644 --- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj +++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj @@ -430,6 +430,9 @@ TextTemplatingFileGenerator MessageToken.cs + + Resources\Img\LeftMainContent\PopupCursor_16x.png + Resources\Img\Cover.png diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj index 28ac4d6e..b3b7a445 100644 --- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj +++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj @@ -496,6 +496,9 @@ TextTemplatingFileGenerator MessageToken.cs + + Resources\Img\LeftMainContent\PopupCursor_16x.png + Resources\Img\Cover.png diff --git a/src/Shared/HandyControlDemo_Shared/App.xaml.cs b/src/Shared/HandyControlDemo_Shared/App.xaml.cs index cd97b41f..6ba5a34f 100644 --- a/src/Shared/HandyControlDemo_Shared/App.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/App.xaml.cs @@ -19,10 +19,10 @@ namespace HandyControlDemo [SuppressMessage("代码质量", "IDE0052:删除未读的私有成员", Justification = "<挂起>")] private static Mutex AppMutex; - public App() + protected override void OnStartup(StartupEventArgs e) { AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew); - + if (!createdNew) { var current = Process.GetCurrentProcess(); @@ -37,29 +37,28 @@ namespace HandyControlDemo } Shutdown(); } - } - - protected override void OnStartup(StartupEventArgs e) - { - var splashScreen = new SplashScreen("Resources/Img/Cover.png"); - splashScreen.Show(true); - - base.OnStartup(e); - - UpdateRegistry(); - - ShutdownMode = ShutdownMode.OnMainWindowClose; - GlobalData.Init(); - ConfigHelper.Instance.SetLang(GlobalData.Config.Lang); - - if (GlobalData.Config.Skin != SkinType.Default) + else { - UpdateSkin(GlobalData.Config.Skin); + var splashScreen = new SplashScreen("Resources/Img/Cover.png"); + splashScreen.Show(true); + + base.OnStartup(e); + + UpdateRegistry(); + + ShutdownMode = ShutdownMode.OnMainWindowClose; + GlobalData.Init(); + ConfigHelper.Instance.SetLang(GlobalData.Config.Lang); + + if (GlobalData.Config.Skin != SkinType.Default) + { + UpdateSkin(GlobalData.Config.Skin); + } + + ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo()); + + ServicePointManager.SecurityProtocol = (SecurityProtocolType)(SslProtocols)0x00000C00; } - - ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo()); - - ServicePointManager.SecurityProtocol = (SecurityProtocolType)(SslProtocols)0x00000C00; } protected override void OnExit(ExitEventArgs e) diff --git a/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs b/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs index 92e46551..d49cb4c8 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs @@ -12,7 +12,7 @@ namespace HandyControlDemo.Data try { var json = File.ReadAllText(AppConfig.SavePath); - Config = JsonConvert.DeserializeObject(json); + Config = (string.IsNullOrEmpty(json) ? new AppConfig() : JsonConvert.DeserializeObject(json)) ?? new AppConfig(); } catch { diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs index c59c99a0..8c984761 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs @@ -98,6 +98,8 @@ public static readonly string GridDemoCtl = nameof(GridDemoCtl); + public static readonly string PoptipDemoCtl = nameof(PoptipDemoCtl); + public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl); public static readonly string ButtonGroupDemoCtl = nameof(ButtonGroupDemoCtl); diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt index 201cc75c..6d152292 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt @@ -51,6 +51,7 @@ var controlList = new List "DialogDemoCtl", "SideMenuDemoCtl", "GridDemoCtl", + "PoptipDemoCtl", "RangeSliderDemoCtl", "ButtonGroupDemoCtl", "CardDemoCtl", diff --git a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems index 6128b123..09b4abbc 100644 --- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems +++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems @@ -161,6 +161,9 @@ PasswordBoxDemoCtl.xaml + + PoptipDemoCtl.xaml + PreviewSliderDemoCtl.xaml @@ -604,6 +607,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs index e2cf3fe6..397ce9ed 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs @@ -1122,6 +1122,24 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 气泡提示 的本地化字符串。 + /// + public static string Poptip { + get { + return ResourceManager.GetString("Poptip", resourceCulture); + } + } + + /// + /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 + /// + public static string PoptipPositionStr { + get { + return ResourceManager.GetString("PoptipPositionStr", resourceCulture); + } + } + /// /// 查找类似 上一步 的本地化字符串。 /// diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx index f555d91f..fd7c626c 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx @@ -600,6 +600,9 @@ Border + + Poptip + Recommendation @@ -678,4 +681,7 @@ Divider + + top-start;top;top-end;right-start;right;right-end;bottom-end;bottom;bottom-start;left-end;left;left-start + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx index 170b2ced..f68af839 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx @@ -678,4 +678,10 @@ Divider + + Poptip + + + top-start;top;top-end;right-start;right;right-end;bottom-end;bottom;bottom-start;left-end;left;left-start + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx index f7c5365c..c01f2d99 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx @@ -678,4 +678,10 @@ Divider + + Poptip + + + top-start;top;top-end;right-start;right;right-end;bottom-end;bottom;bottom-start;left-end;left;left-start + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx index 2d26de95..0de5fbbe 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx @@ -600,6 +600,9 @@ 响应式布局 + + 气泡提示 + 群友推荐 @@ -678,4 +681,7 @@ 分割线 + + 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 + \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/PopupCursor_16x.png b/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/PopupCursor_16x.png new file mode 100644 index 00000000..a1e4fd09 Binary files /dev/null and b/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/PopupCursor_16x.png differ diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml index 9d1f7c91..fb6370d1 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml @@ -23,7 +23,7 @@ - + diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml new file mode 100644 index 00000000..7d15afc0 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + +