├── README.md ├── VNREX.ico ├── UIBrowser ├── VNREX.ico ├── Resources │ ├── head.jpg │ └── NeteaseExample │ │ └── iconfont.ttf ├── app.config ├── packages.config ├── Examples │ ├── NeteaseMusicWindow.xaml.cs │ ├── NavbarWindow.xaml.cs │ ├── MacLikeWindow.xaml.cs │ └── MacLikeWindow.xaml ├── UIBrowser.csproj.user ├── App.xaml.cs ├── App.xaml ├── VNREX │ ├── Common │ │ ├── JsonResponseModel.cs │ │ ├── JsonResponseErrModel.cs │ │ ├── Credential.cs │ │ ├── Exception │ │ │ └── TencentCloudSDKException.cs │ │ ├── TencentCloudCommon.csproj │ │ ├── Profile │ │ │ ├── ClientProfile.cs │ │ │ └── HttpProfile.cs │ │ ├── AbstractModel.cs │ │ └── Sign.cs │ ├── Hook │ │ └── TranslateWindow.cs │ ├── GlobalHotKey │ │ ├── GlobalHotkey.cs │ │ └── VNREXHotKey.cs │ ├── Tmt │ │ ├── Models │ │ │ ├── ImageRecord.cs │ │ │ ├── LanguageDetectRequest.cs │ │ │ ├── LanguageDetectResponse.cs │ │ │ ├── TextTranslateResponse.cs │ │ │ ├── TextTranslateBatchResponse.cs │ │ │ ├── ImageTranslateResponse.cs │ │ │ ├── ItemValue.cs │ │ │ ├── SpeechTranslateResponse.cs │ │ │ ├── ImageTranslateRequest.cs │ │ │ ├── SpeechTranslateRequest.cs │ │ │ ├── TextTranslateBatchRequest.cs │ │ │ └── TextTranslateRequest.cs │ │ ├── V20180321 │ │ │ └── Models │ │ │ │ ├── ImageRecord.cs │ │ │ │ ├── LanguageDetectRequest.cs │ │ │ │ ├── LanguageDetectResponse.cs │ │ │ │ ├── TextTranslateResponse.cs │ │ │ │ ├── TextTranslateBatchResponse.cs │ │ │ │ ├── ImageTranslateResponse.cs │ │ │ │ ├── ItemValue.cs │ │ │ │ ├── SpeechTranslateResponse.cs │ │ │ │ ├── ImageTranslateRequest.cs │ │ │ │ ├── SpeechTranslateRequest.cs │ │ │ │ ├── TextTranslateBatchRequest.cs │ │ │ │ └── TextTranslateRequest.cs │ │ └── TencentCloudTmt.csproj │ ├── Global.cs │ ├── NamePipe │ │ └── NamePipeServer.cs │ └── TTS │ │ └── VoiceRoid2.cs ├── HomeWindow.xaml.cs ├── PartialViews │ ├── Custom │ │ ├── WindowXView.xaml.cs │ │ ├── NoticeView.xaml.cs │ │ ├── WindowXView.xaml │ │ ├── NoticeView.xaml │ │ ├── PendingBoxView.xaml │ │ └── PendingBoxView.xaml.cs │ ├── Native │ │ ├── ContextMenuView.xaml.cs │ │ └── MenuView.xaml.cs │ └── OverviewView.xaml.cs ├── Models │ └── TreeViewItemModel.cs ├── Helpers │ └── Helper.cs ├── Properties │ └── AssemblyInfo.cs ├── OCRPage.xaml.cs ├── MainWindow.xaml.cs ├── OCRPage.xaml ├── HomeWindow.xaml ├── MainWindow.xaml ├── TTSPage.xaml └── TTSPage.xaml.cs ├── Net45 └── Panuon.UI.Silver │ ├── Resources │ └── fontawesome.ttf │ ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs │ ├── Models │ └── NotifyPropertyChanged.cs │ └── Panuon.UI.Silver.csproj ├── Visual Studio 2019 └── Visualizers │ └── attribcache140.bin ├── SharedResources ├── Panuon.UI.Silver.Core │ ├── Attributes │ │ ├── IgnoreColumnAttribute.cs │ │ ├── ReadOnlyColumnAttribute.cs │ │ ├── ColumnWidthAttribute.cs │ │ └── ColumnBindingAttribute.cs │ ├── EventHandler │ │ ├── CancelableEventHandler.cs │ │ ├── ClickEventHandler.cs │ │ ├── DoubleClickEventHandler.cs │ │ ├── IndexChangedEventHandler.cs │ │ ├── SearchTextChangedEventHandler.cs │ │ ├── CurrentIndexChangedEventHandler.cs │ │ ├── SelectedDateChangedEventHandler.cs │ │ ├── SelectedDateTimeChangedEventHandler.cs │ │ ├── SelectedBrushChangedEventHandler.cs │ │ ├── LongPressEventHandler.cs │ │ ├── TabItemRemovedEventHandler.cs │ │ ├── DragingEventHandler.cs │ │ └── DragAreaEventHandler.cs │ ├── Panuon.UI.Silver.Core.shproj │ ├── Models │ │ ├── IPendingingHandler.cs │ │ ├── PendingBoxConfigurations.cs │ │ ├── BrushAnimation.cs │ │ └── MessageBoxXConfigurations.cs │ └── Panuon.UI.Silver.Core.projitems └── Panuon.UI.Silver │ └── Control.xaml ├── Panuon.UI.Silver ├── Properties │ └── AssemblyInfo.cs └── Panuon.UI.Silver.csproj └── VNREX.sln /README.md: -------------------------------------------------------------------------------- 1 | 施工中 2 | -------------------------------------------------------------------------------- /VNREX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/VNREX.ico -------------------------------------------------------------------------------- /UIBrowser/VNREX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/UIBrowser/VNREX.ico -------------------------------------------------------------------------------- /UIBrowser/Resources/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/UIBrowser/Resources/head.jpg -------------------------------------------------------------------------------- /Net45/Panuon.UI.Silver/Resources/fontawesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/Net45/Panuon.UI.Silver/Resources/fontawesome.ttf -------------------------------------------------------------------------------- /UIBrowser/Resources/NeteaseExample/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/UIBrowser/Resources/NeteaseExample/iconfont.ttf -------------------------------------------------------------------------------- /Visual Studio 2019/Visualizers/attribcache140.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lilyltt/VNREXwithGPT/HEAD/Visual Studio 2019/Visualizers/attribcache140.bin -------------------------------------------------------------------------------- /UIBrowser/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Net45/Panuon.UI.Silver/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /UIBrowser/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Attributes/IgnoreColumnAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | [AttributeUsage(AttributeTargets.Property)] 6 | public class IgnoreColumnAttribute : Attribute 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Attributes/ReadOnlyColumnAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | [AttributeUsage(AttributeTargets.Property)] 6 | public class ReadOnlyColumnAttribute : Attribute 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /UIBrowser/Examples/NeteaseMusicWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using Panuon.UI.Silver.Core; 3 | 4 | namespace UIBrowser.Examples 5 | { 6 | /// 7 | /// NeteaseMusicWindow.xaml 的交互逻辑 8 | /// 9 | public partial class NeteaseMusicWindow : WindowX 10 | { 11 | public NeteaseMusicWindow() 12 | { 13 | InitializeComponent(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/CancelableEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Panuon.UI.Silver.Core 6 | { 7 | public class CancelableEventArgs : EventArgs 8 | { 9 | public CancelableEventArgs() : base() 10 | { 11 | } 12 | 13 | public bool Cancel { get; set; } 14 | } 15 | 16 | public delegate void CancelableEventHandler(object sender, CancelableEventArgs e); 17 | } 18 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/ClickEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public class ClickEventArgs : RoutedEventArgs 6 | { 7 | public ClickEventArgs(Point position, RoutedEvent routedEvent) : base(routedEvent) 8 | { 9 | Position = position; 10 | } 11 | 12 | public Point Position { get; set; } 13 | } 14 | 15 | public delegate void ClickEventHandler(object sender, ClickEventArgs e); 16 | } 17 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/DoubleClickEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public class DoubleClickEventArgs : RoutedEventArgs 6 | { 7 | public DoubleClickEventArgs(Point position, RoutedEvent routedEvent) : base(routedEvent) 8 | { 9 | Position = position; 10 | } 11 | 12 | public Point Position { get; set; } 13 | } 14 | 15 | public delegate void DoubleClickEventHandler(object sender, DoubleClickEventArgs e); 16 | } 17 | -------------------------------------------------------------------------------- /UIBrowser/UIBrowser.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | zh-CN 11 | false 12 | 13 | -------------------------------------------------------------------------------- /Net45/Panuon.UI.Silver/Models/NotifyPropertyChanged.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | using System.ComponentModel; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class PropertyChangedBase : INotifyPropertyChanged 7 | { 8 | public event PropertyChangedEventHandler PropertyChanged; 9 | 10 | protected void NotifyPropertyChanged([CallerMemberName] string propertyName = null) 11 | { 12 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/IndexChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public class IndexChangedEventArgs : RoutedEventArgs 6 | { 7 | public IndexChangedEventArgs(int currentIndex, RoutedEvent routedEvent) : base(routedEvent) 8 | { 9 | CurrentIndex = currentIndex; 10 | } 11 | 12 | public int CurrentIndex { get; set; } 13 | } 14 | 15 | public delegate void IndexChangedEventHandler(object sender, IndexChangedEventArgs e); 16 | } 17 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/SearchTextChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public class SearchTextChangedEventArgs : RoutedEventArgs 6 | { 7 | public SearchTextChangedEventArgs(string text, RoutedEvent routedEvent) : base(routedEvent) 8 | { 9 | Text = text; 10 | } 11 | 12 | public string Text { get; set; } 13 | } 14 | 15 | public delegate void SearchTextChangedEventHandler(object sender, SearchTextChangedEventArgs e); 16 | } 17 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/CurrentIndexChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public class CurrentIndexChangedEventArgs : RoutedEventArgs 6 | { 7 | public CurrentIndexChangedEventArgs(int currentIndex, RoutedEvent routedEvent) : base(routedEvent) 8 | { 9 | CurrentIndex = currentIndex; 10 | } 11 | 12 | public int CurrentIndex { get; set; } 13 | } 14 | 15 | public delegate void CurrentIndexChangedEventHandler(object sender, CurrentIndexChangedEventArgs e); 16 | } 17 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/SelectedDateChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class SelectedDateChangedEventArgs : RoutedEventArgs 7 | { 8 | public SelectedDateChangedEventArgs(DateTime dateTime, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | Date = dateTime.Date; 11 | } 12 | 13 | public DateTime Date { get; set; } 14 | } 15 | 16 | public delegate void SelectedDateChangedEventHandler(object sender, SelectedDateChangedEventArgs e); 17 | } 18 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/SelectedDateTimeChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class SelectedDateTimeChangedEventArgs : RoutedEventArgs 7 | { 8 | public SelectedDateTimeChangedEventArgs(DateTime dateTime, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | DateTime = dateTime; 11 | } 12 | 13 | public DateTime DateTime { get; set; } 14 | } 15 | 16 | public delegate void SelectedDateTimeChangedEventHandler(object sender, SelectedDateTimeChangedEventArgs e); 17 | } 18 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/SelectedBrushChangedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class SelectedBrushChangedEventArgs : RoutedEventArgs 7 | { 8 | public SelectedBrushChangedEventArgs(Brush selectedBrush, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | SelectedBrush = selectedBrush; 11 | } 12 | 13 | public Brush SelectedBrush { get; set; } 14 | } 15 | 16 | public delegate void SelectedBrushChangedEventHandler(object sender, SelectedBrushChangedEventArgs e); 17 | } 18 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/LongPressEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class LongPressEventArgs : RoutedEventArgs 7 | { 8 | public LongPressEventArgs(Point position, TimeSpan duration, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | Position = position; 11 | Duration = duration; 12 | } 13 | 14 | public Point Position { get; set; } 15 | 16 | public TimeSpan Duration { get; set; } 17 | } 18 | 19 | public delegate void LongPressEventHandler(object sender, LongPressEventArgs e); 20 | } 21 | -------------------------------------------------------------------------------- /UIBrowser/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Globalization; 6 | using System.Linq; 7 | using System.Threading; 8 | using System.Windows; 9 | 10 | namespace UIBrowser 11 | { 12 | /// 13 | /// App.xaml 的交互逻辑 14 | /// 15 | public partial class App : Application 16 | { 17 | public App() 18 | { 19 | Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; 20 | //System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/TabItemRemovedEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class TabItemRemovedEventArgs : RoutedEventArgs 7 | { 8 | public TabItemRemovedEventArgs(TabItem removedItem, bool removedFromSource, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | RemovedItem = removedItem; 11 | RemovedFromSource = removedFromSource; 12 | } 13 | 14 | public TabItem RemovedItem { get; set; } 15 | 16 | public bool RemovedFromSource { get; set; } 17 | } 18 | 19 | public delegate void TabItemRemovedEventHandler(object sender, TabItemRemovedEventArgs e); 20 | } 21 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Attributes/ColumnWidthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | 6 | [AttributeUsage(AttributeTargets.Property)] 7 | public class ColumnWidthAttribute : Attribute 8 | { 9 | /// 10 | /// Auto column width. 11 | /// 12 | public ColumnWidthAttribute() 13 | { 14 | Width = "auto"; 15 | } 16 | 17 | /// 18 | /// Custom column width. Pixel, star or auto. 19 | /// 20 | /// 21 | public ColumnWidthAttribute(string width) 22 | { 23 | Width = width; 24 | } 25 | 26 | public string Width { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /UIBrowser/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/DragingEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class DragingEventArgs : RoutedEventArgs 7 | { 8 | public DragingEventArgs(Point startPosition, Point endPosition, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | StartPosition = startPosition; 11 | EndPosition = endPosition; 12 | } 13 | public Point StartPosition { get; set; } 14 | 15 | public Point EndPosition { get; set; } 16 | 17 | public Size Size => new Size() 18 | { 19 | Height = Math.Abs(StartPosition.Y - EndPosition.Y), 20 | Width = Math.Abs(StartPosition.X - EndPosition.X), 21 | }; 22 | } 23 | 24 | public delegate void DragingEventHandler(object sender, DragingEventArgs e); 25 | } 26 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Common/JsonResponseModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | using Newtonsoft.Json; 18 | 19 | namespace TencentCloud.Common 20 | { 21 | public class JsonResponseModel 22 | { 23 | [JsonProperty("Response")] 24 | public T Response { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UIBrowser/Examples/NavbarWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using System.Windows; 3 | 4 | namespace UIBrowser.Examples 5 | { 6 | /// 7 | /// MacLikeWindow.xaml 的交互逻辑 8 | /// 9 | public partial class NavbarWindow : WindowX 10 | { 11 | public NavbarWindow() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void BtnClose_Click(object sender, RoutedEventArgs e) 17 | { 18 | Close(); 19 | } 20 | 21 | private void BtnMin_Click(object sender, RoutedEventArgs e) 22 | { 23 | WindowState = WindowState.Minimized; 24 | } 25 | 26 | private void BtnMax_Click(object sender, RoutedEventArgs e) 27 | { 28 | if (WindowState == WindowState.Maximized) 29 | WindowState = WindowState.Normal; 30 | else 31 | WindowState = WindowState.Minimized; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UIBrowser/Examples/MacLikeWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using System.Windows; 3 | 4 | namespace UIBrowser.Examples 5 | { 6 | /// 7 | /// MacLikeWindow.xaml 的交互逻辑 8 | /// 9 | public partial class MacLikeWindow : WindowX 10 | { 11 | public MacLikeWindow() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void BtnClose_Click(object sender, RoutedEventArgs e) 17 | { 18 | Close(); 19 | } 20 | 21 | private void BtnMin_Click(object sender, RoutedEventArgs e) 22 | { 23 | WindowState = WindowState.Minimized; 24 | } 25 | 26 | private void BtnMax_Click(object sender, RoutedEventArgs e) 27 | { 28 | if (WindowState == WindowState.Maximized) 29 | WindowState = WindowState.Normal; 30 | else 31 | WindowState = WindowState.Maximized; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/EventHandler/DragAreaEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | public class DragAreaEventArgs : RoutedEventArgs 7 | { 8 | public DragAreaEventArgs(Point startPosition, Point endPosition, TimeSpan duration, RoutedEvent routedEvent) : base(routedEvent) 9 | { 10 | StartPosition = startPosition; 11 | EndPosition = endPosition; 12 | Duration = duration; 13 | } 14 | 15 | public Point StartPosition { get; set; } 16 | 17 | public Point EndPosition { get; set; } 18 | 19 | public TimeSpan Duration { get; set; } 20 | 21 | public Size Size => new Size() 22 | { 23 | Height = Math.Abs(StartPosition.Y - EndPosition.Y), 24 | Width = Math.Abs(StartPosition.X - EndPosition.X), 25 | }; 26 | } 27 | 28 | public delegate void DragAreaEventHandler(object sender, DragAreaEventArgs e); 29 | } 30 | -------------------------------------------------------------------------------- /UIBrowser/HomeWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Shapes; 15 | using System.Windows.Markup; 16 | namespace UIBrowser 17 | { 18 | /// 19 | /// HomeWindow.xaml 的交互逻辑 20 | /// 21 | public partial class HomeWindow : WindowX, IComponentConnector 22 | { 23 | public HomeWindow() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | private void ListBoxItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) 29 | { 30 | ContenFrame.Navigate(new Uri("HookPage.xaml", UriKind.Relative)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Net45/Panuon.UI.Silver/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Panuon.UI.Silver.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Panuon.UI.Silver.Core.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | dc698b56-ea97-4d48-9e82-e261324ec475 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Panuon.UI.Silver/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Panuon.UI.Silver")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("Panuon.UI.Silver")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("c83cf5d8-c83d-4666-be50-49a554e0650e")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Common/JsonResponseErrModel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | using Newtonsoft.Json; 18 | 19 | namespace TencentCloud.Common 20 | { 21 | public class JsonResponseErrModel 22 | { 23 | [JsonProperty("RequestId")] 24 | public string RequestId { get; set; } 25 | 26 | [JsonProperty("Error")] 27 | public ErrorInfo Error { get; set; } 28 | } 29 | 30 | public class ErrorInfo 31 | { 32 | [JsonProperty("Code")] 33 | public string Code { get; set; } 34 | 35 | [JsonProperty("Message")] 36 | public string Message { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Attributes/ColumnBindingAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Data; 3 | 4 | namespace Panuon.UI.Silver.Core 5 | { 6 | 7 | [AttributeUsage(AttributeTargets.Property)] 8 | public class ColumnBindingAttribute : Attribute 9 | { 10 | /// 11 | /// Custom binding mode. 12 | /// 13 | public ColumnBindingAttribute() 14 | { 15 | BindingMode = BindingMode.TwoWay; 16 | UpdateSourceTrigger = UpdateSourceTrigger.LostFocus; 17 | } 18 | 19 | /// 20 | /// Custom binding mode. 21 | /// 22 | public ColumnBindingAttribute(BindingMode bindingMode) 23 | { 24 | BindingMode = bindingMode; 25 | UpdateSourceTrigger = UpdateSourceTrigger.LostFocus; 26 | } 27 | 28 | /// 29 | /// Custom binding mode. 30 | /// 31 | public ColumnBindingAttribute(BindingMode bindingMode, UpdateSourceTrigger updateSourceTrigger) 32 | { 33 | BindingMode = bindingMode; 34 | UpdateSourceTrigger = updateSourceTrigger; 35 | } 36 | 37 | public BindingMode BindingMode { get; set; } 38 | 39 | public UpdateSourceTrigger UpdateSourceTrigger { get; set; } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /UIBrowser/PartialViews/Custom/WindowXView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using UIBrowser.Examples; 4 | 5 | namespace UIBrowser.PartialViews.Custom 6 | { 7 | /// 8 | /// WindowView.xaml 的交互逻辑 9 | /// 10 | public partial class WindowXView : UserControl 11 | { 12 | #region Identity 13 | #endregion 14 | 15 | public WindowXView() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | 21 | private void BtnWindow_Click(object sender, RoutedEventArgs e) 22 | { 23 | Window window = null; 24 | switch ((sender as Button).Tag.ToString()) 25 | { 26 | case "MacLike": 27 | window = new MacLikeWindow(); 28 | break; 29 | case "Navbar": 30 | window = new NavbarWindow(); 31 | break; 32 | case "NeteaseMusic": 33 | window = new NeteaseMusicWindow(); 34 | break; 35 | } 36 | if (window != null) 37 | { 38 | (Application.Current.MainWindow as MainWindow).IsMaskVisible = true; 39 | window.ShowDialog(); 40 | (Application.Current.MainWindow as MainWindow).IsMaskVisible = false; 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Common/Credential.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | namespace TencentCloud.Common 18 | { 19 | /// 20 | /// Credentials. 21 | /// 22 | public class Credential 23 | { 24 | /// 25 | /// SecretId, can only be obtained from Tencent Cloud Management Console. 26 | /// 27 | public string SecretId { get; set; } 28 | 29 | /// 30 | /// SecretKey, can only be obtained from Tencent Cloud Management Console. 31 | /// 32 | public string SecretKey { get; set; } 33 | 34 | /// 35 | /// Token 36 | /// 37 | public string Token { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /UIBrowser/Models/TreeViewItemModel.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver.Core; 2 | using System.Collections.ObjectModel; 3 | using System.Windows; 4 | 5 | namespace UIBrowser.Models 6 | { 7 | public class TreeViewItemModel : PropertyChangedBase 8 | { 9 | public TreeViewItemModel(string header, string tag, string icon = null) 10 | { 11 | Header = header; 12 | Tag = tag; 13 | Icon = icon; 14 | MenuItems = new ObservableCollection(); 15 | } 16 | 17 | public string Icon { get; set; } 18 | 19 | public string Header { get; set; } 20 | 21 | public string Tag { get; set; } 22 | 23 | public Visibility Visibility 24 | { 25 | get => _visibility; 26 | set { _visibility = value; NotifyPropertyChanged(); } 27 | } 28 | private Visibility _visibility = Visibility.Visible; 29 | 30 | public bool IsExpanded 31 | { 32 | get => _isExpanded; 33 | set { _isExpanded = value; NotifyPropertyChanged(); } 34 | } 35 | private bool _isExpanded = true; 36 | 37 | public ObservableCollection MenuItems 38 | { 39 | get => _menuItems; 40 | set { _menuItems = value; NotifyPropertyChanged(); } 41 | } 42 | private ObservableCollection _menuItems; 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Hook/TranslateWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Diagnostics; 7 | namespace GameHook.TextHookWindwos 8 | { 9 | public class TranslateWindow 10 | { 11 | public Process TranslatorWindowProcess; 12 | public Boolean isopen; 13 | public TranslateWindow() 14 | { 15 | TranslatorWindowProcess = new Process(); 16 | TranslatorWindowProcess.StartInfo.FileName = "WPFTranslatorWindow.exe"; 17 | 18 | } 19 | public void openTranslateWindow() 20 | { 21 | String PriviousPath = Environment.CurrentDirectory; 22 | Environment.CurrentDirectory = System.AppDomain.CurrentDomain.BaseDirectory + "\\TranslatorWindow"; 23 | try 24 | { 25 | Boolean result = TranslatorWindowProcess.Start(); 26 | if (result) 27 | { 28 | isopen = true; 29 | } 30 | else 31 | { 32 | isopen = false; 33 | } 34 | 35 | } 36 | catch (Exception e) 37 | { 38 | isopen = false; 39 | 40 | } 41 | Environment.CurrentDirectory = PriviousPath; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /UIBrowser/Helpers/Helper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows.Media; 4 | 5 | namespace UIBrowser.Helpers 6 | { 7 | public class Helper 8 | { 9 | /// 10 | /// Computer render performance. Good = 2, Normal = 1, Bad = 0. 11 | /// 12 | public static int Tier { get; set; } 13 | 14 | static Helper() 15 | { 16 | Tier = RenderCapability.Tier >> 16; 17 | } 18 | 19 | public static Color GetColorByOffset(GradientStopCollection collection, double offset) 20 | { 21 | var stops = collection.OrderBy(x => x.Offset).ToArray(); 22 | if (offset <= 0) return stops[0].Color; 23 | if (offset >= 1) return stops[stops.Length - 1].Color; 24 | var left = stops.Where(s => s.Offset <= offset).Last(); 25 | var right = stops.Where(s => s.Offset > offset).First(); 26 | offset = Math.Round((offset - left.Offset) / (right.Offset - left.Offset), 2); 27 | var a = (byte)((right.Color.A - left.Color.A) * offset + left.Color.A); 28 | var r = (byte)((right.Color.R - left.Color.R) * offset + left.Color.R); 29 | var g = (byte)((right.Color.G - left.Color.G) * offset + left.Color.G); 30 | var b = (byte)((right.Color.B - left.Color.B) * offset + left.Color.B); 31 | return Color.FromArgb(a, r, g, b); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/GlobalHotKey/GlobalHotkey.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Forms; 8 | 9 | namespace UIBrowser.VNREX.GlobalHotKey 10 | { 11 | public class GlobalHotkey 12 | { 13 | private int modifier; 14 | private int key; 15 | private IntPtr hWnd; 16 | private int id; 17 | 18 | public GlobalHotkey(int modifier, Keys key, IntPtr handle) 19 | { 20 | this.modifier = modifier; 21 | this.key = (int)key; 22 | this.hWnd = handle; 23 | this.id = this.GetHashCode(); 24 | } 25 | 26 | public bool Register() 27 | { 28 | return RegisterHotKey(hWnd, id, modifier, key); 29 | } 30 | 31 | public bool Unregister() 32 | { 33 | return UnregisterHotKey(hWnd, id); 34 | } 35 | 36 | public override int GetHashCode() 37 | { 38 | return modifier ^ key ^ hWnd.ToInt32(); 39 | } 40 | 41 | [DllImport("user32.dll")] 42 | private static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vk); 43 | 44 | [DllImport("user32.dll")] 45 | private static extern bool UnregisterHotKey(IntPtr hWnd, int id); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/Models/ImageRecord.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class ImageRecord : AbstractModel 25 | { 26 | 27 | /// 28 | /// 图片翻译结果 29 | /// 30 | [JsonProperty("Value")] 31 | public ItemValue[] Value{ get; set; } 32 | 33 | 34 | /// 35 | /// For internal usage only. DO NOT USE IT. 36 | /// 37 | public override void ToMap(Dictionary map, string prefix) 38 | { 39 | this.SetParamArrayObj(map, prefix + "Value.", this.Value); 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/GlobalHotKey/VNREXHotKey.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Forms; 7 | using System.Windows.Interop; 8 | 9 | namespace UIBrowser.VNREX.GlobalHotKey 10 | { 11 | class VNREXHotKey 12 | { 13 | const int WindowsMessageHotkey = 786; 14 | public static void RegisterHotKey() 15 | { 16 | var ghk = new GlobalHotkey(0, Keys.F2, new WindowInteropHelper(System.Windows.Application.Current.MainWindow).Handle); 17 | if (!ghk.Register()) 18 | { 19 | MessageBox.Show("F2热键注册失败"); 20 | } 21 | else 22 | { 23 | MessageBox.Show("F2热键注册成功"); 24 | } 25 | ComponentDispatcher.ThreadPreprocessMessage += (ref MSG Message, ref bool Handled) => 26 | { 27 | // 判断是否热键消息 28 | if (Message.message == WindowsMessageHotkey) 29 | { 30 | // 获取热键id 31 | var id = Message.wParam.ToInt32(); 32 | Keys key = (Keys)(((int)Message.lParam >> 16) & 0xFFFF); 33 | // 执行热键回调方法(执行时需要判断是否与注册的热键匹配) 34 | string.Format("sdad"); 35 | //Instance.ExcuteHotKeyCommand(id); 36 | } 37 | }; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/V20180321/Models/ImageRecord.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class ImageRecord : AbstractModel 25 | { 26 | 27 | /// 28 | /// 图片翻译结果 29 | /// 30 | [JsonProperty("Value")] 31 | public ItemValue[] Value{ get; set; } 32 | 33 | 34 | /// 35 | /// For internal usage only. DO NOT USE IT. 36 | /// 37 | public override void ToMap(Dictionary map, string prefix) 38 | { 39 | this.SetParamArrayObj(map, prefix + "Value.", this.Value); 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Common/Exception/TencentCloudSDKException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | using System; 18 | 19 | namespace TencentCloud.Common 20 | { 21 | public class TencentCloudSDKException : Exception 22 | { 23 | public TencentCloudSDKException(string message) 24 | : this(message,"") 25 | { 26 | 27 | } 28 | 29 | public TencentCloudSDKException(string message,string requestId): 30 | base(message) 31 | { 32 | this.RequestId = requestId; 33 | } 34 | 35 | /// 36 | /// UUID of a request. 37 | /// 38 | public string RequestId { get; private set; } 39 | 40 | public override string ToString() 41 | { 42 | 43 | return String.Format("message:{0} requestId{1}", this.Message, RequestId); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /UIBrowser/PartialViews/Native/ContextMenuView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | using System.Windows.Media; 5 | using System.Windows.Media.Effects; 6 | using UIBrowser.Helpers; 7 | 8 | namespace UIBrowser.PartialViews.Native 9 | { 10 | /// 11 | /// ComboBoxView.xaml 的交互逻辑 12 | /// 13 | public partial class ContextMenuView : UserControl 14 | { 15 | #region Identity 16 | private bool _isCodeViewing; 17 | 18 | private LinearGradientBrush _linearGradientBrush; 19 | #endregion 20 | 21 | public ContextMenuView() 22 | { 23 | InitializeComponent(); 24 | Loaded += ContextMenuView_Loaded; 25 | UpdateVisualEffect(); 26 | _linearGradientBrush = FindResource("ColorSelectorBrush") as LinearGradientBrush; 27 | } 28 | 29 | #region Event 30 | 31 | private void ContextMenuView_Loaded(object sender, RoutedEventArgs e) 32 | { 33 | } 34 | #endregion 35 | 36 | #region Function 37 | private void UpdateVisualEffect() 38 | { 39 | switch (Helper.Tier) 40 | { 41 | case 1: 42 | case 2: 43 | AnimationHelper.SetSlideInFromBottom(GrpPalette, true); 44 | RectBackground.Fill = FindResource("GridBrush") as Brush; 45 | GroupBoxHelper.SetShadowColor(GrpPalette, Colors.LightGray); 46 | break; 47 | } 48 | } 49 | 50 | #endregion 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/Models/LanguageDetectRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class LanguageDetectRequest : AbstractModel 25 | { 26 | 27 | /// 28 | /// 待识别的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败。单次请求的文本长度需要低于2000。 29 | /// 30 | [JsonProperty("Text")] 31 | public string Text{ get; set; } 32 | 33 | /// 34 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0 35 | /// 36 | [JsonProperty("ProjectId")] 37 | public long? ProjectId{ get; set; } 38 | 39 | 40 | /// 41 | /// For internal usage only. DO NOT USE IT. 42 | /// 43 | public override void ToMap(Dictionary map, string prefix) 44 | { 45 | this.SetParamSimple(map, prefix + "Text", this.Text); 46 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId); 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/V20180321/Models/LanguageDetectRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class LanguageDetectRequest : AbstractModel 25 | { 26 | 27 | /// 28 | /// 待识别的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败。单次请求的文本长度需要低于2000。 29 | /// 30 | [JsonProperty("Text")] 31 | public string Text{ get; set; } 32 | 33 | /// 34 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0 35 | /// 36 | [JsonProperty("ProjectId")] 37 | public long? ProjectId{ get; set; } 38 | 39 | 40 | /// 41 | /// For internal usage only. DO NOT USE IT. 42 | /// 43 | public override void ToMap(Dictionary map, string prefix) 44 | { 45 | this.SetParamSimple(map, prefix + "Text", this.Text); 46 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId); 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /UIBrowser/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("UIBrowser")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("HP Inc.")] 14 | [assembly: AssemblyProduct("UIBrowser")] 15 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2019")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | // 将 ComVisible 设置为 false 会使此程序集中的类型 19 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 20 | //请将此类型的 ComVisible 特性设置为 true。 21 | [assembly: ComVisible(false)] 22 | 23 | //若要开始生成可本地化的应用程序,请设置 24 | //.csproj 文件中的 CultureYouAreCodingWith 25 | //例如,如果您在源文件中使用的是美国英语, 26 | //使用的是美国英语,请将 设置为 en-US。 然后取消 27 | //对以下 NeutralResourceLanguage 特性的注释。 更新 28 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 29 | 30 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 31 | 32 | 33 | [assembly: ThemeInfo( 34 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 35 | //(未在页面中找到资源时使用, 36 | //或应用程序资源字典中找到时使用) 37 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 38 | //(未在页面中找到资源时使用, 39 | //、应用程序或任何主题专用资源字典中找到时使用) 40 | )] 41 | 42 | 43 | // 程序集的版本信息由下列四个值组成: 44 | // 45 | // 主版本 46 | // 次版本 47 | // 生成号 48 | // 修订号 49 | // 50 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 51 | //通过使用 "*",如下所示: 52 | // [assembly: AssemblyVersion("1.0.*")] 53 | [assembly: AssemblyVersion("1.0.0.0")] 54 | [assembly: AssemblyFileVersion("1.0.0.0")] 55 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Global.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Diagnostics; 7 | using UIBrowser.VNREX.NamePipe; 8 | namespace UIBrowser.VNREX 9 | { 10 | public static class Global 11 | { 12 | public static List taskProcess=new List(); 13 | public static List HcodeGroup= new List(); 14 | public static Boolean isTranslateText = false; 15 | public static Boolean isFilterRepeat = false; 16 | public static int repeatCount = 2; 17 | public static string UpadateRegexString = ""; 18 | public static bool watchClipboard = false; 19 | public static NamePipe.NamePipeServer server = new NamePipe.NamePipeServer(); 20 | public static GameHook.TextHook.TextHook textHook = new GameHook.TextHook.TextHook(); 21 | public static GameHook.TextHookWindwos.TranslateWindow translateWindow = new GameHook.TextHookWindwos.TranslateWindow(); 22 | 23 | public static string BaiduAppid = ""; 24 | public static string BaiduKey = ""; 25 | public static bool BaiduEnable = false; 26 | public static string TencentAppid = ""; 27 | public static string TencentKey = ""; 28 | public static bool TencentEnable = false; 29 | public static string CaiYunToken = ""; 30 | public static bool CaiYunEnable = false; 31 | 32 | 33 | public static bool YouDaoEnable = false; 34 | public static LanguageSetting LangSetting = LanguageSetting.ja2cn; 35 | 36 | public static TranslateController TranslateInstance = new TranslateController(); 37 | 38 | public static string TTSString = ""; 39 | public static string preString = ""; 40 | public static TTS.VoiceRoid2 VoiceRoidCli = new TTS.VoiceRoid2(); 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver.Core/Models/IPendingingHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Panuon.UI.Silver.Core 4 | { 5 | public interface IPendingHandler 6 | { 7 | /// 8 | /// Pending box closed. 9 | /// 10 | event EventHandler Closed; 11 | 12 | /// 13 | /// User canceled. 14 | /// 15 | event EventHandler Cancel; 16 | 17 | /// 18 | /// Close pending box. 19 | /// 20 | void Close(); 21 | 22 | /// 23 | /// Update message of pending box. 24 | /// 25 | void UpdateMessage(string message); 26 | } 27 | 28 | internal class PendingHandler : IPendingHandler 29 | { 30 | #region Identifier 31 | private Action _closeAction; 32 | private Action _updateMessageAction; 33 | #endregion 34 | 35 | #region Constructor 36 | public PendingHandler(Action closeAction, Action updateMessageAction) 37 | { 38 | _closeAction = closeAction; 39 | _updateMessageAction = updateMessageAction; 40 | } 41 | #endregion 42 | 43 | #region Event 44 | public event EventHandler Closed; 45 | public event EventHandler Cancel; 46 | 47 | public void Close() 48 | { 49 | _closeAction(); 50 | } 51 | #endregion 52 | 53 | #region Calling Methods 54 | public void RaiseClosedEvent(object sender, EventArgs e) 55 | { 56 | Closed?.Invoke(sender, e); 57 | } 58 | 59 | public void RaiseCanceledEvent(object sender, EventArgs e) 60 | { 61 | Cancel?.Invoke(sender, e); 62 | } 63 | 64 | public void UpdateMessage(string message) 65 | { 66 | _updateMessageAction(message); 67 | } 68 | #endregion 69 | 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Common/TencentCloudCommon.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | TencentCloud 4 | net45;netstandard2.0 5 | {C0C5CE89-418D-399D-AED0-9B87D308C5C7} 6 | 3.0.181 7 | Tencent Cloud API 3.0 SDK for .NET 8 | 9 | Tencent Cloud API Team 10 | Tencent Ltd. 11 | 12 | TencentCloudSDK.Common 13 | https://github.com/TencentCloud/tencentcloud-sdk-dotnet 14 | https://avatars3.githubusercontent.com/u/20101770 15 | Copyright @2018 THL A29 Limited, a Tencent company. All Rights Reserved. 16 | 17 | 18 | 19 | Full 20 | 1702;1705;1591 21 | 22 | 23 | 24 | NS2 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Net45/Panuon.UI.Silver/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("Panuon.UI.Silver")] 11 | [assembly: AssemblyDescription("A beautiful wpf ui control library.")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Panuon")] 14 | [assembly: AssemblyProduct("PanuonUI.Silver")] 15 | [assembly: AssemblyCopyright("Copyright © Panuon. 2019")] 16 | [assembly: AssemblyTrademark("Panuon")] 17 | [assembly: AssemblyCulture("")] 18 | [assembly: InternalsVisibleTo("PanuonUI.Silver.Extends")] 19 | 20 | //将 ComVisible 设置为 false 将使此程序集中的类型 21 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 22 | //请将此类型的 ComVisible 特性设置为 true。 23 | [assembly: ComVisible(false)] 24 | 25 | //若要开始生成可本地化的应用程序,请设置 26 | //.csproj 文件中的 CultureYouAreCodingWith 27 | //例如,如果您在源文件中使用的是美国英语, 28 | //使用的是美国英语,请将 设置为 en-US。 然后取消 29 | //对以下 NeutralResourceLanguage 特性的注释。 更新 30 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 31 | 32 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 33 | 34 | 35 | [assembly:ThemeInfo( 36 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 37 | //(未在页面中找到资源时使用, 38 | //或应用程序资源字典中找到时使用) 39 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 40 | //(未在页面中找到资源时使用, 41 | //、应用程序或任何主题专用资源字典中找到时使用) 42 | )] 43 | 44 | 45 | // 程序集的版本信息由下列四个值组成: 46 | // 47 | // 主版本 48 | // 次版本 49 | // 生成号 50 | // 修订号 51 | // 52 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 53 | // 方法是按如下所示使用“*”: : 54 | // [assembly: AssemblyVersion("1.0.*")] 55 | [assembly: AssemblyVersion("1.1.3.0")] 56 | [assembly: AssemblyFileVersion("1.1.3.0")] 57 | [assembly: Guid("16dbb0c9-f9b0-4bcf-a1f6-cb740041699e")] 58 | 59 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/Models/LanguageDetectResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class LanguageDetectResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 识别出的语言种类,参考语言列表 29 | ///
  • zh : 中文
  • en : 英文
  • jp : 日语
  • kr : 韩语
  • de : 德语
  • fr : 法语
  • es : 西班牙文
  • it : 意大利文
  • tr : 土耳其文
  • ru : 俄文
  • pt : 葡萄牙文
  • vi : 越南文
  • id : 印度尼西亚文
  • ms : 马来西亚文
  • th : 泰文
  • 30 | ///
    31 | [JsonProperty("Lang")] 32 | public string Lang{ get; set; } 33 | 34 | /// 35 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 36 | /// 37 | [JsonProperty("RequestId")] 38 | public string RequestId{ get; set; } 39 | 40 | 41 | /// 42 | /// For internal usage only. DO NOT USE IT. 43 | /// 44 | public override void ToMap(Dictionary map, string prefix) 45 | { 46 | this.SetParamSimple(map, prefix + "Lang", this.Lang); 47 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/V20180321/Models/LanguageDetectResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class LanguageDetectResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 识别出的语言种类,参考语言列表 29 | ///
  • zh : 中文
  • en : 英文
  • jp : 日语
  • kr : 韩语
  • de : 德语
  • fr : 法语
  • es : 西班牙文
  • it : 意大利文
  • tr : 土耳其文
  • ru : 俄文
  • pt : 葡萄牙文
  • vi : 越南文
  • id : 印度尼西亚文
  • ms : 马来西亚文
  • th : 泰文
  • 30 | ///
    31 | [JsonProperty("Lang")] 32 | public string Lang{ get; set; } 33 | 34 | /// 35 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 36 | /// 37 | [JsonProperty("RequestId")] 38 | public string RequestId{ get; set; } 39 | 40 | 41 | /// 42 | /// For internal usage only. DO NOT USE IT. 43 | /// 44 | public override void ToMap(Dictionary map, string prefix) 45 | { 46 | this.SetParamSimple(map, prefix + "Lang", this.Lang); 47 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /UIBrowser/OCRPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace UIBrowser 17 | { 18 | /// 19 | /// OCRPage.xaml 的交互逻辑 20 | /// 21 | public partial class OCRPage : Page 22 | { 23 | public OCRPage() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | private void SelecteScreenAreaBtn_Click(object sender, RoutedEventArgs e) 29 | { 30 | VNREX.OCR.OCRServer.GenerateRect(); 31 | } 32 | private void UpdateOCRConsoleEvent(string str) 33 | { 34 | if (OCRConsoleTextBox.Text.Length > 10000) 35 | OCRConsoleTextBox.Clear(); 36 | OCRConsoleTextBox.AppendText("\r\n"); 37 | OCRConsoleTextBox.AppendText(str); 38 | 39 | 40 | } 41 | public void UpdateOCRTextEvent(string msg) 42 | { 43 | Action updateConsoleOutputAction = new Action(UpdateOCRConsoleEvent); 44 | OCRConsoleTextBox.Dispatcher.Invoke(updateConsoleOutputAction, msg); 45 | } 46 | private void StartOCRBtn_Click(object sender, RoutedEventArgs e) 47 | { 48 | VNREX.OCR.OCRServer.updateText+= UpdateOCRTextEvent; 49 | if(VNREX.OCR.OCRServer.StartServer("8699")) 50 | { 51 | StartOCRBtn.IsEnabled = false; 52 | OpenOCRClientBtn.IsEnabled = true; 53 | } 54 | 55 | } 56 | 57 | private void OCRConsoleTextBox_TextChanged(object sender, TextChangedEventArgs e) 58 | { 59 | OCRConsoleTextBox.ScrollToEnd(); 60 | } 61 | 62 | private void OpenOCRClientBtn_Click(object sender, RoutedEventArgs e) 63 | { 64 | VNREX.OCR.OCRServer.OpenOCRClient(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/Models/TextTranslateResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class TextTranslateResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 翻译后的文本 29 | /// 30 | [JsonProperty("TargetText")] 31 | public string TargetText{ get; set; } 32 | 33 | /// 34 | /// 源语言,详见入参Target 35 | /// 36 | [JsonProperty("Source")] 37 | public string Source{ get; set; } 38 | 39 | /// 40 | /// 目标语言,详见入参Target 41 | /// 42 | [JsonProperty("Target")] 43 | public string Target{ get; set; } 44 | 45 | /// 46 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 47 | /// 48 | [JsonProperty("RequestId")] 49 | public string RequestId{ get; set; } 50 | 51 | 52 | /// 53 | /// For internal usage only. DO NOT USE IT. 54 | /// 55 | public override void ToMap(Dictionary map, string prefix) 56 | { 57 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText); 58 | this.SetParamSimple(map, prefix + "Source", this.Source); 59 | this.SetParamSimple(map, prefix + "Target", this.Target); 60 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 61 | } 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/V20180321/Models/TextTranslateResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class TextTranslateResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 翻译后的文本 29 | /// 30 | [JsonProperty("TargetText")] 31 | public string TargetText{ get; set; } 32 | 33 | /// 34 | /// 源语言,详见入参Target 35 | /// 36 | [JsonProperty("Source")] 37 | public string Source{ get; set; } 38 | 39 | /// 40 | /// 目标语言,详见入参Target 41 | /// 42 | [JsonProperty("Target")] 43 | public string Target{ get; set; } 44 | 45 | /// 46 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 47 | /// 48 | [JsonProperty("RequestId")] 49 | public string RequestId{ get; set; } 50 | 51 | 52 | /// 53 | /// For internal usage only. DO NOT USE IT. 54 | /// 55 | public override void ToMap(Dictionary map, string prefix) 56 | { 57 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText); 58 | this.SetParamSimple(map, prefix + "Source", this.Source); 59 | this.SetParamSimple(map, prefix + "Target", this.Target); 60 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 61 | } 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/Models/TextTranslateBatchResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class TextTranslateBatchResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 源语言,详见入参Target 29 | /// 30 | [JsonProperty("Source")] 31 | public string Source{ get; set; } 32 | 33 | /// 34 | /// 目标语言,详见入参Target 35 | /// 36 | [JsonProperty("Target")] 37 | public string Target{ get; set; } 38 | 39 | /// 40 | /// 翻译后的文本列表 41 | /// 42 | [JsonProperty("TargetTextList")] 43 | public string[] TargetTextList{ get; set; } 44 | 45 | /// 46 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 47 | /// 48 | [JsonProperty("RequestId")] 49 | public string RequestId{ get; set; } 50 | 51 | 52 | /// 53 | /// For internal usage only. DO NOT USE IT. 54 | /// 55 | public override void ToMap(Dictionary map, string prefix) 56 | { 57 | this.SetParamSimple(map, prefix + "Source", this.Source); 58 | this.SetParamSimple(map, prefix + "Target", this.Target); 59 | this.SetParamArraySimple(map, prefix + "TargetTextList.", this.TargetTextList); 60 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 61 | } 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/Tmt/V20180321/Models/TextTranslateBatchResponse.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, 11 | * software distributed under the License is distributed on an 12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | * KIND, either express or implied. See the License for the 14 | * specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | namespace TencentCloud.Tmt.V20180321.Models 19 | { 20 | using Newtonsoft.Json; 21 | using System.Collections.Generic; 22 | using TencentCloud.Common; 23 | 24 | public class TextTranslateBatchResponse : AbstractModel 25 | { 26 | 27 | /// 28 | /// 源语言,详见入参Target 29 | /// 30 | [JsonProperty("Source")] 31 | public string Source{ get; set; } 32 | 33 | /// 34 | /// 目标语言,详见入参Target 35 | /// 36 | [JsonProperty("Target")] 37 | public string Target{ get; set; } 38 | 39 | /// 40 | /// 翻译后的文本列表 41 | /// 42 | [JsonProperty("TargetTextList")] 43 | public string[] TargetTextList{ get; set; } 44 | 45 | /// 46 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 47 | /// 48 | [JsonProperty("RequestId")] 49 | public string RequestId{ get; set; } 50 | 51 | 52 | /// 53 | /// For internal usage only. DO NOT USE IT. 54 | /// 55 | public override void ToMap(Dictionary map, string prefix) 56 | { 57 | this.SetParamSimple(map, prefix + "Source", this.Source); 58 | this.SetParamSimple(map, prefix + "Target", this.Target); 59 | this.SetParamArraySimple(map, prefix + "TargetTextList.", this.TargetTextList); 60 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId); 61 | } 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /UIBrowser/VNREX/NamePipe/NamePipeServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.IO.Pipes; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading; 9 | using System.Threading.Tasks; 10 | 11 | namespace UIBrowser.VNREX.NamePipe 12 | { 13 | public class NamePipeServer 14 | { 15 | public Boolean serverIsOpen = false; 16 | /// 17 | /// 重要 在轮询线程中将不停向此队列提取数据向客户端发送过去 18 | /// 19 | public ConcurrentQueue safeCollectin = new ConcurrentQueue(); 20 | NamedPipeServerStream pipeServer; 21 | private string temp; 22 | public int clinetNumber = 0; 23 | /// 24 | /// 初始化命名管道 25 | /// 26 | public NamePipeServer() 27 | { 28 | 29 | 30 | 31 | } 32 | /// 33 | /// 开启服务器轮询向客户端写入数据 34 | /// 35 | public void startServer() 36 | { 37 | pipeServer = 38 | new NamedPipeServerStream("testpipe", PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); 39 | serverIsOpen = true; 40 | ThreadPool.QueueUserWorkItem(delegate 41 | { 42 | pipeServer.BeginWaitForConnection((o) => 43 | { 44 | NamedPipeServerStream pServer = (NamedPipeServerStream)o.AsyncState; 45 | pServer.EndWaitForConnection(o); 46 | clinetNumber++; 47 | StreamWriter sr = new StreamWriter(pServer); 48 | sr.AutoFlush = true; 49 | while (true) 50 | { 51 | 52 | var result = safeCollectin.TryDequeue(out temp); 53 | if (result) 54 | { 55 | sr.WriteLine(temp); 56 | } 57 | Thread.Sleep(50); 58 | } 59 | 60 | }, pipeServer); 61 | }); 62 | 63 | } 64 | public void closeServer() 65 | { 66 | pipeServer.Close(); 67 | serverIsOpen = false; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /UIBrowser/PartialViews/Custom/NoticeView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.UI.Silver; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace UIBrowser.PartialViews.Custom 6 | { 7 | /// 8 | /// NoticeView.xaml 的交互逻辑 9 | /// 10 | public partial class NoticeView : UserControl 11 | { 12 | #region Identity 13 | private string _message = "This is a test message. This is a test message. This is a test message. This is a test message. This is a test message. This is a test message.This is a test message. This is a test message. This is a test message. This is a test message. This is a test message. This is a test message.This is a test message. This is a test message. This is a test message. This is a test message. This is a test message. This is a test message."; 14 | private string _message2 = "This is a test message."; 15 | #endregion 16 | 17 | public NoticeView() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void BtnNonIcon_Click(object sender, RoutedEventArgs e) 23 | { 24 | Notice.Show("This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.", "Notice", 3); 25 | } 26 | 27 | private void BtnError_Click(object sender, RoutedEventArgs e) 28 | { 29 | Notice.Show("This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.", "Notice", 3, MessageBoxIcon.Error); 30 | 31 | } 32 | 33 | private void BtnInfo_Click(object sender, RoutedEventArgs e) 34 | { 35 | Notice.Show("This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.", "Notice", 3, MessageBoxIcon.Info); 36 | 37 | } 38 | 39 | private void BtnSuccess_Click(object sender, RoutedEventArgs e) 40 | { 41 | Notice.Show("This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.", "Notice", 3, MessageBoxIcon.Success); 42 | } 43 | 44 | private void BtnWarning_Click(object sender, RoutedEventArgs e) 45 | { 46 | Notice.Show("This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.This is a notice.", "Notice", 3, MessageBoxIcon.Warning); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /Panuon.UI.Silver/Panuon.UI.Silver.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | c83cf5d8-c83d-4666-be50-49a554e0650e 8 | Library 9 | Properties 10 | Panuon.UI.Silver 11 | Panuon.UI.Silver 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /SharedResources/Panuon.UI.Silver/Control.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /UIBrowser/PartialViews/Custom/WindowXView.xaml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 19 | 20 |