support for .NET framework 3.5
Still have bugs
This commit is contained in:
1 parent
5878039e21
commit
7d6b491f25
704 files changed
+48273
-33
No files matched your search
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
internal class AppConfig
|
||||
{
|
||||
public static string SavePath = $"{AppDomain.CurrentDomain.BaseDirectory}AppConfig.json";
|
||||
|
||||
public string Lang { get; set; } = "zh-cn";
|
||||
|
||||
public SkinType Skin { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public enum DemoType
|
||||
{
|
||||
Type1 = 1,
|
||||
Type2,
|
||||
Type3,
|
||||
Type4,
|
||||
Type5,
|
||||
Type6
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
internal class GlobalData
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
if (File.Exists(AppConfig.SavePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(AppConfig.SavePath);
|
||||
Config = JsonConvert.DeserializeObject<AppConfig>(json);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Config = new AppConfig();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Config = new AppConfig();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Save()
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(Config);
|
||||
File.WriteAllText(AppConfig.SavePath, json);
|
||||
}
|
||||
|
||||
public static AppConfig Config { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class MessageToken
|
||||
{
|
||||
public static readonly string GrowlDemoCtl = nameof(GrowlDemoCtl);
|
||||
|
||||
public static readonly string LoadingDemoCtl = nameof(LoadingDemoCtl);
|
||||
|
||||
public static readonly string ImageBrowserDemoCtl = nameof(ImageBrowserDemoCtl);
|
||||
|
||||
public static readonly string ColorPickerDemoCtl = nameof(ColorPickerDemoCtl);
|
||||
|
||||
public static readonly string CarouselDemoCtl = nameof(CarouselDemoCtl);
|
||||
|
||||
public static readonly string CompareSliderDemoCtl = nameof(CompareSliderDemoCtl);
|
||||
|
||||
public static readonly string TimeBarDemoCtl = nameof(TimeBarDemoCtl);
|
||||
|
||||
public static readonly string PaginationDemoCtl = nameof(PaginationDemoCtl);
|
||||
|
||||
public static readonly string AnimationPathDemoCtl = nameof(AnimationPathDemoCtl);
|
||||
|
||||
public static readonly string StepBarDemoCtl = nameof(StepBarDemoCtl);
|
||||
|
||||
public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
|
||||
|
||||
public static readonly string NumericUpDownDemoCtl = nameof(NumericUpDownDemoCtl);
|
||||
|
||||
public static readonly string WindowDemoCtl = nameof(WindowDemoCtl);
|
||||
|
||||
public static readonly string ScrollViewerDemoCtl = nameof(ScrollViewerDemoCtl);
|
||||
|
||||
public static readonly string PreviewSliderDemoCtl = nameof(PreviewSliderDemoCtl);
|
||||
|
||||
public static readonly string CircleProgressBarDemoCtl = nameof(CircleProgressBarDemoCtl);
|
||||
|
||||
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
|
||||
|
||||
public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
|
||||
|
||||
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
|
||||
|
||||
public static readonly string SearchBarDemoCtl = nameof(SearchBarDemoCtl);
|
||||
|
||||
public static readonly string TagDemoCtl = nameof(TagDemoCtl);
|
||||
|
||||
public static readonly string GifImageDemoCtl = nameof(GifImageDemoCtl);
|
||||
|
||||
public static readonly string OutlineTextDemoCtl = nameof(OutlineTextDemoCtl);
|
||||
|
||||
public static readonly string FlipClockDemoCtl = nameof(FlipClockDemoCtl);
|
||||
|
||||
public static readonly string QQGroupView = nameof(QQGroupView);
|
||||
|
||||
public static readonly string BlurWindow = nameof(BlurWindow);
|
||||
|
||||
public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow);
|
||||
|
||||
public static readonly string RateDemoCtl = nameof(RateDemoCtl);
|
||||
|
||||
public static readonly string ShieldDemoCtl = nameof(ShieldDemoCtl);
|
||||
|
||||
public static readonly string WaterfallPanelDemoCtl = nameof(WaterfallPanelDemoCtl);
|
||||
|
||||
public static readonly string CoverViewDemoCtl = nameof(CoverViewDemoCtl);
|
||||
|
||||
public static readonly string CoverFlowDemoCtl = nameof(CoverFlowDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||
|
||||
public static readonly string ExpanderDemoCtl = nameof(ExpanderDemoCtl);
|
||||
|
||||
public static readonly string ProgressBarDemoCtl = nameof(ProgressBarDemoCtl);
|
||||
|
||||
public static readonly string TabControlDemoCtl = nameof(TabControlDemoCtl);
|
||||
|
||||
public static readonly string NaiveTextBoxDemoCtl = nameof(NaiveTextBoxDemoCtl);
|
||||
|
||||
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
||||
|
||||
public static readonly string NaiveComboBoxDemoCtl = nameof(NaiveComboBoxDemoCtl);
|
||||
|
||||
public static readonly string NaivePasswordBoxDemoCtl = nameof(NaivePasswordBoxDemoCtl);
|
||||
|
||||
public static readonly string NaiveTabControlDemoCtl = nameof(NaiveTabControlDemoCtl);
|
||||
|
||||
public static readonly string CheckBoxDemoCtl = nameof(CheckBoxDemoCtl);
|
||||
|
||||
public static readonly string ListBoxDemoCtl = nameof(ListBoxDemoCtl);
|
||||
|
||||
public static readonly string MenuDemoCtl = nameof(MenuDemoCtl);
|
||||
|
||||
public static readonly string TreeViewDemoCtl = nameof(TreeViewDemoCtl);
|
||||
|
||||
public static readonly string BorderDemoCtl = nameof(BorderDemoCtl);
|
||||
|
||||
public static readonly string RadioButtonDemoCtl = nameof(RadioButtonDemoCtl);
|
||||
|
||||
public static readonly string NaiveScrollViewerDemoCtl = nameof(NaiveScrollViewerDemoCtl);
|
||||
|
||||
public static readonly string BrushDemoCtl = nameof(BrushDemoCtl);
|
||||
|
||||
public static readonly string SliderDemoCtl = nameof(SliderDemoCtl);
|
||||
|
||||
public static readonly string GroupBoxDemoCtl = nameof(GroupBoxDemoCtl);
|
||||
|
||||
public static readonly string ListViewDemoCtl = nameof(ListViewDemoCtl);
|
||||
|
||||
public static readonly string RichTextBoxDemoCtl = nameof(RichTextBoxDemoCtl);
|
||||
|
||||
public static readonly string ToolBarDemoCtl = nameof(ToolBarDemoCtl);
|
||||
|
||||
public static readonly string CommonWindow = nameof(CommonWindow);
|
||||
|
||||
public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow);
|
||||
|
||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||
|
||||
public static readonly string FullSwitch = nameof(FullSwitch);
|
||||
|
||||
public static readonly string ContributorsView = nameof(ContributorsView);
|
||||
|
||||
public static readonly string ClearLeftSelected = nameof(ClearLeftSelected);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var controlList = new List<string>
|
||||
{
|
||||
"GrowlDemoCtl",
|
||||
"LoadingDemoCtl",
|
||||
"ImageBrowserDemoCtl",
|
||||
"ColorPickerDemoCtl",
|
||||
"CarouselDemoCtl",
|
||||
"CompareSliderDemoCtl",
|
||||
"TimeBarDemoCtl",
|
||||
"PaginationDemoCtl",
|
||||
"AnimationPathDemoCtl",
|
||||
"StepBarDemoCtl",
|
||||
"CirclePanelDemoCtl",
|
||||
"NumericUpDownDemoCtl",
|
||||
"WindowDemoCtl",
|
||||
"ScrollViewerDemoCtl",
|
||||
"PreviewSliderDemoCtl",
|
||||
"CircleProgressBarDemoCtl",
|
||||
"TextBoxDemoCtl",
|
||||
"ComboBoxDemoCtl",
|
||||
"PasswordBoxDemoCtl",
|
||||
"SearchBarDemoCtl",
|
||||
"TagDemoCtl",
|
||||
"GifImageDemoCtl",
|
||||
"OutlineTextDemoCtl",
|
||||
"FlipClockDemoCtl",
|
||||
"QQGroupView",
|
||||
"BlurWindow",
|
||||
"NoNonClientAreaDragableWindow",
|
||||
"RateDemoCtl",
|
||||
"ShieldDemoCtl",
|
||||
"WaterfallPanelDemoCtl",
|
||||
"CoverViewDemoCtl",
|
||||
"CoverFlowDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
"ButtonDemoCtl",
|
||||
"ToggleButtonDemoCtl",
|
||||
"ExpanderDemoCtl",
|
||||
"ProgressBarDemoCtl",
|
||||
"TabControlDemoCtl",
|
||||
"NaiveTextBoxDemoCtl",
|
||||
"TextBlockDemoCtl",
|
||||
"NaiveComboBoxDemoCtl",
|
||||
"NaivePasswordBoxDemoCtl",
|
||||
"NaiveTabControlDemoCtl",
|
||||
"CheckBoxDemoCtl",
|
||||
"ListBoxDemoCtl",
|
||||
"MenuDemoCtl",
|
||||
"TreeViewDemoCtl",
|
||||
"BorderDemoCtl",
|
||||
"RadioButtonDemoCtl",
|
||||
"NaiveScrollViewerDemoCtl",
|
||||
"BrushDemoCtl",
|
||||
"SliderDemoCtl",
|
||||
"GroupBoxDemoCtl",
|
||||
"ListViewDemoCtl",
|
||||
"RichTextBoxDemoCtl",
|
||||
"ToolBarDemoCtl"
|
||||
};
|
||||
var windowList = new List<string>
|
||||
{
|
||||
"CommonWindow",
|
||||
"CustomNonClientAreaWindow"
|
||||
};
|
||||
#>
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class MessageToken
|
||||
{
|
||||
<#foreach(var item in controlList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
<#foreach(var item in styleList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
<#foreach(var item in windowList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||
|
||||
public static readonly string FullSwitch = nameof(FullSwitch);
|
||||
|
||||
public static readonly string ContributorsView = nameof(ContributorsView);
|
||||
|
||||
public static readonly string ClearLeftSelected = nameof(ClearLeftSelected);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class ContributorModel
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
|
||||
public string Link { get; set; }
|
||||
|
||||
public string AvatarUri { get; set; }
|
||||
}
|
||||
|
||||
public class ContributorWebModel
|
||||
{
|
||||
public string login { get; set; }
|
||||
|
||||
public string html_url { get; set; }
|
||||
|
||||
public string avatar_url { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class DemoDataModel
|
||||
{
|
||||
public int Index { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool IsSelected { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public DemoType Type { get; set; }
|
||||
|
||||
public string ImgPath { get; set; }
|
||||
|
||||
public List<DemoDataModel> DataList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class StepBarDemoModel
|
||||
{
|
||||
public string Header { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user