├── PronamaChanIde2019
├── icon.png
├── preview.png
├── ko-KR
│ └── extension.vsixlangpack
├── ja-JP
│ └── extension.vsixlangpack
├── zh-tw
│ └── extension.vsixlangpack
├── Properties
│ └── AssemblyInfo.cs
├── source.extension.vsixmanifest
├── ViewportAdornmentTextViewCreationListener.cs
├── PronamaChanIdePackage.cs
├── ViewportAdornment.cs
└── PronamaChanIde2019.csproj
├── PronamaChanIde2022
├── icon.png
├── preview.png
├── ko-KR
│ └── extension.vsixlangpack
├── ja-JP
│ └── extension.vsixlangpack
├── zh-tw
│ └── extension.vsixlangpack
├── Properties
│ └── AssemblyInfo.cs
├── source.extension.vsixmanifest
├── ViewportAdornmentTextViewCreationListener.cs
├── PronamaChanIde2022Package.cs
├── ViewportAdornment.cs
└── PronamaChanIde2022.csproj
├── PronamaChanIde2019.Shells
├── Images
│ ├── Classic
│ │ ├── base.png
│ │ ├── cry.png
│ │ ├── fine.png
│ │ ├── proud.png
│ │ ├── wink.png
│ │ ├── blink1.png
│ │ ├── blink2.png
│ │ ├── blink3.png
│ │ └── surprise.png
│ └── Nineteen
│ │ ├── Blink1.png
│ │ ├── Blink2.png
│ │ ├── Blink3.png
│ │ ├── Body1.png
│ │ ├── Body2.png
│ │ ├── FaceCried.png
│ │ ├── FaceFine.png
│ │ ├── FaceHappy.png
│ │ ├── FaceSad.png
│ │ ├── FaceSmug.png
│ │ ├── HandLeft1.png
│ │ ├── HandLeft2.png
│ │ ├── HandLeft3.png
│ │ ├── FaceShocked.png
│ │ ├── HandRight1.png
│ │ ├── HandRight2.png
│ │ └── FaceEyesClosed.png
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── ICharacterShell.cs
├── ClassicShell.xaml
├── NineteenShell.xaml
├── ClassicShell.xaml.cs
├── PronamaChanIde2019.Shells.csproj
└── NineteenShell.xaml.cs
├── PronamaChanIde2019.ShellChecker
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── App.xaml.cs
├── App.xaml
├── MainWindow.xaml.cs
├── MainWindow.xaml
└── PronamaChanIde2019.ShellChecker.csproj
├── README.md
├── .github
└── FUNDING.yml
├── .gitattributes
├── PronamaChanIde2019.sln
└── .gitignore
/PronamaChanIde2019/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019/icon.png
--------------------------------------------------------------------------------
/PronamaChanIde2022/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2022/icon.png
--------------------------------------------------------------------------------
/PronamaChanIde2019/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019/preview.png
--------------------------------------------------------------------------------
/PronamaChanIde2022/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2022/preview.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/base.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/base.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/cry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/cry.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/fine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/fine.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/proud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/proud.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/wink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/wink.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/blink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/blink1.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/blink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/blink2.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/blink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/blink3.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/Blink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/Blink1.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/Blink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/Blink2.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/Blink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/Blink3.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/Body1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/Body1.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/Body2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/Body2.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Classic/surprise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Classic/surprise.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceCried.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceCried.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceFine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceFine.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceHappy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceHappy.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceSad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceSad.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceSmug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceSmug.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft1.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft2.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/HandLeft3.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceShocked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceShocked.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/HandRight1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/HandRight1.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/HandRight2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/HandRight2.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Images/Nineteen/FaceEyesClosed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jz5/PronamaChanIde2019/HEAD/PronamaChanIde2019.Shells/Images/Nineteen/FaceEyesClosed.png
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace PronamaChanIde2019.ShellChecker
10 | {
11 | ///
12 | /// App.xaml の相互作用ロジック
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/ko-KR/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 프로나마짱 IDE
5 | 프로그래밍 생방송(pronama.jp)의 캐릭터인 프로나마짱(쿠레이 케이)을 텍스트 편집기의 배경에 표시합니다.
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/ko-KR/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 프로나마짱 IDE
5 | 프로그래밍 생방송(pronama.jp)의 캐릭터인 프로나마짱(쿠레이 케이)을 텍스트 편집기의 배경에 표시합니다.
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/ja-JP/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | プロ生ちゃん IDE
5 | プログラミング生放送(pronama.jp)のキャラクターのプロ生ちゃん(暮井 慧)をテキストエディターの背景に表示します。
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/ja-JP/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | プロ生ちゃん IDE
5 | プログラミング生放送(pronama.jp)のキャラクターのプロ生ちゃん(暮井 慧)をテキストエディターの背景に表示します。
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/zh-tw/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Pronama-chan IDE
5 | 在背景顯示 Programming Live Program (pronama.jp) 的吉祥物 Pronama-chan (KUREI Kei)
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/zh-tw/extension.vsixlangpack:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Pronama-chan IDE
5 | 在背景顯示 Programming Live Program (pronama.jp) 的吉祥物 Pronama-chan (KUREI Kei)
6 | https://kei.pronama.jp/ide
7 |
8 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/ICharacterShell.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace PronamaChanIde2019.Shells
4 | {
5 | public interface ICharacterShell
6 | {
7 | double DefaultWidth { get; }
8 | double DefaultHeight { get; }
9 |
10 | void ExpressEmotion(bool buildSucceeded);
11 |
12 | #region For Debug
13 |
14 | Task BlinkAsync();
15 | Task ExpressEmotionAsync();
16 | bool EmotionTimerEnabled { get; set; }
17 |
18 | #endregion
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Pronama-chan IDE for Visual Studio 2019/2022
2 |
3 | ## Support ARM64
4 | * Visual Studio 2022
5 |
6 | ## Support Edition
7 | * Community, Professional, Enterprise
8 |
9 | ## Download & Description
10 |
11 | * 2022: https://marketplace.visualstudio.com/items?itemName=jz5.pronama-chan-ide-2022
12 | * 2019: https://marketplace.visualstudio.com/items?itemName=jz5.pronama-chan-ide-2019
13 |
14 | ## License
15 |
16 | * Code license: MIT License: http://opensource.org/licenses/MIT
17 | * Image license: © Pronama LLC, See https://kei.pronama.jp/guideline/
18 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: jz5 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/ClassicShell.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PronamaChanIde2019.ShellChecker.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PronamaChanIde2019.Shells.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("PronamaChanIde2019")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("PronamaChanIde2019")]
13 | [assembly: AssemblyCopyright("")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Pronama-chan IDE")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Pronama-chan IDE")]
13 | [assembly: AssemblyCopyright("© 2021 Pronama LLC")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/MainWindow.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 PronamaChanIde2019.ShellChecker
17 | {
18 | ///
19 | /// MainWindow.xaml の相互作用ロジック
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | private void Success_Button_Click(object sender, RoutedEventArgs e)
29 | {
30 | MyShell.ExpressEmotion(true);
31 | }
32 |
33 | private void Fail_Button_Click(object sender, RoutedEventArgs e)
34 | {
35 | MyShell.ExpressEmotion(false);
36 | }
37 |
38 | private async void Blink_Button_Click(object sender, RoutedEventArgs e)
39 | {
40 | await MyShell.BlinkAsync();
41 | }
42 |
43 | private async void ExpressEmotion_Button_Click(object sender, RoutedEventArgs e)
44 | {
45 | await MyShell.ExpressEmotionAsync();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
29 |
33 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/NineteenShell.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
22 |
28 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Pronama-chan IDE
6 | Display mascot character Pronama-chan (KUREI Kei) of Programming Live Program (pronama.jp) as the background of text editor.
7 | https://kei.pronama.jp/ide
8 | icon.png
9 | preview.png
10 | theme, Text Editor, 痛IDE拡張, Background
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/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("PronamaChanIde2019.Shells")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("PronamaChanIde2019.Shells")]
15 | [assembly: AssemblyCopyright("Copyright © 2019")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
20 | // 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly:ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は次の 4 つの値で構成されています:
45 | //
46 | // メジャー バージョン
47 | // マイナー バージョン
48 | // ビルド番号
49 | // Revision
50 | //
51 | // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/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("PronamaChanIde2019.ShellChecker")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("PronamaChanIde2019.ShellChecker")]
15 | [assembly: AssemblyCopyright("Copyright © 2019")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
20 | // 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | // またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は次の 4 つの値で構成されています:
45 | //
46 | // メジャー バージョン
47 | // マイナー バージョン
48 | // ビルド番号
49 | // リビジョン
50 | //
51 | // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Pronama-chan IDE
6 | Display mascot character Pronama-chan (KUREI Kei) of Programming Live Program (pronama.jp) as the background of text editor. (support ARM64, x86)
7 | https://kei.pronama.jp/ide
8 | icon.png
9 | preview.png
10 | theme, Text Editor, 痛IDE拡張, Background
11 |
12 |
13 |
14 |
17 |
18 | amd64
19 |
20 |
21 | amd64
22 |
23 |
26 |
27 | arm64
28 |
29 |
30 | arm64
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/ViewportAdornmentTextViewCreationListener.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.Composition;
2 | using EnvDTE;
3 | using Microsoft;
4 | using Microsoft.VisualStudio.Shell;
5 | using Microsoft.VisualStudio.Text.Editor;
6 | using Microsoft.VisualStudio.Utilities;
7 |
8 | namespace PronamaChanIde2019
9 | {
10 | ///
11 | /// Establishes an to place the adornment on and exports the
12 | /// that instantiates the adornment on the event of a 's creation
13 | ///
14 | [Export(typeof(IWpfTextViewCreationListener))]
15 | [ContentType("text")]
16 | [TextViewRole(PredefinedTextViewRoles.Document)]
17 | internal sealed class ViewportAdornmentTextViewCreationListener : IWpfTextViewCreationListener
18 | {
19 | [Import]
20 | public SVsServiceProvider ServiceProvider { get; set; }
21 |
22 | // Disable "Field is never assigned to..." and "Field is never used" compiler's warnings. Justification: the field is used by MEF.
23 | #pragma warning disable 649, 169
24 |
25 | ///
26 | /// Defines the adornment layer for the scarlet adornment. This layer is ordered
27 | /// after the selection layer in the Z-order
28 | ///
29 | [Export(typeof(AdornmentLayerDefinition))]
30 | [Name("Pronama_chanIDE2019")]
31 | [Order(Before = PredefinedAdornmentLayers.Caret)]
32 | private AdornmentLayerDefinition _editorAdornmentLayer;
33 |
34 | #pragma warning restore 649, 169
35 |
36 | private ViewportAdornment _adornment;
37 | private BuildEvents _buildEvents;
38 | ///
39 | /// Instantiates a ViewportAdornment manager when a textView is created.
40 | ///
41 | /// The upon which the adornment should be placed
42 | public void TextViewCreated(IWpfTextView textView)
43 | {
44 | ThreadHelper.ThrowIfNotOnUIThread();
45 |
46 | _adornment = new ViewportAdornment(textView);
47 |
48 | if (ServiceProvider.GetService(typeof(DTE)) is DTE dte)
49 | {
50 | _buildEvents = dte.Events.BuildEvents;
51 | dte.Events.BuildEvents.OnBuildProjConfigDone += BuildEvents_OnBuildProjConfigDone;
52 | }
53 | }
54 |
55 | private void BuildEvents_OnBuildProjConfigDone(string Project, string ProjectConfig, string Platform, string SolutionConfig, bool Success)
56 | {
57 | if (_adornment != null)
58 | _adornment.Shell.ExpressEmotion(Success);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/ViewportAdornmentTextViewCreationListener.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.Composition;
2 | using EnvDTE;
3 | using Microsoft;
4 | using Microsoft.VisualStudio.Shell;
5 | using Microsoft.VisualStudio.Text.Editor;
6 | using Microsoft.VisualStudio.Utilities;
7 |
8 | namespace PronamaChanIde2022
9 | {
10 | ///
11 | /// Establishes an to place the adornment on and exports the
12 | /// that instantiates the adornment on the event of a 's creation
13 | ///
14 | [Export(typeof(IWpfTextViewCreationListener))]
15 | [ContentType("text")]
16 | [TextViewRole(PredefinedTextViewRoles.Document)]
17 | internal sealed class ViewportAdornmentTextViewCreationListener : IWpfTextViewCreationListener
18 | {
19 | [Import]
20 | public SVsServiceProvider ServiceProvider { get; set; }
21 |
22 | // Disable "Field is never assigned to..." and "Field is never used" compiler's warnings. Justification: the field is used by MEF.
23 | #pragma warning disable 649, 169
24 |
25 | ///
26 | /// Defines the adornment layer for the scarlet adornment. This layer is ordered
27 | /// after the selection layer in the Z-order
28 | ///
29 | [Export(typeof(AdornmentLayerDefinition))]
30 | [Name("Pronama_chanIDE2022")]
31 | [Order(Before = PredefinedAdornmentLayers.Caret)]
32 | private AdornmentLayerDefinition _editorAdornmentLayer;
33 |
34 | #pragma warning restore 649, 169
35 |
36 | private ViewportAdornment _adornment;
37 | private BuildEvents _buildEvents;
38 | ///
39 | /// Instantiates a ViewportAdornment manager when a textView is created.
40 | ///
41 | /// The upon which the adornment should be placed
42 | public void TextViewCreated(IWpfTextView textView)
43 | {
44 | ThreadHelper.ThrowIfNotOnUIThread();
45 |
46 | _adornment = new ViewportAdornment(textView);
47 |
48 | if (ServiceProvider.GetService(typeof(DTE)) is DTE dte)
49 | {
50 | _buildEvents = dte.Events.BuildEvents;
51 | dte.Events.BuildEvents.OnBuildProjConfigDone += BuildEvents_OnBuildProjConfigDone;
52 | }
53 | }
54 |
55 | private void BuildEvents_OnBuildProjConfigDone(string Project, string ProjectConfig, string Platform, string SolutionConfig, bool Success)
56 | {
57 | if (_adornment != null)
58 | _adornment.Shell.ExpressEmotion(Success);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.42000
5 | //
6 | // このファイルへの変更は、異常な動作の原因となることがあり、
7 | // またコードの再生成時には失われます。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PronamaChanIde2019.Shells.Properties {
12 |
13 |
14 | ///
15 | /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
16 | ///
17 | // このクラスは StronglyTypedResourceBuilder クラスによって ResGen
18 | // または Visual Studio のようなツールを使用して自動生成されました。
19 | // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
20 | // ResGen を実行し直すか、または VS プロジェクトをリビルドします。
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// このクラスで使用されるキャッシュされた ResourceManager インスタンスを返します。
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if ((resourceMan == null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PronamaChanIde2019.Shells.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// すべてについて、現在のスレッドの CurrentUICulture プロパティをオーバーライドします
50 | /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // このコードはツールによって生成されました。
4 | // ランタイム バージョン:4.0.30319.42000
5 | //
6 | // このファイルへの変更は、正しくない動作の原因になったり、
7 | // コードが再生成されるときに失われたりします。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PronamaChanIde2019.ShellChecker.Properties
12 | {
13 |
14 |
15 | ///
16 | /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
17 | ///
18 | // このクラスは StronglyTypedResourceBuilder クラスによって ResGen
19 | // または Visual Studio のようなツールを使用して自動生成されました。
20 | // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21 | // ResGen を実行し直すか、または VS プロジェクトをリビルドします。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// このクラスで使用されるキャッシュされた ResourceManager インスタンスを返します。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PronamaChanIde2019.ShellChecker.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// すべてについて、現在のスレッドの CurrentUICulture プロパティをオーバーライドします
56 | /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/PronamaChanIdePackage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Threading;
4 | using Microsoft.VisualStudio.Shell;
5 | using Task = System.Threading.Tasks.Task;
6 |
7 | namespace PronamaChanIde2019
8 | {
9 | ///
10 | /// This is the class that implements the package exposed by this assembly.
11 | ///
12 | ///
13 | ///
14 | /// The minimum requirement for a class to be considered a valid package for Visual Studio
15 | /// is to implement the IVsPackage interface and register itself with the shell.
16 | /// This package uses the helper classes defined inside the Managed Package Framework (MPF)
17 | /// to do it: it derives from the Package class that provides the implementation of the
18 | /// IVsPackage interface and uses the registration attributes defined in the framework to
19 | /// register itself and its components with the shell. These attributes tell the pkgdef creation
20 | /// utility what data to put into .pkgdef file.
21 | ///
22 | ///
23 | /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file.
24 | ///
25 | ///
26 | [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
27 | [Guid(PronamaChanIdePackage.PackageGuidString)]
28 | public sealed class PronamaChanIdePackage : AsyncPackage
29 | {
30 | ///
31 | /// PronamaChanIde2019Package GUID string.
32 | ///
33 | public const string PackageGuidString = "149d543b-08c0-4902-bfc5-db9b68456432";
34 |
35 | #region Package Members
36 |
37 | ///
38 | /// Initialization of the package; this method is called right after the package is sited, so this is the place
39 | /// where you can put all the initialization code that rely on services provided by VisualStudio.
40 | ///
41 | /// A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.
42 | /// A provider for progress updates.
43 | /// A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.
44 | protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress)
45 | {
46 | // When initialized asynchronously, the current thread may be a background thread at this point.
47 | // Do any initialization that requires the UI thread after switching to the UI thread.
48 | await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/PronamaChanIde2022Package.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell;
2 | using System;
3 | using System.Runtime.InteropServices;
4 | using System.Threading;
5 | using Task = System.Threading.Tasks.Task;
6 |
7 | namespace PronamaChanIde2022
8 | {
9 | ///
10 | /// This is the class that implements the package exposed by this assembly.
11 | ///
12 | ///
13 | ///
14 | /// The minimum requirement for a class to be considered a valid package for Visual Studio
15 | /// is to implement the IVsPackage interface and register itself with the shell.
16 | /// This package uses the helper classes defined inside the Managed Package Framework (MPF)
17 | /// to do it: it derives from the Package class that provides the implementation of the
18 | /// IVsPackage interface and uses the registration attributes defined in the framework to
19 | /// register itself and its components with the shell. These attributes tell the pkgdef creation
20 | /// utility what data to put into .pkgdef file.
21 | ///
22 | ///
23 | /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file.
24 | ///
25 | ///
26 | [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
27 | [Guid(PronamaChanIde2022Package.PackageGuidString)]
28 | public sealed class PronamaChanIde2022Package : AsyncPackage
29 | {
30 | ///
31 | /// PronamaChanIde2022Package GUID string.
32 | ///
33 | public const string PackageGuidString = "a19bc144-b5f8-4491-9b3a-d25bb1ac3f40";
34 |
35 | #region Package Members
36 |
37 | ///
38 | /// Initialization of the package; this method is called right after the package is sited, so this is the place
39 | /// where you can put all the initialization code that rely on services provided by VisualStudio.
40 | ///
41 | /// A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.
42 | /// A provider for progress updates.
43 | /// A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.
44 | protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress)
45 | {
46 | // When initialized asynchronously, the current thread may be a background thread at this point.
47 | // Do any initialization that requires the UI thread after switching to the UI thread.
48 | await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/ViewportAdornment.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Editor;
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.Controls;
8 | using PronamaChanIde2019.Shells;
9 |
10 | namespace PronamaChanIde2019
11 | {
12 | public class ViewportAdornment
13 | {
14 | private readonly IWpfTextView _view;
15 | private readonly IAdornmentLayer _adornmentLayer;
16 | private readonly double _shellWidth;
17 | private readonly double _shellHeight;
18 |
19 | public ICharacterShell Shell { get; }
20 | public UserControl ShellControl => (UserControl)Shell;
21 |
22 |
23 | public ViewportAdornment(IWpfTextView view)
24 | {
25 | _view = view;
26 | _view.ViewportHeightChanged += OnSizeChanged; ;
27 | _view.ViewportWidthChanged += OnSizeChanged;
28 |
29 | var mode = Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_MODE", EnvironmentVariableTarget.User);
30 | if (!string.IsNullOrEmpty(mode))
31 | {
32 | if (mode == "CLASSIC")
33 | Shell = new ClassicShell();
34 | }
35 |
36 | if (Shell == null)
37 | Shell = new NineteenShell();
38 |
39 | // Opacity
40 | ShellControl.Opacity = 0.4;
41 |
42 | if (double.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_OPACITY", EnvironmentVariableTarget.User), out double opactiy))
43 | {
44 | if (0 < opactiy && opactiy <= 1)
45 | (ShellControl).Opacity = opactiy;
46 | }
47 |
48 | // Width, Height
49 | var sizeInitialized = false;
50 | if (double.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_HEIGHT", EnvironmentVariableTarget.User), out double height) &&
51 | height > 0)
52 | {
53 | sizeInitialized = true;
54 |
55 | _shellWidth *= height / _shellHeight;
56 | _shellHeight = height;
57 | }
58 | if (!sizeInitialized)
59 | {
60 | _shellWidth = Shell.DefaultWidth;
61 | _shellHeight = Shell.DefaultHeight;
62 | }
63 | (ShellControl).Width = _shellWidth;
64 | (ShellControl).Height = _shellHeight;
65 |
66 | // Grab a reference to the adornment layer that this adornment should be added to
67 | _adornmentLayer = view.GetAdornmentLayer("Pronama_chanIDE2019");
68 | _view.LayoutChanged += OnSizeChanged;
69 |
70 | //OnSizeChanged(this, EventArgs.Empty);
71 | }
72 |
73 | private void OnSizeChanged(object sender, EventArgs e)
74 | {
75 | // clear the adornment layer of previous adornments
76 | _adornmentLayer.RemoveAllAdornments();
77 |
78 | // Place the image in the bottom right hand corner of the Viewport
79 |
80 | var w = (ShellControl).ActualWidth;
81 | var h = (ShellControl).ActualHeight;
82 |
83 | if ((ShellControl).ActualWidth == 0)
84 | {
85 | w = _shellWidth * (_view.ZoomLevel / 100);
86 | h = _shellHeight * (_view.ZoomLevel / 100);
87 | }
88 |
89 | Canvas.SetLeft((ShellControl), (_view.ViewportRight - w - 10));
90 | Canvas.SetTop((ShellControl), (_view.ViewportBottom - h - 10));
91 |
92 | // add the image to the adornment layer and make it relative to the viewport
93 | _adornmentLayer.AddAdornment(AdornmentPositioningBehavior.ViewportRelative, null, null, (ShellControl), null);
94 | }
95 |
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/ViewportAdornment.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Editor;
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.Controls;
8 | using PronamaChanIde2019.Shells;
9 |
10 | namespace PronamaChanIde2022
11 | {
12 | public class ViewportAdornment
13 | {
14 | private readonly IWpfTextView _view;
15 | private readonly IAdornmentLayer _adornmentLayer;
16 | private readonly double _shellWidth;
17 | private readonly double _shellHeight;
18 |
19 | public ICharacterShell Shell { get; }
20 | public UserControl ShellControl => (UserControl)Shell;
21 |
22 |
23 | public ViewportAdornment(IWpfTextView view)
24 | {
25 | _view = view;
26 | _view.ViewportHeightChanged += OnSizeChanged; ;
27 | _view.ViewportWidthChanged += OnSizeChanged;
28 |
29 | var mode = Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_MODE", EnvironmentVariableTarget.User);
30 | if (!string.IsNullOrEmpty(mode))
31 | {
32 | if (mode == "CLASSIC")
33 | Shell = new ClassicShell();
34 | }
35 |
36 | if (Shell == null)
37 | Shell = new NineteenShell();
38 |
39 | // Opacity
40 | ShellControl.Opacity = 0.4;
41 |
42 | if (double.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_OPACITY", EnvironmentVariableTarget.User), out double opactiy))
43 | {
44 | if (0 < opactiy && opactiy <= 1)
45 | (ShellControl).Opacity = opactiy;
46 | }
47 |
48 | // Width, Height
49 | var sizeInitialized = false;
50 | if (double.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_HEIGHT", EnvironmentVariableTarget.User), out double height) &&
51 | height > 0)
52 | {
53 | sizeInitialized = true;
54 |
55 | _shellWidth *= height / _shellHeight;
56 | _shellHeight = height;
57 | }
58 | if (!sizeInitialized)
59 | {
60 | _shellWidth = Shell.DefaultWidth;
61 | _shellHeight = Shell.DefaultHeight;
62 | }
63 | (ShellControl).Width = _shellWidth;
64 | (ShellControl).Height = _shellHeight;
65 |
66 | // Grab a reference to the adornment layer that this adornment should be added to
67 | _adornmentLayer = view.GetAdornmentLayer("Pronama_chanIDE2022");
68 | _view.LayoutChanged += OnSizeChanged;
69 |
70 | //OnSizeChanged(this, EventArgs.Empty);
71 | }
72 |
73 | private void OnSizeChanged(object sender, EventArgs e)
74 | {
75 | // clear the adornment layer of previous adornments
76 | _adornmentLayer.RemoveAllAdornments();
77 |
78 | // Place the image in the bottom right hand corner of the Viewport
79 |
80 | var w = (ShellControl).ActualWidth;
81 | var h = (ShellControl).ActualHeight;
82 |
83 | if ((ShellControl).ActualWidth == 0)
84 | {
85 | w = _shellWidth * (_view.ZoomLevel / 100);
86 | h = _shellHeight * (_view.ZoomLevel / 100);
87 | }
88 |
89 | Canvas.SetLeft((ShellControl), (_view.ViewportRight - w - 10));
90 | Canvas.SetTop((ShellControl), (_view.ViewportBottom - h - 10));
91 |
92 | // add the image to the adornment layer and make it relative to the viewport
93 | _adornmentLayer.AddAdornment(AdornmentPositioningBehavior.ViewportRelative, null, null, (ShellControl), null);
94 | }
95 |
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/ClassicShell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
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.Navigation;
15 | using System.Windows.Shapes;
16 | using System.Windows.Threading;
17 |
18 | namespace PronamaChanIde2019.Shells
19 | {
20 | ///
21 | /// ClassicShell.xaml の相互作用ロジック
22 | ///
23 | public partial class ClassicShell : UserControl, ICharacterShell
24 | {
25 |
26 | private enum Face
27 | {
28 | Blink1,
29 | Blink2,
30 | Blink3,
31 | Cry,
32 | Fine,
33 | Proud,
34 | Surprise,
35 | Wink
36 | }
37 |
38 | private readonly DispatcherTimer _faceTimer;
39 | private readonly Random _random = new Random();
40 | private readonly Dictionary _images = new Dictionary();
41 |
42 | public double DefaultWidth { get; } = 200;
43 | public double DefaultHeight { get; } = 484.26;
44 |
45 | public bool EmotionTimerEnabled { get; set; } = true;
46 |
47 | public ClassicShell()
48 | {
49 | InitializeComponent();
50 |
51 | _faceTimer = new DispatcherTimer();
52 | _faceTimer.Tick += FaceTimer_Tick;
53 |
54 | _images.Add(Face.Blink1, new BitmapImage(new Uri("Images/Classic/blink1.png", UriKind.Relative)));
55 | _images.Add(Face.Blink2, new BitmapImage(new Uri("Images/Classic/blink2.png", UriKind.Relative)));
56 | _images.Add(Face.Blink3, new BitmapImage(new Uri("Images/Classic/blink3.png", UriKind.Relative)));
57 |
58 | _images.Add(Face.Cry, new BitmapImage(new Uri("Images/Classic/cry.png", UriKind.Relative)));
59 | _images.Add(Face.Fine, new BitmapImage(new Uri("Images/Classic/fine.png", UriKind.Relative)));
60 | _images.Add(Face.Proud, new BitmapImage(new Uri("Images/Classic/proud.png", UriKind.Relative)));
61 | _images.Add(Face.Surprise, new BitmapImage(new Uri("Images/Classic/surprise.png", UriKind.Relative)));
62 | _images.Add(Face.Wink, new BitmapImage(new Uri("Images/Classic/wink.png", UriKind.Relative)));
63 |
64 | RestartTimer();
65 | }
66 |
67 | private void RestartTimer()
68 | {
69 | if (!EmotionTimerEnabled) return;
70 |
71 | _faceTimer.Interval = TimeSpan.FromSeconds(_random.Next(2, 30));
72 | _faceTimer.Start();
73 | }
74 |
75 | private async void FaceTimer_Tick(object sender, EventArgs e)
76 | {
77 | await ExpressEmotionAsync();
78 | }
79 |
80 | public async Task Fine()
81 | {
82 | FaceImage.Source = _images[Face.Fine];
83 | await Task.Factory.StartNew(() => Thread.Sleep(TimeSpan.FromSeconds(3)));
84 | }
85 |
86 | public async Task BlinkAsync()
87 | {
88 | FaceImage.Source = _images[Face.Blink2];
89 | await Task.Factory.StartNew(() =>
90 | {
91 | Thread.Sleep(new TimeSpan(800000));
92 | }).ContinueWith((x) =>
93 | {
94 | FaceImage.Source = _images[Face.Blink3];
95 | }, TaskScheduler.FromCurrentSynchronizationContext()).ContinueWith((x) =>
96 | {
97 | Thread.Sleep(new TimeSpan(800000));
98 | }).ContinueWith((x) =>
99 | {
100 | FaceImage.Source = _images[Face.Blink1];
101 | }, TaskScheduler.FromCurrentSynchronizationContext());
102 | }
103 |
104 | public void ExpressEmotion(bool buildSucceeded)
105 | {
106 | if (!_faceTimer.IsEnabled) // blinking
107 | return;
108 |
109 | _faceTimer.Stop();
110 | if (buildSucceeded)
111 | {
112 | if (_random.Next(0, 10) < 5)
113 | FaceImage.Source = _images[Face.Fine];
114 | else
115 | FaceImage.Source = _images[Face.Wink];
116 | }
117 | else if (_random.Next(0, 10) < 7)
118 | FaceImage.Source = _images[Face.Surprise];
119 | else
120 | FaceImage.Source = _images[Face.Cry];
121 | RestartTimer();
122 | }
123 |
124 | public async Task ExpressEmotionAsync()
125 | {
126 | _faceTimer.Stop();
127 | if (_random.Next(0, 10) < 8)
128 | {
129 | await BlinkAsync();
130 | }
131 | else
132 | {
133 | FaceImage.Source = _images[Face.Proud];
134 | }
135 | RestartTimer();
136 | }
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/PronamaChanIde2022/PronamaChanIde2022.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 |
9 | Debug
10 | AnyCPU
11 | 2.0
12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
13 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}
14 | Library
15 | Properties
16 | PronamaChanIde2022
17 | PronamaChanIde2022
18 | v4.7.2
19 | true
20 | true
21 | true
22 | false
23 | false
24 | true
25 | true
26 | Program
27 | $(DevEnvDir)devenv.exe
28 | /rootsuffix Exp
29 |
30 |
31 | true
32 | full
33 | false
34 | bin\Debug\
35 | DEBUG;TRACE
36 | prompt
37 | 4
38 |
39 |
40 | pdbonly
41 | true
42 | bin\Release\
43 | TRACE
44 | prompt
45 | 4
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Designer
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | compile; build; native; contentfiles; analyzers; buildtransitive
69 |
70 |
71 |
72 |
73 |
74 | Always
75 | true
76 |
77 |
78 | true
79 |
80 |
81 | true
82 |
83 |
84 | Always
85 | true
86 |
87 |
88 | true
89 |
90 |
91 |
92 |
93 | {c423de56-57cf-483a-b716-6588eea4907b}
94 | PronamaChanIde2019.Shells
95 |
96 |
97 |
98 |
99 |
106 |
--------------------------------------------------------------------------------
/PronamaChanIde2019/PronamaChanIde2019.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 | true
9 | full
10 | false
11 | bin\Debug\
12 | DEBUG;TRACE
13 | prompt
14 | 4
15 | AnyCPU
16 |
17 |
18 | pdbonly
19 | true
20 | bin\Release\
21 | TRACE
22 | prompt
23 | 4
24 | AnyCPU
25 |
26 |
27 |
28 | Debug
29 | AnyCPU
30 | 2.0
31 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
32 | {CC6506F5-F68E-447E-AABD-308DE42950D7}
33 | Library
34 | Properties
35 | PronamaChanIde2019
36 | PronamaChanIde2019
37 | v4.7.2
38 | true
39 | true
40 | true
41 | false
42 | false
43 | true
44 | true
45 | Program
46 | $(DevEnvDir)devenv.exe
47 | /rootsuffix Exp
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Designer
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | Always
79 | true
80 |
81 |
82 | true
83 |
84 |
85 | true
86 |
87 |
88 | true
89 | Always
90 |
91 |
92 | true
93 |
94 |
95 |
96 |
97 | {c423de56-57cf-483a-b716-6588eea4907b}
98 | PronamaChanIde2019.Shells
99 |
100 |
101 |
102 |
103 |
110 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/PronamaChanIde2019.Shells.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C423DE56-57CF-483A-B716-6588EEA4907B}
8 | library
9 | PronamaChanIde2019.Shells
10 | PronamaChanIde2019.Shells
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 4.0
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | MSBuild:Compile
53 | Designer
54 |
55 |
56 | MSBuild:Compile
57 | Designer
58 |
59 |
60 | ClassicShell.xaml
61 |
62 |
63 |
64 | NineteenShell.xaml
65 |
66 |
67 |
68 |
69 | Code
70 |
71 |
72 | True
73 | True
74 | Resources.resx
75 |
76 |
77 | True
78 | Settings.settings
79 | True
80 |
81 |
82 | ResXFileCodeGenerator
83 | Resources.Designer.cs
84 |
85 |
86 | SettingsSingleFileGenerator
87 | Settings.Designer.cs
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31903.59
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PronamaChanIde2019", "PronamaChanIde2019\PronamaChanIde2019.csproj", "{CC6506F5-F68E-447E-AABD-308DE42950D7}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PronamaChanIde2019.Shells", "PronamaChanIde2019.Shells\PronamaChanIde2019.Shells.csproj", "{C423DE56-57CF-483A-B716-6588EEA4907B}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PronamaChanIde2019.ShellChecker", "PronamaChanIde2019.ShellChecker\PronamaChanIde2019.ShellChecker.csproj", "{7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PronamaChanIde2022", "PronamaChanIde2022\PronamaChanIde2022.csproj", "{888BE3BA-E404-43CE-A2DA-8A923D3A8546}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Debug|ARM64 = Debug|ARM64
18 | Debug|x64 = Debug|x64
19 | Debug|x86 = Debug|x86
20 | Release|Any CPU = Release|Any CPU
21 | Release|ARM64 = Release|ARM64
22 | Release|x64 = Release|x64
23 | Release|x86 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
26 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|ARM64.ActiveCfg = Debug|Any CPU
29 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|ARM64.Build.0 = Debug|Any CPU
30 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|x64.ActiveCfg = Debug|Any CPU
31 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|x64.Build.0 = Debug|Any CPU
32 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|x86.ActiveCfg = Debug|Any CPU
33 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Debug|x86.Build.0 = Debug|Any CPU
34 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|ARM64.ActiveCfg = Release|Any CPU
37 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|ARM64.Build.0 = Release|Any CPU
38 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|x64.ActiveCfg = Release|Any CPU
39 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|x64.Build.0 = Release|Any CPU
40 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|x86.ActiveCfg = Release|Any CPU
41 | {CC6506F5-F68E-447E-AABD-308DE42950D7}.Release|x86.Build.0 = Release|Any CPU
42 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
45 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|ARM64.Build.0 = Debug|Any CPU
46 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|x64.ActiveCfg = Debug|Any CPU
47 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|x64.Build.0 = Debug|Any CPU
48 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|x86.ActiveCfg = Debug|Any CPU
49 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Debug|x86.Build.0 = Debug|Any CPU
50 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|Any CPU.Build.0 = Release|Any CPU
52 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|ARM64.ActiveCfg = Release|Any CPU
53 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|ARM64.Build.0 = Release|Any CPU
54 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|x64.ActiveCfg = Release|Any CPU
55 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|x64.Build.0 = Release|Any CPU
56 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|x86.ActiveCfg = Release|Any CPU
57 | {C423DE56-57CF-483A-B716-6588EEA4907B}.Release|x86.Build.0 = Release|Any CPU
58 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|ARM64.ActiveCfg = Debug|ARM64
61 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|ARM64.Build.0 = Debug|ARM64
62 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|x64.ActiveCfg = Debug|x64
63 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|x64.Build.0 = Debug|x64
64 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|x86.ActiveCfg = Debug|x86
65 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Debug|x86.Build.0 = Debug|x86
66 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
67 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|Any CPU.Build.0 = Release|Any CPU
68 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|ARM64.ActiveCfg = Release|ARM64
69 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|ARM64.Build.0 = Release|ARM64
70 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|x64.ActiveCfg = Release|x64
71 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|x64.Build.0 = Release|x64
72 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|x86.ActiveCfg = Release|x86
73 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}.Release|x86.Build.0 = Release|x86
74 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|Any CPU.Build.0 = Debug|Any CPU
76 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|ARM64.ActiveCfg = Debug|Any CPU
77 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|ARM64.Build.0 = Debug|Any CPU
78 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|x64.ActiveCfg = Debug|Any CPU
79 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|x64.Build.0 = Debug|Any CPU
80 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|x86.ActiveCfg = Debug|Any CPU
81 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Debug|x86.Build.0 = Debug|Any CPU
82 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|Any CPU.ActiveCfg = Release|Any CPU
83 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|Any CPU.Build.0 = Release|Any CPU
84 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|ARM64.ActiveCfg = Release|Any CPU
85 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|ARM64.Build.0 = Release|Any CPU
86 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|x64.ActiveCfg = Release|Any CPU
87 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|x64.Build.0 = Release|Any CPU
88 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|x86.ActiveCfg = Release|Any CPU
89 | {888BE3BA-E404-43CE-A2DA-8A923D3A8546}.Release|x86.Build.0 = Release|Any CPU
90 | EndGlobalSection
91 | GlobalSection(SolutionProperties) = preSolution
92 | HideSolutionNode = FALSE
93 | EndGlobalSection
94 | GlobalSection(ExtensibilityGlobals) = postSolution
95 | SolutionGuid = {51D770E6-FEB2-4120-A4AE-725D4BF0E60A}
96 | EndGlobalSection
97 | EndGlobal
98 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.ShellChecker/PronamaChanIde2019.ShellChecker.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7E2926F4-A98B-4BF7-97C1-25F187E8E7C5}
8 | WinExe
9 | PronamaChanIde2019.ShellChecker
10 | PronamaChanIde2019.ShellChecker
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 | true
39 | bin\x64\Debug\
40 | DEBUG;TRACE
41 | full
42 | x64
43 | prompt
44 |
45 |
46 | bin\x64\Release\
47 | TRACE
48 | true
49 | pdbonly
50 | x64
51 | prompt
52 |
53 |
54 | true
55 | bin\ARM64\Debug\
56 | DEBUG;TRACE
57 | full
58 | ARM64
59 | prompt
60 |
61 |
62 | bin\ARM64\Release\
63 | TRACE
64 | true
65 | pdbonly
66 | ARM64
67 | prompt
68 |
69 |
70 | true
71 | bin\x86\Debug\
72 | DEBUG;TRACE
73 | full
74 | x86
75 | prompt
76 |
77 |
78 | bin\x86\Release\
79 | TRACE
80 | true
81 | pdbonly
82 | x86
83 | prompt
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 4.0
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | MSBuild:Compile
104 | Designer
105 |
106 |
107 | MSBuild:Compile
108 | Designer
109 |
110 |
111 | App.xaml
112 | Code
113 |
114 |
115 | MainWindow.xaml
116 | Code
117 |
118 |
119 |
120 |
121 | Code
122 |
123 |
124 | True
125 | True
126 | Resources.resx
127 |
128 |
129 | True
130 | Settings.settings
131 | True
132 |
133 |
134 | ResXFileCodeGenerator
135 | Resources.Designer.cs
136 |
137 |
138 | SettingsSingleFileGenerator
139 | Settings.Designer.cs
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 | {c423de56-57cf-483a-b716-6588eea4907b}
148 | PronamaChanIde2019.Shells
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # Exclude Auto-generated (자동생성 파일 제외)
7 | Thumbs.db
8 | **/Thumbs.db
9 | .DS_Store
10 | ._.DS_Store
11 | **/.DS_Store
12 | **/._.DS_Store
13 |
14 | # User-specific files
15 | *.rsuser
16 | *.suo
17 | *.user
18 | *.userosscache
19 | *.sln.docstates
20 |
21 | # User-specific files (MonoDevelop/Xamarin Studio)
22 | *.userprefs
23 |
24 | # Build results
25 | [Dd]ebug/
26 | [Dd]ebugPublic/
27 | [Rr]elease/
28 | [Rr]eleases/
29 | x64/
30 | x86/
31 | [Aa][Rr][Mm]/
32 | [Aa][Rr][Mm]64/
33 | bld/
34 | [Bb]in/
35 | [Oo]bj/
36 | [Ll]og/
37 | publish/
38 |
39 | # Visual Studio 2015/2017 cache/options directory
40 | .vs/
41 | # Uncomment if you have tasks that create the project's static files in wwwroot
42 | #wwwroot/
43 |
44 | # Visual Studio 2017 auto generated files
45 | Generated\ Files/
46 |
47 | # MSTest test Results
48 | [Tt]est[Rr]esult*/
49 | [Bb]uild[Ll]og.*
50 |
51 | # NUNIT
52 | *.VisualState.xml
53 | TestResult.xml
54 |
55 | # Build Results of an ATL Project
56 | [Dd]ebugPS/
57 | [Rr]eleasePS/
58 | dlldata.c
59 |
60 | # Benchmark Results
61 | BenchmarkDotNet.Artifacts/
62 |
63 | # .NET Core
64 | project.lock.json
65 | project.fragment.lock.json
66 | artifacts/
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.vspscc
94 | *.vssscc
95 | .builds
96 | *.pidb
97 | *.svclog
98 | *.scc
99 |
100 | # Chutzpah Test files
101 | _Chutzpah*
102 |
103 | # Visual C++ cache files
104 | ipch/
105 | *.aps
106 | *.ncb
107 | *.opendb
108 | *.opensdf
109 | *.sdf
110 | *.cachefile
111 | *.VC.db
112 | *.VC.VC.opendb
113 |
114 | # Visual Studio profiler
115 | *.psess
116 | *.vsp
117 | *.vspx
118 | *.sap
119 |
120 | # Visual Studio Trace Files
121 | *.e2e
122 |
123 | # TFS 2012 Local Workspace
124 | $tf/
125 |
126 | # Guidance Automation Toolkit
127 | *.gpState
128 |
129 | # ReSharper is a .NET coding add-in
130 | _ReSharper*/
131 | *.[Rr]e[Ss]harper
132 | *.DotSettings.user
133 |
134 | # JustCode is a .NET coding add-in
135 | .JustCode
136 |
137 | # TeamCity is a build add-in
138 | _TeamCity*
139 |
140 | # DotCover is a Code Coverage Tool
141 | *.dotCover
142 |
143 | # AxoCover is a Code Coverage Tool
144 | .axoCover/*
145 | !.axoCover/settings.json
146 |
147 | # Visual Studio code coverage results
148 | *.coverage
149 | *.coveragexml
150 |
151 | # NCrunch
152 | _NCrunch_*
153 | .*crunch*.local.xml
154 | nCrunchTemp_*
155 |
156 | # MightyMoose
157 | *.mm.*
158 | AutoTest.Net/
159 |
160 | # Web workbench (sass)
161 | .sass-cache/
162 |
163 | # Installshield output folder
164 | [Ee]xpress/
165 |
166 | # DocProject is a documentation generator add-in
167 | DocProject/buildhelp/
168 | DocProject/Help/*.HxT
169 | DocProject/Help/*.HxC
170 | DocProject/Help/*.hhc
171 | DocProject/Help/*.hhk
172 | DocProject/Help/*.hhp
173 | DocProject/Help/Html2
174 | DocProject/Help/html
175 |
176 | # Click-Once directory
177 | publish/
178 |
179 | # Publish Web Output
180 | *.[Pp]ublish.xml
181 | *.azurePubxml
182 | # Note: Comment the next line if you want to checkin your web deploy settings,
183 | # but database connection strings (with potential passwords) will be unencrypted
184 | *.pubxml
185 | *.publishproj
186 |
187 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
188 | # checkin your Azure Web App publish settings, but sensitive information contained
189 | # in these scripts will be unencrypted
190 | PublishScripts/
191 |
192 | # NuGet Packages
193 | *.nupkg
194 | # The packages folder can be ignored because of Package Restore
195 | **/[Pp]ackages/*
196 | # except build/, which is used as an MSBuild target.
197 | !**/[Pp]ackages/build/
198 | # Uncomment if necessary however generally it will be regenerated when needed
199 | #!**/[Pp]ackages/repositories.config
200 | # NuGet v3's project.json files produces more ignorable files
201 | *.nuget.props
202 | *.nuget.targets
203 |
204 | # Microsoft Azure Build Output
205 | csx/
206 | *.build.csdef
207 |
208 | # Microsoft Azure Emulator
209 | ecf/
210 | rcf/
211 |
212 | # Windows Store app package directories and files
213 | AppPackages/
214 | BundleArtifacts/
215 | Package.StoreAssociation.xml
216 | _pkginfo.txt
217 | *.appx
218 |
219 | # Visual Studio cache files
220 | # files ending in .cache can be ignored
221 | *.[Cc]ache
222 | # but keep track of directories ending in .cache
223 | !?*.[Cc]ache/
224 |
225 | # Others
226 | ClientBin/
227 | ~$*
228 | *~
229 | *.dbmdl
230 | *.dbproj.schemaview
231 | *.jfm
232 | *.pfx
233 | *.publishsettings
234 | orleans.codegen.cs
235 |
236 | # Including strong name files can present a security risk
237 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
238 | #*.snk
239 |
240 | # Since there are multiple workflows, uncomment next line to ignore bower_components
241 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
242 | #bower_components/
243 |
244 | # RIA/Silverlight projects
245 | Generated_Code/
246 |
247 | # Backup & report files from converting an old project file
248 | # to a newer Visual Studio version. Backup files are not needed,
249 | # because we have git ;-)
250 | _UpgradeReport_Files/
251 | Backup*/
252 | UpgradeLog*.XML
253 | UpgradeLog*.htm
254 | ServiceFabricBackup/
255 | *.rptproj.bak
256 |
257 | # SQL Server files
258 | *.mdf
259 | *.ldf
260 | *.ndf
261 |
262 | # Business Intelligence projects
263 | *.rdl.data
264 | *.bim.layout
265 | *.bim_*.settings
266 | *.rptproj.rsuser
267 | *- Backup*.rdl
268 |
269 | # Microsoft Fakes
270 | FakesAssemblies/
271 |
272 | # GhostDoc plugin setting file
273 | *.GhostDoc.xml
274 |
275 | # Node.js Tools for Visual Studio
276 | .ntvs_analysis.dat
277 | node_modules/
278 |
279 | # Visual Studio 6 build log
280 | *.plg
281 |
282 | # Visual Studio 6 workspace options file
283 | *.opt
284 |
285 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
286 | *.vbw
287 |
288 | # Visual Studio LightSwitch build output
289 | **/*.HTMLClient/GeneratedArtifacts
290 | **/*.DesktopClient/GeneratedArtifacts
291 | **/*.DesktopClient/ModelManifest.xml
292 | **/*.Server/GeneratedArtifacts
293 | **/*.Server/ModelManifest.xml
294 | _Pvt_Extensions
295 |
296 | # Paket dependency manager
297 | .paket/paket.exe
298 | paket-files/
299 |
300 | # FAKE - F# Make
301 | .fake/
302 |
303 | # JetBrains Rider
304 | .idea/
305 | *.sln.iml
306 |
307 | # CodeRush personal settings
308 | .cr/personal
309 |
310 | # Python Tools for Visual Studio (PTVS)
311 | __pycache__/
312 | *.pyc
313 |
314 | # Cake - Uncomment if you are using it
315 | # tools/**
316 | # !tools/packages.config
317 |
318 | # Tabs Studio
319 | *.tss
320 |
321 | # Telerik's JustMock configuration file
322 | *.jmconfig
323 |
324 | # BizTalk build output
325 | *.btp.cs
326 | *.btm.cs
327 | *.odx.cs
328 | *.xsd.cs
329 |
330 | # OpenCover UI analysis results
331 | OpenCover/
332 |
333 | # Azure Stream Analytics local run output
334 | ASALocalRun/
335 |
336 | # MSBuild Binary and Structured Log
337 | *.binlog
338 |
339 | # NVidia Nsight GPU debugger configuration file
340 | *.nvuser
341 |
342 | # MFractors (Xamarin productivity tool) working folder
343 | .mfractor/
344 |
345 | # Local History for Visual Studio
346 | .localhistory/
347 |
348 | # BeatPulse healthcheck temp database
349 | healthchecksdb
350 | /codealike.json
351 |
--------------------------------------------------------------------------------
/PronamaChanIde2019.Shells/NineteenShell.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 | using System.Windows.Controls;
6 | using System.Windows.Media.Imaging;
7 | using System.Windows.Threading;
8 |
9 | namespace PronamaChanIde2019.Shells
10 | {
11 | ///
12 | /// NineteenShell.xaml の相互作用ロジック
13 | ///
14 | public partial class NineteenShell : UserControl, ICharacterShell
15 | {
16 | private enum Images
17 | {
18 | Blink1, // 通常表情(口閉じ)
19 | Blink2,
20 | Blink3,
21 | FaceCried,
22 | FaceEyesClosed, // ><
23 | FaceHappy,
24 | FaceSad,
25 | FaceShocked,
26 | FaceSmug,
27 | FaceFine, // EyesClosed の口(口開け)+ 通常の目(Blink1 の目)
28 |
29 | Body1,
30 | Body2,
31 |
32 | HandLeft1,
33 | HandLeft2,
34 | HandLeft3, // 👍
35 |
36 | HandRight1,
37 | HandRight2,
38 | }
39 |
40 | private readonly DispatcherTimer _emotionTimer;
41 | private readonly Random _random = new Random();
42 | private readonly Dictionary _images = new Dictionary();
43 |
44 | public double DefaultWidth { get; } = 293.88;
45 | public double DefaultHeight { get; } = 500;
46 |
47 | public int EmotionIntervalMin { get; set; } = 2000;
48 | public int EmotionIntervalMax { get; set; } = 30000;
49 | public int BlinkPercentage { get; set; } = 80;
50 | public int FaceFinePercentage { get; set; } = 50;
51 |
52 | public bool EmotionTimerEnabled { get; set; } = true;
53 |
54 | public NineteenShell()
55 | {
56 | InitializeComponent();
57 |
58 | _emotionTimer = new DispatcherTimer();
59 | _emotionTimer.Tick += EmotionTimer_Tick;
60 |
61 | foreach (Images value in Enum.GetValues(typeof(Images)))
62 | {
63 | _images.Add(value, new BitmapImage(new Uri($"Images/Nineteen/{value}.png", UriKind.Relative)));
64 | }
65 |
66 | // Read environment variable
67 | // Emotion interval
68 | if (int.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_NINETEEN_EMOTION_INTERVAL", EnvironmentVariableTarget.User), out int emotionInterval))
69 | {
70 | EmotionIntervalMax = EmotionIntervalMin = emotionInterval;
71 | }
72 | else if (int.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_NINETEEN_EMOTION_INTERVAL_MIN", EnvironmentVariableTarget.User), out int emotionIntervalMin))
73 | {
74 | EmotionIntervalMin = emotionIntervalMin;
75 |
76 | // Max is need min
77 | if (int.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_NINETEEN_EMOTION_INTERVAL_MAX", EnvironmentVariableTarget.User), out int emotionIntervalMax))
78 | EmotionIntervalMax = emotionIntervalMax >= emotionIntervalMin ? emotionIntervalMax : emotionIntervalMin;
79 | else if (EmotionIntervalMin > EmotionIntervalMax)
80 | EmotionIntervalMax = EmotionIntervalMin;
81 |
82 | }
83 |
84 | // Blink percentage
85 | if (int.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_NINETEEN_BLINK_PERCENTAGE", EnvironmentVariableTarget.User), out int blinkPercentage))
86 | BlinkPercentage = blinkPercentage;
87 |
88 | // Face fine percentage
89 | if (int.TryParse(Environment.GetEnvironmentVariable("PRONAMA-CHAN_IDE_NINETEEN_FACEFINE_PERCENTAGE", EnvironmentVariableTarget.User), out int faceFinePercentage))
90 | FaceFinePercentage = faceFinePercentage;
91 |
92 | RestartTimer();
93 | }
94 |
95 |
96 | private void RestartTimer()
97 | {
98 | if (!EmotionTimerEnabled) return;
99 |
100 | _emotionTimer.Interval = TimeSpan.FromMilliseconds(_random.Next(EmotionIntervalMin, EmotionIntervalMax));
101 | _emotionTimer.Start();
102 | }
103 | private void StopTimer() => _emotionTimer.Stop();
104 |
105 | private async void EmotionTimer_Tick(object sender, EventArgs e)
106 | {
107 | await ExpressEmotionAsync();
108 | }
109 |
110 | public async Task BlinkAsync()
111 | {
112 | FaceImage.Source = _images[Images.Blink2];
113 | await Task.Factory.StartNew(() =>
114 | {
115 | Thread.Sleep(TimeSpan.FromMilliseconds(80));
116 | }).ContinueWith(x =>
117 | {
118 | FaceImage.Source = _images[Images.Blink3];
119 | }, TaskScheduler.FromCurrentSynchronizationContext()).ContinueWith(x =>
120 | {
121 | Thread.Sleep(TimeSpan.FromMilliseconds(80));
122 | }).ContinueWith(x =>
123 | {
124 | FaceImage.Source = _images[Images.Blink1];
125 | }, TaskScheduler.FromCurrentSynchronizationContext());
126 | }
127 |
128 | private Action _expressEmotionAfterBlinking;
129 | public void ExpressEmotion(bool buildSucceeded)
130 | {
131 | // While blinking, execute again after blinking is completed
132 | if (!_emotionTimer.IsEnabled) // blinking
133 | {
134 | _expressEmotionAfterBlinking = () => ExpressEmotion(buildSucceeded);
135 | return;
136 | }
137 |
138 | _expressEmotionAfterBlinking = null;
139 |
140 | StopTimer();
141 |
142 | if (buildSucceeded)
143 | ExpressSucceededEmotion();
144 | else
145 | ExpressFailedEmotion();
146 |
147 | RestartTimer();
148 | }
149 |
150 | private void ExpressSucceededEmotion()
151 | {
152 | var patterns = new[] {
153 | (Images.Body1, Images.HandLeft1, Images.HandRight1),
154 | (Images.Body2, Images.HandLeft2, Images.HandRight2),
155 | (Images.Body1, Images.HandLeft3, Images.HandRight1),
156 | (Images.Body2, Images.HandLeft3, Images.HandRight2),
157 | };
158 |
159 | var i = _random.Next(0, patterns.Length);
160 | BodyImage.Source = _images[patterns[i].Item1];
161 | HandLeftImage.Source = _images[patterns[i].Item2];
162 | HandRightImage.Source = _images[patterns[i].Item3];
163 |
164 | var faces = new[] {
165 | //Images.FaceEyesClosed,
166 | Images.FaceHappy,
167 | Images.FaceSmug,
168 | };
169 |
170 | FaceImage.Source = _images[faces[_random.Next(0, faces.Length)]];
171 | }
172 |
173 | private void ExpressFailedEmotion()
174 | {
175 | var patterns = new[] {
176 | (Images.Body1, Images.HandLeft1, Images.HandRight1),
177 | (Images.Body2, Images.HandLeft2, Images.HandRight2),
178 | };
179 |
180 | var i = _random.Next(0, patterns.Length);
181 | BodyImage.Source = _images[patterns[i].Item1];
182 | HandLeftImage.Source = _images[patterns[i].Item2];
183 | HandRightImage.Source = _images[patterns[i].Item3];
184 |
185 | var faces = new[] {
186 | //Images.FaceCried,
187 | Images.FaceSad,
188 | Images.FaceShocked,
189 | };
190 |
191 | FaceImage.Source = _images[faces[_random.Next(0, faces.Length)]];
192 |
193 | }
194 |
195 | public async Task ExpressEmotionAsync()
196 | {
197 | StopTimer();
198 | var blinked = false;
199 |
200 | if (_random.Next(0, 100) < BlinkPercentage)
201 | {
202 | // Blink
203 | blinked = true;
204 | await BlinkAsync();
205 | }
206 | else if (_random.Next(0, 100) < FaceFinePercentage)
207 | {
208 | // Change face
209 | FaceImage.Source = _images[Images.FaceFine];
210 | }
211 | else
212 | {
213 | // Change pause
214 |
215 | var patterns = new[] {
216 | (Images.Body1, Images.HandLeft1, Images.HandRight1),
217 | (Images.Body2, Images.HandLeft2, Images.HandRight2),
218 | };
219 |
220 | var i = _random.Next(0, patterns.Length);
221 | BodyImage.Source = _images[patterns[i].Item1];
222 | HandLeftImage.Source = _images[patterns[i].Item2];
223 | HandRightImage.Source = _images[patterns[i].Item3];
224 | }
225 |
226 | RestartTimer();
227 |
228 | if (blinked)
229 | {
230 | _expressEmotionAfterBlinking?.Invoke();
231 | }
232 | }
233 | }
234 | }
235 |
--------------------------------------------------------------------------------