Commit 77eb5a22 by liulongfei

插件化改造

parent 48729ac8
......@@ -53,6 +53,9 @@
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP.Golf\VIZ.TVP.Golf\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
</packages>
\ No newline at end of file
......@@ -5,6 +5,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Framework.Common;component/MessageBox/MessageBoxEx.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common;component/Widgets/ViewLoader/ViewLoader.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common;component/Widgets/VideoTimeBar/VideoTimeBar.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common;component/Widgets/NavigationControl/NavigationControl.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common;component/Widgets/ColorPickButton/ColorPickButton.xaml"></ResourceDictionary>
......
......@@ -60,6 +60,9 @@
<Reference Include="NDILibDotNet2">
<HintPath>..\05-Lib\NDILibDotNet2.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.H2V\packages\OpenCvSharp4.4.6.0.20220608\lib\net48\OpenCvSharp.dll</HintPath>
</Reference>
......@@ -185,6 +188,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Widgets\ViewLoader\ViewLoader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="MessageBox\MessageBoxEx.cs" />
......@@ -316,6 +323,7 @@
<Compile Include="Widgets\TimeDisplayControl\TimeDisplayControl.cs" />
<Compile Include="Widgets\VideoTimeBar\EventArgs\VideoTimeBarValueChangedEventArgs.cs" />
<Compile Include="Widgets\VideoTimeBar\VideoTimeBar.cs" />
<Compile Include="Widgets\ViewLoader\ViewLoader.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Framework.Common
{
/// <summary>
/// 视图加载器
/// </summary>
public class ViewLoader : ContentControl
{
static ViewLoader()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ViewLoader), new FrameworkPropertyMetadata(typeof(ViewLoader)));
}
/// <summary>
/// 是否已经完成加载
/// </summary>
private bool isAlreadyLoaded;
public ViewLoader()
{
this.Loaded += ViewLoader_Loaded;
}
private void ViewLoader_Loaded(object sender, RoutedEventArgs e)
{
if (this.isAlreadyLoaded || this.ViewType == null)
return;
FrameworkElement view = this.ViewType.Assembly.CreateInstance(this.ViewType.FullName) as FrameworkElement;
this.Content = view;
ViewModelBase vm = this.DataContext as ViewModelBase;
if (vm != null)
{
WPFHelper.BindingViewModel(view, vm);
}
this.isAlreadyLoaded = true;
}
#region ViewType -- 视图类型
/// <summary>
/// 视图类型
/// </summary>
public Type ViewType
{
get { return (Type)GetValue(ViewTypeProperty); }
set { SetValue(ViewTypeProperty, value); }
}
/// <summary>
/// Using a DependencyProperty as the backing store for ViewType. This enables animation, styling, binding, etc...
/// </summary>
public static readonly DependencyProperty ViewTypeProperty =
DependencyProperty.Register("ViewType", typeof(Type), typeof(ViewLoader), new PropertyMetadata(null));
#endregion
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VIZ.Framework.Common">
<Style TargetType="local:ViewLoader">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:ViewLoader">
<Border Background="Transparent">
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></ContentPresenter>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -2,6 +2,7 @@
<packages>
<package id="Extended.Wpf.Toolkit" version="4.4.0" targetFramework="net48" />
<package id="log4net" version="2.0.14" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="OpenCvSharp4" version="4.6.0.20220608" targetFramework="net48" />
<package id="SharpDX" version="4.2.0" targetFramework="net48" />
<package id="SharpDX.Direct2D1" version="4.2.0" targetFramework="net48" />
......
......@@ -37,7 +37,20 @@ namespace VIZ.Framework.Core
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <returns>返回数据</returns>
public static string Get(string url, CookieContainer cookie)
public static string Get(string url)
{
return Get(url, null, null);
}
/// <summary>
/// Get请求
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <param name="header">请求头部</param>
/// <param name="cookie">Cookie</param>
/// <returns>返回数据</returns>
public static string Get(string url, Dictionary<string, string> header, CookieContainer cookie)
{
try
{
......@@ -50,6 +63,13 @@ namespace VIZ.Framework.Core
handler.UseCookies = true;
handler.CookieContainer = cookie;
}
if (header != null)
{
foreach (var kv in header)
{
client.DefaultRequestHeaders.Add(kv.Key, kv.Value);
}
}
client.Timeout = TimeSpan.FromMilliseconds(TIME_OUT);
using (HttpResponseMessage response = client.GetAsync(url).Result)
......@@ -76,11 +96,22 @@ namespace VIZ.Framework.Core
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <returns>返回json对象</returns>
public static T Get<T>(string url, CookieContainer cookie) where T : class
public static T Get<T>(string url) where T : class
{
return Get<T>(url, null, null);
}
/// <summary>
/// Get请求
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <returns>返回json对象</returns>
public static T Get<T>(string url, Dictionary<string, string> header, CookieContainer cookie) where T : class
{
try
{
string json = Get(url, cookie);
string json = Get(url, header, cookie);
if (string.IsNullOrWhiteSpace(json))
return null;
......@@ -97,12 +128,23 @@ namespace VIZ.Framework.Core
/// <summary>
/// Post请求
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <param name="content">请求内容</param>
/// <param name="args">参数集合</param>
/// <param name="data">请求内容</param>
/// <returns>返回json对象</returns>
public static string Post(string url, object data, CookieContainer cookie)
public static string Post(string url, object data)
{
return Post(url, data, null, null);
}
/// <summary>
/// Post请求
/// </summary>
/// <param name="url">请求url</param>
/// <param name="data">请求内容</param>
/// <param name="header">Header</param>
/// <param name="cookie">Cookie</param>
/// <returns>返回json对象</returns>
public static string Post(string url, object data, Dictionary<string, string> header, CookieContainer cookie)
{
try
{
......@@ -118,6 +160,14 @@ namespace VIZ.Framework.Core
using (HttpClient client = new HttpClient(handler))
{
if (header != null)
{
foreach (var kv in header)
{
client.DefaultRequestHeaders.Add(kv.Key, kv.Value);
}
}
client.Timeout = TimeSpan.FromMilliseconds(TIME_OUT);
StringContent content = new StringContent(postJson, Encoding.UTF8);
using (HttpResponseMessage response = client.PostAsync(url, content).Result)
......@@ -143,14 +193,27 @@ namespace VIZ.Framework.Core
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <param name="content">请求内容</param>
/// <param name="args">参数集合</param>
/// <param name="data">请求内容</param>
/// <returns>返回json对象</returns>
public static T Post<T>(string url, object data) where T : class
{
return Post<T>(url, data, null, null);
}
/// <summary>
/// Post请求
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="url">请求url</param>
/// <param name="data">请求内容</param>
/// <param name="header">Header</param>
/// <param name="cookie">Cookie</param>
/// <returns>返回json对象</returns>
public static T Post<T>(string url, object data, CookieContainer cookie) where T : class
public static T Post<T>(string url, object data, Dictionary<string, string> header, CookieContainer cookie) where T : class
{
try
{
string json = Post(url, data, cookie);
string json = Post(url, data, header, cookie);
return JsonConvert.DeserializeObject<T>(json);
}
......
......@@ -38,5 +38,10 @@ namespace VIZ.Framework.Core
{
return this.Value;
}
public override string ToString()
{
return this.Value;
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -7,6 +8,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
using log4net;
using TDx.SpaceMouse.Navigation3D;
namespace VIZ.Framework.Core
{
......@@ -115,7 +117,7 @@ namespace VIZ.Framework.Core
#region UIThread -- UI线程
/// <summary>
/// 开始安全的UI同步更新
/// 开始UI同步更新
/// </summary>
/// <param name="action">行为</param>
/// <param name="dispatcherPriority">优先级</param>
......@@ -135,7 +137,7 @@ namespace VIZ.Framework.Core
}
/// <summary>
/// 开始安全的UI同步更新
/// 开始UI同步更新
/// </summary>
/// <param name="action">行为</param>
/// <param name="dispatcherPriority">优先级</param>
......
......@@ -52,6 +52,9 @@
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP.Golf\VIZ.TVP.Golf\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
</packages>
\ No newline at end of file
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件加载器
/// </summary>
public class PluginLoader : ContentControl
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(PluginLoader));
static PluginLoader()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(PluginLoader), new FrameworkPropertyMetadata(typeof(PluginLoader)));
}
#region ViewInfo -- 视图信息
/// <summary>
/// 视图信息
/// </summary>
public PluginViewInfo ViewInfo
{
get { return (PluginViewInfo)GetValue(ViewInfoProperty); }
set { SetValue(ViewInfoProperty, value); }
}
/// <summary>
/// Using a DependencyProperty as the backing store for ViewInfo. This enables animation, styling, binding, etc...
/// </summary>
public static readonly DependencyProperty ViewInfoProperty =
DependencyProperty.Register("ViewInfo", typeof(PluginViewInfo), typeof(PluginLoader), new PropertyMetadata(null, new PropertyChangedCallback((s, e) =>
{
(s as PluginLoader).ResetViewInfo();
})));
#endregion
/// <summary>
/// 重置视图信息
/// </summary>
private void ResetViewInfo()
{
IDisposable disposable = this.Content as IDisposable;
this.Content = null;
disposable?.Dispose();
PluginViewInfo info = this.ViewInfo;
if (info == null)
return;
info.View = info.ViewType.Assembly.CreateInstance(info.ViewType.FullName) as FrameworkElement;
if (info.ViewModelType == null)
return;
info.ViewModel = info.ViewModelType.Assembly.CreateInstance(info.ViewModelType.FullName) as PluginViewModelBase;
WPFHelper.BindingViewModel(info.View, info.ViewModel);
this.Content = info.View;
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VIZ.Framework.Plugin">
<Style TargetType="local:PluginLoader">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:PluginLoader">
<Border Background="Transparent">
<ContentPresenter></ContentPresenter>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件异常
/// </summary>
public class PluginException : Exception
{
/// <summary>
/// 插件异常
/// </summary>
/// <param name="message"></param>
public PluginException(string message) : base(message)
{
}
/// <summary>
/// 编号
/// </summary>
public string ID { get; set; }
/// <summary>
/// 视图模型
/// </summary>
public PluginViewModelBase ViewModel { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件信息
/// </summary>
public class PluginInfo : ModelBase
{
#region ID -- 编号
private string id;
/// <summary>
/// 编号
/// </summary>
public string ID
{
get { return id; }
set { id = value; this.RaisePropertyChanged(nameof(ID)); }
}
#endregion
#region DisplayName -- 显示名称
private string displayName;
/// <summary>
/// 显示名称
/// </summary>
public string DisplayName
{
get { return displayName; }
set { displayName = value; this.RaisePropertyChanged(nameof(DisplayName)); }
}
#endregion
#region Version -- 版本
private string version;
/// <summary>
/// 版本
/// </summary>
public string Version
{
get { return version; }
set { version = value; this.RaisePropertyChanged(nameof(Version)); }
}
#endregion
#region HasView -- 是否包含视图
private bool hasView;
/// <summary>
/// 是否包含视图
/// </summary>
public bool HasView
{
get { return hasView; }
set { hasView = value; this.RaisePropertyChanged(nameof(HasView)); }
}
#endregion
#region HasSettingView -- 是否包含设置视图
private bool hasSettingView;
/// <summary>
/// 是否包含设置视图
/// </summary>
public bool HasSettingView
{
get { return hasSettingView; }
set { hasSettingView = value; this.RaisePropertyChanged(nameof(HasSettingView)); }
}
#endregion
#region ViewInfo -- 视图信息
private PluginViewInfo viewInfo;
/// <summary>
/// 视图信息
/// </summary>
public PluginViewInfo ViewInfo
{
get { return viewInfo; }
set { viewInfo = value; this.RaisePropertyChanged(nameof(ViewInfo)); }
}
#endregion
#region SettingViewInfo -- 设置视图信息
private PluginViewInfo settingViewInfo;
/// <summary>
/// 设置视图信息
/// </summary>
public PluginViewInfo SettingViewInfo
{
get { return settingViewInfo; }
set { settingViewInfo = value; this.RaisePropertyChanged(nameof(SettingViewInfo)); }
}
#endregion
#region LifeCycle -- 生命周期
private IPluginLifeCycle lifeCycle;
/// <summary>
/// 生命周期
/// </summary>
public IPluginLifeCycle LifeCycle
{
get { return lifeCycle; }
set { lifeCycle = value; this.RaisePropertyChanged(nameof(LifeCycle)); }
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件视图信息
/// </summary>
public class PluginViewInfo
{
/// <summary>
/// 插件视图信息
/// </summary>
/// <param name="viewType">视图类型</param>
/// <param name="viewModelType">视图模型类型</param>
public PluginViewInfo(Type viewType, Type viewModelType)
{
this.ViewType = viewType;
this.ViewModelType = viewModelType;
// 校验
}
/// <summary>
/// 视图类型
/// </summary>
public Type ViewType { get; set; }
/// <summary>
/// 视图
/// </summary>
public FrameworkElement View { get; internal set; }
/// <summary>
/// 视图模型类型
/// </summary>
public Type ViewModelType { get; set; }
/// <summary>
/// 视图模型
/// </summary>
public PluginViewModelBase ViewModel { get; internal set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件生命周期
/// </summary>
public interface IPluginLifeCycle : IDisposable
{
/// <summary>
/// 注册
/// </summary>
/// <returns>插件信息</returns>
PluginInfo Register();
/// <summary>
/// 初始化
/// </summary>
void Initialize();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件社遏制视图模型基类
/// </summary>
public abstract class PluginSettingViewModelBase : PluginViewModelBase, IDisposable
{
/// <summary>
/// 是否需要保存
/// </summary>
/// <returns>是否需要保存</returns>
public abstract bool IsNeedSave();
/// <summary>
/// 保存
/// </summary>
public abstract void Save();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
namespace VIZ.Framework.Plugin
{
/// <summary>
/// 插件视图模型基类
/// </summary>
public abstract class PluginViewModelBase : ViewModelBase, IDisposable
{
// ==================================================================================
// Property
// ==================================================================================
// ==================================================================================
// override
// ==================================================================================
/// <summary>
/// 销毁
/// </summary>
public abstract void Dispose();
}
}
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Viz.Framework.Plugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Viz.Framework.Plugin")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.Framework.Plugin.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VIZ.Framework.Plugin.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.Framework.Plugin.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
\ No newline at end of file
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Viz.Framework.Plugin">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Framework.Plugin;component/Control/PluginLoader/PluginLoader.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{39A3CDBE-2132-4C71-BF2F-F99A9E966109}</ProjectGuid>
<OutputType>library</OutputType>
<RootNamespace>VIZ.Framework.Plugin</RootNamespace>
<AssemblyName>VIZ.Framework.Plugin</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Page Include="Control\PluginLoader\PluginLoader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Control\PluginLoader\PluginLoader.cs" />
<Compile Include="Exception\PluginException.cs" />
<Compile Include="Info\PluginInfo.cs" />
<Compile Include="Info\PluginViewInfo.cs" />
<Compile Include="Interface\IPluginLifeCycle.cs" />
<Compile Include="PluginSettingViewModelBase.cs" />
<Compile Include="PluginViewModelBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VIZ.Framework.Core\VIZ.Framework.Core.csproj">
<Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project>
<Name>VIZ.Framework.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
</packages>
\ No newline at end of file
......@@ -52,6 +52,9 @@
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\VIZ.TVP\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<HintPath>..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
</Reference>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="SharpDX" version="4.2.0" targetFramework="net48" />
<package id="SharpDX.Mathematics" version="4.2.0" targetFramework="net48" />
</packages>
\ No newline at end of file
......@@ -23,9 +23,7 @@ namespace VIZ.Framework.UnitTest
{
try
{
string str = HttpHelper.Post("https://sportsdata.5club.cctv.cn/mobileinf/rest/sportsdata/matchdata?schedule_id=133001&user=yspxmt&matchtype=FWC2022&encrypted=e80ab00f28b2626898c07c083f1d71de&timestamp=1669138672085&type=1", null, null);
HttpHelper.Get("", null, null);
}
catch (Exception ex)
{
......
......@@ -64,6 +64,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP.Golf", "V
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP", "VIZ.Framework.TVP\VIZ.Framework.TVP.csproj", "{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "55-Plugin", "55-Plugin", "{FF5A079F-4182-4D93-B828-3578C40185AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Viz.Framework.Plugin", "Viz.Framework.Plugin\Viz.Framework.Plugin.csproj", "{39A3CDBE-2132-4C71-BF2F-F99A9E966109}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -278,6 +282,18 @@ Global
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x64.Build.0 = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x86.ActiveCfg = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x86.Build.0 = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x64.ActiveCfg = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x64.Build.0 = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x86.ActiveCfg = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x86.Build.0 = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|Any CPU.Build.0 = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x64.ActiveCfg = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x64.Build.0 = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x86.ActiveCfg = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -300,6 +316,7 @@ Global
{3C45130C-941C-4980-B524-D91B10163F4C} = {2F6173AD-2376-4F42-B852-10E3DBD394EE}
{6FBD7D1A-C16E-486B-A98C-727C09E514B8} = {1A70AADE-E6B2-4C85-95F8-77D049DBD898}
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C} = {1A70AADE-E6B2-4C85-95F8-77D049DBD898}
{39A3CDBE-2132-4C71-BF2F-F99A9E966109} = {FF5A079F-4182-4D93-B828-3578C40185AC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C56D4BA-4B41-4AB8-836F-9997506EA9AC}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment