Adjust project structure
This commit is contained in:
1 parent
d38912f5da
commit
e3c436f939
2111 files changed
+14028
-47199
No files matched your search
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
internal class AppConfig
|
||||
{
|
||||
public static readonly 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,38 @@
|
||||
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; }
|
||||
|
||||
public static bool NotifyIconIsShow { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
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 ClockDemoCtl = nameof(ClockDemoCtl);
|
||||
|
||||
public static readonly string TimePickerDemoCtl = nameof(TimePickerDemoCtl);
|
||||
|
||||
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 ProgressBarDemoCtl = nameof(ProgressBarDemoCtl);
|
||||
|
||||
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 DatePickerDemoCtl = nameof(DatePickerDemoCtl);
|
||||
|
||||
public static readonly string DateTimePickerDemoCtl = nameof(DateTimePickerDemoCtl);
|
||||
|
||||
public static readonly string CalendarWithClockDemoCtl = nameof(CalendarWithClockDemoCtl);
|
||||
|
||||
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 ProgressButtonDemoCtl = nameof(ProgressButtonDemoCtl);
|
||||
|
||||
public static readonly string TransferDemoCtl = nameof(TransferDemoCtl);
|
||||
|
||||
public static readonly string ChatBubbleDemoCtl = nameof(ChatBubbleDemoCtl);
|
||||
|
||||
public static readonly string GotoTopDemoCtl = nameof(GotoTopDemoCtl);
|
||||
|
||||
public static readonly string NotifyIconDemoCtl = nameof(NotifyIconDemoCtl);
|
||||
|
||||
public static readonly string BadgeDemoCtl = nameof(BadgeDemoCtl);
|
||||
|
||||
public static readonly string GravatarDemoCtl = nameof(GravatarDemoCtl);
|
||||
|
||||
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl);
|
||||
|
||||
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 NativeProgressBarDemoCtl = nameof(NativeProgressBarDemoCtl);
|
||||
|
||||
public static readonly string TabControlDemoCtl = nameof(TabControlDemoCtl);
|
||||
|
||||
public static readonly string CalendarDemoCtl = nameof(CalendarDemoCtl);
|
||||
|
||||
public static readonly string NativeDatePickerDemoCtl = nameof(NativeDatePickerDemoCtl);
|
||||
|
||||
public static readonly string NativeTextBoxDemoCtl = nameof(NativeTextBoxDemoCtl);
|
||||
|
||||
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
||||
|
||||
public static readonly string NativeComboBoxDemoCtl = nameof(NativeComboBoxDemoCtl);
|
||||
|
||||
public static readonly string NativePasswordBoxDemoCtl = nameof(NativePasswordBoxDemoCtl);
|
||||
|
||||
public static readonly string NativeTabControlDemoCtl = nameof(NativeTabControlDemoCtl);
|
||||
|
||||
public static readonly string DataGridDemoCtl = nameof(DataGridDemoCtl);
|
||||
|
||||
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 NativeScrollViewerDemoCtl = nameof(NativeScrollViewerDemoCtl);
|
||||
|
||||
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 LabelDemoCtl = nameof(LabelDemoCtl);
|
||||
|
||||
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);
|
||||
|
||||
public static readonly string SendChatMessage = nameof(SendChatMessage);
|
||||
|
||||
public static readonly string GrowlDemoPanel = nameof(GrowlDemoPanel);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<#@ 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",
|
||||
"ClockDemoCtl",
|
||||
"TimePickerDemoCtl",
|
||||
"CirclePanelDemoCtl",
|
||||
"NumericUpDownDemoCtl",
|
||||
"WindowDemoCtl",
|
||||
"ScrollViewerDemoCtl",
|
||||
"PreviewSliderDemoCtl",
|
||||
"ProgressBarDemoCtl",
|
||||
"TextBoxDemoCtl",
|
||||
"ComboBoxDemoCtl",
|
||||
"PasswordBoxDemoCtl",
|
||||
"DatePickerDemoCtl",
|
||||
"DateTimePickerDemoCtl",
|
||||
"CalendarWithClockDemoCtl",
|
||||
"SearchBarDemoCtl",
|
||||
"TagDemoCtl",
|
||||
"GifImageDemoCtl",
|
||||
"OutlineTextDemoCtl",
|
||||
"FlipClockDemoCtl",
|
||||
"QQGroupView",
|
||||
"BlurWindow",
|
||||
"NoNonClientAreaDragableWindow",
|
||||
"RateDemoCtl",
|
||||
"ShieldDemoCtl",
|
||||
"WaterfallPanelDemoCtl",
|
||||
"CoverViewDemoCtl",
|
||||
"CoverFlowDemoCtl",
|
||||
"ProgressButtonDemoCtl",
|
||||
"TransferDemoCtl",
|
||||
"ChatBubbleDemoCtl",
|
||||
"GotoTopDemoCtl",
|
||||
"NotifyIconDemoCtl",
|
||||
"BadgeDemoCtl",
|
||||
"GravatarDemoCtl",
|
||||
"DialogDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
"ButtonDemoCtl",
|
||||
"ToggleButtonDemoCtl",
|
||||
"ExpanderDemoCtl",
|
||||
"NativeProgressBarDemoCtl",
|
||||
"TabControlDemoCtl",
|
||||
"CalendarDemoCtl",
|
||||
"NativeDatePickerDemoCtl",
|
||||
"NativeTextBoxDemoCtl",
|
||||
"TextBlockDemoCtl",
|
||||
"NativeComboBoxDemoCtl",
|
||||
"NativePasswordBoxDemoCtl",
|
||||
"NativeTabControlDemoCtl",
|
||||
"DataGridDemoCtl",
|
||||
"CheckBoxDemoCtl",
|
||||
"ListBoxDemoCtl",
|
||||
"MenuDemoCtl",
|
||||
"TreeViewDemoCtl",
|
||||
"BorderDemoCtl",
|
||||
"RadioButtonDemoCtl",
|
||||
"NativeScrollViewerDemoCtl",
|
||||
"BrushDemoCtl",
|
||||
"SliderDemoCtl",
|
||||
"GroupBoxDemoCtl",
|
||||
"ListViewDemoCtl",
|
||||
"RichTextBoxDemoCtl",
|
||||
"ToolBarDemoCtl",
|
||||
"LabelDemoCtl"
|
||||
};
|
||||
var windowList = new List<string>
|
||||
{
|
||||
"CommonWindow",
|
||||
"CustomNonClientAreaWindow"
|
||||
};
|
||||
var messageList = new List<string>
|
||||
{
|
||||
"LoadShowContent",
|
||||
"FullSwitch",
|
||||
"ContributorsView",
|
||||
"ClearLeftSelected",
|
||||
"SendChatMessage",
|
||||
"GrowlDemoPanel"
|
||||
};
|
||||
#>
|
||||
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#>);
|
||||
|
||||
<#}#>
|
||||
<#foreach(var item in messageList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public struct ChatInfoModel
|
||||
{
|
||||
public object Message { get; set; }
|
||||
|
||||
public string SenderId { get; set; }
|
||||
|
||||
public ChatRoleType Role { get; set; }
|
||||
|
||||
public ChatMessageType Type { get; set; }
|
||||
|
||||
public object Enclosure { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class ContributorModel
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
|
||||
public string Link { get; set; }
|
||||
|
||||
public string AvatarUri { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class CoverViewDemoModel
|
||||
{
|
||||
public string ImgPath { get; set; }
|
||||
|
||||
public string BackgroundToken { 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