├── 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 |
28 |
37 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/UIBrowser/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Runtime.CompilerServices;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Markup;
10 | using UIBrowser.Models;
11 | using UIBrowser.ViewModels;
12 |
13 | namespace UIBrowser
14 | {
15 | ///
16 | /// MainWindow.xaml 的交互逻辑
17 | ///
18 | public partial class MainWindow : WindowX, IComponentConnector
19 | {
20 | #region Identity
21 | private static IDictionary _partialViewDic;
22 | #endregion
23 |
24 | #region Property
25 | public MainWindowViewModel ViewModel { get; set; }
26 |
27 | public string Text { get; set; }
28 | #endregion
29 |
30 | #region Constructor
31 | static MainWindow()
32 | {
33 | _partialViewDic = new Dictionary();
34 | var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName.StartsWith("UIBrowser"));
35 | assembly.GetTypes().Where(x => x.Namespace.StartsWith("UIBrowser.PartialViews") && x.IsSubclassOf(typeof(UserControl))).ToList().ForEach(x => _partialViewDic.Add(x.Name.Remove(x.Name.Length - 4), x));
36 | }
37 |
38 | public MainWindow()
39 | {
40 | InitializeComponent();
41 | ViewModel = new MainWindowViewModel();
42 | DataContext = ViewModel;
43 | }
44 |
45 | #endregion
46 |
47 | #region EventHandler
48 | private void TvMenu_SelectionChanged(object sender, RoutedPropertyChangedEventArgs e)
49 | {
50 | if (!IsLoaded)
51 | return;
52 |
53 | var selectedItem = TvMenu.SelectedItem as TreeViewItemModel;
54 | var tag = selectedItem.Tag;
55 | if (tag.IsNullOrEmpty())
56 | return;
57 |
58 | if (_partialViewDic.ContainsKey(tag))
59 | ContentControl.Content = Activator.CreateInstance(_partialViewDic[tag]);
60 | else
61 | ContentControl.Content = null;
62 | }
63 | #endregion
64 |
65 | private void WindowX_Closing(object sender, System.ComponentModel.CancelEventArgs e)
66 | {
67 | Application.Current.Shutdown();
68 | }
69 |
70 | private void Button_Click(object sender, RoutedEventArgs e)
71 | {
72 |
73 | }
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Common/Profile/ClientProfile.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.Profile
18 | {
19 | ///
20 | /// Client profiles.
21 | ///
22 | public class ClientProfile
23 | {
24 | ///
25 | /// Constructor.
26 | ///
27 | /// Signature process method.
28 | /// HttpProfile instance.
29 | public ClientProfile(string signMethod, HttpProfile httpProfile)
30 | {
31 | this.SignMethod = signMethod;
32 | this.HttpProfile = httpProfile;
33 | }
34 |
35 | public ClientProfile(string signMethod)
36 | : this(signMethod, new HttpProfile())
37 | {
38 |
39 | }
40 |
41 | public ClientProfile()
42 | {
43 | SignMethod = SIGN_SHA256;
44 | HttpProfile = new HttpProfile();
45 | }
46 |
47 | ///
48 | /// HTTP profiles, refer to
49 | ///
50 | public HttpProfile HttpProfile { get; set; }
51 |
52 | ///
53 | /// Signature process method.
54 | ///
55 | public string SignMethod { get; set; }
56 |
57 |
58 | ///
59 | /// Signature process version 1, with HmacSHA1.
60 | ///
61 | public const string SIGN_SHA1 = "HmacSHA1";
62 |
63 | ///
64 | /// Signature process version 1, with HmacSHA256.
65 | ///
66 | public static string SIGN_SHA256 = "HmacSHA256";
67 |
68 | ///
69 | /// Signature process version 3, with TC3-HMAC-SHA256.
70 | ///
71 | public static string SIGN_TC3SHA256 = "TC3-HMAC-SHA256";
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/ImageTranslateResponse.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 ImageTranslateResponse : AbstractModel
25 | {
26 |
27 | ///
28 | /// 请求的SessionUuid返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 源语言
35 | ///
36 | [JsonProperty("Source")]
37 | public string Source{ get; set; }
38 |
39 | ///
40 | /// 目标语言
41 | ///
42 | [JsonProperty("Target")]
43 | public string Target{ get; set; }
44 |
45 | ///
46 | /// 图片翻译结果,翻译结果按识别的文本每一行独立翻译,后续会推出按段落划分并翻译的版本
47 | ///
48 | [JsonProperty("ImageRecord")]
49 | public ImageRecord ImageRecord{ get; set; }
50 |
51 | ///
52 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
53 | ///
54 | [JsonProperty("RequestId")]
55 | public string RequestId{ get; set; }
56 |
57 |
58 | ///
59 | /// For internal usage only. DO NOT USE IT.
60 | ///
61 | public override void ToMap(Dictionary map, string prefix)
62 | {
63 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
64 | this.SetParamSimple(map, prefix + "Source", this.Source);
65 | this.SetParamSimple(map, prefix + "Target", this.Target);
66 | this.SetParamObj(map, prefix + "ImageRecord.", this.ImageRecord);
67 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
68 | }
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/ImageTranslateResponse.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 ImageTranslateResponse : AbstractModel
25 | {
26 |
27 | ///
28 | /// 请求的SessionUuid返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 源语言
35 | ///
36 | [JsonProperty("Source")]
37 | public string Source{ get; set; }
38 |
39 | ///
40 | /// 目标语言
41 | ///
42 | [JsonProperty("Target")]
43 | public string Target{ get; set; }
44 |
45 | ///
46 | /// 图片翻译结果,翻译结果按识别的文本每一行独立翻译,后续会推出按段落划分并翻译的版本
47 | ///
48 | [JsonProperty("ImageRecord")]
49 | public ImageRecord ImageRecord{ get; set; }
50 |
51 | ///
52 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
53 | ///
54 | [JsonProperty("RequestId")]
55 | public string RequestId{ get; set; }
56 |
57 |
58 | ///
59 | /// For internal usage only. DO NOT USE IT.
60 | ///
61 | public override void ToMap(Dictionary map, string prefix)
62 | {
63 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
64 | this.SetParamSimple(map, prefix + "Source", this.Source);
65 | this.SetParamSimple(map, prefix + "Target", this.Target);
66 | this.SetParamObj(map, prefix + "ImageRecord.", this.ImageRecord);
67 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
68 | }
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/ItemValue.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 ItemValue : AbstractModel
25 | {
26 |
27 | ///
28 | /// 识别出的源文
29 | ///
30 | [JsonProperty("SourceText")]
31 | public string SourceText{ get; set; }
32 |
33 | ///
34 | /// 翻译后的译文
35 | ///
36 | [JsonProperty("TargetText")]
37 | public string TargetText{ get; set; }
38 |
39 | ///
40 | /// X坐标
41 | ///
42 | [JsonProperty("X")]
43 | public long? X{ get; set; }
44 |
45 | ///
46 | /// Y坐标
47 | ///
48 | [JsonProperty("Y")]
49 | public long? Y{ get; set; }
50 |
51 | ///
52 | /// 宽度
53 | ///
54 | [JsonProperty("W")]
55 | public long? W{ get; set; }
56 |
57 | ///
58 | /// 高度
59 | ///
60 | [JsonProperty("H")]
61 | public long? H{ get; set; }
62 |
63 |
64 | ///
65 | /// For internal usage only. DO NOT USE IT.
66 | ///
67 | public override void ToMap(Dictionary map, string prefix)
68 | {
69 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
70 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText);
71 | this.SetParamSimple(map, prefix + "X", this.X);
72 | this.SetParamSimple(map, prefix + "Y", this.Y);
73 | this.SetParamSimple(map, prefix + "W", this.W);
74 | this.SetParamSimple(map, prefix + "H", this.H);
75 | }
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/SharedResources/Panuon.UI.Silver.Core/Panuon.UI.Silver.Core.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | dc698b56-ea97-4d48-9e82-e261324ec475
7 |
8 |
9 | Panuon.UI.Silver.Core
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/ItemValue.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 ItemValue : AbstractModel
25 | {
26 |
27 | ///
28 | /// 识别出的源文
29 | ///
30 | [JsonProperty("SourceText")]
31 | public string SourceText{ get; set; }
32 |
33 | ///
34 | /// 翻译后的译文
35 | ///
36 | [JsonProperty("TargetText")]
37 | public string TargetText{ get; set; }
38 |
39 | ///
40 | /// X坐标
41 | ///
42 | [JsonProperty("X")]
43 | public long? X{ get; set; }
44 |
45 | ///
46 | /// Y坐标
47 | ///
48 | [JsonProperty("Y")]
49 | public long? Y{ get; set; }
50 |
51 | ///
52 | /// 宽度
53 | ///
54 | [JsonProperty("W")]
55 | public long? W{ get; set; }
56 |
57 | ///
58 | /// 高度
59 | ///
60 | [JsonProperty("H")]
61 | public long? H{ get; set; }
62 |
63 |
64 | ///
65 | /// For internal usage only. DO NOT USE IT.
66 | ///
67 | public override void ToMap(Dictionary map, string prefix)
68 | {
69 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
70 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText);
71 | this.SetParamSimple(map, prefix + "X", this.X);
72 | this.SetParamSimple(map, prefix + "Y", this.Y);
73 | this.SetParamSimple(map, prefix + "W", this.W);
74 | this.SetParamSimple(map, prefix + "H", this.H);
75 | }
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Common/Profile/HttpProfile.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.Profile
18 | {
19 | ///
20 | /// HTTP profiles.
21 | ///
22 | public class HttpProfile
23 | {
24 | ///
25 | /// HTTPS protocol.
26 | ///
27 | public static readonly string REQ_HTTPS = "https://";
28 |
29 | ///
30 | /// HTTP protocol.
31 | ///
32 | public static readonly string REQ_HTTP = "http://";
33 |
34 | ///
35 | /// HTTP method POST.
36 | ///
37 | public static readonly string REQ_POST = "POST";
38 |
39 | ///
40 | /// HTTP method GET.
41 | ///
42 | public static readonly string REQ_GET = "GET";
43 |
44 | ///
45 | /// Time unit, 60 seconds.
46 | ///
47 | public static readonly int TM_MINUTE = 60;
48 |
49 | public HttpProfile()
50 | {
51 | this.ReqMethod = REQ_POST;
52 | this.Endpoint = null;
53 | this.Protocol = REQ_HTTPS;
54 | this.Timeout = TM_MINUTE;
55 | }
56 |
57 | ///
58 | /// HTTP request method.
59 | ///
60 | public string ReqMethod { get; set; }
61 |
62 | ///
63 | /// Service endpoint, or domain name.
64 | ///
65 | public string Endpoint { get; set; }
66 |
67 | ///
68 | /// HTTP protocol.
69 | ///
70 | public string Protocol { get; set; }
71 |
72 | ///
73 | /// HTTP request timeout value, in seconds.
74 | ///
75 | public int Timeout { get; set; }
76 |
77 | ///
78 | /// HTTP proxy settings.
79 | ///
80 | public string WebProxy { get; set; }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/TTS/VoiceRoid2.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.Security.Cryptography;
7 | using System.IO;
8 | using System.Diagnostics;
9 | using System.Threading;
10 | namespace TTS
11 | {
12 | public class VoiceRoid2
13 | {
14 | public Process proc = new Process();
15 | public bool ini = false;
16 |
17 | public static string GetMD5HashFromFile(string filename)
18 | {
19 | try
20 | {
21 | FileStream file = new FileStream(filename, FileMode.Open);
22 | System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
23 | byte[] retVal = md5.ComputeHash(file);
24 | file.Close();
25 |
26 | StringBuilder sb = new StringBuilder();
27 | for (int i = 0; i < retVal.Length; i++)
28 | {
29 | sb.Append(retVal[i].ToString("x2"));
30 |
31 |
32 | }
33 |
34 | return sb.ToString();
35 |
36 |
37 |
38 | }
39 | catch (System.Exception ex)
40 | {
41 |
42 | return "er";
43 | }
44 |
45 | }
46 | public bool VoiceRoid2CliInit(string cliPath)
47 | {
48 | bool result = false;
49 |
50 |
51 | if (!System.IO.File.Exists(cliPath))
52 | throw new Exception("文件不在在");
53 |
54 | string MD5= GetMD5HashFromFile(cliPath);
55 | if (!MD5.Equals("ccecdfd708ea63fc90b68202c6cf93db"))
56 | throw new Exception("文件校验失败请选择正确的文件");
57 | String PriviousPath = Environment.CurrentDirectory;
58 | Environment.CurrentDirectory = Path.GetDirectoryName(cliPath);
59 |
60 | proc.StartInfo.FileName = Path.GetFileName(cliPath);
61 | //proc.StartInfo.Arguments = @"startservice";
62 | proc.StartInfo.UseShellExecute = false;
63 | //proc.StartInfo.StandardOutputEncoding = Encoding.Unicode;
64 | proc.StartInfo.RedirectStandardInput = true;
65 | proc.StartInfo.RedirectStandardOutput = true;
66 | proc.StartInfo.RedirectStandardError = true;
67 | proc.StartInfo.CreateNoWindow = true;
68 | try
69 | {
70 | result=proc.Start();
71 | if (result)
72 | {
73 | proc.BeginOutputReadLine();
74 | Thread.Sleep(500);
75 | ini = true;
76 | //proc.StandardInput.WriteLineAsync("StartService");
77 |
78 | }
79 |
80 | Environment.CurrentDirectory = PriviousPath;
81 | return result;
82 | }
83 | catch
84 | {
85 | Environment.CurrentDirectory = PriviousPath;
86 | result = false;
87 | return result;
88 | }
89 |
90 | }
91 |
92 |
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/UIBrowser/PartialViews/OverviewView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver;
2 | using Panuon.UI.Silver.Core;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Media;
6 | using UIBrowser.Helpers;
7 |
8 | namespace UIBrowser.PartialViews
9 | {
10 | ///
11 | /// OverviewView.xaml 的交互逻辑
12 | ///
13 | public partial class OverviewView : UserControl
14 | {
15 | private LinearGradientBrush _linearGradientBrush;
16 |
17 | public OverviewView()
18 | {
19 | InitializeComponent();
20 | _linearGradientBrush = FindResource("ColorSelectorBrush") as LinearGradientBrush;
21 |
22 | ViewModel = new OverviewViewModel("#3E3E3E".ToColor());
23 | DataContext = ViewModel;
24 | }
25 |
26 | public OverviewViewModel ViewModel { get; set; }
27 |
28 | private void SldTheme_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
29 | {
30 | if (!IsLoaded)
31 | return;
32 |
33 | var color = Helper.GetColorByOffset(_linearGradientBrush.GradientStops, SldTheme.Value / 70);
34 |
35 | ViewModel.Update(color);
36 |
37 | }
38 | }
39 |
40 | public class OverviewViewModel : PropertyChangedBase
41 | {
42 | public OverviewViewModel(Color color)
43 | {
44 | Update(color);
45 | }
46 |
47 | public void Update(Color color)
48 | {
49 | Brush = color.ToBrush();
50 | LightBrush = new Color() { A = 200, R = color.R, G = color.G, B = color.B }.ToBrush();
51 | BrushTran1 = new Color() { A = 34, R = color.R, G = color.G, B = color.B }.ToBrush();
52 | BrushTran2 = new Color() { A = 51, R = color.R, G = color.G, B = color.B }.ToBrush();
53 | }
54 |
55 | public Brush Brush
56 | {
57 | get => _brush;
58 | set { _brush = value; NotifyPropertyChanged(); }
59 | }
60 | private Brush _brush;
61 |
62 |
63 | public Brush LightBrush
64 | {
65 | get => _lightBrush;
66 | set { _lightBrush = value; NotifyPropertyChanged(); }
67 | }
68 | private Brush _lightBrush;
69 |
70 | public Brush BrushTran1
71 | {
72 | get => _brushTran1;
73 | set { _brushTran1 = value; NotifyPropertyChanged(); }
74 | }
75 | private Brush _brushTran1;
76 |
77 |
78 | public Brush BrushTran2
79 | {
80 | get => _brushTran2;
81 | set { _brushTran2 = value; NotifyPropertyChanged(); }
82 | }
83 | private Brush _brushTran2;
84 |
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/Net45/Panuon.UI.Silver/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Panuon.UI.Silver.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Panuon.UI.Silver.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/TencentCloudTmt.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | TencentCloud
4 | net45;netstandard2.0
5 | {A5E90D54-00EC-330D-9397-49162FD643F9}
6 | false
7 | 3.0.181
8 | Tencent Cloud API 3.0 SDK for .NET
9 | https://github.com/TencentCloud/tencentcloud-sdk-dotnet/blob/master/LICENSE
10 | Tencent Cloud API Team
11 | Tencent Ltd.
12 |
13 | TencentCloudSDK.Tmt
14 | https://github.com/TencentCloud/tencentcloud-sdk-dotnet
15 | https://avatars3.githubusercontent.com/u/20101770
16 | Copyright @2018 THL A29 Limited, a Tencent company. All Rights Reserved.
17 |
18 |
19 |
20 | Full
21 | 1702;1705;1591
22 |
23 |
24 |
25 | NS2
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/UIBrowser/PartialViews/Custom/NoticeView.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
19 |
20 |
27 |
35 |
43 |
51 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/UIBrowser/Examples/MacLikeWindow.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
18 |
20 |
22 |
23 |
24 |
25 |
26 |
29 |
38 |
47 |
56 |
57 |
61 |
62 |
63 |
64 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/UIBrowser/PartialViews/Native/MenuView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver;
2 | using System;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Media;
6 | using System.Windows.Media.Effects;
7 | using UIBrowser.Helpers;
8 |
9 | namespace UIBrowser.PartialViews.Native
10 | {
11 | ///
12 | /// MenuView.xaml 的交互逻辑
13 | ///
14 | public partial class MenuView : UserControl
15 | {
16 | #region Identity
17 | private bool _isCodeViewing;
18 |
19 | private LinearGradientBrush _linearGradientBrush;
20 | #endregion
21 |
22 | public MenuView()
23 | {
24 | InitializeComponent();
25 | Loaded += ButtonView_Loaded;
26 | UpdateVisualEffect();
27 | _linearGradientBrush = FindResource("ColorSelectorBrush") as LinearGradientBrush;
28 | }
29 |
30 | #region Event Handler
31 |
32 | private void ButtonView_Loaded(object sender, RoutedEventArgs e)
33 | {
34 | UpdateTemplate();
35 | }
36 |
37 | private void SldTheme_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
38 | {
39 | if (!IsLoaded)
40 | return;
41 |
42 | UpdateTemplate();
43 | }
44 |
45 | private void SldCornerRadius_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
46 | {
47 | if (!IsLoaded)
48 | return;
49 |
50 | UpdateTemplate();
51 | }
52 |
53 | private void RdbBaseStyle_CheckChanged(object sender, RoutedEventArgs e)
54 | {
55 | if (!IsLoaded)
56 | return;
57 | var rdb = sender as RadioButton;
58 | MenuHelper.SetMenuStyle(MenuCustom, (MenuStyle)Enum.Parse(typeof(MenuStyle), rdb.Content.ToString()));
59 |
60 | UpdateTemplate();
61 | }
62 | #endregion
63 |
64 | #region Function
65 | private void UpdateVisualEffect()
66 | {
67 | switch (Helper.Tier)
68 | {
69 | case 1:
70 | case 2:
71 | AnimationHelper.SetSlideInFromBottom(GrpPalette, true);
72 | RectBackground.Fill = FindResource("GridBrush") as Brush;
73 | GroupBoxHelper.SetShadowColor(GrpPalette, Colors.LightGray);
74 | break;
75 | }
76 | }
77 | private void UpdateTemplate()
78 | {
79 | var color = Helper.GetColorByOffset(_linearGradientBrush.GradientStops, SldTheme.Value / 7);
80 |
81 | switch (MenuHelper.GetMenuStyle(MenuCustom))
82 | {
83 | case MenuStyle.Standard:
84 | MenuHelper.SetHoverBackground(MenuCustom, new Color() { A = 34, R = color.R, G = color.G, B = color.B }.ToBrush());
85 | MenuHelper.SetHoverForeground(MenuCustom, null);
86 | break;
87 | case MenuStyle.Modern:
88 | MenuHelper.SetHoverBackground(MenuCustom, null);
89 | MenuHelper.SetHoverForeground(MenuCustom, color.ToBrush());
90 | break;
91 | }
92 | }
93 |
94 | #endregion
95 |
96 |
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/UIBrowser/PartialViews/Custom/PendingBoxView.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
19 |
20 |
24 |
25 |
27 |
34 |
42 |
50 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/UIBrowser/OCRPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
37 |
51 |
65 |
66 |
67 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Common/AbstractModel.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 | using System;
19 | using System.Collections.Generic;
20 |
21 | namespace TencentCloud.Common
22 | {
23 | public abstract class AbstractModel
24 | {
25 | public abstract void ToMap(Dictionary map, string prefix);
26 |
27 | protected void SetParamSimple(Dictionary map, String key, V value)
28 | {
29 | if ((value!= null) && !value.Equals(default(V)) )
30 | {
31 | key = key.Substring(0, 1).ToUpper() + key.Substring(1);
32 | key = key.Replace("_", ".");
33 | map.Add(key, value.ToString());
34 | }
35 | }
36 |
37 | protected void SetParamArraySimple(Dictionary map, string prefix, V[] array)
38 | {
39 | if (array != null)
40 | {
41 | for (int i = 0; i < array.Length; i++)
42 | {
43 | this.SetParamSimple(map, prefix + i, array[i]);
44 | }
45 | }
46 | }
47 |
48 | protected void SetParamObj(Dictionary map, String prefix, V obj) where V: AbstractModel
49 | {
50 | if (obj != null)
51 | {
52 | obj.ToMap(map, prefix);
53 | }
54 | }
55 |
56 | protected void SetParamArrayObj(Dictionary map, String prefix, V[] array) where V : AbstractModel
57 | {
58 | if (array != null)
59 | {
60 | for (int i = 0; i < array.Length; i++)
61 | {
62 | this.SetParamObj(map, prefix + i + ".", array[i]);
63 | }
64 | }
65 | }
66 |
67 | ///
68 | /// Serialize an obect of AbstractModel into JSON string.
69 | ///
70 | /// A class inherited from AbstrctModel.
71 | /// An object of the class.
72 | /// JSON formatted string.
73 | public static string ToJsonString(V obj) where V: AbstractModel
74 | {
75 | return JsonConvert.SerializeObject(obj);
76 | }
77 |
78 | ///
79 | /// Deserialize JSON formatted string into an object of a class inherited from AbstractModel.
80 | ///
81 | /// A class inherited from AbstrctModel.
82 | /// JSON formatted string.
83 | /// An object of the class.
84 | public static V FromJsonString(string json)
85 | {
86 | return JsonConvert.DeserializeObject(json);
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/UIBrowser/HomeWindow.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/SharedResources/Panuon.UI.Silver.Core/Models/PendingBoxConfigurations.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver.Utils;
2 | using System.Windows;
3 | using System.Windows.Media;
4 |
5 | namespace Panuon.UI.Silver.Core
6 | {
7 | public class PendingBoxConfigurations
8 | {
9 | public PendingBoxConfigurations()
10 | {
11 | switch (System.Threading.Thread.CurrentThread.CurrentUICulture.IetfLanguageTag)
12 | {
13 | case "zh-CN":
14 | CancelButton = "取 消";
15 | break;
16 | }
17 | }
18 |
19 | ///
20 | /// Pending box style. Default : Standard.
21 | ///
22 | public PendingBoxStyle PendingBoxStyle { get; set; } = PendingBoxStyle.Standard;
23 |
24 | ///
25 | /// Loding style. Default : Ring2.
26 | ///
27 | public LoadingStyle LoadingStyle { get; set; } = LoadingStyle.Ring2;
28 |
29 | ///
30 | /// Theme Brush. Default : #3E3E3E.
31 | ///
32 | public Brush ButtonBrush { get; set; } = "#3E3E3E".ToColor().ToBrush();
33 |
34 | ///
35 | /// Loading stroke. Default : Transparent.
36 | ///
37 | public Brush LoadingBackground { get; set; } = Brushes.Transparent;
38 |
39 | ///
40 | /// Loading stroke cover. Default : #3E3E3E
41 | ///
42 | public Brush LoadingForeground { get; set; } = "#3E3E3E".ToColor().ToBrush();
43 |
44 | ///
45 | /// Foreground.
46 | ///
47 | public Brush Foreground { get; set; } = "#3E3E3E".ToColor().ToBrush();
48 |
49 | ///
50 | /// Min height. Default : 250.
51 | ///
52 | public double MinHeight { get; set; } = 200;
53 |
54 | ///
55 | /// Min width. Default : 500.
56 | ///
57 | public double MinWidth { get; set; } = 450;
58 |
59 | ///
60 | /// Min height. Default : 250.
61 | ///
62 | public double MaxHeight { get; set; } = 200;
63 |
64 | ///
65 | /// Min width. Default : 500.
66 | ///
67 | public double MaxWidth { get; set; } = 450;
68 |
69 | ///
70 | /// Font size. Default : 16.
71 | ///
72 | public double FontSize { get; set; } = 16;
73 |
74 | ///
75 | /// Loading size
76 | ///
77 | public double LoadingSize { get; set; } = 35;
78 |
79 | ///
80 | /// Show in taskbar.
81 | ///
82 | public bool ShowInTaskbar { get; set; } = true;
83 |
84 | ///
85 | /// Topmost.
86 | ///
87 | public bool Topmost { get; set; } = true;
88 |
89 | ///
90 | /// Window startup location.
91 | ///
92 | public WindowStartupLocation WindowStartupLocation { get; set; } = WindowStartupLocation.CenterScreen;
93 |
94 | ///
95 | /// Show owner's mask when popuped, and hide it when closed. Only worked with WindowX type owner.
96 | ///
97 | public bool InteractOwnerMask { get; set; } = true;
98 |
99 | ///
100 | /// Content of cancel button.
101 | ///
102 | public string CancelButton { get; set; } = "Cancel";
103 |
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/SpeechTranslateResponse.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 SpeechTranslateResponse : AbstractModel
25 | {
26 |
27 | ///
28 | /// 请求的SessionUuid直接返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 语音识别状态 1-进行中 0-完成
35 | ///
36 | [JsonProperty("RecognizeStatus")]
37 | public long? RecognizeStatus{ get; set; }
38 |
39 | ///
40 | /// 识别出的原文
41 | ///
42 | [JsonProperty("SourceText")]
43 | public string SourceText{ get; set; }
44 |
45 | ///
46 | /// 翻译出的译文
47 | ///
48 | [JsonProperty("TargetText")]
49 | public string TargetText{ get; set; }
50 |
51 | ///
52 | /// 第几个语音分片
53 | ///
54 | [JsonProperty("Seq")]
55 | public long? Seq{ get; set; }
56 |
57 | ///
58 | /// 原语言
59 | ///
60 | [JsonProperty("Source")]
61 | public string Source{ get; set; }
62 |
63 | ///
64 | /// 目标语言
65 | ///
66 | [JsonProperty("Target")]
67 | public string Target{ get; set; }
68 |
69 | ///
70 | /// 当请求的Mode参数填写bvad是,启动VadSeq。此时Seq会被设置为后台vad(静音检测)后的新序号,而VadSeq代表客户端原始Seq值
71 | ///
72 | [JsonProperty("VadSeq")]
73 | public long? VadSeq{ get; set; }
74 |
75 | ///
76 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
77 | ///
78 | [JsonProperty("RequestId")]
79 | public string RequestId{ get; set; }
80 |
81 |
82 | ///
83 | /// For internal usage only. DO NOT USE IT.
84 | ///
85 | public override void ToMap(Dictionary map, string prefix)
86 | {
87 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
88 | this.SetParamSimple(map, prefix + "RecognizeStatus", this.RecognizeStatus);
89 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
90 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText);
91 | this.SetParamSimple(map, prefix + "Seq", this.Seq);
92 | this.SetParamSimple(map, prefix + "Source", this.Source);
93 | this.SetParamSimple(map, prefix + "Target", this.Target);
94 | this.SetParamSimple(map, prefix + "VadSeq", this.VadSeq);
95 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
96 | }
97 | }
98 | }
99 |
100 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/SpeechTranslateResponse.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 SpeechTranslateResponse : AbstractModel
25 | {
26 |
27 | ///
28 | /// 请求的SessionUuid直接返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 语音识别状态 1-进行中 0-完成
35 | ///
36 | [JsonProperty("RecognizeStatus")]
37 | public long? RecognizeStatus{ get; set; }
38 |
39 | ///
40 | /// 识别出的原文
41 | ///
42 | [JsonProperty("SourceText")]
43 | public string SourceText{ get; set; }
44 |
45 | ///
46 | /// 翻译出的译文
47 | ///
48 | [JsonProperty("TargetText")]
49 | public string TargetText{ get; set; }
50 |
51 | ///
52 | /// 第几个语音分片
53 | ///
54 | [JsonProperty("Seq")]
55 | public long? Seq{ get; set; }
56 |
57 | ///
58 | /// 原语言
59 | ///
60 | [JsonProperty("Source")]
61 | public string Source{ get; set; }
62 |
63 | ///
64 | /// 目标语言
65 | ///
66 | [JsonProperty("Target")]
67 | public string Target{ get; set; }
68 |
69 | ///
70 | /// 当请求的Mode参数填写bvad是,启动VadSeq。此时Seq会被设置为后台vad(静音检测)后的新序号,而VadSeq代表客户端原始Seq值
71 | ///
72 | [JsonProperty("VadSeq")]
73 | public long? VadSeq{ get; set; }
74 |
75 | ///
76 | /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
77 | ///
78 | [JsonProperty("RequestId")]
79 | public string RequestId{ get; set; }
80 |
81 |
82 | ///
83 | /// For internal usage only. DO NOT USE IT.
84 | ///
85 | public override void ToMap(Dictionary map, string prefix)
86 | {
87 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
88 | this.SetParamSimple(map, prefix + "RecognizeStatus", this.RecognizeStatus);
89 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
90 | this.SetParamSimple(map, prefix + "TargetText", this.TargetText);
91 | this.SetParamSimple(map, prefix + "Seq", this.Seq);
92 | this.SetParamSimple(map, prefix + "Source", this.Source);
93 | this.SetParamSimple(map, prefix + "Target", this.Target);
94 | this.SetParamSimple(map, prefix + "VadSeq", this.VadSeq);
95 | this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
96 | }
97 | }
98 | }
99 |
100 |
--------------------------------------------------------------------------------
/SharedResources/Panuon.UI.Silver.Core/Models/BrushAnimation.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver.Utils;
2 | using System;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Media;
6 | using System.Windows.Media.Animation;
7 |
8 | namespace Panuon.UI.Silver.Core
9 | {
10 | public class BrushAnimation : AnimationTimeline
11 | {
12 | #region Properties
13 | public Brush From
14 | {
15 | get { return (Brush)GetValue(FromProperty); }
16 | set { SetValue(FromProperty, value); }
17 | }
18 |
19 | public static readonly DependencyProperty FromProperty =
20 | DependencyProperty.Register("From", typeof(Brush), typeof(BrushAnimation));
21 |
22 | public Brush To
23 | {
24 | get { return (Brush)GetValue(ToProperty); }
25 | set { SetValue(ToProperty, value); }
26 | }
27 |
28 | public static readonly DependencyProperty ToProperty =
29 | DependencyProperty.Register("To", typeof(Brush), typeof(BrushAnimation));
30 |
31 | #endregion
32 |
33 | #region Override
34 | public override Type TargetPropertyType => typeof(Brush);
35 |
36 | public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
37 | {
38 | return GetCurrentValue(defaultOriginValue as Brush, defaultDestinationValue as Brush, animationClock);
39 | }
40 |
41 | protected override Freezable CreateInstanceCore()
42 | {
43 | return new BrushAnimation();
44 | }
45 |
46 | public object GetCurrentValue(Brush defaultOriginValue, Brush defaultDestinationValue, AnimationClock animationClock)
47 | {
48 | if (!animationClock.CurrentProgress.HasValue)
49 | return Brushes.Transparent;
50 |
51 | defaultOriginValue = this.From ?? defaultOriginValue;
52 | defaultDestinationValue = this.To ?? defaultDestinationValue;
53 |
54 | if (animationClock.CurrentProgress.Value == 0)
55 | return defaultOriginValue;
56 | if (animationClock.CurrentProgress.Value == 1)
57 | return defaultDestinationValue;
58 |
59 | if (To != null)
60 | {
61 | if (defaultDestinationValue is SolidColorBrush && ((SolidColorBrush)defaultDestinationValue).Color.A < 255
62 | && (!(defaultOriginValue is SolidColorBrush) || (((SolidColorBrush)defaultOriginValue).Color.A == 255)))
63 | {
64 | return BrushUtils.GetVisualBrush(defaultDestinationValue, defaultOriginValue, 1 - animationClock.CurrentProgress.Value);
65 | }
66 | else
67 | {
68 | return BrushUtils.GetVisualBrush(defaultOriginValue, defaultDestinationValue, animationClock.CurrentProgress.Value);
69 | }
70 | }
71 | else
72 | {
73 | if (defaultOriginValue is SolidColorBrush && ((SolidColorBrush)defaultOriginValue).Color.A < 255
74 | && (!(defaultDestinationValue is SolidColorBrush) || (((SolidColorBrush)defaultDestinationValue).Color.A == 255)))
75 | {
76 | return BrushUtils.GetVisualBrush(defaultOriginValue, defaultDestinationValue, animationClock.CurrentProgress.Value);
77 | }
78 | else
79 | {
80 | return BrushUtils.GetVisualBrush(defaultDestinationValue, defaultOriginValue, 1 - animationClock.CurrentProgress.Value);
81 | }
82 | }
83 | }
84 | #endregion
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/SharedResources/Panuon.UI.Silver.Core/Models/MessageBoxXConfigurations.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver.Utils;
2 | using System.Windows;
3 | using System.Windows.Media;
4 |
5 | namespace Panuon.UI.Silver.Core
6 | {
7 | public class MessageBoxXConfigurations
8 | {
9 | public MessageBoxXConfigurations()
10 | {
11 | switch (System.Threading.Thread.CurrentThread.CurrentUICulture.IetfLanguageTag)
12 | {
13 | case "zh-CN":
14 | YesButton = "是 的";
15 | NoButton = "不";
16 | OKButton = "好 的";
17 | CancelButton = "取 消";
18 | break;
19 | }
20 | }
21 |
22 | ///
23 | /// MessageBox style.
24 | ///
25 | public MessageBoxStyle MessageBoxStyle { get; set; } = MessageBoxStyle.Standard;
26 |
27 | ///
28 | /// MessageBox icon
29 | ///
30 | public MessageBoxIcon MessageBoxIcon { get; set; } = MessageBoxIcon.Info;
31 |
32 | ///
33 | /// Default button
34 | ///
35 | public DefaultButton DefaultButton { get; set; } = DefaultButton.YesOK;
36 |
37 | ///
38 | /// Button Brush
39 | ///
40 | public Brush ButtonBrush { get; set; } = "#55CEF1".ToColor().ToBrush();
41 |
42 | ///
43 | /// Min height. Default : 250.
44 | ///
45 | public double MinHeight { get; set; } = 250;
46 |
47 | ///
48 | /// Min width. Default : 500.
49 | ///
50 | public double MinWidth { get; set; } = 500;
51 |
52 | ///
53 | /// Font size. Default : 16.
54 | ///
55 | public double FontSize { get; set; } = 16;
56 |
57 | ///
58 | /// Max content height. default : 100.
59 | ///
60 | public double MaxContentHeight { get; set; } = 100;
61 |
62 | ///
63 | /// Max content width. Default : 300;
64 | ///
65 | public double MaxContentWidth { get; set; } = 300;
66 |
67 | ///
68 | /// Show in taskbar.
69 | ///
70 | public bool ShowInTaskbar { get; set; } = true;
71 |
72 | ///
73 | /// Topmost.
74 | ///
75 | public bool Topmost { get; set; } = true;
76 |
77 | ///
78 | /// Window startup location.
79 | ///
80 | public WindowStartupLocation WindowStartupLocation { get; set; } = WindowStartupLocation.CenterScreen;
81 |
82 | ///
83 | /// Show owner's mask when popuped, and hide it when closed. Only worked with WindowX type owner.
84 | ///
85 | public bool InteractOwnerMask { get; set; } = true;
86 |
87 | ///
88 | /// Content of yes button.
89 | ///
90 | public string YesButton { get; set; } = "Yes";
91 |
92 | ///
93 | /// Content of no button.
94 | ///
95 | public string NoButton { get; set; } = "No";
96 |
97 | ///
98 | /// Content of ok button.
99 | ///
100 | public string OKButton { get; set; } = "OK";
101 |
102 | ///
103 | /// Content of cancel button.
104 | ///
105 | public string CancelButton { get; set; } = "Cancel";
106 |
107 | ///
108 | /// Reverse button sequence.
109 | ///
110 | public bool ReverseButtonSequence { get; set; }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/ImageTranslateRequest.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 ImageTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 唯一id,返回时原样返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// doc:文档扫描
35 | ///
36 | [JsonProperty("Scene")]
37 | public string Scene{ get; set; }
38 |
39 | ///
40 | /// 图片数据的Base64字符串,图片大小上限为4M,建议对源图片进行一定程度压缩
41 | ///
42 | [JsonProperty("Data")]
43 | public string Data{ get; set; }
44 |
45 | ///
46 | /// 源语言,支持语言列表: auto:自动识别(识别为一种语言) zh:简体中文 zh-TW:繁体中文 en:英语 ja:日语 ko:韩语 ru:俄语 fr:法语 de:德语 it:意大利语 es:西班牙语 pt:葡萄牙语 ms:马来西亚语 th:泰语 vi:越南语
47 | ///
48 | [JsonProperty("Source")]
49 | public string Source{ get; set; }
50 |
51 | ///
52 | /// 目标语言,各源语言的目标语言支持列表如下:
53 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
54 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
55 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
56 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
57 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
58 | /// ru:俄语:zh(中文)、en(英语)
59 | /// fr:法语:zh(中文)、en(英语)
60 | /// de:德语:zh(中文)、en(英语)
61 | /// it:意大利语:zh(中文)、en(英语)
62 | /// es:西班牙语:zh(中文)、en(英语)
63 | /// pt:葡萄牙语:zh(中文)、en(英语)
64 | /// ms:马来西亚语:zh(中文)、en(英语)
65 | /// th:泰语:zh(中文)、en(英语)
66 | /// vi:越南语:zh(中文)、en(英语)
67 | ///
68 | [JsonProperty("Target")]
69 | public string Target{ get; set; }
70 |
71 | ///
72 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
73 | ///
74 | [JsonProperty("ProjectId")]
75 | public long? ProjectId{ get; set; }
76 |
77 |
78 | ///
79 | /// For internal usage only. DO NOT USE IT.
80 | ///
81 | public override void ToMap(Dictionary map, string prefix)
82 | {
83 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
84 | this.SetParamSimple(map, prefix + "Scene", this.Scene);
85 | this.SetParamSimple(map, prefix + "Data", this.Data);
86 | this.SetParamSimple(map, prefix + "Source", this.Source);
87 | this.SetParamSimple(map, prefix + "Target", this.Target);
88 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
89 | }
90 | }
91 | }
92 |
93 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/ImageTranslateRequest.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 ImageTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 唯一id,返回时原样返回
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// doc:文档扫描
35 | ///
36 | [JsonProperty("Scene")]
37 | public string Scene{ get; set; }
38 |
39 | ///
40 | /// 图片数据的Base64字符串,图片大小上限为4M,建议对源图片进行一定程度压缩
41 | ///
42 | [JsonProperty("Data")]
43 | public string Data{ get; set; }
44 |
45 | ///
46 | /// 源语言,支持语言列表: auto:自动识别(识别为一种语言) zh:简体中文 zh-TW:繁体中文 en:英语 ja:日语 ko:韩语 ru:俄语 fr:法语 de:德语 it:意大利语 es:西班牙语 pt:葡萄牙语 ms:马来西亚语 th:泰语 vi:越南语
47 | ///
48 | [JsonProperty("Source")]
49 | public string Source{ get; set; }
50 |
51 | ///
52 | /// 目标语言,各源语言的目标语言支持列表如下:
53 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
54 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
55 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、ru(俄语)、fr(法语)、de(德语)、it(意大利语)、es(西班牙语)、pt(葡萄牙语)、ms(马来语)、th(泰语)、vi(越南语)
56 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
57 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
58 | /// ru:俄语:zh(中文)、en(英语)
59 | /// fr:法语:zh(中文)、en(英语)
60 | /// de:德语:zh(中文)、en(英语)
61 | /// it:意大利语:zh(中文)、en(英语)
62 | /// es:西班牙语:zh(中文)、en(英语)
63 | /// pt:葡萄牙语:zh(中文)、en(英语)
64 | /// ms:马来西亚语:zh(中文)、en(英语)
65 | /// th:泰语:zh(中文)、en(英语)
66 | /// vi:越南语:zh(中文)、en(英语)
67 | ///
68 | [JsonProperty("Target")]
69 | public string Target{ get; set; }
70 |
71 | ///
72 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
73 | ///
74 | [JsonProperty("ProjectId")]
75 | public long? ProjectId{ get; set; }
76 |
77 |
78 | ///
79 | /// For internal usage only. DO NOT USE IT.
80 | ///
81 | public override void ToMap(Dictionary map, string prefix)
82 | {
83 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
84 | this.SetParamSimple(map, prefix + "Scene", this.Scene);
85 | this.SetParamSimple(map, prefix + "Data", this.Data);
86 | this.SetParamSimple(map, prefix + "Source", this.Source);
87 | this.SetParamSimple(map, prefix + "Target", this.Target);
88 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
89 | }
90 | }
91 | }
92 |
93 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/SpeechTranslateRequest.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 SpeechTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 一段完整的语音对应一个SessionUuid
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 音频中的语言类型,支持语言列表 zh : 中文 en : 英文
35 | ///
36 | [JsonProperty("Source")]
37 | public string Source{ get; set; }
38 |
39 | ///
40 | /// 翻译目标语言类型,支持的语言列表 zh : 中文 en : 英文
41 | ///
42 | [JsonProperty("Target")]
43 | public string Target{ get; set; }
44 |
45 | ///
46 | /// pcm : 146 speex : 16779154 mp3 : 83886080
47 | ///
48 | [JsonProperty("AudioFormat")]
49 | public long? AudioFormat{ get; set; }
50 |
51 | ///
52 | /// 语音分片的序号,从0开始
53 | ///
54 | [JsonProperty("Seq")]
55 | public long? Seq{ get; set; }
56 |
57 | ///
58 | /// 是否最后一片语音分片,0-否,1-是
59 | ///
60 | [JsonProperty("IsEnd")]
61 | public long? IsEnd{ get; set; }
62 |
63 | ///
64 | /// 语音分片内容进行 Base64 编码后的字符串。音频内容需包含有效并可识别的文本信息。
65 | ///
66 | [JsonProperty("Data")]
67 | public string Data{ get; set; }
68 |
69 | ///
70 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
71 | ///
72 | [JsonProperty("ProjectId")]
73 | public long? ProjectId{ get; set; }
74 |
75 | ///
76 | /// 识别模式,该参数已废弃
77 | ///
78 | [JsonProperty("Mode")]
79 | public string Mode{ get; set; }
80 |
81 | ///
82 | /// 该参数已废弃
83 | ///
84 | [JsonProperty("TransType")]
85 | public long? TransType{ get; set; }
86 |
87 |
88 | ///
89 | /// For internal usage only. DO NOT USE IT.
90 | ///
91 | public override void ToMap(Dictionary map, string prefix)
92 | {
93 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
94 | this.SetParamSimple(map, prefix + "Source", this.Source);
95 | this.SetParamSimple(map, prefix + "Target", this.Target);
96 | this.SetParamSimple(map, prefix + "AudioFormat", this.AudioFormat);
97 | this.SetParamSimple(map, prefix + "Seq", this.Seq);
98 | this.SetParamSimple(map, prefix + "IsEnd", this.IsEnd);
99 | this.SetParamSimple(map, prefix + "Data", this.Data);
100 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
101 | this.SetParamSimple(map, prefix + "Mode", this.Mode);
102 | this.SetParamSimple(map, prefix + "TransType", this.TransType);
103 | }
104 | }
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/SpeechTranslateRequest.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 SpeechTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 一段完整的语音对应一个SessionUuid
29 | ///
30 | [JsonProperty("SessionUuid")]
31 | public string SessionUuid{ get; set; }
32 |
33 | ///
34 | /// 音频中的语言类型,支持语言列表 zh : 中文 en : 英文
35 | ///
36 | [JsonProperty("Source")]
37 | public string Source{ get; set; }
38 |
39 | ///
40 | /// 翻译目标语言类型,支持的语言列表 zh : 中文 en : 英文
41 | ///
42 | [JsonProperty("Target")]
43 | public string Target{ get; set; }
44 |
45 | ///
46 | /// pcm : 146 speex : 16779154 mp3 : 83886080
47 | ///
48 | [JsonProperty("AudioFormat")]
49 | public long? AudioFormat{ get; set; }
50 |
51 | ///
52 | /// 语音分片的序号,从0开始
53 | ///
54 | [JsonProperty("Seq")]
55 | public long? Seq{ get; set; }
56 |
57 | ///
58 | /// 是否最后一片语音分片,0-否,1-是
59 | ///
60 | [JsonProperty("IsEnd")]
61 | public long? IsEnd{ get; set; }
62 |
63 | ///
64 | /// 语音分片内容进行 Base64 编码后的字符串。音频内容需包含有效并可识别的文本信息。
65 | ///
66 | [JsonProperty("Data")]
67 | public string Data{ get; set; }
68 |
69 | ///
70 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
71 | ///
72 | [JsonProperty("ProjectId")]
73 | public long? ProjectId{ get; set; }
74 |
75 | ///
76 | /// 识别模式,该参数已废弃
77 | ///
78 | [JsonProperty("Mode")]
79 | public string Mode{ get; set; }
80 |
81 | ///
82 | /// 该参数已废弃
83 | ///
84 | [JsonProperty("TransType")]
85 | public long? TransType{ get; set; }
86 |
87 |
88 | ///
89 | /// For internal usage only. DO NOT USE IT.
90 | ///
91 | public override void ToMap(Dictionary map, string prefix)
92 | {
93 | this.SetParamSimple(map, prefix + "SessionUuid", this.SessionUuid);
94 | this.SetParamSimple(map, prefix + "Source", this.Source);
95 | this.SetParamSimple(map, prefix + "Target", this.Target);
96 | this.SetParamSimple(map, prefix + "AudioFormat", this.AudioFormat);
97 | this.SetParamSimple(map, prefix + "Seq", this.Seq);
98 | this.SetParamSimple(map, prefix + "IsEnd", this.IsEnd);
99 | this.SetParamSimple(map, prefix + "Data", this.Data);
100 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
101 | this.SetParamSimple(map, prefix + "Mode", this.Mode);
102 | this.SetParamSimple(map, prefix + "TransType", this.TransType);
103 | }
104 | }
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/UIBrowser/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
24 |
25 |
26 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
49 |
50 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
69 |
72 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Common/Sign.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 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Security.Cryptography;
21 | using System.Text;
22 | using System.Threading.Tasks;
23 | using TencentCloud.Common.Profile;
24 |
25 | namespace TencentCloud.Common
26 | {
27 | ///
28 | /// Signature helper class.
29 | ///
30 | public class SignHelper
31 | {
32 | ///Generate signature.
33 | /// Credential SecretKey.
34 | /// Plain text to be signed.
35 | ///Signature.
36 | public static string Sign(string signKey, string secret, string SignatureMethod)
37 | {
38 | string signRet = string.Empty;
39 | if (SignatureMethod == ClientProfile.SIGN_SHA256)
40 | {
41 | using (HMACSHA256 mac = new HMACSHA256(Encoding.UTF8.GetBytes(signKey)))
42 | {
43 | byte[] hash = mac.ComputeHash(Encoding.UTF8.GetBytes(secret));
44 | signRet = Convert.ToBase64String(hash);
45 | }
46 | }
47 | else if(SignatureMethod == ClientProfile.SIGN_SHA1)
48 | {
49 | using (HMACSHA1 mac = new HMACSHA1(Encoding.UTF8.GetBytes(signKey)))
50 | {
51 | byte[] hash = mac.ComputeHash(Encoding.UTF8.GetBytes(secret));
52 | signRet = Convert.ToBase64String(hash);
53 | }
54 | }
55 | return signRet;
56 | }
57 |
58 | public static string SHA256Hex(string s)
59 | {
60 | using (SHA256 algo = SHA256.Create())
61 | {
62 | byte[] hashbytes = algo.ComputeHash(Encoding.UTF8.GetBytes(s));
63 | StringBuilder builder = new StringBuilder();
64 | for ( int i = 0; i < hashbytes.Length; ++i )
65 | {
66 | builder.Append(hashbytes[i].ToString("x2"));
67 | }
68 | return builder.ToString();
69 | }
70 | }
71 |
72 | public static byte [] HmacSHA256(byte [] key, byte [] msg)
73 | {
74 | using (HMACSHA256 mac = new HMACSHA256(key))
75 | {
76 | return mac.ComputeHash(msg);
77 | }
78 | }
79 |
80 | private static string BuildParamStr(SortedDictionary requestParams, string requestMethod = "GET")
81 | {
82 | string retStr = "";
83 | foreach (string key in requestParams.Keys)
84 | {
85 | retStr += string.Format("{0}={1}&", key, requestParams[key]);
86 | }
87 | return retStr.TrimEnd('&');
88 | }
89 |
90 | public static string MakeSignPlainText(SortedDictionary requestParams, string requestMethod , string requestHost, string requestPath)
91 | {
92 | string retStr = "";
93 | retStr += requestMethod;
94 | retStr += requestHost;
95 | retStr += requestPath;
96 | retStr += "?";
97 | retStr += BuildParamStr(requestParams);
98 | return retStr;
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/UIBrowser/PartialViews/Custom/PendingBoxView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Panuon.UI.Silver;
2 | using Panuon.UI.Silver.Core;
3 | using System.Threading.Tasks;
4 | using System.Windows;
5 | using System.Windows.Controls;
6 |
7 | namespace UIBrowser.PartialViews.Custom
8 | {
9 | ///
10 | /// WindowView.xaml 的交互逻辑
11 | ///
12 | public partial class PendingBoxView : UserControl
13 | {
14 | #region Identity
15 | 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.";
16 | private string _message2 = "This is a test message.";
17 | #endregion
18 |
19 | public PendingBoxView()
20 | {
21 | InitializeComponent();
22 | }
23 |
24 | #region Event Handler
25 | private async void BtnStandard_Click(object sender, RoutedEventArgs e)
26 | {
27 | var handler = PendingBox.Show("Please wait (1/2)...", "Processing", false, Application.Current.MainWindow, new PendingBoxConfigurations()
28 | {
29 | LoadingForeground = "#5DBBEC".ToColor().ToBrush(),
30 | ButtonBrush = "#5DBBEC".ToColor().ToBrush(),
31 | });
32 | await Task.Delay(2000);
33 | handler.UpdateMessage("Almost complete (2/2)...");
34 | await Task.Delay(2000);
35 | handler.Close();
36 | }
37 |
38 | private async void BtnStandardCancelable_Click(object sender, RoutedEventArgs e)
39 | {
40 | var handler = PendingBox.Show("Please wait (1/2)...", "Processing", true, Application.Current.MainWindow, new PendingBoxConfigurations()
41 | {
42 | LoadingForeground = "#5DBBEC".ToColor().ToBrush(),
43 | ButtonBrush = "#5DBBEC".ToColor().ToBrush(),
44 | });
45 | handler.Cancel += delegate
46 | {
47 | handler.Close();
48 | };
49 |
50 | await Task.Delay(2000);
51 | handler.UpdateMessage("Almost complete (2/2)...");
52 | await Task.Delay(2000);
53 | handler.Close();
54 | }
55 |
56 | private async void BtnClassic_Click(object sender, RoutedEventArgs e)
57 | {
58 | var handler = PendingBox.Show("Please wait (1/2)...", "Processing", false, Application.Current.MainWindow, new PendingBoxConfigurations()
59 | {
60 | LoadingForeground = "#5DBBEC".ToColor().ToBrush(),
61 | ButtonBrush = "#5DBBEC".ToColor().ToBrush(),
62 | LoadingSize = 50,
63 | PendingBoxStyle = PendingBoxStyle.Classic,
64 | FontSize = 14,
65 | });
66 | await Task.Delay(2000);
67 | handler.UpdateMessage("Almost complete (2/2)...");
68 | await Task.Delay(2000);
69 | handler.Close();
70 | }
71 |
72 | private async void BtnClassicCancelable_Click(object sender, RoutedEventArgs e)
73 | {
74 | var handler = PendingBox.Show("Please wait (1/2)...", "Processing", true, Application.Current.MainWindow, new PendingBoxConfigurations()
75 | {
76 | LoadingForeground = "#5DBBEC".ToColor().ToBrush(),
77 | ButtonBrush = "#5DBBEC".ToColor().ToBrush(),
78 | LoadingSize = 50,
79 | PendingBoxStyle = PendingBoxStyle.Classic,
80 | FontSize = 14,
81 | });
82 | handler.Cancel += delegate
83 | {
84 | handler.Close();
85 | };
86 |
87 | await Task.Delay(2000);
88 | handler.UpdateMessage("Almost complete (2/2)...");
89 | await Task.Delay(2000);
90 | handler.Close();
91 | }
92 | #endregion
93 |
94 | }
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/Net45/Panuon.UI.Silver/Panuon.UI.Silver.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2}
8 | library
9 | Panuon.UI.Silver
10 | Panuon.UI.Silver
11 | v4.5
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 | false
27 |
28 |
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 4.0
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Code
58 |
59 |
60 | True
61 | True
62 | Resources.resx
63 |
64 |
65 | True
66 | Settings.settings
67 | True
68 |
69 |
70 | ResXFileCodeGenerator
71 | Resources.Designer.cs
72 |
73 |
74 | SettingsSingleFileGenerator
75 | Settings.Designer.cs
76 |
77 |
78 |
79 |
80 |
81 | MSBuild:Compile
82 | Designer
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/VNREX.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.852
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIBrowser", "UIBrowser\UIBrowser.csproj", "{F8A6F19C-B283-46F1-8576-7A2B1F4EB8A7}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2} = {461FE59D-57B8-4599-8E7D-439E27A2BBB2}
9 | EndProjectSection
10 | EndProject
11 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Net4.0", "Net4.0", "{D380FB9B-6461-4F58-B8EF-96C2FDA2A856}"
12 | EndProject
13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Panuon.UI.Silver", "Net40\Panuon.UI.Silver\Panuon.UI.Silver.csproj", "{527FF1E2-A99C-40C2-B589-69B5BAD77F5A}"
14 | EndProject
15 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Net4.5", "Net4.5", "{218C15E8-B6A4-4CF1-8D5F-EB567F9AF8C8}"
16 | EndProject
17 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Panuon.UI.Silver", "Net45\Panuon.UI.Silver\Panuon.UI.Silver.csproj", "{461FE59D-57B8-4599-8E7D-439E27A2BBB2}"
18 | EndProject
19 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedResources", "SharedResources", "{637442C4-FAFA-457B-B379-696A0185B624}"
20 | EndProject
21 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Panuon.UI.Silver.Core", "SharedResources\Panuon.UI.Silver.Core\Panuon.UI.Silver.Core.shproj", "{DC698B56-EA97-4D48-9E82-E261324EC475}"
22 | EndProject
23 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Panuon.UI.Silver", "SharedResources\Panuon.UI.Silver\Panuon.UI.Silver.shproj", "{2F11D2D6-B0CC-49F6-944B-2AD8CD905644}"
24 | EndProject
25 | Global
26 | GlobalSection(SharedMSBuildProjectFiles) = preSolution
27 | SharedResources\Panuon.UI.Silver\Panuon.UI.Silver.projitems*{2f11d2d6-b0cc-49f6-944b-2ad8cd905644}*SharedItemsImports = 13
28 | SharedResources\Panuon.UI.Silver.Core\Panuon.UI.Silver.Core.projitems*{461fe59d-57b8-4599-8e7d-439e27a2bbb2}*SharedItemsImports = 4
29 | SharedResources\Panuon.UI.Silver\Panuon.UI.Silver.projitems*{461fe59d-57b8-4599-8e7d-439e27a2bbb2}*SharedItemsImports = 4
30 | SharedResources\Panuon.UI.Silver.Core\Panuon.UI.Silver.Core.projitems*{527ff1e2-a99c-40c2-b589-69b5bad77f5a}*SharedItemsImports = 4
31 | SharedResources\Panuon.UI.Silver\Panuon.UI.Silver.projitems*{527ff1e2-a99c-40c2-b589-69b5bad77f5a}*SharedItemsImports = 4
32 | SharedResources\Panuon.UI.Silver.Core\Panuon.UI.Silver.Core.projitems*{dc698b56-ea97-4d48-9e82-e261324ec475}*SharedItemsImports = 13
33 | EndGlobalSection
34 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
35 | Debug|Any CPU = Debug|Any CPU
36 | Release|Any CPU = Release|Any CPU
37 | EndGlobalSection
38 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
39 | {F8A6F19C-B283-46F1-8576-7A2B1F4EB8A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40 | {F8A6F19C-B283-46F1-8576-7A2B1F4EB8A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
41 | {F8A6F19C-B283-46F1-8576-7A2B1F4EB8A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 | {F8A6F19C-B283-46F1-8576-7A2B1F4EB8A7}.Release|Any CPU.Build.0 = Release|Any CPU
43 | {527FF1E2-A99C-40C2-B589-69B5BAD77F5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 | {527FF1E2-A99C-40C2-B589-69B5BAD77F5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 | {527FF1E2-A99C-40C2-B589-69B5BAD77F5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
46 | {527FF1E2-A99C-40C2-B589-69B5BAD77F5A}.Release|Any CPU.Build.0 = Release|Any CPU
47 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
49 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
50 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2}.Release|Any CPU.Build.0 = Release|Any CPU
51 | EndGlobalSection
52 | GlobalSection(SolutionProperties) = preSolution
53 | HideSolutionNode = FALSE
54 | EndGlobalSection
55 | GlobalSection(NestedProjects) = preSolution
56 | {527FF1E2-A99C-40C2-B589-69B5BAD77F5A} = {D380FB9B-6461-4F58-B8EF-96C2FDA2A856}
57 | {461FE59D-57B8-4599-8E7D-439E27A2BBB2} = {218C15E8-B6A4-4CF1-8D5F-EB567F9AF8C8}
58 | {DC698B56-EA97-4D48-9E82-E261324EC475} = {637442C4-FAFA-457B-B379-696A0185B624}
59 | {2F11D2D6-B0CC-49F6-944B-2AD8CD905644} = {637442C4-FAFA-457B-B379-696A0185B624}
60 | EndGlobalSection
61 | GlobalSection(ExtensibilityGlobals) = postSolution
62 | SolutionGuid = {9B3F19A6-8D38-45CA-945A-A2D448FD75DB}
63 | EndGlobalSection
64 | EndGlobal
65 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/TextTranslateBatchRequest.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 TextTranslateBatchRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 源语言,支持:
29 | /// auto:自动识别(识别为一种语言)
30 | /// zh:简体中文
31 | /// zh-TW:繁体中文
32 | /// en:英语
33 | /// ja:日语
34 | /// ko:韩语
35 | /// fr:法语
36 | /// es:西班牙语
37 | /// it:意大利语
38 | /// de:德语
39 | /// tr:土耳其语
40 | /// ru:俄语
41 | /// pt:葡萄牙语
42 | /// vi:越南语
43 | /// id:印尼语
44 | /// th:泰语
45 | /// ms:马来西亚语
46 | /// ar:阿拉伯语
47 | /// hi:印地语
48 | ///
49 | [JsonProperty("Source")]
50 | public string Source{ get; set; }
51 |
52 | ///
53 | /// 目标语言,各源语言的目标语言支持列表如下
54 | ///
55 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
56 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
57 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)、ar(阿拉伯语)、hi(印地语)
58 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
59 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
60 | /// fr(法语):zh(中文)、en(英语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
61 | /// es(西班牙语):zh(中文)、en(英语)、fr(法语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
62 | /// it(意大利语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
63 | /// de(德语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
64 | /// tr(土耳其语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、ru(俄语)、pt(葡萄牙语)
65 | /// ru(俄语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、pt(葡萄牙语)
66 | /// pt(葡萄牙语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)
67 | /// vi(越南语):zh(中文)、en(英语)
68 | /// id(印尼语):zh(中文)、en(英语)
69 | /// th(泰语):zh(中文)、en(英语)
70 | /// ms(马来语):zh(中文)、en(英语)
71 | /// ar(阿拉伯语):en(英语)
72 | /// hi(印地语):en(英语)
73 | ///
74 | [JsonProperty("Target")]
75 | public string Target{ get; set; }
76 |
77 | ///
78 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
79 | ///
80 | [JsonProperty("ProjectId")]
81 | public long? ProjectId{ get; set; }
82 |
83 | ///
84 | /// 待翻译的文本列表,批量接口可以以数组方式在一次请求中填写多个待翻译文本。文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败,请传入有效文本,html标记等非常规翻译文本可能会翻译失败。单次请求的文本长度总和需要低于2000。
85 | ///
86 | [JsonProperty("SourceTextList")]
87 | public string[] SourceTextList{ get; set; }
88 |
89 |
90 | ///
91 | /// For internal usage only. DO NOT USE IT.
92 | ///
93 | public override void ToMap(Dictionary map, string prefix)
94 | {
95 | this.SetParamSimple(map, prefix + "Source", this.Source);
96 | this.SetParamSimple(map, prefix + "Target", this.Target);
97 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
98 | this.SetParamArraySimple(map, prefix + "SourceTextList.", this.SourceTextList);
99 | }
100 | }
101 | }
102 |
103 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/TextTranslateBatchRequest.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 TextTranslateBatchRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 源语言,支持:
29 | /// auto:自动识别(识别为一种语言)
30 | /// zh:简体中文
31 | /// zh-TW:繁体中文
32 | /// en:英语
33 | /// ja:日语
34 | /// ko:韩语
35 | /// fr:法语
36 | /// es:西班牙语
37 | /// it:意大利语
38 | /// de:德语
39 | /// tr:土耳其语
40 | /// ru:俄语
41 | /// pt:葡萄牙语
42 | /// vi:越南语
43 | /// id:印尼语
44 | /// th:泰语
45 | /// ms:马来西亚语
46 | /// ar:阿拉伯语
47 | /// hi:印地语
48 | ///
49 | [JsonProperty("Source")]
50 | public string Source{ get; set; }
51 |
52 | ///
53 | /// 目标语言,各源语言的目标语言支持列表如下
54 | ///
55 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
56 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
57 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)、ar(阿拉伯语)、hi(印地语)
58 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
59 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
60 | /// fr(法语):zh(中文)、en(英语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
61 | /// es(西班牙语):zh(中文)、en(英语)、fr(法语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
62 | /// it(意大利语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
63 | /// de(德语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
64 | /// tr(土耳其语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、ru(俄语)、pt(葡萄牙语)
65 | /// ru(俄语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、pt(葡萄牙语)
66 | /// pt(葡萄牙语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)
67 | /// vi(越南语):zh(中文)、en(英语)
68 | /// id(印尼语):zh(中文)、en(英语)
69 | /// th(泰语):zh(中文)、en(英语)
70 | /// ms(马来语):zh(中文)、en(英语)
71 | /// ar(阿拉伯语):en(英语)
72 | /// hi(印地语):en(英语)
73 | ///
74 | [JsonProperty("Target")]
75 | public string Target{ get; set; }
76 |
77 | ///
78 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
79 | ///
80 | [JsonProperty("ProjectId")]
81 | public long? ProjectId{ get; set; }
82 |
83 | ///
84 | /// 待翻译的文本列表,批量接口可以以数组方式在一次请求中填写多个待翻译文本。文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败,请传入有效文本,html标记等非常规翻译文本可能会翻译失败。单次请求的文本长度总和需要低于2000。
85 | ///
86 | [JsonProperty("SourceTextList")]
87 | public string[] SourceTextList{ get; set; }
88 |
89 |
90 | ///
91 | /// For internal usage only. DO NOT USE IT.
92 | ///
93 | public override void ToMap(Dictionary map, string prefix)
94 | {
95 | this.SetParamSimple(map, prefix + "Source", this.Source);
96 | this.SetParamSimple(map, prefix + "Target", this.Target);
97 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
98 | this.SetParamArraySimple(map, prefix + "SourceTextList.", this.SourceTextList);
99 | }
100 | }
101 | }
102 |
103 |
--------------------------------------------------------------------------------
/UIBrowser/TTSPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
38 |
48 |
49 |
50 |
64 |
78 |
79 |
80 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/Models/TextTranslateRequest.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 TextTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 待翻译的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败,请传入有效文本,html标记等非常规翻译文本可能会翻译失败。单次请求的文本长度需要低于2000。
29 | ///
30 | [JsonProperty("SourceText")]
31 | public string SourceText{ get; set; }
32 |
33 | ///
34 | /// 源语言,支持:
35 | /// auto:自动识别(识别为一种语言)
36 | /// zh:简体中文
37 | /// zh-TW:繁体中文
38 | /// en:英语
39 | /// ja:日语
40 | /// ko:韩语
41 | /// fr:法语
42 | /// es:西班牙语
43 | /// it:意大利语
44 | /// de:德语
45 | /// tr:土耳其语
46 | /// ru:俄语
47 | /// pt:葡萄牙语
48 | /// vi:越南语
49 | /// id:印尼语
50 | /// th:泰语
51 | /// ms:马来西亚语
52 | /// ar:阿拉伯语
53 | /// hi:印地语
54 | ///
55 | [JsonProperty("Source")]
56 | public string Source{ get; set; }
57 |
58 | ///
59 | /// 目标语言,各源语言的目标语言支持列表如下
60 | ///
61 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
62 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
63 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)、ar(阿拉伯语)、hi(印地语)
64 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
65 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
66 | /// fr(法语):zh(中文)、en(英语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
67 | /// es(西班牙语):zh(中文)、en(英语)、fr(法语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
68 | /// it(意大利语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
69 | /// de(德语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
70 | /// tr(土耳其语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、ru(俄语)、pt(葡萄牙语)
71 | /// ru(俄语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、pt(葡萄牙语)
72 | /// pt(葡萄牙语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)
73 | /// vi(越南语):zh(中文)、en(英语)
74 | /// id(印尼语):zh(中文)、en(英语)
75 | /// th(泰语):zh(中文)、en(英语)
76 | /// ms(马来语):zh(中文)、en(英语)
77 | /// ar(阿拉伯语):en(英语)
78 | /// hi(印地语):en(英语)
79 | ///
80 | [JsonProperty("Target")]
81 | public string Target{ get; set; }
82 |
83 | ///
84 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
85 | ///
86 | [JsonProperty("ProjectId")]
87 | public long? ProjectId{ get; set; }
88 |
89 | ///
90 | /// 用来标记不希望被翻译的文本内容,如句子中的特殊符号、人名、地名等;每次请求只支持配置一个不被翻译的单词;仅支持配置人名、地名等名词,不要配置动词或短语,否则会影响翻译结果。
91 | ///
92 | [JsonProperty("UntranslatedText")]
93 | public string UntranslatedText{ get; set; }
94 |
95 |
96 | ///
97 | /// For internal usage only. DO NOT USE IT.
98 | ///
99 | public override void ToMap(Dictionary map, string prefix)
100 | {
101 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
102 | this.SetParamSimple(map, prefix + "Source", this.Source);
103 | this.SetParamSimple(map, prefix + "Target", this.Target);
104 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
105 | this.SetParamSimple(map, prefix + "UntranslatedText", this.UntranslatedText);
106 | }
107 | }
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/UIBrowser/VNREX/Tmt/V20180321/Models/TextTranslateRequest.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 TextTranslateRequest : AbstractModel
25 | {
26 |
27 | ///
28 | /// 待翻译的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败,请传入有效文本,html标记等非常规翻译文本可能会翻译失败。单次请求的文本长度需要低于2000。
29 | ///
30 | [JsonProperty("SourceText")]
31 | public string SourceText{ get; set; }
32 |
33 | ///
34 | /// 源语言,支持:
35 | /// auto:自动识别(识别为一种语言)
36 | /// zh:简体中文
37 | /// zh-TW:繁体中文
38 | /// en:英语
39 | /// ja:日语
40 | /// ko:韩语
41 | /// fr:法语
42 | /// es:西班牙语
43 | /// it:意大利语
44 | /// de:德语
45 | /// tr:土耳其语
46 | /// ru:俄语
47 | /// pt:葡萄牙语
48 | /// vi:越南语
49 | /// id:印尼语
50 | /// th:泰语
51 | /// ms:马来西亚语
52 | /// ar:阿拉伯语
53 | /// hi:印地语
54 | ///
55 | [JsonProperty("Source")]
56 | public string Source{ get; set; }
57 |
58 | ///
59 | /// 目标语言,各源语言的目标语言支持列表如下
60 | ///
61 | /// zh(简体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
62 | /// zh-TW(繁体中文):en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
63 | /// en(英语):zh(中文)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)、ar(阿拉伯语)、hi(印地语)
64 | /// ja(日语):zh(中文)、en(英语)、ko(韩语)
65 | /// ko(韩语):zh(中文)、en(英语)、ja(日语)
66 | /// fr(法语):zh(中文)、en(英语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
67 | /// es(西班牙语):zh(中文)、en(英语)、fr(法语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
68 | /// it(意大利语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、de(德语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
69 | /// de(德语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、tr(土耳其语)、ru(俄语)、pt(葡萄牙语)
70 | /// tr(土耳其语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、ru(俄语)、pt(葡萄牙语)
71 | /// ru(俄语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、pt(葡萄牙语)
72 | /// pt(葡萄牙语):zh(中文)、en(英语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)、ru(俄语)
73 | /// vi(越南语):zh(中文)、en(英语)
74 | /// id(印尼语):zh(中文)、en(英语)
75 | /// th(泰语):zh(中文)、en(英语)
76 | /// ms(马来语):zh(中文)、en(英语)
77 | /// ar(阿拉伯语):en(英语)
78 | /// hi(印地语):en(英语)
79 | ///
80 | [JsonProperty("Target")]
81 | public string Target{ get; set; }
82 |
83 | ///
84 | /// 项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0
85 | ///
86 | [JsonProperty("ProjectId")]
87 | public long? ProjectId{ get; set; }
88 |
89 | ///
90 | /// 用来标记不希望被翻译的文本内容,如句子中的特殊符号、人名、地名等;每次请求只支持配置一个不被翻译的单词;仅支持配置人名、地名等名词,不要配置动词或短语,否则会影响翻译结果。
91 | ///
92 | [JsonProperty("UntranslatedText")]
93 | public string UntranslatedText{ get; set; }
94 |
95 |
96 | ///
97 | /// For internal usage only. DO NOT USE IT.
98 | ///
99 | public override void ToMap(Dictionary map, string prefix)
100 | {
101 | this.SetParamSimple(map, prefix + "SourceText", this.SourceText);
102 | this.SetParamSimple(map, prefix + "Source", this.Source);
103 | this.SetParamSimple(map, prefix + "Target", this.Target);
104 | this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
105 | this.SetParamSimple(map, prefix + "UntranslatedText", this.UntranslatedText);
106 | }
107 | }
108 | }
109 |
110 |
--------------------------------------------------------------------------------
/UIBrowser/TTSPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
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.Interop;
13 | using System.Windows.Media;
14 | using System.Windows.Media.Imaging;
15 | using System.Windows.Navigation;
16 | using System.Windows.Shapes;
17 | using UIBrowser.VNREX.GlobalHotKey;
18 |
19 | namespace UIBrowser
20 | {
21 | ///
22 | /// TTSPage.xaml 的交互逻辑
23 | ///
24 | public partial class TTSPage : Page
25 | {
26 | public TTSPage()
27 | {
28 | InitializeComponent();
29 | }
30 | const int WindowsMessageHotkey = 786;
31 | private void SetCliSettingBtn_Click(object sender, RoutedEventArgs e)
32 | {
33 |
34 | var ghk = new GlobalHotkey(0, System.Windows.Forms.Keys.F2, new WindowInteropHelper(System.Windows.Application.Current.MainWindow).Handle);
35 | if (!ghk.Register())
36 | {
37 |
38 | MessageBox.Show("F2热键注册失败");
39 |
40 | }
41 | else
42 | {
43 | ComponentDispatcher.ThreadPreprocessMessage += (ref MSG Message, ref bool Handled) =>
44 | {
45 | // 判断是否热键消息
46 | if (Message.message == WindowsMessageHotkey)
47 | {
48 | // 获取热键id
49 | var id = Message.wParam.ToInt32();
50 | System.Windows.Forms.Keys key = (System.Windows.Forms.Keys)(((int)Message.lParam >> 16) & 0xFFFF);
51 |
52 | // 执行热键回调方法(执行时需要判断是否与注册的热键匹配)
53 | if(key == System.Windows.Forms.Keys.F2)
54 | {
55 | if (VNREX.Global.VoiceRoidCli.ini)
56 | {
57 | if(!VNREX.Global.TTSString.Equals(""))
58 | VNREX.Global.VoiceRoidCli.proc.StandardInput.WriteLineAsync(VNREX.Global.TTSString);
59 | }
60 | }
61 |
62 |
63 | //Instance.ExcuteHotKeyCommand(id);
64 | }
65 | };
66 | SetCliSettingBtn.IsEnabled = false;
67 | MessageBox.Show("F2热键注册成功");
68 | }
69 |
70 |
71 | }
72 |
73 | private void SetCLIEXEPath_Click(object sender, RoutedEventArgs e)
74 | {
75 |
76 | System.Windows.Forms.OpenFileDialog FD = new System.Windows.Forms.OpenFileDialog();
77 | FD.Filter = "All PE FILES | *.exe";
78 |
79 | System.Windows.Forms.DialogResult DR = FD.ShowDialog();
80 | if (DR == System.Windows.Forms.DialogResult.OK)
81 | {
82 |
83 | CliEXEPathTextBox.Text = FD.FileName;
84 | }
85 | }
86 |
87 | private void LoadCLIBtn_Click(object sender, RoutedEventArgs e)
88 | {
89 | if (CliEXEPathTextBox.Text.Equals("")){
90 | MessageBox.Show("请选择CLI程序");
91 | return;
92 | }
93 |
94 | if (!VNREX.Global.VoiceRoidCli.ini)
95 | {
96 | try
97 | {
98 | VNREX.Global.VoiceRoidCli.VoiceRoid2CliInit(CliEXEPathTextBox.Text);
99 | }
100 | catch (Exception ex)
101 | {
102 | MessageBox.Show(ex.Message);
103 | }
104 |
105 | if (VNREX.Global.VoiceRoidCli.ini)
106 | {
107 | //VNREX.Global.VoiceRoidCli.proc.StandardInput.WriteLineAsync("StartService");
108 | System.Threading.Thread.Sleep(500);
109 | TTSConsoleTextBox.AppendText("\r\n");
110 | TTSConsoleTextBox.AppendText("初始化成功请点击注册热键按F2将对HOOK到的文本进行语音合成");
111 |
112 | LoadCLIBtn.IsEnabled = false;
113 | }
114 | else
115 | {
116 | TTSConsoleTextBox.AppendText("\r\n");
117 | TTSConsoleTextBox.AppendText("初始化失败");
118 | }
119 |
120 | }
121 | }
122 |
123 | private void TTSConsoleTextBox_TextChanged(object sender, TextChangedEventArgs e)
124 | {
125 | TTSConsoleTextBox.ScrollToEnd();
126 | }
127 | }
128 | }
129 |
--------------------------------------------------------------------------------