diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..118e6cf43 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*.{cs,xaml}] +indent_style = tab +indent_size = 4 +end_of_line = crlf +insert_final_newline = true +charset = utf-8-bom diff --git a/.gitignore b/.gitignore index 2f7f05091..0666d1948 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ local.properties *.suo *.user *.sln.docstates +*.sln.ide # Build results diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..9bc7afb5a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "MetroRadiance"] + path = MetroRadiance +url=https://github.com/Grabacr07/MetroRadiance +[submodule "resources/translations"] + path = resources/translations + url = git://github.com/Yuubari/KanColleViewer-Translations.git diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 000000000..0a8ffdd90 --- /dev/null +++ b/FAQ.md @@ -0,0 +1,111 @@ +# (English) KanColleViewer! FAQ +This document will attempt to answer some of the questions that keep popping up in random places. +Any additions are welcome. + +## First things you must always do before reporting any issues: + +1. If you are using **Windows 7** and have not updated it to **Service Pack 1** yet, do it. +2. Update your Microsoft Internet Explorer to *the latest available version*. That means **Internet Explorer 11** as of December 15th, 2014. +3. Update your **.NET Framework** to the latest version (**4.5.2** as of this writing: use either [Offline installer](http://www.microsoft.com/en-us/download/details.aspx?id=42642) or [Web Installer](http://www.microsoft.com/en-us/download/details.aspx?id=42643)). +4. Update KCV to its latest version. Pay attention to the release notes. +5. If your question is related to translations, update translations to the latest version. +6. **Do not put KCV under Program Files.** Current English builds store translation XML files inside the program's directory and when located inside Program Files these files cannot be properly saved (because elevation is required). This will be fixed in the future. +7. **Any modifications to the .exe.config file are not officially supported.** This file is **not** read by KCV and it has no control over its parsing. The config file is generated at compile time and is read by the .NET Framework. **If KCV crashes with a configuration error in .exe.config, this means you, and only you, are to blame.** KCV ships with a correct configuration file. + +## Frequently Asked Questions +#### How do I use the region cookie method? +Do not spam-click the button; instead do the following: + +1. Open KCV. +2. Wait for DMM.com to finish loading; it will most probably be in English. +3. Click **Set region cookie**. +4. Click **日本語** in the top right to switch to the Japanese language version of DMM.com. +5. Either close and restart KCV or proceed to **オンラインゲーム** and then **艦隊これくしょん**. + +#### KCV does not translate anything inside the game. +KCV will never do that as that requires changing the data received from the server before passing it to the game client. This can be easily detected by DMM and is definitely grounds for a ban. + +#### KCV shows ships being constructed as “???”. +This is the default. Tick the **Reveal ship names** checkbox in the **Shipyard** tab to see the names. + +#### Is there a way to reload the game without going to **Settings** → **Browser**? +**Press F5** just like you do in your favourite web browser. + +#### I pinned KCV to my taskbar and translations aren't working. +Right click the pinned button on the taskbar. A context menu will appear with KanColleViewer at the top. Right click that line, it'll open another context menu. Choose Properties in there: + +![Taskbar Screenshot](http://i.koumakan.jp/2015-01-20/1421749535.png) + +Explorer will open the standard shortcut properties window: + +![Properties Screenshot](http://i.koumakan.jp/2015-01-20/1421749669.png) + +Make sure the **Start in:** folder is set to the folder where KCV is. + +#### I made a shortcut for KCV and translations aren't working. +See the answer above, but instead of the taskbar button's shortcut properties you'll need to right-click your shortcut and choose Properties in that context menu. Look for **Start in:** and make sure it points to the folder with the KCV executable. + +#### Translations aren't working even though KCV is not pinned or has **Start in** set correctly. +Try closing KCV, removing the XML files in the translations folder and restarting KCV; it should download translations automatically. If you have that option disabled, download them manually. If this still does not help, you might have permission issues. +Another approach: open **Windows File Explorer** (NOT Internet Explorer; to start File Explorer you can use the following keyboard shortcut: Windows Logo Key + E) and insert `%APPDATA%\grabacr.net\KanColleViewer\` into its address bar. Delete **Settings.xml** there. Note: this will reset your KCV settings. + +#### Every time I start KanColle, it seems to re-download every asset (CG, BGM, etc.) +Make sure your system time is correct. Enable time synchronisation if your BIOS RTC is faulty (**Internet Time** tab in the **Date and Time** applet). +*If you are running Windows 10 Technical Preview:* this is a known issue; as a workaround you can use a local caching proxy server ([polipo-win32](http://www.pps.univ-paris-diderot.fr/~jch/software/files/polipo/) should do the trick but setting it up is outside the scope of this document so I won't provide any instructions; you can also use Squid/win32 or any other HTTP proxy server you prefer). + +#### KCV shows the game but the bottom (or right, for the horizontal version) pane remains in the *Waiting for KanColle to start* state. +You probably launched a second copy of KCV. As KCV uses FiddlerCore's proxying functionality, only the first instance of KCV is able to set up Fiddler to listen on the port defined in the configuration file. Any other instances will get their data processed by that first instance's Fiddler. +If you need to run two copies at once, copy the KCV .exe file and its .exe.config file under a new name (say, KanColleViewer2.exe and KanColleViewer2.exe.config) and edit +```xml + + 37564 + +``` +replacing `37564` with some other value (recommended to be above `10000`; also, port number cannot exceed `65534`). If you start the renamed executable after that, it'll use its own port for its Fiddler instance. + +#### KCV shows the game wrong (I'm missing ship CG, map selection is wrong, etc.) +Try clearing the cache (either using the button on the KCV start screen or in Internet Explorer's Internet Options). If you are using API links, refresh your API token. + +#### Game hangs on the loading screen. +Check if the game works in your system's Internet Explorer and try clearing your cache. + +#### Instead of showing the game, KCV tells me to download something. +Install [Adobe Flash Player](http://get.adobe.com/flashplayer/). + +#### Instead of the game I only see a small red cross in the top left corner. +Most probably you have Flash disabled in your Add-on settings in Internet Explorer. Click the gear icon on the toolbar (it's on the very right) and choose **Manage Add-ons**; check if Adobe Flash is disabled under the **Toolbars and extensions** category. +*Important note:* Adobe Flash might not be present in the extension list because Internet Explorer has its own Flash plug-in. If that is the case, try installing Adobe's version. + +#### Instead of the game I only see white. +You may have ActiveX filtered or disabled in your Internet Explorer settings. Adobe Flash uses ActiveX; disable filtering and/or enable ActiveX in Internet Explorer settings. + +#### How to make KCV load my API link automatically? +Edit `KanColleViewer.exe.config` (or the appropriate configuration file for the horizontal build). +Change `http://www.dmm.com/netgame/social/application/-/detail/=/app_id=854854/` in +```xml + + http://www.dmm.com/netgame/social/application/-/detail/=/app_id=854854/ + +``` +to your API link URL, but *make sure you replace `&` with `&`* (this is called an *HTML escape*; `&` has a special meaning in XML and KCV will probably crash if you don't properly escape it). + +The end result should look kind of like this: + +```xml + + http://ip.octets.go.here/kcs/mainD2.swf?api_token=█████████████████&api_starttime=█████████████ + +``` + +There *must be* no quotation marks of any kind. The URL *must be* an absolute URL (in other words, it *must* start with `http://`). + +#### I use API link and the Flash quality settings don't work. +You must use the game with the DMM site for them to work, or you can make up your own HTML page that embeds the Flash object and make a script for it. + +#### KCV crashes randomly on my overclocked PC. +Some users reported crashes when running in an overclocked environment. Try disabling overclocking. + +#### How to report an issue? +You'll need a GitHub account. If the issue in question is not related to translations of quests, ship names, equipment and other in-game strings, use [KCV's issue tracker](https://github.com/Yuubari/KanColleViewer/issues). For everything related to translations of in-game strings use [KCV Localisation issue tracker](https://github.com/KCV-Localisation/KanColleViewer-Translations/issues); this is also the place for submitting new quests although now this isn't needed as they are submitted automatically. + +KanColleViewer! automatically generates a crash log file, `error.log`, in its folder. In cases of crashes please attach this file to your report. diff --git a/Grabacr07.Desktop.Metro/Desktop.Metro.csproj b/Grabacr07.Desktop.Metro/Desktop.Metro.csproj index 4f42e7bb6..e459fc241 100644 --- a/Grabacr07.Desktop.Metro/Desktop.Metro.csproj +++ b/Grabacr07.Desktop.Metro/Desktop.Metro.csproj @@ -59,15 +59,6 @@ ..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll - - ..\assemblies\MetroRadiance.dll - - - ..\assemblies\MetroRadiance.Chrome.dll - - - ..\assemblies\MetroRadiance.Core.dll - ..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll @@ -159,6 +150,20 @@ Designer + + + {21b4ad15-d9fa-4873-bfad-1eeefbc6c264} + MetroRadiance.Chrome + + + {a6b0a741-5be0-479d-b813-e65672350057} + MetroRadiance.Core + + + {0af0b9ff-d981-4d0f-a41f-c3ab6fe2f16d} + MetroRadiance + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Grabacr07.Desktop.Metro/Properties/Settings.Designer.cs b/Grabacr07.Desktop.Metro/Properties/Settings.Designer.cs index 30e0c4e1a..c71c0311f 100644 --- a/Grabacr07.Desktop.Metro/Properties/Settings.Designer.cs +++ b/Grabacr07.Desktop.Metro/Properties/Settings.Designer.cs @@ -1,26 +1,26 @@ -//------------------------------------------------------------------------------ -// -// このコードはツールによって生成されました。 -// ランタイム バージョン:4.0.30319.18051 -// -// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 -// コードが再生成されるときに損失したりします。 -// -//------------------------------------------------------------------------------ - -namespace Grabacr07.Desktop.Metro.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// このコードはツールによって生成されました。 +// ランタイム バージョン:4.0.30319.18051 +// +// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 +// コードが再生成されるときに損失したりします。 +// +//------------------------------------------------------------------------------ + +namespace Grabacr07.Desktop.Metro.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Grabacr07.Desktop.Metro/Properties/Settings.settings b/Grabacr07.Desktop.Metro/Properties/Settings.settings index 033d7a5e9..8f2fd95d6 100644 --- a/Grabacr07.Desktop.Metro/Properties/Settings.settings +++ b/Grabacr07.Desktop.Metro/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/App.config b/Grabacr07.KanColleViewer/App.config index 56feaa74a..73c9e8bbb 100644 --- a/Grabacr07.KanColleViewer/App.config +++ b/Grabacr07.KanColleViewer/App.config @@ -15,6 +15,7 @@ + @@ -22,7 +23,7 @@ 37564 - http://www.dmm.com/netgame/social/application/-/detail/=/app_id=854854/ + http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/ body { @@ -57,10 +58,10 @@ 8000 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/ + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/ - https://raw.github.com/Zharay/KanColleViewer/master/resources/Version.xml + http://kcv.koumakan.jp/version/ var flashQuality = function () {{ diff --git a/Grabacr07.KanColleViewer/App.xaml.cs b/Grabacr07.KanColleViewer/App.xaml.cs index bf17cc164..23c2125db 100644 --- a/Grabacr07.KanColleViewer/App.xaml.cs +++ b/Grabacr07.KanColleViewer/App.xaml.cs @@ -5,12 +5,14 @@ using System.Linq; using System.Threading.Tasks; using System.Windows; +using Grabacr07.KanColleViewer.Composition; using Grabacr07.KanColleViewer.Models; using Grabacr07.KanColleViewer.ViewModels; using Grabacr07.KanColleViewer.Views; using Grabacr07.KanColleWrapper; using Livet; using MetroRadiance; +using Microsoft.Win32; using AppSettings = Grabacr07.KanColleViewer.Properties.Settings; using Settings = Grabacr07.KanColleViewer.Models.Settings; @@ -36,17 +38,15 @@ protected override void OnStartup(StartupEventArgs e) ProductInfo = new ProductInfo(); Settings.Load(); - WindowsNotification.Notifier.Initialize(); + PluginHost.Instance.Initialize(); + NotifierHost.Instance.Initialize(KanColleClient.Current); Helper.SetRegistryFeatureBrowserEmulation(); + Helper.SetMMCSSTask(); KanColleClient.Current.Proxy.Startup(AppSettings.Default.LocalProxyPort); - KanColleClient.Current.Proxy.UseProxyOnConnect = Settings.Current.EnableProxy; - KanColleClient.Current.Proxy.UseProxyOnSSLConnect = Settings.Current.EnableSSLProxy; - KanColleClient.Current.Proxy.UpstreamProxyHost = Settings.Current.ProxyHost; - KanColleClient.Current.Proxy.UpstreamProxyPort = Settings.Current.ProxyPort; + KanColleClient.Current.Proxy.UpstreamProxySettings = Settings.Current.ProxySettings; ResourceService.Current.ChangeCulture(Settings.Current.Culture); - // Initialize translations KanColleClient.Current.Translations.EnableTranslations = Settings.Current.EnableTranslations; KanColleClient.Current.Translations.EnableAddUntranslated = Settings.Current.EnableAddUntranslated; @@ -57,7 +57,7 @@ protected override void OnStartup(StartupEventArgs e) { if (Settings.Current.EnableUpdateNotification && KanColleClient.Current.Updater.IsOnlineVersionGreater(0, ProductInfo.Version.ToString())) { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, KanColleViewer.Properties.Resources.Updater_Notification_Title, string.Format(KanColleViewer.Properties.Resources.Updater_Notification_NewAppVersion, KanColleClient.Current.Updater.GetOnlineVersion(0)), () => Process.Start(KanColleClient.Current.Updater.GetOnlineVersion(0, true))); @@ -67,7 +67,7 @@ protected override void OnStartup(StartupEventArgs e) { if (KanColleClient.Current.Updater.UpdateTranslations(AppSettings.Default.XMLTransUrl.AbsoluteUri, Settings.Current.Culture, KanColleClient.Current.Translations) > 0) { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, KanColleViewer.Properties.Resources.Updater_Notification_Title, KanColleViewer.Properties.Resources.Updater_Notification_TransUpdate_Success, () => App.ViewModelRoot.Activate()); @@ -82,6 +82,16 @@ protected override void OnStartup(StartupEventArgs e) ViewModelRoot = new MainWindowViewModel(); this.MainWindow = new MainWindow { DataContext = ViewModelRoot }; this.MainWindow.Show(); + + // Check if Adobe Flash is installed in Microsoft Explorer + if (GetFlashVersion() == "") + { + MessageBoxResult MB = MessageBox.Show(KanColleViewer.Properties.Resources.System_Flash_Not_Installed_Text, KanColleViewer.Properties.Resources.System_Flash_Not_Installed_Caption, MessageBoxButton.YesNo, MessageBoxImage.Error, MessageBoxResult.Yes); + if (MB == MessageBoxResult.Yes) { + Process.Start("IExplore.exe", @"http://get.adobe.com/flashplayer/"); + this.MainWindow.Close(); + } + } } protected override void OnExit(ExitEventArgs e) @@ -90,7 +100,7 @@ protected override void OnExit(ExitEventArgs e) KanColleClient.Current.Proxy.Shutdown(); - WindowsNotification.Notifier.Dispose(); + PluginHost.Instance.Dispose(); Settings.Current.Save(); } @@ -118,5 +128,22 @@ private static void ReportException(object sender, Exception exception) Debug.WriteLine(ex); } } + + /// + /// Obtains Adobe Flash Player's ActiveX element version. + /// + /// Empty string if Flash is not installed, otherwise the currently installed version. + private static string GetFlashVersion() + { + string sVersion = ""; + + RegistryKey FlashRK = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Macromedia\FlashPlayerActiveX"); + if (FlashRK != null) + { + sVersion = FlashRK.GetValue("Version", "").ToString(); + } + + return sVersion; + } } } diff --git a/Grabacr07.KanColleViewer/Composition/AggregateNotifier.cs b/Grabacr07.KanColleViewer/Composition/AggregateNotifier.cs new file mode 100644 index 000000000..46ca80e02 --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/AggregateNotifier.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// 複数の を集約した通知機能を提供します。 + /// + public class AggregateNotifier : INotifier + { + private readonly INotifier[] notifiers; + + public AggregateNotifier(IEnumerable notifiers) + { + this.notifiers = notifiers.ToArray(); + } + + public void Dispose() + { + this.notifiers.ForEach(x => x.Dispose()); + } + + public void Initialize() + { + this.notifiers.ForEach(x => x.Initialize()); + } + + public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) + { + this.notifiers.ForEach(x => x.Show(type, header, body, activated, failed)); + } + + public object GetSettingsView() + { + return null; + } + } +} diff --git a/Grabacr07.KanColleViewer/Composition/INotifier.cs b/Grabacr07.KanColleViewer/Composition/INotifier.cs new file mode 100644 index 000000000..e6f82408c --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/INotifier.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// 通知機能を公開します。 + /// + public interface INotifier : IPlugin, IDisposable + { + void Initialize(); + + void Show(NotifyType type, string header, string body, Action activated, Action failed = null); + } +} diff --git a/Grabacr07.KanColleViewer/Composition/IPlugin.cs b/Grabacr07.KanColleViewer/Composition/IPlugin.cs new file mode 100644 index 000000000..60094da15 --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/IPlugin.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// KanColleViewer プラグインの機能を公開します。 + /// + public interface IPlugin + { + /// + /// プラグインの設定画面を取得します。 + /// + /// プラグインの設定画面に表示する UI 要素。 + object GetSettingsView(); + } +} diff --git a/Grabacr07.KanColleViewer/Composition/IPluginMetadata.cs b/Grabacr07.KanColleViewer/Composition/IPluginMetadata.cs new file mode 100644 index 000000000..0d013939d --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/IPluginMetadata.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// KanColleViewer プラグインのメタデータを公開します。 + /// + public interface IPluginMetadata + { + /// + /// プラグインのタイトルを取得します。 + /// + string Title { get; } + + /// + /// プラグインが提供する機能を簡潔に説明するテキストを取得します。 + /// + string Description { get; } + + /// + /// プラグインのバージョンを取得します。 + /// + string Version { get; } + + /// + /// プラグインの開発者を取得します。 + /// + string Author { get; } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Composition/IToolPlugin.cs b/Grabacr07.KanColleViewer/Composition/IToolPlugin.cs new file mode 100644 index 000000000..6a1055a14 --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/IToolPlugin.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// プラグインの主機能を [ツール] タブに表示させるためのメンバーを公開します。 + /// + public interface IToolPlugin : IPlugin + { + string ToolName { get; } + + object GetToolView(); + } +} diff --git a/Grabacr07.KanColleViewer/Composition/NotifyType.cs b/Grabacr07.KanColleViewer/Composition/NotifyType.cs new file mode 100644 index 000000000..72b82446a --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/NotifyType.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// 通知の種類を表します。 + /// + public enum NotifyType + { + /// + /// その他。 + /// + Other = 0, + /// + /// 遠征からの帰投。 + /// + Expedition, + /// + /// 整備の完了。 + /// + Repair, + /// + /// 建造の完了。 + /// + Build, + /// + /// 疲労回復の完了。 + /// + Rejuvenated, + } +} diff --git a/Grabacr07.KanColleViewer/Composition/PluginHost.cs b/Grabacr07.KanColleViewer/Composition/PluginHost.cs new file mode 100644 index 000000000..0505f84c4 --- /dev/null +++ b/Grabacr07.KanColleViewer/Composition/PluginHost.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.ComponentModel.Composition.Hosting; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleViewer.Composition +{ + /// + /// プラグインを読み込み、機能へのアクセスを提供します。 + /// + public class PluginHost : IDisposable + { + /// + /// プラグインを検索するディレクトリへの相対パスを表す文字列を取得します。 + /// + /// プラグインを検索するディレクトリへの相対パスを表す文字列。 + public const string PluginsDirectory = "Plugins"; + + #region singleton members + + private static readonly PluginHost instance = new PluginHost(); + + /// + /// のインスタンスを取得します。 + /// + /// のインスタンス。 + public static PluginHost Instance + { + get { return instance; } + } + + #endregion + + private readonly CompositionContainer container; + + /// + /// プラグインによって提供される通知機能を表すオブジェクトのシーケンスを取得します。 + /// + /// プラグインによって提供される通知機能を表すオブジェクトのシーケンス。 + [ImportMany] + public IEnumerable> Notifiers { get; set; } + + /// + /// プラグインによって提供されるツール機能を表すオブジェクトのシーケンスを取得します。 + /// + [ImportMany] + public IEnumerable> Tools { get; set; } + + /// + /// インポートされたプラグインのシーケンスを取得します。 + /// + [ImportMany] + public IEnumerable> Plugins { get; set; } + + + private PluginHost() + { + var catalog = new AggregateCatalog(new AssemblyCatalog(Assembly.GetExecutingAssembly())); + + var current = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location); + if (current != null) + { + var pluginsPath = Path.Combine(current, PluginsDirectory); + if (Directory.Exists(pluginsPath)) + { + catalog.Catalogs.Add(new DirectoryCatalog(pluginsPath)); + } + } + + this.container = new CompositionContainer(catalog); + } + + static PluginHost() + { + + } + + public void Dispose() + { + this.container.Dispose(); + this.GetNotifier().Dispose(); + } + + /// + /// プラグインをロードし、初期化を行います。 + /// + public void Initialize() + { + this.container.ComposeParts(this); + this.GetNotifier().Initialize(); + } + + /// + /// ロードされている全ての通知機能を集約して操作するオブジェクトを返します。 + /// + /// ロードされている全ての通知機能を集約して操作するオブジェクト。 + public INotifier GetNotifier() + { + return new AggregateNotifier(this.Notifiers.Select(x => x.Value)); + } + } +} diff --git a/Grabacr07.KanColleViewer/KanColleViewer.csproj b/Grabacr07.KanColleViewer/KanColleViewer.csproj index 304bc301b..04f577c7d 100644 --- a/Grabacr07.KanColleViewer/KanColleViewer.csproj +++ b/Grabacr07.KanColleViewer/KanColleViewer.csproj @@ -10,7 +10,6 @@ Grabacr07.KanColleViewer KanColleViewer v4.5 - 8.1 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -27,6 +26,7 @@ true 12.0.41002.1 + false publish\ true Disk @@ -39,9 +39,9 @@ true 0 1.0.0.%2a - false false true + 12.0.50716.0 AnyCPU @@ -86,16 +86,10 @@ ..\packages\LivetExtensions.1.1.0.0\lib\net45\Livet.Extensions.dll - - ..\assemblies\MetroRadiance.dll - - - ..\assemblies\MetroRadiance.Chrome.dll - - - ..\assemblies\MetroRadiance.Core.dll + + False + ..\assemblies\Microsoft.Expression.Drawing.dll - ..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll @@ -107,31 +101,33 @@ False ..\packages\LivetExtensions.1.1.0.0\lib\net45\Microsoft.WindowsAPICodePack.Shell.dll - - ..\packages\NAudio.1.7.1\lib\net35\NAudio.dll - + ..\packages\Ix-Main.1.2.2\lib\net45\System.Interactive.dll - - ..\packages\Rx-Core.2.2.2\lib\net45\System.Reactive.Core.dll + + False + ..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll - - ..\packages\Rx-Interfaces.2.2.2\lib\net45\System.Reactive.Interfaces.dll + + False + ..\packages\Rx-Interfaces.2.2.4\lib\net45\System.Reactive.Interfaces.dll - - ..\packages\Rx-Linq.2.2.2\lib\net45\System.Reactive.Linq.dll + + False + ..\packages\Rx-Linq.2.2.4\lib\net45\System.Reactive.Linq.dll - - ..\packages\Rx-PlatformServices.2.2.2\lib\net45\System.Reactive.PlatformServices.dll + + False + ..\packages\Rx-PlatformServices.2.2.4\lib\net45\System.Reactive.PlatformServices.dll - - ..\packages\Rx-XAML.2.2.2\lib\net45\System.Reactive.Windows.Threading.dll + + False + ..\packages\Rx-Xaml.2.2.4\lib\net45\System.Reactive.Windows.Threading.dll - ..\packages\LivetCask.1.1.0.0\lib\net45\System.Windows.Interactivity.dll @@ -143,9 +139,6 @@ 4.0 - - C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd - @@ -155,40 +148,50 @@ MSBuild:Compile Designer + + + + + + - - + + - + - - - - + - + + + + + - - - + + + + + + - - + + @@ -196,20 +199,20 @@ - - - + + + - + @@ -227,22 +230,24 @@ + + + StateDetailIndicator.xaml + + + StateIconIndicator.xaml + + + Tools.xaml + - - Browser.xaml - + Updates.xaml - - Calculator.xaml - - - Rankings.xaml - BrowserNavigator.xaml @@ -250,7 +255,6 @@ ShipCatalogWindow.xaml - SlotItemCatalogWindow.xaml @@ -268,8 +272,8 @@ - - Dockyard.xaml + + Shipyard.xaml Expeditions.xaml @@ -277,6 +281,7 @@ ZoomFactorSelector.xaml + DebugTab.xaml @@ -287,21 +292,33 @@ Language.xaml + + FleetWindow.xaml + + + Browser.xaml + + + Notification.xaml + Operation.xaml Others.xaml + + PluginInfo.xaml + + + VersionInfo.xaml + Window.xaml StartContent.xaml - - Repairyard.xaml - Settings.xaml @@ -311,19 +328,11 @@ StatusBar.xaml - - Tools.xaml - - - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -343,6 +352,11 @@ MSBuild:Compile Controls.xaml + + Designer + MSBuild:Compile + Controls.xaml + Designer MSBuild:Compile @@ -412,6 +426,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -436,18 +458,10 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -464,10 +478,18 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -476,15 +498,19 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile - + + Designer + MSBuild:Compile + + Designer MSBuild:Compile - + Designer MSBuild:Compile @@ -500,7 +526,7 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile @@ -522,7 +548,6 @@ - @@ -541,10 +566,6 @@ MainWindow.xaml Code - - Designer - MSBuild:Compile - @@ -563,6 +584,9 @@ Resources.resx + + Resources.resx + Resources.resx @@ -594,6 +618,18 @@ {0bc8cf79-76d9-46ad-867f-fec6c6ad4594} KanColleWrapper + + {21b4ad15-d9fa-4873-bfad-1eeefbc6c264} + MetroRadiance.Chrome + + + {a6b0a741-5be0-479d-b813-e65672350057} + MetroRadiance.Core + + + {0af0b9ff-d981-4d0f-a41f-c3ab6fe2f16d} + MetroRadiance + @@ -601,7 +637,7 @@ 4 0 0 - primary + tlbimp False True @@ -616,10 +652,11 @@ - + + - + @@ -648,6 +685,12 @@ + + Always + + + Always + @@ -656,9 +699,12 @@ xcopy /Y "$(TargetDir)KanColleViewer.exe.config" "$(SolutionDir)KanColleViewer-Compiled" xcopy /Y "$(TargetDir)*.dll" "$(SolutionDir)KanColleViewer-Compiled\lib" xcopy /Y /E /I "$(TargetDir)en" "$(SolutionDir)KanColleViewer-Compiled\lib\en" -xcopy /Y /E /I "$(TargetDir)zh-CN" "$(SolutionDir)KanColleViewer-Compiled\lib\zh-CN" xcopy /Y /E /I "$(TargetDir)ko-KR" "$(SolutionDir)KanColleViewer-Compiled\lib\ko-KR" -xcopy /Y /E /I "$(SolutionDir)resources\Translations" "$(SolutionDir)KanColleViewer-Compiled\Translations" +xcopy /Y /E /I "$(TargetDir)zh-CN" "$(SolutionDir)KanColleViewer-Compiled\lib\zh-CN" +xcopy /Y "$(TargetDir)Plugins\*.dll" "$(SolutionDir)KanColleViewer-Compiled\Plugins" +xcopy /Y /I "$(SolutionDir)resources\Translations\ko-KR\*.xml" "$(SolutionDir)KanColleViewer-Compiled\Translations\ko-KR\" +xcopy /Y /I "$(SolutionDir)resources\Translations\zh-CN\*.xml" "$(SolutionDir)KanColleViewer-Compiled\Translations\zh-CN\" +xcopy /Y /I "$(SolutionDir)resources\Translations\*.xml" "$(SolutionDir)KanColleViewer-Compiled\Translations" xcopy /Y /E /I "$(SolutionDir)resources\Translations" "$(TargetDir)Translations" xcopy /Y /E /I "$(SolutionDir)resources\Sounds" "$(SolutionDir)KanColleViewer-Compiled\Sounds" xcopy /Y /E /I "$(SolutionDir)resources\Sounds" "$(TargetDir)Sounds" @@ -671,6 +717,7 @@ md "$(SolutionDir)KanColleViewer-Compiled" md "$(SolutionDir)KanColleViewer-Compiled\lib" md "$(SolutionDir)KanColleViewer-Compiled\Translations" md "$(SolutionDir)KanColleViewer-Compiled\Sounds" +md "$(SolutionDir)KanColleViewer-Compiled\Plugins" md "$(TargetDir)Translations" md "$(TargetDir)Sounds" diff --git a/Grabacr07.KanColleViewer/Models/Helper.cs b/Grabacr07.KanColleViewer/Models/Helper.cs index 4c0c4cee0..052efbf90 100644 --- a/Grabacr07.KanColleViewer/Models/Helper.cs +++ b/Grabacr07.KanColleViewer/Models/Helper.cs @@ -5,10 +5,11 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Text; using System.Threading.Tasks; using System.Windows; using Grabacr07.KanColleViewer.Win32; -using MetroRadiance.Core; using Microsoft.Win32; namespace Grabacr07.KanColleViewer.Models @@ -21,6 +22,21 @@ static Helper() IsWindows8OrGreater = (version.Major == 6 && version.Minor >= 2) || version.Major > 6; } + + /// + /// Windows 8 またはそれ以降のバージョンで動作しているかどうかを確認します。 + /// + public static bool IsWindows8OrGreater { get; private set; } + + /// + /// デザイナーのコンテキストで実行されているかどうかを取得します。 + /// + public static bool IsInDesignMode + { + get { return DesignerProperties.GetIsInDesignMode(new DependencyObject()); } + } + + public static string CreateScreenshotFilePath() { var filePath = Path.Combine( @@ -37,20 +53,6 @@ public static string CreateScreenshotFilePath() } - /// - /// Windows 8 またはそれ以降のバージョンで動作しているかどうかを確認します。 - /// - public static bool IsWindows8OrGreater { get; private set; } - - /// - /// デザイナーのコンテキストで実行されているかどうかを取得します。 - /// - public static bool IsInDesignMode - { - get { return DesignerProperties.GetIsInDesignMode(new DependencyObject()); } - } - - /// /// HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION /// に WebBrowser コントロールの動作バージョンを設定します。 @@ -73,6 +75,12 @@ public static void SetRegistryFeatureBrowserEmulation() } } + public static void SetMMCSSTask() + { + var index = 0u; + NativeMethods.AvSetMmThreadCharacteristics("Games", ref index); + } + /// /// キャッシュを削除します。 @@ -139,5 +147,72 @@ private static bool DeleteInternetCacheCore() return true; } + + + /// + /// 指定した文字列を暗号化します。 + /// + /// 暗号化する文字列。 + /// 暗号化に使用するパスワード。 + /// 暗号化された文字列。 + public static string EncryptString(string source, string password) + { + using (var rijndael = new RijndaelManaged()) + { + byte[] key, iv; + GenerateKeyFromPassword(password, rijndael.KeySize, out key, rijndael.BlockSize, out iv); + rijndael.Key = key; + rijndael.IV = iv; + + using (var encryptor = rijndael.CreateEncryptor()) + { + var strBytes = Encoding.UTF8.GetBytes(source); + var encBytes = encryptor.TransformFinalBlock(strBytes, 0, strBytes.Length); + return Convert.ToBase64String(encBytes); + } + } + } + + /// + /// 指定された文字列を複合化します。 + /// + /// 暗号化された文字列。 + /// 暗号化に使用したパスワード。 + /// 復号化された文字列。 + public static string DecryptString(string source, string password) + { + try + { + using (var rijndael = new RijndaelManaged()) + { + byte[] key, iv; + GenerateKeyFromPassword(password, rijndael.KeySize, out key, rijndael.BlockSize, out iv); + rijndael.Key = key; + rijndael.IV = iv; + + using (var decryptor = rijndael.CreateDecryptor()) + { + var strBytes = Convert.FromBase64String(source); + var decBytes = decryptor.TransformFinalBlock(strBytes, 0, strBytes.Length); + return Encoding.UTF8.GetString(decBytes); + } + } + } + catch (Exception ex) + { + Debug.WriteLine(ex); + return null; + } + } + + private static void GenerateKeyFromPassword(string password, int keySize, out byte[] key, int blockSize, out byte[] iv) + { + var salt = Encoding.UTF8.GetBytes("C98534F6-7286-4BED-83A6-10FD5052ABA6"); + using (var deriveBytes = new Rfc2898DeriveBytes(password, salt) { IterationCount = 1000 }) + { + key = deriveBytes.GetBytes(keySize / 8); + iv = deriveBytes.GetBytes(blockSize / 8); + } + } } } diff --git a/Grabacr07.KanColleViewer/Models/IWindowsNotifier.cs b/Grabacr07.KanColleViewer/Models/IWindowsNotifier.cs deleted file mode 100644 index 65b47d07b..000000000 --- a/Grabacr07.KanColleViewer/Models/IWindowsNotifier.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleViewer.Models -{ - /// - /// Windows の通知機能を公開します。 - /// - public interface IWindowsNotifier : IDisposable - { - void Initialize(); - void Show(string header, string body, Action activated, Action failed = null); - } -} diff --git a/Grabacr07.KanColleViewer/Models/NotifierHost.cs b/Grabacr07.KanColleViewer/Models/NotifierHost.cs new file mode 100644 index 000000000..faad87585 --- /dev/null +++ b/Grabacr07.KanColleViewer/Models/NotifierHost.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; +using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleWrapper; +using Livet; + +namespace Grabacr07.KanColleViewer.Models +{ + public class NotifierHost : NotificationObject + { + #region singleton members + + private static readonly NotifierHost instance = new NotifierHost(); + + public static NotifierHost Instance + { + get { return instance; } + } + + #endregion + + private NotifierHost() { } + + public void Initialize(KanColleClient client) + { + client.PropertyChanged += (sender, args) => + { + if (args.PropertyName == "IsStarted") this.InitializeCore(client); + }; + + } + + private void InitializeCore(KanColleClient client) + { + client.Homeport.Repairyard.PropertyChanged += (sender, args) => + { + if (args.PropertyName == "Docks") UpdateRepairyard(client.Homeport.Repairyard); + }; + UpdateRepairyard(client.Homeport.Repairyard); + + client.Homeport.Dockyard.PropertyChanged += (sender, args) => + { + if (args.PropertyName == "Docks") UpdateDockyard(client.Homeport.Dockyard); + }; + UpdateDockyard(client.Homeport.Dockyard); + + client.Homeport.Organization.PropertyChanged += (sender, args) => + { + if (args.PropertyName == "Fleets") UpdateFleets(client.Homeport.Organization); + }; + UpdateFleets(client.Homeport.Organization); + } + + private static void UpdateRepairyard(Repairyard repairyard) + { + foreach (var dock in repairyard.Docks.Values) + { + dock.Completed += (sender, args) => + { + if (Settings.Current.NotifyRepairingCompleted) + { + PluginHost.Instance.GetNotifier().Show( + NotifyType.Repair, + Resources.Repairyard_NotificationMessage_Title, + string.Format(Resources.Repairyard_NotificationMessage, args.DockId, args.Ship.Info.Name), + () => App.ViewModelRoot.Activate()); + } + }; + } + } + + private static void UpdateDockyard(Dockyard dockyard) + { + foreach (var dock in dockyard.Docks.Values) + { + dock.Completed += (sender, args) => + { + if (Settings.Current.NotifyBuildingCompleted) + { + var shipName = Settings.Current.CanDisplayBuildingShipName + ? args.Ship.Name + : Resources.Common_ShipGirl; + + PluginHost.Instance.GetNotifier().Show( + NotifyType.Build, + Resources.Dockyard_NotificationMessage_Title, + string.Format(Resources.Dockyard_NotificationMessage, args.DockId, shipName), + () => App.ViewModelRoot.Activate()); + } + }; + } + } + + private static void UpdateFleets(Organization organization) + { + foreach (var fleet in organization.Fleets.Values) + { + fleet.Expedition.Returned += (sender, args) => + { + if (Settings.Current.NotifyExpeditionReturned) + { + PluginHost.Instance.GetNotifier().Show( + NotifyType.Expedition, + Resources.Expedition_NotificationMessage_Title, + string.Format(Resources.Expedition_NotificationMessage, args.FleetName), + () => App.ViewModelRoot.Activate()); + } + }; + + fleet.State.Condition.Rejuvenated += (sender, args) => + { + if (Settings.Current.NotifyFleetRejuvenated) + { + PluginHost.Instance.GetNotifier().Show( + NotifyType.Rejuvenated, + Resources.Notifications_MoraleRestored, + string.Format(Resources.Notifications_MoraleRestored_Details, args.FleetName), + () => App.ViewModelRoot.Activate()); + } + }; + } + } + } +} diff --git a/Grabacr07.KanColleViewer/Models/ProductInfo.cs b/Grabacr07.KanColleViewer/Models/ProductInfo.cs index ae1814f20..6d2140354 100644 --- a/Grabacr07.KanColleViewer/Models/ProductInfo.cs +++ b/Grabacr07.KanColleViewer/Models/ProductInfo.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text; using System.Threading.Tasks; namespace Grabacr07.KanColleViewer.Models @@ -52,7 +51,7 @@ public string Trademark public Version Version { - get { return this._Version ?? (this._Version = assembly.GetName().Version); } + get { return this._Version ?? (this._Version = this.assembly.GetName().Version); } } public string VersionString @@ -62,7 +61,6 @@ public string VersionString public bool IsBetaRelease { - #if BETA get { return true; } #else @@ -70,20 +68,28 @@ public bool IsBetaRelease #endif } + public bool IsDebug + { +#if DEBUG + get { return true; } +#else + get { return false; } +#endif + } public IReadOnlyCollection Libraries { get { return this._Libraries ?? (this._Libraries = new List - { - new Library("Reactive Extensions", new Uri("http://rx.codeplex.com/")), - new Library("Interactive Extensions", new Uri("http://rx.codeplex.com/")), - new Library("Windows API Code Pack", new Uri("http://archive.msdn.microsoft.com/WindowsAPICodePack")), - new Library("Livet", new Uri("http://ugaya40.net/livet")), - new Library("DynamicJson", new Uri("http://dynamicjson.codeplex.com/")), - new Library("FiddlerCore", new Uri("http://fiddler2.com/fiddlercore")), - }); + { + new Library("Reactive Extensions", new Uri("http://rx.codeplex.com/")), + new Library("Interactive Extensions", new Uri("http://rx.codeplex.com/")), + new Library("Windows API Code Pack", new Uri("http://archive.msdn.microsoft.com/WindowsAPICodePack")), + new Library("Livet", new Uri("http://ugaya40.net/livet")), + new Library("DynamicJson", new Uri("http://dynamicjson.codeplex.com/")), + new Library("FiddlerCore", new Uri("http://fiddler2.com/fiddlercore")), + }); } } } diff --git a/Grabacr07.KanColleViewer/Models/ProxySettings.cs b/Grabacr07.KanColleViewer/Models/ProxySettings.cs new file mode 100644 index 000000000..d7517f88e --- /dev/null +++ b/Grabacr07.KanColleViewer/Models/ProxySettings.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Xml.Serialization; +using Grabacr07.KanColleWrapper; +using Livet; + +namespace Grabacr07.KanColleViewer.Models +{ + [Serializable] + public class ProxySettings : NotificationObject, IProxySettings + { + #region IsEnabled 変更通知プロパティ + + private bool _IsEnabled; + + public bool IsEnabled + { + get { return this._IsEnabled; } + set + { + if (this._IsEnabled != value) + { + this._IsEnabled = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region IsEnabledOnSSL 変更通知プロパティ + + private bool _IsEnabledOnSSL; + + public bool IsEnabledOnSSL + { + get { return this._IsEnabledOnSSL; } + set + { + if (this._IsEnabledOnSSL != value) + { + this._IsEnabledOnSSL = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Host 変更通知プロパティ + + private string _Host; + + [XmlElement(ElementName = "ProxyHost")] + public string Host + { + get { return this._Host; } + set + { + if (this._Host != value) + { + this._Host = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Port 変更通知プロパティ + + private ushort _Port; + + public ushort Port + { + get { return this._Port; } + set + { + if (this._Port != value) + { + this._Port = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region IsAuthRequired 変更通知プロパティ + + private bool _IsAuthRequired; + + public bool IsAuthRequired + { + get { return this._IsAuthRequired; } + set + { + if (this._IsAuthRequired != value) + { + this._IsAuthRequired = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Username 変更通知プロパティ + + private string _Username; + + public string Username + { + get { return this._Username; } + set + { + if (this._Username != value) + { + this._Username = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Password 変更通知プロパティ + + private const string passwordForEncryption = "4629A16F-C815-4307-B367-9C16FAC0A52F"; + + [XmlIgnore] + public string Password + { + get { return Helper.DecryptString(this.ProtectedPassword, passwordForEncryption); } + set { this.ProtectedPassword = Helper.EncryptString(value, passwordForEncryption); } + } + + #endregion + + #region ProtectedPassword 変更通知プロパティ + + private string _ProtectedPassword; + + public string ProtectedPassword + { + get { return this._ProtectedPassword; } + set + { + if (this._ProtectedPassword != value) + { + this._ProtectedPassword = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + } +} diff --git a/Grabacr07.KanColleViewer/Models/ResourceService.cs b/Grabacr07.KanColleViewer/Models/ResourceService.cs index 8638fb285..98359a9dd 100644 --- a/Grabacr07.KanColleViewer/Models/ResourceService.cs +++ b/Grabacr07.KanColleViewer/Models/ResourceService.cs @@ -31,32 +31,25 @@ public static ResourceService Current { "ja", // Resources.resx "en", + // "de", "zh-CN", "ko-KR", }; - private readonly Resources _Resources = new Resources(); - private readonly IReadOnlyCollection _SupportedCultures; - /// /// 多言語化されたリソースを取得します。 /// - public Resources Resources - { - get { return this._Resources; } - } + public Resources Resources { get; private set; } /// /// サポートされているカルチャを取得します。 /// - public IReadOnlyCollection SupportedCultures - { - get { return this._SupportedCultures; } - } + public IReadOnlyCollection SupportedCultures { get; private set; } private ResourceService() { - this._SupportedCultures = this.supportedCultureNames + this.Resources = new Resources(); + this.SupportedCultures = this.supportedCultureNames .Select(x => { try diff --git a/Grabacr07.KanColleViewer/Models/Settings.cs b/Grabacr07.KanColleViewer/Models/Settings.cs index 8a223cfac..7dbee509a 100644 --- a/Grabacr07.KanColleViewer/Models/Settings.cs +++ b/Grabacr07.KanColleViewer/Models/Settings.cs @@ -1,28 +1,28 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; -using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; using Grabacr07.KanColleViewer.Models.Data.Xml; +using Grabacr07.KanColleWrapper; +using Grabacr07.KanColleWrapper.Models; using Livet; -using MetroRadiance.Core; namespace Grabacr07.KanColleViewer.Models { + [Serializable] public class Settings : NotificationObject { #region static members private static readonly string filePath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "grabacr.net", + "Smooth and Flat", "KanColleViewer", "Settings.xml"); - private static readonly string CurrentSettingsVersion = "1.5"; + private static readonly string CurrentSettingsVersion = "1.7"; public static Settings Current { get; set; } @@ -37,7 +37,7 @@ public static void Load() catch (Exception ex) { Current = GetInitialSettings(); - Debug.WriteLine(ex); + System.Diagnostics.Debug.WriteLine(ex); } } @@ -64,12 +64,16 @@ public static Settings GetInitialSettings() ShipCatalog_RemodelFilter_Both = true, ShipCatalog_ModernFilter_Both = true, ShipCatalog_ShowMoreStats = true, + SlotItemCatalog_ShowStats = true, NotifyBuildingCompleted = true, NotifyRepairingCompleted = true, NotifyExpeditionReturned = true, FlashQuality = "High", FlashWindow = "Opaque", - CustomSoundVolume = 50 + CustomSoundVolume = 50, + KanColleClientSettings = new KanColleClientSettings(), + Culture = "en", + OrientationHorizontal = false, }; } @@ -250,21 +254,18 @@ public bool NotifyRepairingCompleted #endregion - #region EnableProxy 変更通知プロパティ + #region NotifyFleetRejuvenated 変更通知プロパティ - private bool _EnableProxy; + private bool _NotifyFleetRejuvenated; - /// - /// プロキシサーバーを使用して通信をするかどうかを取得または設定します。 - /// - public bool EnableProxy + public bool NotifyFleetRejuvenated { - get { return this._EnableProxy; } + get { return this._NotifyFleetRejuvenated; } set { - if (this._EnableProxy != value) + if (this._NotifyFleetRejuvenated != value) { - this._EnableProxy = value; + this._NotifyFleetRejuvenated = value; this.RaisePropertyChanged(); } } @@ -272,72 +273,53 @@ public bool EnableProxy #endregion - #region EnableSSLProxy 変更通知プロパティ + #region ProxySettings 変更通知プロパティ - private bool _EnableSSLProxy; + private ProxySettings _ProxySettings; - /// - /// プロキシサーバーを使用して SSL 通信をするかどうかを取得または設定します。 - /// - public bool EnableSSLProxy + public ProxySettings ProxySettings { - get { return this._EnableSSLProxy; } + get { return this._ProxySettings ?? (this._ProxySettings = new ProxySettings()); } set { - if (this._EnableSSLProxy != value) + if (this._ProxySettings != value) { - this._EnableSSLProxy = value; + this._ProxySettings = value; this.RaisePropertyChanged(); } } } - #endregion + #region old properties - #region ProxyHost 変更通知プロパティ + public bool EnableProxy + { + get { return this.ProxySettings.IsEnabled; } + set { this.ProxySettings.IsEnabled = value; } + } - private string _ProxyHost; + public bool EnableSSLProxy + { + get { return this.ProxySettings.IsEnabledOnSSL; } + set { this.ProxySettings.IsEnabledOnSSL = value; } + } - /// - /// プロキシサーバーのホスト名を取得または設定します。 - /// public string ProxyHost { - get { return this._ProxyHost; } - set - { - if (this._ProxyHost != value) - { - this._ProxyHost = value; - this.RaisePropertyChanged(); - } - } + get { return this.ProxySettings.Host; } + set { this.ProxySettings.Host = value; } } - - #endregion - - #region ProxyPort 変更通知プロパティ - - private UInt16 _ProxyPort; - - /// - /// プロキシサーバーのポート番号を取得または設定します。 - /// - public UInt16 ProxyPort + + public ushort ProxyPort { - get { return this._ProxyPort; } - set - { - if (this._ProxyPort != value) - { - this._ProxyPort = value; - this.RaisePropertyChanged(); - } - } + get { return this.ProxySettings.Port; } + set { this.ProxySettings.Port = value; } } #endregion + #endregion + #region TopMost 変更通知プロパティ private bool _TopMost; @@ -416,21 +398,16 @@ public double BrowserZoomFactor #endregion - #region ReSortieCondition 変更通知プロパティ - - private ushort _ReSortieCondition = 40; + #region KanColleClientSettings 変更通知プロパティ - /// - /// 艦隊が再出撃可能と判断する基準となるコンディション値を取得または設定します。 - /// - public ushort ReSortieCondition + public KanColleClientSettings KanColleClientSettings { - get { return this._ReSortieCondition; } + get { return KanColleClient.Current.Settings; } set { - if (this._ReSortieCondition != value) + if (KanColleClient.Current.Settings != value) { - this._ReSortieCondition = value; + KanColleClient.Current.Settings = value; this.RaisePropertyChanged(); } } @@ -438,24 +415,6 @@ public ushort ReSortieCondition #endregion - #region EnableLogging 変更通知プロパティ - - private bool _EnableLogging; - - public bool EnableLogging - { - get { return this._EnableLogging; } - set - { - if (this._EnableLogging != value) - { - this._EnableLogging = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion #region EnableTranslations 変更通知プロパティ @@ -911,6 +870,25 @@ public bool ShipCatalog_ShowMoreStats #endregion + #region SlotItemCatalog_ShowStats 変更通知プロパティ + + private bool _SlotItemCatalog_ShowStats; + + public bool SlotItemCatalog_ShowStats + { + get { return this._SlotItemCatalog_ShowStats; } + set + { + if (this._SlotItemCatalog_ShowStats != value) + { + this._SlotItemCatalog_ShowStats = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + #region FlashQuality 変更通知プロパティ private string _FlashQuality; @@ -947,36 +925,54 @@ public string FlashWindow } #endregion - #region EnableFatigueNotification 変更通知プロパティ + #region CustomSoundVolume 変更通知プロパティ - private bool _EnableFatigueNotification; + private int _CustomSoundVolume; - public bool EnableFatigueNotification + public int CustomSoundVolume { - get { return this._EnableFatigueNotification; } + get { return this._CustomSoundVolume; } set { - if (this._EnableFatigueNotification != value) + if (this._CustomSoundVolume != value) { - this._EnableFatigueNotification = value; + this._CustomSoundVolume = value; this.RaisePropertyChanged(); } } } #endregion - #region CustomSoundVolume 変更通知プロパティ + #region EnableLogging 変更通知プロパティ - private int _CustomSoundVolume; + private bool _EnableLogging; - public int CustomSoundVolume + public bool EnableLogging { - get { return this._CustomSoundVolume; } + get { return this._EnableLogging; } + set + { + if (this._EnableLogging != value) + { + this._EnableLogging = value; + this.RaisePropertyChanged(); + } + } + } + #endregion + + #region OrientationHorizontal 変更通知プロパティ + + private bool _OrientationHorizontal; + + public bool OrientationHorizontal + { + get { return this._OrientationHorizontal; } set { - if (this._CustomSoundVolume != value) + if (this._OrientationHorizontal != value) { - this._CustomSoundVolume = value; + this._OrientationHorizontal = value; this.RaisePropertyChanged(); } } @@ -1011,7 +1007,7 @@ public void Save() } catch (Exception ex) { - Debug.WriteLine(ex); + System.Diagnostics.Debug.WriteLine(ex); } } } diff --git a/Grabacr07.KanColleViewer/Models/StatusService.cs b/Grabacr07.KanColleViewer/Models/StatusService.cs index f1d6d7af4..3c844e0cc 100644 --- a/Grabacr07.KanColleViewer/Models/StatusService.cs +++ b/Grabacr07.KanColleViewer/Models/StatusService.cs @@ -17,6 +17,7 @@ public class StatusService : NotificationObject #region static members private static readonly StatusService current = new StatusService(); + public static StatusService Current { get { return current; } diff --git a/Grabacr07.KanColleViewer/Models/WindowsNotification.cs b/Grabacr07.KanColleViewer/Models/WindowsNotification.cs deleted file mode 100644 index 806da64b4..000000000 --- a/Grabacr07.KanColleViewer/Models/WindowsNotification.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models.Internal; - -namespace Grabacr07.KanColleViewer.Models -{ - /// - /// Windows の通知機能を提供します。Windows のバージョンに依存する実装の差異は隠蔽されます。 - /// - public static class WindowsNotification - { - private static IWindowsNotifier notifier; - - /// - /// 現在の OS バージョンに適合する通知機能へアクセスできるようにします。 - /// - public static IWindowsNotifier Notifier - { - get { return notifier ?? (notifier = Windows8Notifier.IsSupported ? (IWindowsNotifier)new Windows8Notifier() : new Windows7Notifier()); } - } - } -} diff --git a/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs b/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs index b1343595d..59976fd63 100644 --- a/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs +++ b/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs @@ -8,10 +8,10 @@ // アセンブリに関連付けられている情報を変更するには、 // これらの属性値を変更してください。 [assembly: AssemblyTitle("KanColleViewer!")] -[assembly: AssemblyDescription("KanColleViewer! β")] +[assembly: AssemblyDescription("KanColleViewer!")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("grabacr.net")] -[assembly: AssemblyProduct("KanColleViewer! β")] +[assembly: AssemblyProduct("KanColleViewer!")] [assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,4 +51,4 @@ // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.6.0.461")] +[assembly: AssemblyVersion("3.8.1.8")] diff --git a/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs b/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs index 2d85ba1f4..f6b839f12 100644 --- a/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs +++ b/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34014 +// Runtime Version:4.0.30319.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -357,6 +357,15 @@ public static string Fleets_Average { } } + /// + /// Looks up a localized string similar to 艦隊詳細. + /// + public static string Fleets_Button_Details { + get { + return ResourceManager.GetString("Fleets_Button_Details", resourceCulture); + } + } + /// /// Looks up a localized string similar to レベル. /// @@ -375,6 +384,15 @@ public static string Fleets_Speed_Fast { } } + /// + /// Looks up a localized string similar to 速度混成艦隊. + /// + public static string Fleets_Speed_Hybrid { + get { + return ResourceManager.GetString("Fleets_Speed_Hybrid", resourceCulture); + } + } + /// /// Looks up a localized string similar to 低速艦隊. /// @@ -402,6 +420,204 @@ public static string Fleets_ViewRange { } } + /// + /// Looks up a localized string similar to 索敵能力. + /// + public static string Fleets_ViewRange_Equipment { + get { + return ResourceManager.GetString("Fleets_ViewRange_Equipment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 制空戦力. + /// + public static string FleetWindow_AirSuperiority { + get { + return ResourceManager.GetString("FleetWindow_AirSuperiority", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 平均レベル. + /// + public static string FleetWindow_LevelAverage { + get { + return ResourceManager.GetString("FleetWindow_LevelAverage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 合計レベル. + /// + public static string FleetWindow_LevelTotal { + get { + return ResourceManager.GetString("FleetWindow_LevelTotal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 索敵値. + /// + public static string FleetWindow_LoS { + get { + return ResourceManager.GetString("FleetWindow_LoS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 連合艦隊は遠征に参加できません. + /// + public static string FleetWindow_Status_CombinedNoExpedition { + get { + return ResourceManager.GetString("FleetWindow_Status_CombinedNoExpedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の艦娘に大きなダメージはありません. + /// + public static string FleetWindow_Status_DamageInsignificant { + get { + return ResourceManager.GetString("FleetWindow_Status_DamageInsignificant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に大破した艦娘がいます. + /// + public static string FleetWindow_Status_DamageTaiha { + get { + return ResourceManager.GetString("FleetWindow_Status_DamageTaiha", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に大破した艦娘がいます!. + /// + public static string FleetWindow_Status_DamageTaihaSortie { + get { + return ResourceManager.GetString("FleetWindow_Status_DamageTaihaSortie", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に入渠中の艦娘がいます. + /// + public static string FleetWindow_Status_Docked { + get { + return ResourceManager.GetString("FleetWindow_Status_Docked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は遠征中です. + /// + public static string FleetWindow_Status_Expedition { + get { + return ResourceManager.GetString("FleetWindow_Status_Expedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 疲労回復まで. + /// + public static string FleetWindow_Status_FatigueTimer { + get { + return ResourceManager.GetString("FleetWindow_Status_FatigueTimer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の艦娘は入渠していません. + /// + public static string FleetWindow_Status_NoDocked { + get { + return ResourceManager.GetString("FleetWindow_Status_NoDocked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は遠征中ではありません. + /// + public static string FleetWindow_Status_NoExpedition { + get { + return ResourceManager.GetString("FleetWindow_Status_NoExpedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の艦娘は疲労していません. + /// + public static string FleetWindow_Status_NoFatigued { + get { + return ResourceManager.GetString("FleetWindow_Status_NoFatigued", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は出撃していません. + /// + public static string FleetWindow_Status_NotSortied { + get { + return ResourceManager.GetString("FleetWindow_Status_NotSortied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は補給済みです. + /// + public static string FleetWindow_Status_Resupplied { + get { + return ResourceManager.GetString("FleetWindow_Status_Resupplied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に未補給の艦娘がいます. + /// + public static string FleetWindow_Status_ResupplyNeeded { + get { + return ResourceManager.GetString("FleetWindow_Status_ResupplyNeeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は出撃中です!. + /// + public static string FleetWindow_Status_Sortied { + get { + return ResourceManager.GetString("FleetWindow_Status_Sortied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の出撃準備は完了していません. + /// + public static string FleetWindow_Status_SortieNotReady { + get { + return ResourceManager.GetString("FleetWindow_Status_SortieNotReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 出撃準備完了!. + /// + public static string FleetWindow_Status_SortieReady { + get { + return ResourceManager.GetString("FleetWindow_Status_SortieReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊詳細. + /// + public static string FleetWindow_Title { + get { + return ResourceManager.GetString("FleetWindow_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to 司令部. /// @@ -564,6 +780,51 @@ public static string MessageBar_ReSortie_Wounded { } } + /// + /// Looks up a localized string similar to 疲労回復完了. + /// + public static string Notifications_MoraleRestored { + get { + return ResourceManager.GetString("Notifications_MoraleRestored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 「{0}」に編成されている艦娘の疲労が回復しました。. + /// + public static string Notifications_MoraleRestored_Details { + get { + return ResourceManager.GetString("Notifications_MoraleRestored_Details", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to データ. + /// + public static string Overview_Data { + get { + return ResourceManager.GetString("Overview_Data", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 装備一覧. + /// + public static string Overview_EquipmentList { + get { + return ResourceManager.GetString("Overview_EquipmentList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦娘一覧. + /// + public static string Overview_ShipList { + get { + return ResourceManager.GetString("Overview_ShipList", resourceCulture); + } + } + /// /// Looks up a localized string similar to 任務画面の全ページにアクセスしてください。. /// @@ -663,6 +924,96 @@ public static string Quests_Weekly { } } + /// + /// Looks up a localized string similar to 大将. + /// + public static string Rank_Admiral { + get { + return ResourceManager.GetString("Rank_Admiral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 大佐. + /// + public static string Rank_Captain { + get { + return ResourceManager.GetString("Rank_Captain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 中佐. + /// + public static string Rank_Commander { + get { + return ResourceManager.GetString("Rank_Commander", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 中堅少佐. + /// + public static string Rank_Lieutenant { + get { + return ResourceManager.GetString("Rank_Lieutenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 少佐. + /// + public static string Rank_Lieutenant_Commander { + get { + return ResourceManager.GetString("Rank_Lieutenant_Commander", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 元帥. + /// + public static string Rank_Marshal_Admiral { + get { + return ResourceManager.GetString("Rank_Marshal_Admiral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 新米中佐. + /// + public static string Rank_Novice_Commander { + get { + return ResourceManager.GetString("Rank_Novice_Commander", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 新米少佐. + /// + public static string Rank_Novice_Lieutenant { + get { + return ResourceManager.GetString("Rank_Novice_Lieutenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 少将. + /// + public static string Rank_Rear_Admiral { + get { + return ResourceManager.GetString("Rank_Rear_Admiral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 中将. + /// + public static string Rank_Vice_Admiral { + get { + return ResourceManager.GetString("Rank_Vice_Admiral", resourceCulture); + } + } + /// /// Looks up a localized string similar to 入渠ドック. /// @@ -987,7 +1338,7 @@ public static string Settings_Logging_Enable { } /// - /// Looks up a localized string similar to 通信設定. + /// Looks up a localized string similar to ネットワーク. /// public static string Settings_Network { get { @@ -996,344 +1347,1379 @@ public static string Settings_Network { } /// - /// Looks up a localized string similar to Give a notification for ships in critical condition. + /// Looks up a localized string similar to パスワード. /// - public static string Settings_Notify_CriticalCondition { + public static string Settings_Network_Proxy_Auth_Password { get { - return ResourceManager.GetString("Settings_Notify_CriticalCondition", resourceCulture); + return ResourceManager.GetString("Settings_Network_Proxy_Auth_Password", resourceCulture); } } /// - /// Looks up a localized string similar to Give a notification when a fleet's fatigue as reset. (Not 100% accurate!). + /// Looks up a localized string similar to プロキシ サーバーにユーザー名とパスワードが必要. /// - public static string Settings_Notify_Fatigue { + public static string Settings_Network_Proxy_Auth_Required { get { - return ResourceManager.GetString("Settings_Notify_Fatigue", resourceCulture); + return ResourceManager.GetString("Settings_Network_Proxy_Auth_Required", resourceCulture); } } /// - /// Looks up a localized string similar to 動作設定. + /// Looks up a localized string similar to ユーザー名. /// - public static string Settings_Operation { + public static string Settings_Network_Proxy_Auth_Username { get { - return ResourceManager.GetString("Settings_Operation", resourceCulture); + return ResourceManager.GetString("Settings_Network_Proxy_Auth_Username", resourceCulture); } } /// - /// Looks up a localized string similar to その他. + /// Looks up a localized string similar to 通信設定. /// - public static string Settings_Other { + public static string Settings_Notifications { get { - return ResourceManager.GetString("Settings_Other", resourceCulture); + return ResourceManager.GetString("Settings_Notifications", resourceCulture); } } /// - /// Looks up a localized string similar to プロキシ設定. + /// Looks up a localized string similar to 通知を早める:. /// - public static string Settings_Proxy { + public static string Settings_Notifications_AheadOfTime { get { - return ResourceManager.GetString("Settings_Proxy", resourceCulture); + return ResourceManager.GetString("Settings_Notifications_AheadOfTime", resourceCulture); } } /// - /// Looks up a localized string similar to 通信にプロキシ サーバーを使用する. + /// Looks up a localized string similar to 艦これ本体の仕様により、最大 1 分間短縮できます。サーバー時刻とのずれを加味し、40 ~ 50 秒に設定することを推奨します。. /// - public static string Settings_Proxy_Enable { + public static string Settings_Notifications_AheadOfTime_Description { get { - return ResourceManager.GetString("Settings_Proxy_Enable", resourceCulture); + return ResourceManager.GetString("Settings_Notifications_AheadOfTime_Description", resourceCulture); } } /// - /// Looks up a localized string similar to SSL 接続時もプロキシサーバーを使用する. + /// Looks up a localized string similar to 秒. /// - public static string Settings_Proxy_Enable_4_SSL { + public static string Settings_Notifications_AheadOfTime_Seconds { + get { + return ResourceManager.GetString("Settings_Notifications_AheadOfTime_Seconds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 建造完了時に通知する. + /// + public static string Settings_Notifications_Construction_Enabled { + get { + return ResourceManager.GetString("Settings_Notifications_Construction_Enabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 遠征帰投時に通知する. + /// + public static string Settings_Notifications_Expeditions_Enabled { + get { + return ResourceManager.GetString("Settings_Notifications_Expeditions_Enabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に編成されている艦娘の疲労が回復したら通知する. + /// + public static string Settings_Notifications_FleetsMorale { + get { + return ResourceManager.GetString("Settings_Notifications_FleetsMorale", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に編成されているすべて艦娘のコンディション値が上記の値以上になったときに通知されます。コンディション値は 3 分間で 3 ずつ回復しますが、KanColleViewer 実装の仕様により、通知タイミングは数秒 ~ 最大 3 分程度遅れる可能性があること予めご了承ください。. + /// + public static string Settings_Notifications_FleetsMorale_Description { + get { + return ResourceManager.GetString("Settings_Notifications_FleetsMorale_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ※[動作設定] > [出撃コンディション] から設定できます。. + /// + public static string Settings_Notifications_FleetsMorale_Reference { + get { + return ResourceManager.GetString("Settings_Notifications_FleetsMorale_Reference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 再出撃可能とするコンディション値. + /// + public static string Settings_Notifications_FleetsMorale_Threshold { + get { + return ResourceManager.GetString("Settings_Notifications_FleetsMorale_Threshold", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 通知プラグイン. + /// + public static string Settings_Notifications_NotificationPlugins { + get { + return ResourceManager.GetString("Settings_Notifications_NotificationPlugins", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 以下のプラグインを使用して通知されます。. + /// + public static string Settings_Notifications_NotificationPlugins_InUse { + get { + return ResourceManager.GetString("Settings_Notifications_NotificationPlugins_InUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 入渠完了時に通知する. + /// + public static string Settings_Notifications_Repair_Enabled { + get { + return ResourceManager.GetString("Settings_Notifications_Repair_Enabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Give a notification for ships in critical condition. + /// + public static string Settings_Notify_CriticalCondition { + get { + return ResourceManager.GetString("Settings_Notify_CriticalCondition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 動作設定. + /// + public static string Settings_Operation { + get { + return ResourceManager.GetString("Settings_Operation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦上偵察機. + /// + public static string Settings_Operation_LoS_CarrierBasedRecon { + get { + return ResourceManager.GetString("Settings_Operation_LoS_CarrierBasedRecon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 彩雲、二式艦上偵察機. + /// + public static string Settings_Operation_LoS_CarrierBasedRecon_Tooltip { + get { + return ResourceManager.GetString("Settings_Operation_LoS_CarrierBasedRecon_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (偵察機 × 2) + (電探) + √(装備込みの艦隊索敵値合計 - 偵察機 - 電探). + /// + public static string Settings_Operation_LoS_New { + get { + return ResourceManager.GetString("Settings_Operation_LoS_New", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 装備による索敵値が重要とされる場合の計算方法 (推定). + /// + public static string Settings_Operation_LoS_New_Desc { + get { + return ResourceManager.GetString("Settings_Operation_LoS_New_Desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 偵察機. + /// + public static string Settings_Operation_LoS_Recon { + get { + return ResourceManager.GetString("Settings_Operation_LoS_Recon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 水上爆撃機. + /// + public static string Settings_Operation_LoS_SeaplaneBomber { + get { + return ResourceManager.GetString("Settings_Operation_LoS_SeaplaneBomber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 瑞雲、瑞雲(六三四空)、試製晴嵐. + /// + public static string Settings_Operation_LoS_SeaplaneBomber_Tooltip { + get { + return ResourceManager.GetString("Settings_Operation_LoS_SeaplaneBomber_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 水上偵察機. + /// + public static string Settings_Operation_LoS_SeaplaneRecon { + get { + return ResourceManager.GetString("Settings_Operation_LoS_SeaplaneRecon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 零式水上偵察機、零式水上観測機、九八式水上偵察機(夜偵). + /// + public static string Settings_Operation_LoS_SeaplaneRecon_Tooltip { + get { + return ResourceManager.GetString("Settings_Operation_LoS_SeaplaneRecon_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦娘と装備の索敵値の単純な合計. + /// + public static string Settings_Operation_LoS_Simple { + get { + return ResourceManager.GetString("Settings_Operation_LoS_Simple", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to KanColleViewer での従来の計算方法. + /// + public static string Settings_Operation_LoS_Simple_Description { + get { + return ResourceManager.GetString("Settings_Operation_LoS_Simple_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の索敵値の算出に使用する計算式は、以下を使用する. + /// + public static string Settings_Operation_LoS_Title { + get { + return ResourceManager.GetString("Settings_Operation_LoS_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 索敵値計算. + /// + public static string Settings_Operation_LoSCalculation { + get { + return ResourceManager.GetString("Settings_Operation_LoSCalculation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 出撃コンディション. + /// + public static string Settings_Operation_SortieCondition { + get { + return ResourceManager.GetString("Settings_Operation_SortieCondition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ※通常は、間宮アイコンが消灯する 40 か、自然回復上限の 49 に設定します。. + /// + public static string Settings_Operation_SortieCondition_Description { + get { + return ResourceManager.GetString("Settings_Operation_SortieCondition_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊内の全艦のコンディションが次の数値以上になったとき、出撃可能と判断する. + /// + public static string Settings_Operation_SortieCondition_Title { + get { + return ResourceManager.GetString("Settings_Operation_SortieCondition_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to その他. + /// + public static string Settings_Other { + get { + return ResourceManager.GetString("Settings_Other", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to プロキシ設定. + /// + public static string Settings_Proxy { + get { + return ResourceManager.GetString("Settings_Proxy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 通信にプロキシ サーバーを使用する. + /// + public static string Settings_Proxy_Enable { + get { + return ResourceManager.GetString("Settings_Proxy_Enable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SSL 接続時もプロキシサーバーを使用する. + /// + public static string Settings_Proxy_Enable_4_SSL { get { return ResourceManager.GetString("Settings_Proxy_Enable_4_SSL", resourceCulture); } } /// - /// Looks up a localized string similar to サーバー. + /// Looks up a localized string similar to サーバー. + /// + public static string Settings_Proxy_Host { + get { + return ResourceManager.GetString("Settings_Proxy_Host", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ポート. + /// + public static string Settings_Proxy_Port { + get { + return ResourceManager.GetString("Settings_Proxy_Port", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to スクリーンショット. + /// + public static string Settings_Screenshot { + get { + return ResourceManager.GetString("Settings_Screenshot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 選択. + /// + public static string Settings_Screenshot_FolderSelectionDialog_OpenButton { + get { + return ResourceManager.GetString("Settings_Screenshot_FolderSelectionDialog_OpenButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to スクリーンショットの保存先を指定. + /// + public static string Settings_Screenshot_FolderSelectionDialog_Title { + get { + return ResourceManager.GetString("Settings_Screenshot_FolderSelectionDialog_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存先. + /// + public static string Settings_Screenshot_FolderTextBox_Label { + get { + return ResourceManager.GetString("Settings_Screenshot_FolderTextBox_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 保存先フォルダーのパス. + /// + public static string Settings_Screenshot_FolderTextBox_Prompt { + get { + return ResourceManager.GetString("Settings_Screenshot_FolderTextBox_Prompt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 画像形式. + /// + public static string Settings_Screenshot_ImageFormat_Label { + get { + return ResourceManager.GetString("Settings_Screenshot_ImageFormat_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to フォルダーを開く. + /// + public static string Settings_Screenshot_OpenFolderButton { + get { + return ResourceManager.GetString("Settings_Screenshot_OpenFolderButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Translations. + /// + public static string Settings_Translations { + get { + return ResourceManager.GetString("Settings_Translations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Append untranslated items to the translation files?. + /// + public static string Settings_Translations_Add_Enable { + get { + return ResourceManager.GetString("Settings_Translations_Add_Enable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Translate game items, ships, and quests to selected language?. + /// + public static string Settings_Translations_Enable { + get { + return ResourceManager.GetString("Settings_Translations_Enable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updates. + /// + public static string Settings_Updates { + get { + return ResourceManager.GetString("Settings_Updates", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Automatically update translations on startup. + /// + public static string Settings_Updates_AutoUpdateTrans { + get { + return ResourceManager.GetString("Settings_Updates_AutoUpdateTrans", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check for the latest program and translation versions. + /// + public static string Settings_Updates_CheckUpdateButn_ToolTip { + get { + return ResourceManager.GetString("Settings_Updates_CheckUpdateButn_ToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check for Updates. + /// + public static string Settings_Updates_CheckUpdatesBtn { + get { + return ResourceManager.GetString("Settings_Updates_CheckUpdatesBtn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Currently. + /// + public static string Settings_Updates_CurrentVersion { + get { + return ResourceManager.GetString("Settings_Updates_CurrentVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get Latest KCV. + /// + public static string Settings_Updates_GetKCVBtn { + get { + return ResourceManager.GetString("Settings_Updates_GetKCVBtn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opens a link to the latest version of KCV found here.. + /// + public static string Settings_Updates_GetKCVBtn_ToolTip { + get { + return ResourceManager.GetString("Settings_Updates_GetKCVBtn_ToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Online. + /// + public static string Settings_Updates_OnlineVersion { + get { + return ResourceManager.GetString("Settings_Updates_OnlineVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check for updates on startup. + /// + public static string Settings_Updates_UpdateOnStartup { + get { + return ResourceManager.GetString("Settings_Updates_UpdateOnStartup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download Translations. + /// + public static string Settings_Updates_UpdateTransBtn { + get { + return ResourceManager.GetString("Settings_Updates_UpdateTransBtn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Downloads translations only for selected UI language!. + /// + public static string Settings_Updates_UpdateTransBtn_ToolTip { + get { + return ResourceManager.GetString("Settings_Updates_UpdateTransBtn_ToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to バージョン情報. + /// + public static string Settings_VersionInfo { + get { + return ResourceManager.GetString("Settings_VersionInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ウィンドウ設定. + /// + public static string Settings_Window { + get { + return ResourceManager.GetString("Settings_Window", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ウィンドウを常に最前面に表示する. + /// + public static string Settings_Window_TopMost { + get { + return ResourceManager.GetString("Settings_Window_TopMost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ウィンドウ操作. + /// + public static string Settings_WindowControl { + get { + return ResourceManager.GetString("Settings_WindowControl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ウィンドウをモニターの左端に寄せる. + /// + public static string Settings_WindowControl_LocationLeftButton { + get { + return ResourceManager.GetString("Settings_WindowControl_LocationLeftButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8 インチタブレット (800 x 1280) 用. + /// + public static string Settings_WindowControl_LocationLeftButton_Sub { + get { + return ResourceManager.GetString("Settings_WindowControl_LocationLeftButton_Sub", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 入渠中. + /// + public static string Ship_Condition_Docked { + get { + return ResourceManager.GetString("Ship_Condition_Docked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 健在. + /// + public static string Ship_Condition_Healthy { + get { + return ResourceManager.GetString("Ship_Condition_Healthy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 健在・ダメコン搭載. + /// + public static string Ship_Condition_HealthyDamecon { + get { + return ResourceManager.GetString("Ship_Condition_HealthyDamecon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 大破 (轟沈の可能性あり). + /// + public static string Ship_Condition_Taiha { + get { + return ResourceManager.GetString("Ship_Condition_Taiha", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 大破 (ダメコン使用可能). + /// + public static string Ship_Condition_TaihaDamecon { + get { + return ResourceManager.GetString("Ship_Condition_TaihaDamecon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 大破 (退避済み). + /// + public static string Ship_Condition_Towed { + get { + return ResourceManager.GetString("Ship_Condition_Towed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 撤退 (護衛退避). + /// + public static string Ship_Condition_Towing { + get { + return ResourceManager.GetString("Ship_Condition_Towing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dock: {0}. + /// + public static string Ship_RepairDockToolTip { + get { + return ResourceManager.GetString("Ship_RepairDockToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Facility: {0}. + /// + public static string Ship_RepairFacilityToolTip { + get { + return ResourceManager.GetString("Ship_RepairFacilityToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 入渠中. + /// + public static string Ship_Repairing { + get { + return ResourceManager.GetString("Ship_Repairing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show additional stats. + /// + public static string ShipCatalog_AdditionalStats { + get { + return ResourceManager.GetString("ShipCatalog_AdditionalStats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 対空. + /// + public static string ShipCatalog_Column_AntiAir { + get { + return ResourceManager.GetString("ShipCatalog_Column_AntiAir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 装甲. + /// + public static string ShipCatalog_Column_Armour { + get { + return ResourceManager.GetString("ShipCatalog_Column_Armour", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 対潜. + /// + public static string ShipCatalog_Column_ASW { + get { + return ResourceManager.GetString("ShipCatalog_Column_ASW", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cond.. + /// + public static string ShipCatalog_Column_Condition { + get { + return ResourceManager.GetString("ShipCatalog_Column_Condition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 装備. + /// + public static string ShipCatalog_Column_Equipped { + get { + return ResourceManager.GetString("ShipCatalog_Column_Equipped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 回避. + /// + public static string ShipCatalog_Column_Evasion { + get { + return ResourceManager.GetString("ShipCatalog_Column_Evasion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 火力. + /// + public static string ShipCatalog_Column_Firepower { + get { + return ResourceManager.GetString("ShipCatalog_Column_Firepower", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦種. + /// + public static string ShipCatalog_Column_HullCode { + get { + return ResourceManager.GetString("ShipCatalog_Column_HullCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to レベル. + /// + public static string ShipCatalog_Column_Level { + get { + return ResourceManager.GetString("ShipCatalog_Column_Level", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 運. + /// + public static string ShipCatalog_Column_Luck { + get { + return ResourceManager.GetString("ShipCatalog_Column_Luck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦名. + /// + public static string ShipCatalog_Column_Name { + get { + return ResourceManager.GetString("ShipCatalog_Column_Name", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID. + /// + public static string ShipCatalog_Column_ObtainedID { + get { + return ResourceManager.GetString("ShipCatalog_Column_ObtainedID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 雷装. + /// + public static string ShipCatalog_Column_Torpedo { + get { + return ResourceManager.GetString("ShipCatalog_Column_Torpedo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 索敵. + /// + public static string ShipCatalog_Column_ViewRange { + get { + return ResourceManager.GetString("ShipCatalog_Column_ViewRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦種. + /// + public static string ShipCatalog_Filter_Hulls { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 戦艦. + /// + public static string ShipCatalog_Filter_Hulls_BB { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_BB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 重巡・航巡. + /// + public static string ShipCatalog_Filter_Hulls_CA { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_CA", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 軽巡・雷巡. + /// + public static string ShipCatalog_Filter_Hulls_CL { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_CL", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 航空母艦. + /// + public static string ShipCatalog_Filter_Hulls_CV { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_CV", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 駆逐艦. + /// + public static string ShipCatalog_Filter_Hulls_DD { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_DD", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 他の. + /// + public static string ShipCatalog_Filter_Hulls_Misc { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_Misc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 航戦・航巡. + /// + public static string ShipCatalog_Filter_Hulls_SeaplaneBomberCapable { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_SeaplaneBomberCapable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to すべて選択. + /// + public static string ShipCatalog_Filter_Hulls_SelectAll { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_SelectAll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 潜水艦. + /// + public static string ShipCatalog_Filter_Hulls_SS { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Hulls_SS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to すべて. + /// + public static string ShipCatalog_Filter_Misc_All { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_All", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 遠征中の艦を除外する. + /// + public static string ShipCatalog_Filter_Misc_ExcludeOnExpedition { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_ExcludeOnExpedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 遠征. + /// + public static string ShipCatalog_Filter_Misc_Expedition { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Expedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to レベル. + /// + public static string ShipCatalog_Filter_Misc_Level { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Level", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lv.1. /// - public static string Settings_Proxy_Host { + public static string ShipCatalog_Filter_Misc_Level1 { get { - return ResourceManager.GetString("Settings_Proxy_Host", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Level1", resourceCulture); } } /// - /// Looks up a localized string similar to ポート. + /// Looks up a localized string similar to Lv.2 以上. /// - public static string Settings_Proxy_Port { + public static string ShipCatalog_Filter_Misc_Level2Up { get { - return ResourceManager.GetString("Settings_Proxy_Port", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Level2Up", resourceCulture); } } /// - /// Looks up a localized string similar to スクリーンショット. + /// Looks up a localized string similar to ロック. /// - public static string Settings_Screenshot { + public static string ShipCatalog_Filter_Misc_Lock { get { - return ResourceManager.GetString("Settings_Screenshot", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Lock", resourceCulture); } } /// - /// Looks up a localized string similar to 選択. + /// Looks up a localized string similar to ロックしていない. /// - public static string Settings_Screenshot_FolderSelectionDialog_OpenButton { + public static string ShipCatalog_Filter_Misc_LockedNo { get { - return ResourceManager.GetString("Settings_Screenshot_FolderSelectionDialog_OpenButton", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_LockedNo", resourceCulture); } } /// - /// Looks up a localized string similar to スクリーンショットの保存先を指定. + /// Looks up a localized string similar to ロックしている. /// - public static string Settings_Screenshot_FolderSelectionDialog_Title { + public static string ShipCatalog_Filter_Misc_LockedYes { get { - return ResourceManager.GetString("Settings_Screenshot_FolderSelectionDialog_Title", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_LockedYes", resourceCulture); } } /// - /// Looks up a localized string similar to 保存先. + /// Looks up a localized string similar to 近代化改修. /// - public static string Settings_Screenshot_FolderTextBox_Label { + public static string ShipCatalog_Filter_Misc_Modernised { get { - return ResourceManager.GetString("Settings_Screenshot_FolderTextBox_Label", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Modernised", resourceCulture); } } /// - /// Looks up a localized string similar to 保存先フォルダーのパス. + /// Looks up a localized string similar to 改修未完. /// - public static string Settings_Screenshot_FolderTextBox_Prompt { + public static string ShipCatalog_Filter_Misc_ModernisedNo { get { - return ResourceManager.GetString("Settings_Screenshot_FolderTextBox_Prompt", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_ModernisedNo", resourceCulture); } } /// - /// Looks up a localized string similar to 画像形式. + /// Looks up a localized string similar to 改修完了. /// - public static string Settings_Screenshot_ImageFormat_Label { + public static string ShipCatalog_Filter_Misc_ModernisedYes { get { - return ResourceManager.GetString("Settings_Screenshot_ImageFormat_Label", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_ModernisedYes", resourceCulture); } } /// - /// Looks up a localized string similar to フォルダーを開く. + /// Looks up a localized string similar to 改造. /// - public static string Settings_Screenshot_OpenFolderButton { + public static string ShipCatalog_Filter_Misc_Remodelled { get { - return ResourceManager.GetString("Settings_Screenshot_OpenFolderButton", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Remodelled", resourceCulture); } } /// - /// Looks up a localized string similar to Translations. + /// Looks up a localized string similar to 改造未完. /// - public static string Settings_Translations { + public static string ShipCatalog_Filter_Misc_RemodelledNo { get { - return ResourceManager.GetString("Settings_Translations", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_RemodelledNo", resourceCulture); } } /// - /// Looks up a localized string similar to Append untranslated items to the translation files?. + /// Looks up a localized string similar to 改造完了. /// - public static string Settings_Translations_Add_Enable { + public static string ShipCatalog_Filter_Misc_RemodelledYes { get { - return ResourceManager.GetString("Settings_Translations_Add_Enable", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_RemodelledYes", resourceCulture); } } /// - /// Looks up a localized string similar to Translate game items, ships, and quests to selected language?. + /// Looks up a localized string similar to 速力. /// - public static string Settings_Translations_Enable { + public static string ShipCatalog_Filter_Misc_Speed { get { - return ResourceManager.GetString("Settings_Translations_Enable", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Speed", resourceCulture); } } /// - /// Looks up a localized string similar to Updates. + /// Looks up a localized string similar to 高速. /// - public static string Settings_Updates { + public static string ShipCatalog_Filter_Misc_SpeedFast { get { - return ResourceManager.GetString("Settings_Updates", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_SpeedFast", resourceCulture); } } /// - /// Looks up a localized string similar to Automatically update translations on startup. + /// Looks up a localized string similar to 低速. /// - public static string Settings_Updates_AutoUpdateTrans { + public static string ShipCatalog_Filter_Misc_SpeedSlow { get { - return ResourceManager.GetString("Settings_Updates_AutoUpdateTrans", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Misc_SpeedSlow", resourceCulture); } } /// - /// Looks up a localized string similar to Check for the latest program and translation versions. + /// Looks up a localized string similar to Reset Filter Settings. /// - public static string Settings_Updates_CheckUpdateButn_ToolTip { + public static string ShipCatalog_Filter_Reset { get { - return ResourceManager.GetString("Settings_Updates_CheckUpdateButn_ToolTip", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Reset", resourceCulture); } } /// - /// Looks up a localized string similar to Check for Updates. + /// Looks up a localized string similar to Save Filter Settings. /// - public static string Settings_Updates_CheckUpdatesBtn { + public static string ShipCatalog_Filter_SaveSettings { get { - return ResourceManager.GetString("Settings_Updates_CheckUpdatesBtn", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_SaveSettings", resourceCulture); } } /// - /// Looks up a localized string similar to Currently. + /// Looks up a localized string similar to Does not include ship types!. /// - public static string Settings_Updates_CurrentVersion { + public static string ShipCatalog_Filter_SaveSettings_ToolTip { get { - return ResourceManager.GetString("Settings_Updates_CurrentVersion", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_SaveSettings_ToolTip", resourceCulture); } } /// - /// Looks up a localized string similar to Get Latest KCV. + /// Looks up a localized string similar to フィルター設定. /// - public static string Settings_Updates_GetKCVBtn { + public static string ShipCatalog_Filter_Title { get { - return ResourceManager.GetString("Settings_Updates_GetKCVBtn", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Filter_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Opens a link to the latest version of KCV found here.. + /// Looks up a localized string similar to AL 作戦参加済み. /// - public static string Settings_Updates_GetKCVBtn_ToolTip { + public static string ShipCatalog_Operation_AL { get { - return ResourceManager.GetString("Settings_Updates_GetKCVBtn_ToolTip", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Operation_AL", resourceCulture); } } /// - /// Looks up a localized string similar to Online. + /// Looks up a localized string similar to MI 作戦参加済み. /// - public static string Settings_Updates_OnlineVersion { + public static string ShipCatalog_Operation_MI { get { - return ResourceManager.GetString("Settings_Updates_OnlineVersion", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Operation_MI", resourceCulture); } } /// - /// Looks up a localized string similar to Check for updates on startup. + /// Looks up a localized string similar to 作戦出撃なし. /// - public static string Settings_Updates_UpdateOnStartup { + public static string ShipCatalog_Operation_NeitherALnorMI { get { - return ResourceManager.GetString("Settings_Updates_UpdateOnStartup", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Operation_NeitherALnorMI", resourceCulture); } } /// - /// Looks up a localized string similar to Download Translations. + /// Looks up a localized string similar to 更新. /// - public static string Settings_Updates_UpdateTransBtn { + public static string ShipCatalog_Sort_Apply { get { - return ResourceManager.GetString("Settings_Updates_UpdateTransBtn", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Apply", resourceCulture); } } /// - /// Looks up a localized string similar to Downloads translations only for selected UI language!. + /// Looks up a localized string similar to 昇順. /// - public static string Settings_Updates_UpdateTransBtn_ToolTip { + public static string ShipCatalog_Sort_Ascending { get { - return ResourceManager.GetString("Settings_Updates_UpdateTransBtn_ToolTip", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Ascending", resourceCulture); } } /// - /// Looks up a localized string similar to バージョン情報. + /// Looks up a localized string similar to クリア. /// - public static string Settings_VersionInfo { + public static string ShipCatalog_Sort_Clear { get { - return ResourceManager.GetString("Settings_VersionInfo", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Clear", resourceCulture); } } /// - /// Looks up a localized string similar to ウィンドウ設定. + /// Looks up a localized string similar to 降順. /// - public static string Settings_Window { + public static string ShipCatalog_Sort_Descending { get { - return ResourceManager.GetString("Settings_Window", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Descending", resourceCulture); } } /// - /// Looks up a localized string similar to ウィンドウを常に最前面に表示する. + /// Looks up a localized string similar to なし. /// - public static string Settings_Window_TopMost { + public static string ShipCatalog_Sort_None { get { - return ResourceManager.GetString("Settings_Window_TopMost", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_None", resourceCulture); } } /// - /// Looks up a localized string similar to ウィンドウ操作. + /// Looks up a localized string similar to 方法. /// - public static string Settings_WindowControl { + public static string ShipCatalog_Sort_Prompt { get { - return ResourceManager.GetString("Settings_WindowControl", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Prompt", resourceCulture); } } /// - /// Looks up a localized string similar to ウィンドウをモニターの左端に寄せる. + /// Looks up a localized string similar to 艦娘を以下の順序で並べ替えます。. /// - public static string Settings_WindowControl_LocationLeftButton { + public static string ShipCatalog_Sort_Subtitle { get { - return ResourceManager.GetString("Settings_WindowControl_LocationLeftButton", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Subtitle", resourceCulture); } } /// - /// Looks up a localized string similar to 8 インチタブレット (800 x 1280) 用. + /// Looks up a localized string similar to 並べ替え設定. /// - public static string Settings_WindowControl_LocationLeftButton_Sub { + public static string ShipCatalog_Sort_Title { get { - return ResourceManager.GetString("Settings_WindowControl_LocationLeftButton_Sub", resourceCulture); + return ResourceManager.GetString("ShipCatalog_Sort_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Dock: {0}. + /// Looks up a localized string similar to CatalogID. /// - public static string Ship_RepairDockToolTip { + public static string ShipCatalog_SortBy_CatalogID { get { - return ResourceManager.GetString("Ship_RepairDockToolTip", resourceCulture); + return ResourceManager.GetString("ShipCatalog_SortBy_CatalogID", resourceCulture); } } /// - /// Looks up a localized string similar to Facility: {0}. + /// Looks up a localized string similar to Condition 値. /// - public static string Ship_RepairFacilityToolTip { + public static string ShipCatalog_SortBy_Condition { get { - return ResourceManager.GetString("Ship_RepairFacilityToolTip", resourceCulture); + return ResourceManager.GetString("ShipCatalog_SortBy_Condition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 次のレベルまでの経験値. + /// + public static string ShipCatalog_SortBy_Experience { + get { + return ResourceManager.GetString("ShipCatalog_SortBy_Experience", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 耐久. + /// + public static string ShipCatalog_SortBy_MaxHP { + get { + return ResourceManager.GetString("ShipCatalog_SortBy_MaxHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 出撃海域. + /// + public static string ShipCatalog_SortieWaters { + get { + return ResourceManager.GetString("ShipCatalog_SortieWaters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AL 作戦. + /// + public static string ShipCatalog_SortieWaters_AL { + get { + return ResourceManager.GetString("ShipCatalog_SortieWaters_AL", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MI 作戦. + /// + public static string ShipCatalog_SortieWaters_MI { + get { + return ResourceManager.GetString("ShipCatalog_SortieWaters_MI", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 所属艦娘一覧. + /// + public static string ShipCatalog_WindowTitle { + get { + return ResourceManager.GetString("ShipCatalog_WindowTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 工廠. + /// + public static string Shipyard { + get { + return ResourceManager.GetString("Shipyard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 建造. + /// + public static string Shipyard_ConstructionDock { + get { + return ResourceManager.GetString("Shipyard_ConstructionDock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 装備開発. + /// + public static string Shipyard_Development { + get { + return ResourceManager.GetString("Shipyard_Development", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 失敗. + /// + public static string Shipyard_Development_Result_Failure { + get { + return ResourceManager.GetString("Shipyard_Development_Result_Failure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 結果なし. + /// + public static string Shipyard_Development_Result_None { + get { + return ResourceManager.GetString("Shipyard_Development_Result_None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 成功. + /// + public static string Shipyard_Development_Result_Success { + get { + return ResourceManager.GetString("Shipyard_Development_Result_Success", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 入渠. + /// + public static string Shipyard_RepairDock { + get { + return ResourceManager.GetString("Shipyard_RepairDock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 表示の更新. + /// + public static string SlotItemCatalog_Refresh { + get { + return ResourceManager.GetString("SlotItemCatalog_Refresh", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show item stats. + /// + public static string SlotItemCatalog_ShowStats { + get { + return ResourceManager.GetString("SlotItemCatalog_ShowStats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 所有装備一覧. + /// + public static string SlotItemCatalog_WindowTitle { + get { + return ResourceManager.GetString("SlotItemCatalog_WindowTitle", resourceCulture); } } @@ -1400,6 +2786,69 @@ public static string StartContent_Welcom { } } + /// + /// Looks up a localized string similar to 大破した艦娘がいます!!!. + /// + public static string StateDetail_CriticalDamage { + get { + return ResourceManager.GetString("StateDetail_CriticalDamage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊に艦娘が編成されていません。. + /// + public static string StateDetail_EmptyFleet { + get { + return ResourceManager.GetString("StateDetail_EmptyFleet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 出撃可能!. + /// + public static string StateDetail_IsReady { + get { + return ResourceManager.GetString("StateDetail_IsReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 疲労回復済み. + /// + public static string StateDetail_MoraleRecovering { + get { + return ResourceManager.GetString("StateDetail_MoraleRecovering", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 疲労回復まで. + /// + public static string StateDetail_MoraleRecoveryTimer { + get { + return ResourceManager.GetString("StateDetail_MoraleRecoveryTimer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 遠征中. + /// + public static string StateDetail_OnExpedition { + get { + return ResourceManager.GetString("StateDetail_OnExpedition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊は出撃中です!. + /// + public static string StateDetail_OnSortie { + get { + return ResourceManager.GetString("StateDetail_OnSortie", resourceCulture); + } + } + /// /// Looks up a localized string similar to Accuracy. /// @@ -1490,6 +2939,15 @@ public static string Stats_Luck { } } + /// + /// Looks up a localized string similar to Next Remodel. + /// + public static string Stats_RemodelLevel { + get { + return ResourceManager.GetString("Stats_RemodelLevel", resourceCulture); + } + } + /// /// Looks up a localized string similar to Sight Rng. /// @@ -1535,6 +2993,33 @@ public static string StatusBar_Ready { } } + /// + /// Looks up a localized string similar to Adobe Flash ActiveX Not Found. + /// + public static string System_Flash_Not_Installed_Caption { + get { + return ResourceManager.GetString("System_Flash_Not_Installed_Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adobe Flash for Microsoft Internet Explorer is required by KCV! but is not installed. Would you like to download and install it now?. + /// + public static string System_Flash_Not_Installed_Text { + get { + return ResourceManager.GetString("System_Flash_Not_Installed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ツール. + /// + public static string Tools { + get { + return ResourceManager.GetString("Tools", resourceCulture); + } + } + /// /// Looks up a localized string similar to Calculator. /// diff --git a/Grabacr07.KanColleViewer/Properties/Resources.de.resx b/Grabacr07.KanColleViewer/Properties/Resources.de.resx new file mode 100644 index 000000000..77a5986c7 --- /dev/null +++ b/Grabacr07.KanColleViewer/Properties/Resources.de.resx @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ※ Wird bald eingebaut + + + Keine Benachrichtigungen + + + (geplant) + + + Benachrichtigungen + + + (Windows 8+) + + + Schiffsmädchen + + + Debug + + + Dies ist eine Testbenachrichtigung. + + + Test + + + Werft + + + Fertig! + + + Schiffsnamen anzeigen + + + Anzeigeeinstellungen + + + Gesperrt + + + Bau von {1} in Dock {0} ist abgeschlossen. + + + Werft + + + Benachrichtigen wenn fertiggestellt + + + Individuelle Dock Einstellungen + + + Schiff in Bau + + + Zeit bis Fertigstellung + + + Verbleibende Zeit + + + Leer + + + Expeditionen + + + Nicht auf einer Expedition. + + + 「{0}」 ist von einer Expedition zurück. + + + Expedition + + + Bei Rückkehr benachrichtigen + + + Individuelle Flotten Einstellungen + + + Abschluss + + + Verbleibend + + + Flotten + + + Flotten HQ + + + Sofort Bau: + + + Sofort Reparatur: + + + Ausrüstung: + + + Schiffsmädchen: + + + Übersicht + + + Diese Flotte ist auf einer Expedition. + + + Zeitpunkt der Rückkehr: + + + Verbleibende Zeit: + + + Es sind derzeit Schiffe in der Reparatur. Zeitpunkt der Fertigstellung: {0:MM/dd HH\:mm} Verbleibende Zeit: {1}:{2:mm\:ss} + + + Es sind derzeit Schiffe in der Reparatur... + + + sind erschöpft + + + Einige Schiffe in deiner Flotte, {0}. + + + Bereit zum Einsatz! + + + benötigen Versörgung + + + Wartezeit: + + + , + + + sind schwer beschädigt + + + Quests + + + Aktive Quests + + + Tägliche Quests + + + ※ Die Indikatoren (50%, 80%) spiegeln in-Game Indikatoren wieder. Gegnerische Flottenkills, erfolgreiche Expeditionen, etc. werden nicht aktiv gezählt. + + + Bitte öffne das in-Game Questmenü um die Questliste zu füllen. + + + Wöchentliche Quests + + + Bitte öffne alle Questseiten. + + + 50% + + + 80% + + + Fertig + + + (unbekanntes Quest) + + + Reparaturen + + + Gesperrt + + + Reparaturen an {1} in Dock {0} sind abgeschlossen. + + + Reparaturwerft + + + Bei Fertigstellung benachrichtigen + + + Individuelle Dock Einstellungen + + + Angedocktes Schiff + + + Fertigstellung + + + Verbleibend + + + Leer + + + Alle Schiffe in 「{0}」 haben sich vollständig erholt. + + + Erholung beendet + + + Screenshot speichern fehlgeschlagen: + + + Screenshot gespeichert: + + + Einstellungen + + + Browser + + + Zurücksetzen auf 100% + + + (Anzeige) + + + ※ Dies wird das Spiel schließen, bitte mit Vorsicht verwenden + + + Anzeigeeinstellungen + + + Sprache + + + Netzwerk + + + Verhalten + + + Sonstiges + + + Proxy Einstellungen + + + Proxy verwenden um mit Server zu verbinden + + + Proxy für SSL Verbindungen verwenden + + + Host + + + Port + + + Screenshot Einstellungen + + + Durchsuchen + + + Wähle einen Ort zum Speichern der Screenshots + + + Ziel + + + Zielpfad + + + Bildformat + + + Ordner öffnen + + + Versionsinfos + + + Fenster + + + Fenstereinstellungen + + + Fenster am linken Bildschirmrand andocken. + + + Für 8 Zoll Tablets (800x1280) + + + Fenster immer im Vordergrund + + + Cache leeren + + + Browser Cache geleert + + + 「提督業も忙しい!」は、艦これを遊びやすくするためのツールです。 + + + Willkommen + + + Auf KanColle warten + + + Bereit + + + {0}% Zoom wird nicht unterstützt. + + + Zoom fehlgeschlagen: {0} + + + Rangliste + + + Derzeitiges Ranking + + + Loggen + + + Drops und Bauergebnisse in Logfile speichern. + + + Regions Cookie setzen + + + Cookie wurde gesetzt. + + + Übersetzungen + + + Unübersetzte Punkte an die Übersetzungen anfügen? + + + Gegenstände, Schiffe und Ausrüstung in die gewählte Sprache übersetzen? + + + Nicht vergessen DMM.com auf Japanisch zu stellen. (日本語) + + + Genaugigkeit + + + Flugabwehr + + + Anti-U-Boot + + + Rüstung + + + Tauchbombe + + + Ausweichrate + + + Feuerkraft + + + Gesundheit + + + Glück + + + Reichweite + + + Geschwindigkeit + + + Torpedo + + + Angriffsreichweite + + + 「{0}」 in {1} ist in einem kritischen Zustand! + + + Kritische Schiffswarnung + + + Fensterfarbe wechseln, wenn Schiff in kritischem Zustand + + + Verfassung der Flotte + + + Benachrichtigen, wenn Schiff in kritischem Zustand + + + Updates + + + Übersetzungen automatisch beim Start updaten. + + + Auf neuste Programm und Übersetzungen prüfen. + + + Auf Updates prüfen + + + Derzeitige + + + Online + + + Beim Starten auf Updates prüfen + + + Übersetzungen herunterladen + + + Nur Übersetzungen für die gewählte UI Sprache laden! + + + Rechner + + + Derzeitiges Level + + + Flaggschiff + + + Schiffsmädchen auswählen + + + Karte + + + MVP + + + Verbleibend + + + Ergebnis + + + Einsatz Erf. + + + Ziel Level + + + Rangliste + + + Kommentar + + + Erfahrung + + + Level + + + Seite: + + + Rang + + + Derzeitige Ränge + + + Rate + + + Gesamt Rang: + + + Benutzer + + + KCV konnte nicht auf Updates prüfen + + + Neue Version von KCV ist verfügbar! 「v{0}」 +Klicke hier, um sie zu downloaden. + + + Updater + + + KCV konnte keine Übersetzungen laden! + + + Übersetzungen sind up-to-date! + + + Übersetzungen wurden aktualisiert! + + + Luftüberlegenheit + + + Durchschnitt + + + Level + + + Schnelle Flotte + + + Langsame Flotte + + + Gesamt + + + Spielanzeigegröße + + + Anzeige des Spiel-Bildschirms anpassen. + + + Flash + + + Flash Qualität: + + + Undurchsichtig: Standard (Der alte IE hat keine HW Beschl.) +Direct: Schnellste Renderunggeschw. (HW Beschl.) +GPU: Langsam! GPU Optimierung für Tablets. + + + Flash Fenster: + + + Beste: Anti-Aliasing auf allen Bildern (Langsamtes) +Hoch: Standard. +Auto-Hoch: Senkt die Qualität, wenn nötig. +Medium: Durchschnittliche Performance +Auto-Niedrig: Passt die Geschwindigkeit an, wenn nötig. +Niedrig: Performance über Qualität. Sieht einfach beschissen aus. + + + Gesamt Sichtweite (LoS) + + + Neusten KCV laden + + + Öffnet einen Link zur neusten KCV Version. + + + Benachrichtigen, wenn Flotte wieder fit ist. + + + Funktioniert nun mit DMM.com. OSAPI, und API Links ! +[Du musst das Spiel neuladen, damit das funktioniert.] + + + Admiral + + + Kapitän zur See + + + Fregattenkapitän + + + Kapitänleutnant + + + Korvettenkapitän + + + Großadmiral + + + Korvettenkapitänskadett + + + Kapitänleutnantkadett + + + Konteradmiral + + + Vizeadmiral + + + Werkzeuge + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Properties/Resources.en.resx b/Grabacr07.KanColleViewer/Properties/Resources.en.resx index aa8cbb91c..cb3bbf943 100644 --- a/Grabacr07.KanColleViewer/Properties/Resources.en.resx +++ b/Grabacr07.KanColleViewer/Properties/Resources.en.resx @@ -1,4 +1,4 @@ - + - - + + - + - - - - + + + + - - + + - - + + - - - - + + + + - + - + @@ -504,4 +504,37 @@ Torpedo + + 대장 + + + 대령 + + + 중령 + + + 대위 + + + 소령 + + + 원사 + + + 신임중령 + + + 신임소령 + + + 소장 + + + 중장 + + + Tools + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Properties/Resources.resx b/Grabacr07.KanColleViewer/Properties/Resources.resx index 3c1fd145b..a7c239d8f 100644 --- a/Grabacr07.KanColleViewer/Properties/Resources.resx +++ b/Grabacr07.KanColleViewer/Properties/Resources.resx @@ -361,7 +361,7 @@ 言語 - 通信設定 + ネットワーク 動作設定 @@ -692,9 +692,6 @@ Low: Performance over quality. Ugliest setting. Volume - - Give a notification when a fleet's fatigue as reset. (Not 100% accurate!) - This works with DMM.com. OSAPI, and API links now! [You must reload the game for the changes to take affect.] @@ -705,4 +702,502 @@ Low: Performance over quality. Ugliest setting. Facility: {0} + + 大将 + + + 大佐 + + + 中佐 + + + 中堅少佐 + + + 少佐 + + + 元帥 + + + 新米中佐 + + + 新米少佐 + + + 少将 + + + 中将 + + + ツール + + + 通信設定 + + + 通知を早める: + + + 艦これ本体の仕様により、最大 1 分間短縮できます。サーバー時刻とのずれを加味し、40 ~ 50 秒に設定することを推奨します。 + + + + + + 建造完了時に通知する + + + 遠征帰投時に通知する + + + 艦隊に編成されている艦娘の疲労が回復したら通知する + + + 艦隊に編成されているすべて艦娘のコンディション値が上記の値以上になったときに通知されます。コンディション値は 3 分間で 3 ずつ回復しますが、KanColleViewer 実装の仕様により、通知タイミングは数秒 ~ 最大 3 分程度遅れる可能性があること予めご了承ください。 + + + ※[動作設定] > [出撃コンディション] から設定できます。 + + + 再出撃可能とするコンディション値 + + + 入渠完了時に通知する + + + 出撃コンディション + + + ※通常は、間宮アイコンが消灯する 40 か、自然回復上限の 49 に設定します。 + + + 艦隊内の全艦のコンディションが次の数値以上になったとき、出撃可能と判断する + + + パスワード + + + プロキシ サーバーにユーザー名とパスワードが必要 + + + ユーザー名 + + + データ + + + 装備一覧 + + + 艦娘一覧 + + + 工廠 + + + 建造 + + + 装備開発 + + + 失敗 + + + 結果なし + + + 成功 + + + 入渠 + + + 入渠中 + + + 大破した艦娘がいます!!! + + + 艦隊に艦娘が編成されていません。 + + + 出撃可能! + + + 疲労回復済み + + + 疲労回復まで + + + 遠征中 + + + 艦隊は出撃中です! + + + 疲労回復完了 + + + 「{0}」に編成されている艦娘の疲労が回復しました。 + + + 出撃海域 + + + AL 作戦 + + + MI 作戦 + + + AL 作戦参加済み + + + MI 作戦参加済み + + + 作戦出撃なし + + + 索敵値計算 + + + 艦上偵察機 + + + 彩雲、二式艦上偵察機 + + + (偵察機 × 2) + (電探) + √(装備込みの艦隊索敵値合計 - 偵察機 - 電探) + + + 装備による索敵値が重要とされる場合の計算方法 (推定) + + + 偵察機 + + + 水上爆撃機 + + + 瑞雲、瑞雲(六三四空)、試製晴嵐 + + + 水上偵察機 + + + 零式水上偵察機、零式水上観測機、九八式水上偵察機(夜偵) + + + 艦娘と装備の索敵値の単純な合計 + + + KanColleViewer での従来の計算方法 + + + 艦隊の索敵値の算出に使用する計算式は、以下を使用する + + + 索敵能力 + + + 表示の更新 + + + Show item stats + + + Adobe Flash ActiveX Not Found + + + Adobe Flash for Microsoft Internet Explorer is required by KCV! but is not installed. Would you like to download and install it now? + + + 速度混成艦隊 + + + 制空戦力 + + + 平均レベル + + + 合計レベル + + + 索敵値 + + + 連合艦隊は遠征に参加できません + + + 艦隊の艦娘に大きなダメージはありません + + + 艦隊に大破した艦娘がいます + + + 艦隊に大破した艦娘がいます! + + + 艦隊に入渠中の艦娘がいます + + + 艦隊は遠征中です + + + 疲労回復まで + + + 艦隊の艦娘は入渠していません + + + 艦隊は遠征中ではありません + + + 艦隊の艦娘は疲労していません + + + 艦隊は出撃していません + + + 艦隊は補給済みです + + + 艦隊に未補給の艦娘がいます + + + 艦隊は出撃中です! + + + 艦隊の出撃準備は完了していません + + + 出撃準備完了! + + + 艦隊詳細 + + + 入渠中 + + + 健在 + + + 健在・ダメコン搭載 + + + 大破 (轟沈の可能性あり) + + + 大破 (ダメコン使用可能) + + + 大破 (退避済み) + + + 撤退 (護衛退避) + + + 艦隊詳細 + + + 対空 + + + 装甲 + + + 対潜 + + + ID + + + Cond. + + + 装備 + + + 回避 + + + 火力 + + + 艦種 + + + レベル + + + + + + 艦名 + + + 雷装 + + + 索敵 + + + 更新 + + + 昇順 + + + クリア + + + 降順 + + + 方法 + + + 艦娘を以下の順序で並べ替えます。 + + + 並べ替え設定 + + + なし + + + Show additional stats + + + 艦種 + + + 戦艦 + + + 重巡・航巡 + + + 軽巡・雷巡 + + + 航空母艦 + + + 駆逐艦 + + + 他の + + + 航戦・航巡 + + + すべて選択 + + + 潜水艦 + + + すべて + + + 遠征中の艦を除外する + + + 遠征 + + + レベル + + + Lv.1 + + + Lv.2 以上 + + + ロック + + + ロックしていない + + + ロックしている + + + 近代化改修 + + + 改修未完 + + + 改修完了 + + + 改造 + + + 改造未完 + + + 改造完了 + + + 速力 + + + 高速 + + + 低速 + + + Reset Filter Settings + + + Save Filter Settings + + + Does not include ship types! + + + フィルター設定 + + + CatalogID + + + Condition 値 + + + 次のレベルまでの経験値 + + + 耐久 + + + 所属艦娘一覧 + + + 所有装備一覧 + + + Next Remodel + + + 通知プラグイン + + + 以下のプラグインを使用して通知されます。 + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Properties/Resources.zh-CN.resx b/Grabacr07.KanColleViewer/Properties/Resources.zh-CN.resx index 8331fbb68..42960dc29 100644 --- a/Grabacr07.KanColleViewer/Properties/Resources.zh-CN.resx +++ b/Grabacr07.KanColleViewer/Properties/Resources.zh-CN.resx @@ -1,4 +1,4 @@ - + - - + + - + - - - - + + + + - - + + - - + + - - - - + + + + - + - + @@ -139,10 +139,10 @@ Debug - これはテスト通知です。 + 这是通知测试。 - テスト + 测试 建造 @@ -160,7 +160,7 @@ 该建造坞被锁定 - 工厂的第 {0} 个建造坞的{1}建造完毕。 + 工厂的第 {0} 个建造坞的{1}已建造完毕。 建造完毕 @@ -226,34 +226,34 @@ 所持有的舰娘: - 総合 + 综合 - この艦隊は遠征中です。 + 此舰队正在远征中。 - 完了時刻: + 完成时间: - 帰投まで: + 归来剩余时间: - 艦隊に入渠中の艦娘がいます。 完了時刻: {0:MM/dd HH\:mm} 完了まで: {1}:{2:mm\:ss} + 舰队里仍有舰娘正在修理中。 完成时间: {0:MM/dd HH\:mm} 剩余时间: {1}:{2:mm\:ss} - 艦隊に入渠中の艦娘がいます。 + 舰队里仍有舰娘正在修理中。 - 疲労中の艦娘 + 疲劳中的舰娘 - 艦隊に{0}がいます。 + 舰队里有{0}艘。 - 出撃可能! + 出击可能! - 未補給の艦娘 + 未补给的舰娘 再出撃までの目安: @@ -262,7 +262,7 @@ - 中破以上の艦娘 + 中破以上的舰娘 任务 @@ -424,16 +424,16 @@ 永远保持在最前端 - キャッシュの削除 + 删除缓冲 - キャッシュを削除しました + 缓冲已删除 - 「提督業も忙しい!」は、艦これを遊びやすくするためのツールです。 + 「提督工作也很忙!(提督業も忙しい!)」是让你方便游玩舰队Collection(艦これ)的工具。 - ようこそ + 欢迎 对空战斗力: @@ -460,10 +460,10 @@ 缩放失败: {0} - Rankings + 排名 - Current Rankings + 目前排名 Logging @@ -472,63 +472,96 @@ Log drops and crafting results to file - Set Region Cookie + 设置区域Cookie - Cookie has been set + Cookie已设置 - Translations + 翻译 - Append untranslated items to the translation files? + 增添未翻译物品到翻译文件吗? - Translate game items, ships, and quests to selected language? + 翻译游戏物品、舰娘以及任务到指定语言吗? - Make sure DMM.com is set to Japanese (日本語) + 请确认在DMM.com里所设置的语言是日语(日本語) - Total Level (Average): + 总等级 (平均): - Accuracy + 准确度 - Anti-Air + 对空 - Anti-Sub + 对潜 - Armor + 装甲 - Attack Rng + 攻击范围 - Bombing + 俯冲轰炸 - Evasion + 回避 - Firepower + 火力 - Health + 体力 - Luck + - Sight Rng + 搜敌 - Speed + 速度 - Torpedo + 雷装 - \ No newline at end of file + + 大将 + + + 大佐 + + + 中佐 + + + 中坚少佐 + + + 少佐 + + + 元帅 + + + 新手中佐 + + + 新手少佐 + + + 少将 + + + 中将 + + + 工具 + + diff --git a/Grabacr07.KanColleViewer/Properties/Settings.Designer.cs b/Grabacr07.KanColleViewer/Properties/Settings.Designer.cs index 83f1904d1..416c0d6fd 100644 --- a/Grabacr07.KanColleViewer/Properties/Settings.Designer.cs +++ b/Grabacr07.KanColleViewer/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34014 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ namespace Grabacr07.KanColleViewer.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -34,7 +34,7 @@ public int LocalProxyPort { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("http://www.dmm.com/netgame/social/application/-/detail/=/app_id=854854/")] + [global::System.Configuration.DefaultSettingValueAttribute("http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/")] public global::System.Uri KanColleUrl { get { return ((global::System.Uri)(this["KanColleUrl"])); @@ -93,7 +93,8 @@ public int FeatureBrowserEmulation { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/")] + [global::System.Configuration.DefaultSettingValueAttribute("https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/ma" + + "ster/")] public global::System.Uri XMLTransUrl { get { return ((global::System.Uri)(this["XMLTransUrl"])); @@ -102,7 +103,7 @@ public int FeatureBrowserEmulation { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("https://raw.github.com/Zharay/KanColleViewer/master/resources/Version.xml")] + [global::System.Configuration.DefaultSettingValueAttribute("http://kcv.koumakan.jp/version/")] public global::System.Uri KCVUpdateUrl { get { return ((global::System.Uri)(this["KCVUpdateUrl"])); diff --git a/Grabacr07.KanColleViewer/Properties/Settings.settings b/Grabacr07.KanColleViewer/Properties/Settings.settings index 5d5843dc2..4d55c69e8 100644 --- a/Grabacr07.KanColleViewer/Properties/Settings.settings +++ b/Grabacr07.KanColleViewer/Properties/Settings.settings @@ -6,7 +6,7 @@ 37564 - http://www.dmm.com/netgame/social/application/-/detail/=/app_id=854854/ + http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/ body { @@ -41,10 +41,10 @@ 8000 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/ + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/ - https://raw.github.com/Zharay/KanColleViewer/master/resources/Version.xml + http://kcv.koumakan.jp/version/ var flashQuality = function () {{ diff --git a/Grabacr07.KanColleViewer/SampleData/DockyardViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/DockyardViewModelSampleData.xaml deleted file mode 100644 index 0881bb53e..000000000 --- a/Grabacr07.KanColleViewer/SampleData/DockyardViewModelSampleData.xaml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/SampleData/FleetViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/FleetViewModelSampleData.xaml index 40a4438c0..17ca66151 100644 --- a/Grabacr07.KanColleViewer/SampleData/FleetViewModelSampleData.xaml +++ b/Grabacr07.KanColleViewer/SampleData/FleetViewModelSampleData.xaml @@ -500,8 +500,7 @@ - - - - + + + diff --git a/Grabacr07.KanColleViewer/SampleData/RankingsViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/RankingsViewModelSampleData.xaml deleted file mode 100644 index 52c767cf2..000000000 --- a/Grabacr07.KanColleViewer/SampleData/RankingsViewModelSampleData.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/SampleData/RepairyardViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/RepairyardViewModelSampleData.xaml deleted file mode 100644 index db94ed940..000000000 --- a/Grabacr07.KanColleViewer/SampleData/RepairyardViewModelSampleData.xaml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/SampleData/ShipCatalogSortWorkerSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/ShipCatalogSortWorkerSampleData.xaml new file mode 100644 index 000000000..56960c109 --- /dev/null +++ b/Grabacr07.KanColleViewer/SampleData/ShipCatalogSortWorkerSampleData.xaml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/SampleData/ShipViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/ShipViewModelSampleData.xaml new file mode 100644 index 000000000..1a0e2cb12 --- /dev/null +++ b/Grabacr07.KanColleViewer/SampleData/ShipViewModelSampleData.xaml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + MainCanonHeavy + + + + + + + + + + + + + Torpedo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/SampleData/ShipyardViewModelSampleData.xaml b/Grabacr07.KanColleViewer/SampleData/ShipyardViewModelSampleData.xaml new file mode 100644 index 000000000..b368c9935 --- /dev/null +++ b/Grabacr07.KanColleViewer/SampleData/ShipyardViewModelSampleData.xaml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/Styles/Controls.TabControl.xaml b/Grabacr07.KanColleViewer/Styles/Controls.TabControl.xaml new file mode 100644 index 000000000..91cf4752c --- /dev/null +++ b/Grabacr07.KanColleViewer/Styles/Controls.TabControl.xaml @@ -0,0 +1,73 @@ + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Styles/Controls.Text.xaml b/Grabacr07.KanColleViewer/Styles/Controls.Text.xaml index 81c0c09a9..09ae82965 100644 --- a/Grabacr07.KanColleViewer/Styles/Controls.Text.xaml +++ b/Grabacr07.KanColleViewer/Styles/Controls.Text.xaml @@ -1,30 +1,182 @@  + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:s="clr-namespace:System;assembly=mscorlib"> - - + + + + Meiryo UI, Segoe UI + 12 + + + + + + Meiryo UI, Segoe UI + 10.5 + + + + + + Meiryo UI, Segoe UI + 15 + + + + + + Meiryo UI, Segoe UI Light + 16 + + + + + + Meiryo UI, Segoe UI Light + 14 + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Styles/Controls.xaml b/Grabacr07.KanColleViewer/Styles/Controls.xaml index ff7426259..64bab4156 100644 --- a/Grabacr07.KanColleViewer/Styles/Controls.xaml +++ b/Grabacr07.KanColleViewer/Styles/Controls.xaml @@ -6,6 +6,7 @@ + diff --git a/Grabacr07.KanColleViewer/Themes/Generic.Quest.xaml b/Grabacr07.KanColleViewer/Themes/Generic.Quest.xaml index 038f2559e..0c4abe301 100644 --- a/Grabacr07.KanColleViewer/Themes/Generic.Quest.xaml +++ b/Grabacr07.KanColleViewer/Themes/Generic.Quest.xaml @@ -35,26 +35,24 @@ + Style="{DynamicResource DefaultTextStyleKey}" + TextWrapping="{TemplateBinding TextWrapping}"> + Style="{DynamicResource EmphaticTextElementStyleKey}" /> - - - + diff --git a/Grabacr07.KanColleViewer/Themes/Generic.SlotItemIcon.xaml b/Grabacr07.KanColleViewer/Themes/Generic.SlotItemIcon.xaml index 3ca844ceb..533c273a5 100644 --- a/Grabacr07.KanColleViewer/Themes/Generic.SlotItemIcon.xaml +++ b/Grabacr07.KanColleViewer/Themes/Generic.SlotItemIcon.xaml @@ -538,6 +538,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogFilter.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogFilter.cs index 6d068bfe6..c88e31e57 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogFilter.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogFilter.cs @@ -236,8 +236,8 @@ public ShipSpeedFilter(Action updateAction) public override bool Predicate(Ship ship) { if (this.Both) return true; - if (this.Fast && ship.Info.Speed == Speed.Fast) return true; - if (this.Low && ship.Info.Speed == Speed.Low) return true; + if (this.Fast && ship.Info.Speed == ShipSpeed.Fast) return true; + if (this.Low && ship.Info.Speed == ShipSpeed.Low) return true; return false; } @@ -425,4 +425,81 @@ public void SetFleets(MemberTable fleets) .SelectMany(x => x.Value.Ships.Select(s => s.Id))); } } + + public class ShipSallyAreaFilter : ShipCatalogFilter + { + #region None 変更通知プロパティ + + private bool _None = true; + + public bool None + { + get { return this._None; } + set + { + if (this._None != value) + { + this._None = value; + this.RaisePropertyChanged(); + this.Update(); + } + } + } + + #endregion + + #region Aleutian 変更通知プロパティ + + private bool _Aleutian = true; + + public bool Aleutian + { + get { return this._Aleutian; } + set + { + if (this._Aleutian != value) + { + this._Aleutian = value; + this.RaisePropertyChanged(); + this.Update(); + } + } + } + + #endregion + + #region Midway 変更通知プロパティ + + private bool _Midway = true; + + public bool Midway + { + get { return this._Midway; } + set + { + if (this._Midway != value) + { + this._Midway = value; + this.RaisePropertyChanged(); + this.Update(); + } + } + } + + #endregion + + + public ShipSallyAreaFilter(Action updateAction) : base(updateAction) { } + + public override bool Predicate(Ship ship) + { + //if (this.None && ship.SallyArea == 0) return true; + //if (this.Aleutian && ship.SallyArea == 1) return true; + //if (this.Midway && ship.SallyArea == 2) return true; + + //return false; + + return true; + } + } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortTarget.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortTarget.cs deleted file mode 100644 index d2c2fc460..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortTarget.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleViewer.ViewModels.Catalogs -{ - public enum ShipCatalogSortTarget - { - None, - Id, - Type, - Name, - Level, - Cond, - Firepower, - Torpedo, - AntiAir, - Armor, - Luck, - ViewRange, - Evasion, - AntiSub, - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs index dd6ff61d5..b59a8b57d 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs @@ -1,114 +1,278 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; -using Grabacr07.Desktop.Metro.Controls; -using Grabacr07.KanColleViewer.ViewModels.Contents; +using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; +using Grabacr07.KanColleViewer.Properties; +using Livet; namespace Grabacr07.KanColleViewer.ViewModels.Catalogs { - public class ShipCatalogSortWorker + public class ShipCatalogSortWorker : ViewModel { - private readonly List sortableColumns; - private readonly NoneColumnViewModel noneColumn = new NoneColumnViewModel(); - private SortableColumnViewModel currentSortTarget; - - public IdColumnViewModel IdColumn { get; private set; } - public TypeColumnViewModel TypeColumn { get; private set; } - public NameColumnViewModel NameColumn { get; private set; } - public LevelColumnViewModel LevelColumn { get; private set; } - public ConditionColumnViewModel ConditionColumn { get; private set; } - public FirepowerColumnViewModel FirepowerColumn { get; private set; } - public TorpedoColumnViewModel TorpedoColumn { get; private set; } - public AntiAirColumnViewModel AntiAirColumn { get; private set; } - public ArmorColumnViewModel ArmorColumn { get; private set; } - public LuckColumnViewModel LuckColumn { get; private set; } - public ViewRangeColumnViewModel ViewRangeColumn { get; private set; } - public EvasionColumnViewModel EvasionColumn { get; private set; } - public AntiSubColumnViewModel AntiSubColumn { get; private set; } + #region static members - public ShipCatalogSortWorker() + private const int selectorNum = 4; + public static readonly SortableColumn NoneColumn = new SortableColumn { Name = Resources.ShipCatalog_Sort_None, KeySelector = null }; + public static readonly SortableColumn IdColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ObtainedID, KeySelector = x => x.Id, }; + public static readonly SortableColumn StypeColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_HullCode, KeySelector = x => x.Info.ShipType.SortNumber, }; + public static readonly SortableColumn SortIdColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_CatalogID, KeySelector = x => x.Info.SortId, }; + public static readonly SortableColumn NameColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Name, KeySelector = x => x.Info.Name, }; + public static readonly SortableColumn LevelColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Level, KeySelector = x => x.Level, DefaultIsDescending = true, }; + public static readonly SortableColumn ExpColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_Experience, KeySelector = x => x.ExpForNextLevel, }; + public static readonly SortableColumn CondColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_Condition, KeySelector = x => x.Condition, DefaultIsDescending = true, }; + public static readonly SortableColumn FirepowerColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Firepower, KeySelector = x => x.Firepower.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn TorpedoColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Torpedo, KeySelector = x => x.Torpedo.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn AAColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_AntiAir, KeySelector = x => x.AA.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn ArmerColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Armour, KeySelector = x => x.Armer.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn LuckColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Luck, KeySelector = x => x.Luck.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn HPColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_MaxHP, KeySelector = x => x.HP.Maximum, DefaultIsDescending = true, }; + public static readonly SortableColumn ViewRangeColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ViewRange, KeySelector = x => x.ViewRange, DefaultIsDescending = true, }; + public static readonly SortableColumn EvasionColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Evasion, KeySelector = x => x.Evasion.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn AntiSubColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ASW, KeySelector = x => x.AntiSub.Current, DefaultIsDescending = true, }; + + public static SortableColumn[] Columns { get; set; } + + static ShipCatalogSortWorker() { - this.IdColumn = new IdColumnViewModel(); - this.TypeColumn = new TypeColumnViewModel(); - this.NameColumn = new NameColumnViewModel(); - this.LevelColumn = new LevelColumnViewModel(); - this.ConditionColumn = new ConditionColumnViewModel(); - this.FirepowerColumn = new FirepowerColumnViewModel(); - this.TorpedoColumn = new TorpedoColumnViewModel(); - this.AntiAirColumn = new AntiAirColumnViewModel(); - this.ArmorColumn = new ArmorColumnViewModel(); - this.LuckColumn = new LuckColumnViewModel(); - this.ViewRangeColumn = new ViewRangeColumnViewModel(); - this.EvasionColumn = new EvasionColumnViewModel(); - this.AntiSubColumn = new AntiSubColumnViewModel(); - - this.sortableColumns = new List + Columns = new[] { - this.noneColumn, - this.IdColumn, - this.TypeColumn, - this.NameColumn, - this.LevelColumn, - this.ConditionColumn, - this.FirepowerColumn, - this.TorpedoColumn, - this.AntiAirColumn, - this.ArmorColumn, - this.LuckColumn, - this.ViewRangeColumn, - this.EvasionColumn, - this.AntiSubColumn, + NoneColumn, + IdColumn, + StypeColumn, + NameColumn, + LevelColumn, + CondColumn, + FirepowerColumn, + TorpedoColumn, + AAColumn, + ArmerColumn, + LuckColumn, + HPColumn, + ViewRangeColumn, + EvasionColumn, + AntiSubColumn }; + } + + #endregion + + #region Selectors 変更通知プロパティ + + private SortableColumnSelector[] _Selectors; + + public SortableColumnSelector[] Selectors + { + get { return this._Selectors; } + set + { + if (this._Selectors != value) + { + this._Selectors = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + + public ShipCatalogSortWorker() + { + this.UpdateSelectors(); + + this.SetFirst(LevelColumn); + } + + public IEnumerable Sort(IEnumerable ships) + { + var selectors = this.Selectors.Where(x => x.Current.KeySelector != null).ToArray(); + if (selectors.Length == 0) return ships; - this.currentSortTarget = this.noneColumn; + var selector = selectors[0].Current.KeySelector; + var orderedShips = selectors[0].IsAscending ? ships.OrderBy(selector) : ships.OrderByDescending(selector); + + for (var i = 1; i < selectors.Length; i++) + { + selector = selectors[i].Current.KeySelector; + orderedShips = selectors[i].IsAscending ? orderedShips.ThenBy(selector) : orderedShips.ThenByDescending(selector); + } + + return orderedShips; } - public void SetTarget(ShipCatalogSortTarget sortTarget, bool reverse) + public void SetFirst(SortableColumn column) { - var target = this.sortableColumns.FirstOrDefault(x => x.Target == sortTarget); - if (target == null) return; + if (!this.Selectors.HasItems()) return; - if (reverse) + if (column == StypeColumn) { - switch (target.Direction) + // 列ヘッダーから艦種が選択されたときは、艦種 (降順) -> 艦名 (昇順) に設定 + // (ゲーム内の艦種ソートと同じ動作) + + this.Selectors[0].SafeUpdate(StypeColumn); + this.Selectors[0].SafeUpdate(false); + if (this.Selectors.Length >= 2) { - case SortDirection.None: - target.Direction = SortDirection.Descending; - break; - case SortDirection.Descending: - target.Direction = SortDirection.Ascending; - break; - case SortDirection.Ascending: - target = this.noneColumn; - break; + this.Selectors[1].SafeUpdate(NameColumn); + this.Selectors[1].SafeUpdate(true); } } else { - switch (target.Direction) + this.Selectors[0].SafeUpdate(column); + this.Selectors[0].SafeUpdate(!column.DefaultIsDescending); + } + + this.UpdateSelectors(); + } + + public void Clear() + { + this.Selectors = null; + this.UpdateSelectors(); + } + + private void UpdateSelectors(SortableColumnSelector target = null) + { + if (this.Selectors == null) + { + this.Selectors = Enumerable.Range(0, selectorNum) + .Select(_ => new SortableColumnSelector { Updated = x => this.UpdateSelectors(x), }) + .ToArray(); + } + + // nonColumn 以外で選択された列 + var selectedItems = new HashSet(); + SortableColumnSelector previous = null; + + // enabled は Selector の SelectableColumns を作り直すかどうか + // target が指定されていなければ全部、指定されていればその target の次から作り直す + var enabled = target == null; + + foreach (var selector in this.Selectors) + { + if (enabled) + { + var sortables = Columns.Where(x => !selectedItems.Contains(x)).ToList(); + var current = selector.Current; + + if (previous != null && previous.Current == LevelColumn) + { + // 直前のソート列がレベルだったら、この列は次のレベルまでの経験値にしてあげる + sortables.Insert(1, ExpColumn); + current = ExpColumn; + selector.SafeUpdate(!previous.IsAscending); + } + + selector.SelectableColumns = sortables.ToArray(); + selector.SafeUpdate(sortables.Contains(current) ? current : sortables.FirstOrDefault()); + } + else + { + enabled = selector == target; + } + + if (selector.Current != NoneColumn) + { + selectedItems.Add(selector.Current); + } + + previous = selector; + } + } + } + + + public class SortableColumnSelector : ViewModel + { + internal Action Updated { get; set; } + + #region Current 変更通知プロパティ + + private SortableColumn _Current; + + public SortableColumn Current + { + get { return this._Current; } + set + { + if (this._Current != value) + { + this._Current = value; + this.SafeUpdate(!value.DefaultIsDescending); + this.Updated(this); + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region SelectableColumns 変更通知プロパティ + + private SortableColumn[] _SelectableColumns; + + public SortableColumn[] SelectableColumns + { + get { return this._SelectableColumns; } + set + { + if (this._SelectableColumns != value) { - case SortDirection.None: - target.Direction = SortDirection.Ascending; - break; - case SortDirection.Ascending: - target.Direction = SortDirection.Descending; - break; - case SortDirection.Descending: - target = this.noneColumn; - break; + this._SelectableColumns = value; + this.RaisePropertyChanged(); } } + } + + #endregion - this.currentSortTarget = target; - this.sortableColumns.Where(x => x.Target != target.Target).ForEach(x => x.Direction = SortDirection.None); + #region IsAscending / IsDescending 変更通知プロパティ + + private bool _IsAscending = true; + + public bool IsAscending + { + get { return this._IsAscending; } + set + { + if (this._IsAscending != value) + { + this._IsAscending = value; + this.Updated(this); + this.RaisePropertyChanged(); + this.RaisePropertyChanged("IsDescending"); + } + } + } + + public bool IsDescending + { + get { return !this.IsAscending; } } - public IEnumerable Sort(IEnumerable shipList) + #endregion + + internal void SafeUpdate(SortableColumn column) { - return this.currentSortTarget.Sort(shipList); + this._Current = column; + this.RaisePropertyChanged("Current"); } + + internal void SafeUpdate(bool isAscending) + { + this._IsAscending = isAscending; + this.RaisePropertyChanged("IsAscending"); + this.RaisePropertyChanged("IsDescending"); + } + } + + public class SortableColumn + { + public string Name { get; set; } + public bool DefaultIsDescending { get; set; } + public Func KeySelector { get; set; } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs index bff458572..f0f02fbb6 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs @@ -7,6 +7,7 @@ using System.Reactive.Subjects; using System.Threading.Tasks; using Grabacr07.KanColleViewer.ViewModels.Contents; +using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleWrapper; using Livet.EventListeners; using Settings = Grabacr07.KanColleViewer.Models.Settings; @@ -27,6 +28,7 @@ public class ShipCatalogWindowViewModel : WindowViewModel public ShipModernizeFilter ShipModernizeFilter { get; private set; } public ShipRemodelingFilter ShipRemodelingFilter { get; private set; } public ShipExpeditionFilter ShipExpeditionFilter { get; private set; } + public ShipSallyAreaFilter ShipSallyAreaFilter { get; private set; } public bool CheckAllShipTypes { @@ -57,18 +59,37 @@ public IReadOnlyCollection Ships #endregion - #region IsOpenSettings 変更通知プロパティ + #region IsOpenFilterSettings 変更通知プロパティ - private bool _IsOpenSettings; + private bool _IsOpenFilterSettings; - public bool IsOpenSettings + public bool IsOpenFilterSettings { - get { return this._IsOpenSettings; } + get { return this._IsOpenFilterSettings; } set { - if (this._IsOpenSettings != value) + if (this._IsOpenFilterSettings != value) { - this._IsOpenSettings = value; + this._IsOpenFilterSettings = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region IsOpenSortSettings 変更通知プロパティ + + private bool _IsOpenSortSettings; + + public bool IsOpenSortSettings + { + get { return this._IsOpenSortSettings; } + set + { + if (this._IsOpenSortSettings != value) + { + this._IsOpenSortSettings = value; this.RaisePropertyChanged(); } } @@ -155,8 +176,8 @@ public void ResetFilters () public ShipCatalogWindowViewModel() { - this.Title = "Ship Girl Roster"; - this.IsOpenSettings = true; + this.Title = Resources.ShipCatalog_WindowTitle; + this.IsOpenFilterSettings = true; this.SortWorker = new ShipCatalogSortWorker(); @@ -174,9 +195,12 @@ public ShipCatalogWindowViewModel() this.ShipModernizeFilter = new ShipModernizeFilter(this.Update); this.ShipRemodelingFilter = new ShipRemodelingFilter(this.Update); this.ShipExpeditionFilter = new ShipExpeditionFilter(this.Update); + this.ShipSallyAreaFilter = new ShipSallyAreaFilter(this.Update); this.updateSource .Do(_ => this.IsReloading = true) + // ☟ 連続で艦種選択できるように猶予を設けるつもりだったけど、 + //   ソートだけしたいケースとかだと遅くてイラ壁なので迷う .Throttle(TimeSpan.FromMilliseconds(7.0)) .Do(_ => this.UpdateCore()) .Subscribe(_ => this.IsReloading = false); @@ -199,17 +223,6 @@ public void Update() this.updateSource.OnNext(Unit.Default); } - public void Update(ShipCatalogSortTarget sortTarget) - { - this.SortWorker.SetTarget(sortTarget, false); - this.Update(); - } - public void UpdateReverse(ShipCatalogSortTarget sortTarget) - { - this.SortWorker.SetTarget(sortTarget, true); - this.Update(); - } - private void UpdateCore() { var list = this.homeport.Organization.Ships @@ -220,7 +233,8 @@ private void UpdateCore() .Where(this.ShipSpeedFilter.Predicate) .Where(this.ShipModernizeFilter.Predicate) .Where(this.ShipRemodelingFilter.Predicate) - .Where(this.ShipExpeditionFilter.Predicate); + .Where(this.ShipExpeditionFilter.Predicate) + .Where(this.ShipSallyAreaFilter.Predicate); this.Ships = this.SortWorker.Sort(list) .Select((x, i) => new ShipViewModel(i + 1, x)) @@ -241,5 +255,11 @@ public void AdditionalStats(bool bShow) } } + + public void Sort(SortableColumn column) + { + this.SortWorker.SetFirst(column); + this.Update(); + } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipViewModel.cs index d1ba5d017..3c10fe38c 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipViewModel.cs @@ -12,13 +12,12 @@ public class ShipViewModel : ViewModel { public int Index { get; private set; } public Ship Ship { get; private set; } - public List SlotItems { get; private set; } public ShipViewModel(int index, Ship ship) { this.Index = index; this.Ship = ship; - this.SlotItems = ship.SlotItems.Select(i => new SlotItemViewModel(i.Info)).ToList(); + // this.SlotItems = ship.SlotItems.Select(i => new SlotItemViewModel(i.Info)).ToList(); } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs index 1272f31fd..c4bf3598b 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs @@ -1,20 +1,27 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reactive; +using System.Reactive.Linq; +using System.Reactive.Subjects; using System.Threading.Tasks; using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; +using Grabacr07.KanColleViewer.Properties; using Livet; +using Settings = Grabacr07.KanColleViewer.Models.Settings; namespace Grabacr07.KanColleViewer.ViewModels.Catalogs { public class SlotItemCatalogViewModel : WindowViewModel { + private readonly Subject updateSource = new Subject(); + #region SlotItems 変更通知プロパティ - private IReadOnlyCollection _SlotItems; + private IReadOnlyCollection _SlotItems; - public IReadOnlyCollection SlotItems + public IReadOnlyCollection SlotItems { get { return this._SlotItems; } set @@ -48,48 +55,72 @@ public bool IsReloading #endregion + #region ShowStats 変更通知プロパティ + + public bool ShowStats + { + get { return Settings.Current.SlotItemCatalog_ShowStats; } + set + { + if (Settings.Current.SlotItemCatalog_ShowStats != value) + { + Settings.Current.SlotItemCatalog_ShowStats = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion public SlotItemCatalogViewModel() { - this.Title = "Equipment List"; + this.Title = Resources.SlotItemCatalog_WindowTitle; + + var listener = this.updateSource + .Do(_ => this.IsReloading = true) + .Throttle(TimeSpan.FromMilliseconds(100)) + .Select(_ => UpdateCore()) + .Do(_ => this.IsReloading = false) + .ObserveOnDispatcher() + .Subscribe(x => this.SlotItems = x); + + this.CompositeDisposable.Add(listener); + this.CompositeDisposable.Add(this.updateSource); + this.Update(); } - public async void Update() + public void Update() { - this.IsReloading = true; - this.SlotItems = await UpdateCore(); - this.IsReloading = false; + this.updateSource.OnNext(Unit.Default); } - private static Task> UpdateCore() + private static List UpdateCore() { - // これはひどい - // あとでちゃんと書き直す - - var ships = KanColleClient.Current.Homeport.Organization.Ships; - var items = KanColleClient.Current.Homeport.SlotItems; + var ships = KanColleClient.Current.Homeport.Organization.Ships.Values.ToList(); + var items = KanColleClient.Current.Homeport.Itemyard.SlotItems.Values.ToList(); var master = KanColleClient.Current.Master.SlotItems; - return Task.Factory.StartNew(() => - { - var dic = items.GroupBy(kvp => kvp.Value.Info.Id, kvp => kvp.Value) - .ToDictionary(g => g.Key, g => new SlotItemViewModel { SlotItem = master[g.Key], Count = g.Count() }); + // dic (Dictionary) + // Key: 装備のマスター ID + // Value: Key が示す ID に該当する所有装備カウンター + var dic = items + .GroupBy(x => x.Info.Id) + .ToDictionary(g => g.Key, g => new SlotItemCounter(master[g.Key], g)); - foreach (var ship in ships.Values) + foreach (var ship in ships) + { + foreach (var target in ship.EquippedSlots.Select(slot => new { slot, counter = dic[slot.Item.Info.Id] })) { - foreach (var target in ship.SlotItems.Where(x => x != null).Select(item => dic[item.Info.Id])) - { - target.AddShip(ship); - } + target.counter.AddShip(ship, target.slot.Item.Level); } + } - return dic.Values - .OrderBy(x => x.SlotItem.CategoryId) - .ThenBy(x => x.SlotItem.Id) - .ToList(); - }); + return dic.Values + .OrderBy(x => x.Target.CategoryId) + .ThenBy(x => x.Target.Id) + .ToList(); } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCounter.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCounter.cs new file mode 100644 index 000000000..8f7224ef9 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCounter.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Grabacr07.KanColleViewer.Properties; + +namespace Grabacr07.KanColleViewer.ViewModels.Catalogs +{ + public class SlotItemCounter + { + // Key: 装備レベル (★) + // Value: レベル別の装備数カウンター + private readonly Dictionary itemsByLevel; + + public SlotItemInfo Target { get; private set; } + + public IReadOnlyCollection Levels + { + get { return this.itemsByLevel.OrderBy(x => x.Key).Select(x => x.Value).ToList(); } + } + + public int Count + { + get { return this.itemsByLevel.Sum(x => x.Value.Count); } + } + + + public SlotItemCounter(SlotItemInfo target, IEnumerable items) + { + this.Target = target; + + this.itemsByLevel = items + .GroupBy(x => x.Level) + .ToDictionary(x => x.Key, x => new SlotItemCounterByLevel { Level = x.Key, Count = x.Count(), }); + } + + public void AddShip(Ship ship, int itemLevel) + { + this.itemsByLevel[itemLevel].AddShip(ship); + } + + public string Detail + { + get + { + string AddDetail = ""; + + if (this.Target.Firepower > 0) AddDetail += " +" + this.Target.Firepower + " " + Resources.Stats_Firepower; + if (this.Target.AA > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.AA + " " + Resources.Stats_AntiAir; + if (this.Target.Torpedo > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Torpedo + " " + Resources.Stats_Torpedo; + if (this.Target.AntiSub > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.AntiSub + " " + Resources.Stats_AntiSub; + if (this.Target.SightRange > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.SightRange + " " + Resources.Stats_SightRange; + if (this.Target.Speed > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Speed + " " + Resources.Stats_Speed; + if (this.Target.Armor > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Armor + " " + Resources.Stats_Armor; + if (this.Target.Health > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Health + " " + Resources.Stats_Health; + if (this.Target.Luck > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Luck + " " + Resources.Stats_Luck; + if (this.Target.Evasion > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Evasion + " " + Resources.Stats_Evasion; + if (this.Target.Accuracy > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.Accuracy + " " + Resources.Stats_Accuracy; + if (this.Target.DiveBomb > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.DiveBomb + " " + Resources.Stats_DiveBomb; + if (this.Target.AttackRange > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " " + Resources.Stats_AttackRange + " (" + this.Target.AttackRange + ")"; + //if (this.Target.RawData.api_raik > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_raik + " api_raik"; + //if (this.Target.RawData.api_raim > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_raim + " api_raim"; + //if (this.Target.RawData.api_sakb > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_sakb + " api_sakb"; + //if (this.Target.RawData.api_atap > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_atap + " api_atap"; + //if (this.Target.RawData.api_rare > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_rare + " api_rare"; + //if (this.Target.RawData.api_bakk > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.Target.RawData.api_bakk + " api_bakk"; + + return AddDetail; + } + } + } + + + public class SlotItemCounterByLevel + { + // Key: 艦娘の ID + // Value: 艦娘別の装備カウンター + private readonly Dictionary itemsByShip; + private int count; + + public int Level { get; set; } + + public IReadOnlyCollection Ships + { + get { return this.itemsByShip.Values.OrderByDescending(x => x.Ship.Level).ThenBy(x => x.Ship.SortNumber).ToList(); } + } + + public int Count + { + get { return this.count; } + set { this.count = this.Remainder = value; } + } + + // 余り + public int Remainder { get; private set; } + + + public SlotItemCounterByLevel() + { + this.itemsByShip = new Dictionary(); + } + + public void AddShip(Ship ship) + { + SlotItemCounterByShip target; + if (this.itemsByShip.TryGetValue(ship.Id, out target)) + { + target.Count++; + } + else + { + this.itemsByShip.Add(ship.Id, new SlotItemCounterByShip { Ship = ship, Count = 1 }); + } + + this.Remainder--; + } + } + + public class SlotItemCounterByShip + { + public Ship Ship { get; set; } + + public int Count { get; set; } + + public string ShipName + { + get { return this.Ship.Info.Name; } + } + + public string ShipLevel + { + get { return "Lv." + this.Ship.Level; } + } + + public string CountString + { + get { return this.Count == 1 ? "" : " x " + this.Count + " "; } + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemViewModel.cs deleted file mode 100644 index 23bef70fb..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemViewModel.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Grabacr07.KanColleWrapper.Models; -using Grabacr07.KanColleViewer.Properties; -using Livet; - -namespace Grabacr07.KanColleViewer.ViewModels.Catalogs -{ - public class SlotItemViewModel : ViewModel - { - private int count; - public List Ships { get; private set; } - - public class Counter - { - public Ship Ship { get; set; } - public int Count { get; set; } - - public string ShipName - { - get { return this.Ship.Info.Name; } - } - - public string ShipLevel - { - get { return "Lv." + this.Ship.Level; } - } - - public string CountString - { - get { return this.Count == 1 ? "" : " x " + this.Count + " "; } - } - - public string StatsToolTip - { - get - { - string AddDetail = ""; - if (this.Ship.Info.UntranslatedName != "") - AddDetail += this.Ship.Info.UntranslatedName + "\n"; - AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_Firepower, this.Ship.Firepower.Current, (this.Ship.Firepower.IsMax ? @"MAX" : "+" + (this.Ship.Firepower.Max - this.Ship.Firepower.Current).ToString())); - AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_Torpedo, this.Ship.Torpedo.Current, (this.Ship.Torpedo.IsMax ? @"MAX" : "+" + (this.Ship.Torpedo.Max - this.Ship.Torpedo.Current).ToString())); - AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_AntiAir, this.Ship.AA.Current, (this.Ship.AA.IsMax ? @"MAX" : "+" + (this.Ship.AA.Max - this.Ship.AA.Current).ToString())); - AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_Armor, this.Ship.Armer.Current, (this.Ship.Armer.IsMax ? @"MAX" : "+" + (this.Ship.Armer.Max - this.Ship.Armer.Current).ToString())); - AddDetail += string.Format("{0}: {1} ({2})", Resources.Stats_Luck, this.Ship.Luck.Current, (this.Ship.Luck.IsMax ? @"MAX" : "+" + (this.Ship.Luck.Max - this.Ship.Luck.Current).ToString())); - - return AddDetail; - } - } - } - - - public SlotItemInfo SlotItem { get; set; } - - public int Count - { - get { return this.count; } - set { this.count = this.Remainder = value; } - } - - public int Remainder { get; set; } - - - public SlotItemViewModel() - { - this.Ships = new List(); - } - - public SlotItemViewModel(SlotItemInfo item) - { - this.Ships = new List(); - this.SlotItem = item; - } - - public void AddShip(Ship ship) - { - var target = this.Ships.FirstOrDefault(x => x.Ship.Id == ship.Id); - if (target == null) - { - this.Ships.Add(new Counter { Ship = ship, Count = 1 }); - } - else - { - target.Count++; - } - - this.Remainder--; - } - - public string DetailedToolTip - { - get - { - string _Detail = this.Detail; - return this.SlotItem.Name + (_Detail != "" ? "\n" + _Detail : ""); - } - } - - public string Detail - { - get - { - string AddDetail = ""; - - if (this.SlotItem.Firepower> 0) AddDetail += " +" + this.SlotItem.Firepower + " " + Resources.Stats_Firepower; - if (this.SlotItem.AA > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.AA + " " + Resources.Stats_AntiAir; - if (this.SlotItem.Torpedo > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Torpedo + " " + Resources.Stats_Torpedo; - if (this.SlotItem.AntiSub > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.AntiSub + " " + Resources.Stats_AntiSub; - if (this.SlotItem.SightRange > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.SightRange + " " + Resources.Stats_SightRange; - if (this.SlotItem.Speed > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Speed + " " + Resources.Stats_Speed; - if (this.SlotItem.Armor > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Armor + " " + Resources.Stats_Armor; - if (this.SlotItem.Health > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Health + " " + Resources.Stats_Health; - if (this.SlotItem.Luck > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Luck + " " + Resources.Stats_Luck; - if (this.SlotItem.Evasion > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Evasion + " " + Resources.Stats_Evasion; - if (this.SlotItem.Accuracy > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.Accuracy + " " + Resources.Stats_Accuracy; - if (this.SlotItem.DiveBomb > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.DiveBomb + " " + Resources.Stats_DiveBomb; - if (this.SlotItem.AttackRange > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " " + Resources.Stats_AttackRange + " (" + this.SlotItem.AttackRange + ")"; - //if (this.SlotItem.RawData.api_raik > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_raik + " api_raik"; - //if (this.SlotItem.RawData.api_raim > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_raim + " api_raim"; - //if (this.SlotItem.RawData.api_sakb > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_sakb + " api_sakb"; - //if (this.SlotItem.RawData.api_atap > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_atap + " api_atap"; - //if (this.SlotItem.RawData.api_rare > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_rare + " api_rare"; - //if (this.SlotItem.RawData.api_bakk > 0) AddDetail += (AddDetail != "" ? "\n" : "") + " +" + this.SlotItem.RawData.api_bakk + " api_bakk"; - - return AddDetail; - } - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SortableColumnViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Catalogs/SortableColumnViewModel.cs deleted file mode 100644 index 8533390fe..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Catalogs/SortableColumnViewModel.cs +++ /dev/null @@ -1,349 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.Desktop.Metro.Controls; -using Grabacr07.KanColleWrapper.Models; -using Livet; - -namespace Grabacr07.KanColleViewer.ViewModels.Catalogs -{ - public abstract class SortableColumnViewModel : ViewModel - { - public ShipCatalogSortTarget Target { get; private set; } - - #region Direction 変更通知プロパティ - - private SortDirection _Direction = SortDirection.None; - - public SortDirection Direction - { - get { return this._Direction; } - set - { - if (this._Direction != value) - { - this._Direction = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - protected SortableColumnViewModel(ShipCatalogSortTarget target) - { - this.Target = target; - } - - public abstract IEnumerable Sort(IEnumerable list); - } - - public class NoneColumnViewModel : SortableColumnViewModel - { - public NoneColumnViewModel() : base(ShipCatalogSortTarget.None) { } - - public override IEnumerable Sort(IEnumerable list) - { - return list; - } - } - - public class IdColumnViewModel : SortableColumnViewModel - { - public IdColumnViewModel() : base(ShipCatalogSortTarget.Id) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Id); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Id); - } - return list; - } - } - - public class TypeColumnViewModel : SortableColumnViewModel - { - public TypeColumnViewModel() : base(ShipCatalogSortTarget.Type) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Info.Name) - .ThenBy(x => x.Id); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Info.Name) - .ThenByDescending(x => x.Id); - } - return list; - } - } - - public class NameColumnViewModel : SortableColumnViewModel - { - public NameColumnViewModel() : base(ShipCatalogSortTarget.Name) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Info.Name) - .ThenBy(x => x.Id); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Info.Name) - .ThenByDescending(x => x.Id); - } - return list; - } - } - - public class LevelColumnViewModel : SortableColumnViewModel - { - public LevelColumnViewModel() : base(ShipCatalogSortTarget.Level) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Level) - .ThenBy(x => x.Info.Name) - .ThenBy(x => x.Id); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name) - .ThenByDescending(x => x.Id); - } - return list; - } - } - - public class ConditionColumnViewModel : SortableColumnViewModel - { - public ConditionColumnViewModel() : base(ShipCatalogSortTarget.Cond) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Condition) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Condition) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class FirepowerColumnViewModel : SortableColumnViewModel - { - public FirepowerColumnViewModel() : base(ShipCatalogSortTarget.Firepower) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Firepower.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Firepower.Current) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class TorpedoColumnViewModel : SortableColumnViewModel - { - public TorpedoColumnViewModel() : base(ShipCatalogSortTarget.Torpedo) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Torpedo.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Torpedo.Current) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class AntiAirColumnViewModel : SortableColumnViewModel - { - public AntiAirColumnViewModel() : base(ShipCatalogSortTarget.AntiAir) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.AA.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.AA.Current) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class ArmorColumnViewModel : SortableColumnViewModel - { - public ArmorColumnViewModel() : base(ShipCatalogSortTarget.Armor) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Armer.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Armer.Current) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class LuckColumnViewModel : SortableColumnViewModel - { - public LuckColumnViewModel() : base(ShipCatalogSortTarget.Luck) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Luck.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.Name); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Luck.Current) - .ThenByDescending(x => x.Info.ShipType.Id) - .ThenByDescending(x => x.Level) - .ThenByDescending(x => x.Info.Name); - } - return list; - } - } - - public class ViewRangeColumnViewModel : SortableColumnViewModel - { - public ViewRangeColumnViewModel() : base(ShipCatalogSortTarget.ViewRange) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.LineOfSight.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.LineOfSight.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - return list; - } - } - - public class EvasionColumnViewModel : SortableColumnViewModel - { - public EvasionColumnViewModel() : base(ShipCatalogSortTarget.Evasion) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.Evasion.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.Evasion.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - return list; - } - } - - public class AntiSubColumnViewModel : SortableColumnViewModel - { - public AntiSubColumnViewModel() : base(ShipCatalogSortTarget.AntiSub) { } - - public override IEnumerable Sort(IEnumerable list) - { - if (this.Direction == SortDirection.Ascending) - { - return list.OrderBy(x => x.AntiSub.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - if (this.Direction == SortDirection.Descending) - { - return list.OrderByDescending(x => x.AntiSub.Current) - .ThenBy(x => x.Info.ShipType.Id) - .ThenBy(x => x.Level) - .ThenBy(x => x.Info.SortId); - } - return list; - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Composition/NotifierViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Composition/NotifierViewModel.cs new file mode 100644 index 000000000..cd254fa40 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Composition/NotifierViewModel.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; + +namespace Grabacr07.KanColleViewer.ViewModels.Composition +{ + public class NotifierViewModel : PluginViewModelBase + { + #region ErrorMessage 変更通知プロパティ + + private string _ErrorMessage; + + public string ErrorMessage + { + get { return this._ErrorMessage; } + set + { + if (this._ErrorMessage != value) + { + this._ErrorMessage = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public NotifierViewModel(Lazy plugin) : base(plugin) + { + this.ErrorMessage = null; + } + + public void Test() + { + this.Plugin.Show(NotifyType.Other, "テスト", "これはテスト通知です。", App.ViewModelRoot.Activate, ex => this.ErrorMessage = ex.Message); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModel.cs new file mode 100644 index 000000000..959b01cf6 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; + +namespace Grabacr07.KanColleViewer.ViewModels.Composition +{ + public class PluginViewModel : PluginViewModelBase + { + public PluginViewModel(Lazy plugin) : base(plugin) { } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModelBase.cs b/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModelBase.cs new file mode 100644 index 000000000..3febf8091 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModelBase.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels.Composition +{ + public abstract class PluginViewModelBase : ViewModel where TPlugin : IPlugin + { + protected TPlugin Plugin { get; private set; } + + private IPluginMetadata Metadata { get; set; } + + + public string Title + { + get { return this.Metadata.Title; } + } + + public string Description + { + get { return this.Metadata.Description; } + } + + public string Author + { + get { return this.Metadata.Author; } + } + + public string Version + { + get { return this.Metadata.Version; } + } + + + protected PluginViewModelBase(Lazy plugin) + { + this.Plugin = plugin.Value; + this.Metadata = plugin.Metadata; + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Composition/ToolViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Composition/ToolViewModel.cs new file mode 100644 index 000000000..eb35303d9 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Composition/ToolViewModel.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; + +namespace Grabacr07.KanColleViewer.ViewModels.Composition +{ + public class ToolViewModel : PluginViewModelBase + { + public ToolViewModel(Lazy plugin) : base(plugin) { } + + public string ToolName + { + get { return this.Plugin.ToolName; } + } + + public object View + { + get { return this.Plugin.GetToolView(); } + } + + public override string ToString() + { + return this.Title; + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/BuildingDockViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/BuildingDockViewModel.cs new file mode 100644 index 000000000..1031b4298 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/BuildingDockViewModel.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents +{ + public class BuildingDockViewModel : ViewModel + { + private readonly BuildingDock source; + + public int Id + { + get { return this.source.Id; } + } + + public string Ship + { + get { return this.source.Ship == null ? "----" : this.source.Ship.Name; } + } + + public string CompleteTime + { + get { return this.source.CompleteTime.HasValue ? this.source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } + } + + public string Remaining + { + get { return this.source.Remaining.HasValue ? this.source.Remaining.Value.ToString(@"hh\:mm\:ss") : "--:--:--"; } + } + + public BuildingDockState State + { + get { return this.source.State; } + } + + public BuildingDockViewModel(BuildingDock source) + { + this.source = source; + this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/CreatedSlotItemViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/CreatedSlotItemViewModel.cs new file mode 100644 index 000000000..8d067ff2f --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/CreatedSlotItemViewModel.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents +{ + public class CreatedSlotItemViewModel : ViewModel + { + #region Succeed 変更通知プロパティ + + private bool? _Succeed; + + public bool? Succeed + { + get { return this._Succeed; } + set + { + if (this._Succeed != value) + { + this._Succeed = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Name 変更通知プロパティ + + private string _Name; + + public string Name + { + get { return this._Name; } + set + { + if (this._Name != value) + { + this._Name = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public CreatedSlotItemViewModel() + { + this.Succeed = null; + this.Name = "-----"; + } + + public void Update(CreatedSlotItem item) + { + this.Succeed = item.Succeed; + this.Name = item.SlotItemInfo.Name; + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/BuildingDockViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/BuildingDockViewModel.cs deleted file mode 100644 index 917c1a51e..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/BuildingDockViewModel.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleViewer.Properties; -using Grabacr07.KanColleWrapper.Models; -using Livet; -using Livet.EventListeners; -using Livet.Messaging.Windows; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks -{ - public class BuildingDockViewModel : ViewModel - { - private readonly BuildingDock source; - - public int Id - { - get { return this.source.Id; } - } - - public string Ship - { - get { return source.Ship == null ? "----" : source.Ship.Name; } - } - - public string CompleteTime - { - get { return source.CompleteTime.HasValue ? source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } - } - - public string Remaining - { - get { return source.Remaining.HasValue ? source.Remaining.Value.ToString(@"hh\:mm\:ss") : "--:--:--"; } - } - - public BuildingDockState State - { - get { return this.source.State; } - } - - #region CanDisplayShipName 変更通知プロパティ - - private bool _CanDisplayShipName; - - /// - /// 建造中の艦娘の艦名を表示するかどうかを示す値を取得または設定します。 - /// - public bool CanDisplayShipName - { - get { return this._CanDisplayShipName; } - set - { - if (this._CanDisplayShipName != value) - { - this._CanDisplayShipName = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region IsNotifyCompleted 変更通知プロパティ - - private bool _IsNotifyCompleted; - - public bool IsNotifyCompleted - { - get { return this._IsNotifyCompleted; } - set - { - if (this._IsNotifyCompleted != value) - { - this._IsNotifyCompleted = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public BuildingDockViewModel(BuildingDock source) - { - this.source = source; - this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); - - source.Completed += (sender, args) => - { - if (this.IsNotifyCompleted) - { - WindowsNotification.Notifier.Show( - Resources.Dockyard_NotificationMessage_Title, - string.Format( - Resources.Dockyard_NotificationMessage, - this.Id, - this.CanDisplayShipName ? this.Ship : Resources.Common_ShipGirl), - () => App.ViewModelRoot.Activate()); - } - }; - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/DockyardViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/DockyardViewModel.cs deleted file mode 100644 index e7bcf491f..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/DockyardViewModel.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleWrapper; -using Livet; -using Livet.EventListeners; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks -{ - public class DockyardViewModel : TabItemViewModel - { - public override string Name - { - get { return Properties.Resources.Dockyard; } - protected set { throw new NotImplementedException(); } - } - - #region Docks 変更通知プロパティ - - private BuildingDockViewModel[] _Docks; - - public BuildingDockViewModel[] Docks - { - get { return this._Docks; } - set - { - if (!Equals(this._Docks, value)) - { - this._Docks = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region CanDisplayShipName 変更通知プロパティ - - public bool CanDisplayShipName - { - get { return Settings.Current.CanDisplayBuildingShipName; } - set - { - if (Settings.Current.CanDisplayBuildingShipName != value) - { - Settings.Current.CanDisplayBuildingShipName = value; - this.Docks.ForEach(x => x.CanDisplayShipName = value); - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region IsNotifyCompleted 変更通知プロパティ - - public bool IsNotifyCompleted - { - get { return Settings.Current.NotifyBuildingCompleted; } - set - { - if (Settings.Current.NotifyBuildingCompleted != value) - { - Settings.Current.NotifyBuildingCompleted = value; - this.Docks.ForEach(x => x.IsNotifyCompleted = value); - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public bool IsSupportedNotification - { - get { return Helper.IsWindows8OrGreater; } - } - - - public DockyardViewModel() - { - this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Dockyard) - { - { "Docks", (sender, args) => this.Update() }, - }); - this.Update(); - } - - private void Update() - { - this.Docks = KanColleClient.Current.Homeport.Dockyard.Docks.Select(kvp => new BuildingDockViewModel(kvp.Value)).ToArray(); - this.Docks.ForEach(x => - { - x.CanDisplayShipName = this.CanDisplayShipName; - x.IsNotifyCompleted = this.IsNotifyCompleted; - }); - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairyardViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairyardViewModel.cs deleted file mode 100644 index 194979382..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairyardViewModel.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleWrapper; -using Livet; -using Livet.EventListeners; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks -{ - public class RepairyardViewModel : TabItemViewModel - { - public override string Name - { - get { return Properties.Resources.Repairyard; } - protected set { throw new NotImplementedException(); } - } - - #region Docks 変更通知プロパティ - - private RepairingDockViewModel[] _Docks; - - public RepairingDockViewModel[] Docks - { - get { return this._Docks; } - set - { - if (!Equals(this._Docks, value)) - { - this._Docks = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region IsNotifyCompleted 変更通知プロパティ - - public bool IsNotifyCompleted - { - get { return Settings.Current.NotifyRepairingCompleted; } - set - { - if (Settings.Current.NotifyRepairingCompleted != value) - { - Settings.Current.NotifyRepairingCompleted = value; - this.Docks.ForEach(x => x.IsNotifyCompleted = value); - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public bool IsSupportedNotification - { - get { return Helper.IsWindows8OrGreater; } - } - - - public RepairyardViewModel() - { - this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Repairyard) - { - { "Docks", (sender, args) => this.Update() }, - }); - this.Update(); - } - - private void Update() - { - this.Docks = KanColleClient.Current.Homeport.Repairyard.Docks.Select(kvp => new RepairingDockViewModel(kvp.Value)).ToArray(); - this.Docks.ForEach(x => x.IsNotifyCompleted = this.IsNotifyCompleted); - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/CombinedFleetViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/CombinedFleetViewModel.cs new file mode 100644 index 000000000..7d067d1a0 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/CombinedFleetViewModel.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + public class CombinedFleetViewModel : ItemViewModel + { + public CombinedFleet Source { get; private set; } + + public string Name + { + get { return this.Source.Name; } + } + + public FleetStateViewModel State { get; private set; } + + public ViewModel QuickStateView + { + get + { + return this.Source.State.Situation.HasFlag(FleetSituation.Sortie) + ? this.State.Sortie + : this.State.Homeport as QuickStateViewViewModel; + } + } + + public CombinedFleetViewModel(CombinedFleet fleet) + { + this.Source = fleet; + + this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet) + { + { "Name", (sender, args) => this.RaisePropertyChanged("Name") }, + }); + this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet.State) + { + { "Situation", (sender, args) => this.RaisePropertyChanged("QuickStateView") }, + }); + + this.State = new FleetStateViewModel(fleet.State); + this.CompositeDisposable.Add(this.State); + } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ConditionViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ConditionViewModel.cs new file mode 100644 index 000000000..81d38b324 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ConditionViewModel.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + public class ConditionViewModel : ViewModel + { + private readonly FleetCondition source; + + public string RejuvenateTime + { + get + { + return this.source.RejuvenateTime.HasValue + ? this.source.RejuvenateTime.Value.LocalDateTime.ToString("MM/dd HH:mm") + : "--/-- --:--"; + } + } + + public string Remaining + { + get + { + return this.source.Remaining.HasValue + ? string.Format("{0:D2}:{1}", + (int)this.source.Remaining.Value.TotalHours, + this.source.Remaining.Value.ToString(@"mm\:ss")) + : "--:--:--"; + } + } + + public bool IsRejuvenating + { + get { return this.source.IsRejuvenating; } + } + + + public ConditionViewModel(FleetCondition condition) + { + this.source = condition; + this.CompositeDisposable.Add(new PropertyChangedEventListener(condition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ExpeditionViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ExpeditionViewModel.cs index 86c03e052..e528b5e98 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ExpeditionViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ExpeditionViewModel.cs @@ -2,12 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; using Livet; using Livet.EventListeners; -using Livet.Messaging.Windows; namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets { @@ -15,6 +13,11 @@ public class ExpeditionViewModel : ViewModel { private readonly Expedition source; + public Mission Mission + { + get { return this.source.Mission; } + } + public bool IsInExecution { get { return this.source.IsInExecution; } @@ -42,40 +45,10 @@ public string Remaining } } - #region IsNotifyReturned 変更通知プロパティ - - private bool _IsNotifyReturned; - - public bool IsNotifyReturned - { - get { return this._IsNotifyReturned; } - set - { - if (this._IsNotifyReturned != value) - { - this._IsNotifyReturned = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); - - expedition.Returned += (sender, args) => - { - if (this.IsNotifyReturned) - { - WindowsNotification.Notifier.Show( - Resources.Expedition_NotificationMessage_Title, - string.Format(Resources.Expedition_NotificationMessage, args.FleetName), - () => App.ViewModelRoot.Activate()); - } - }; } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs new file mode 100644 index 000000000..c2cb33f94 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleWrapper.Models; +using Livet; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + public class FleetStateViewModel : ViewModel + { + public FleetState Source { get; private set; } + + public string AverageLevel + { + get { return this.Source.AverageLevel.ToString("#0.##"); } + } + + public string TotalLevel + { + get { return this.Source.TotalLevel.ToString("###0"); } + } + + public string AirSuperiorityPotential + { + get { return this.Source.AirSuperiorityPotential.ToString("##0"); } + } + + public string ViewRange + { + get { return this.Source.ViewRange.ToString("##0.##"); } + } + + public string Speed + { + get + { + switch (this.Source.Speed) + { + case FleetSpeed.Fast: + return Resources.Fleets_Speed_Fast; + case FleetSpeed.Low: + return Resources.Fleets_Speed_Slow; + default: + return Resources.Fleets_Speed_Hybrid; + } + } + } + + public HomeportViewModel Homeport { get; private set; } + + public SortieViewModel Sortie { get; private set; } + + + public FleetStateViewModel(FleetState source) + { + this.Source = source; + this.CompositeDisposable.Add(new PropertyChangedEventListener(source) + { + (sender, args) => this.RaisePropertyChanged(args.PropertyName), + }); + + this.Sortie = new SortieViewModel(source); + this.CompositeDisposable.Add(this.Sortie); + + this.Homeport = new HomeportViewModel(source); + this.CompositeDisposable.Add(this.Homeport); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetViewModel.cs index e6a18e9cc..5edc65599 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetViewModel.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Properties; -using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; using Livet; using Livet.EventListeners; @@ -13,46 +11,18 @@ namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets /// /// 単一の艦隊情報を提供します。 /// - public class FleetViewModel : ViewModel + public class FleetViewModel : ItemViewModel { - private readonly Fleet source; - - public ReSortieBarViewModel ReSortie { get; private set; } - public ExpeditionViewModel Expedition { get; private set; } + public Fleet Source { get; private set; } public int Id { - get { return this.source.Id; } + get { return this.Source.Id; } } public string Name { - get { return string.IsNullOrEmpty(this.source.Name.Trim()) ? "(First " + this.source.Id + " Fleet)" : this.source.Name; } - } - - public string TotalLevel - { - get { return this.source.TotalLevel.ToString("####"); } - } - - public string AverageLevel - { - get { return this.source.AverageLevel.ToString("##.##"); } - } - - public string Speed - { - get { return this.source.Speed == KanColleWrapper.Models.Speed.Fast ? Resources.Fleets_Speed_Fast : Resources.Fleets_Speed_Slow; } - } - - public int AirSuperiorityPotential - { - get { return this.source.AirSuperiorityPotential; } - } - - public string TotalViewRange - { - get { return this.source.TotalViewRange.ToString("####"); } + get { return string.IsNullOrEmpty(this.Source.Name.Trim()) ? "(第 " + this.Source.Id + " 艦隊)" : this.Source.Name; } } /// @@ -60,64 +30,51 @@ public string TotalViewRange /// public ShipViewModel[] Ships { - get { return this.source.Ships.Select(x => new ShipViewModel(x)).ToArray(); } + get { return this.Source.Ships.Select(x => new ShipViewModel(x)).ToArray(); } } - /// - /// 艦隊の状態を取得します。 - /// - public ViewModel State + public FleetStateViewModel State { get; private set; } + + public ExpeditionViewModel Expedition { get; private set; } + + public ViewModel QuickStateView { get { - if (this.source.Ships.Length == 0) + var situation = this.Source.State.Situation; + if (situation == FleetSituation.Empty) { - return null; + return NullViewModel.Instance; } - if (this.source.State == FleetState.Expedition) + if (situation.HasFlag(FleetSituation.Sortie)) { - return this.Expedition; + return this.State.Sortie; } - if (this.source.State == FleetState.Repairing) + if (situation.HasFlag(FleetSituation.Expedition)) { - return new RepairingBarViewModel(source); + return this.Expedition; } - return this.ReSortie; - } - } - - #region IsSelected 変更通知プロパティ - private bool _IsSelected; - - public bool IsSelected - { - get { return this._IsSelected; } - set - { - if (this._IsSelected != value) - { - this._IsSelected = value; - this.RaisePropertyChanged(); - } + return this.State.Homeport; } } - #endregion - public FleetViewModel(Fleet fleet) { - this.source = fleet; + this.Source = fleet; this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet) { (sender, args) => this.RaisePropertyChanged(args.PropertyName), - { () => fleet.Ships, (sender, args) => this.RaisePropertyChanged("Planes") }, + }); + this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet.State) + { + { "Situation", (sender, args) => this.RaisePropertyChanged("QuickStateView") }, }); - this.ReSortie = new ReSortieBarViewModel(this, fleet.ReSortie); - this.CompositeDisposable.Add(this.ReSortie); + this.State = new FleetStateViewModel(fleet.State); + this.CompositeDisposable.Add(this.State); this.Expedition = new ExpeditionViewModel(fleet.Expedition); this.CompositeDisposable.Add(this.Expedition); diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetsViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetsViewModel.cs index eb2022e92..b1d8f18b7 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetsViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetsViewModel.cs @@ -6,6 +6,7 @@ using Grabacr07.KanColleWrapper; using Livet; using Livet.EventListeners; +using Livet.Messaging; namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets { @@ -60,33 +61,6 @@ public FleetViewModel SelectedFleet #endregion - #region IsNotifyReturned 変更通知プロパティ - - /// - /// 遠征帰投時にトースト通知を表示するかどうかを示す値を取得します。 - /// - public bool IsNotifyReturned - { - get { return Settings.Current.NotifyExpeditionReturned; } - set - { - if (Settings.Current.NotifyExpeditionReturned != value) - { - Settings.Current.NotifyExpeditionReturned = value; - this.Fleets.ForEach(x => x.Expedition.IsNotifyReturned = value); - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public bool IsSupportedNotification - { - get { return Helper.IsWindows8OrGreater; } - } - - public FleetsViewModel() { this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Organization) @@ -96,11 +70,18 @@ public FleetsViewModel() this.UpdateFleets(); } + public void ShowFleetWindow() + { + var fleetwd = new FleetWindowViewModel(); + var message = new TransitionMessage(fleetwd, "Show/FleetWindow"); + this.Messenger.RaiseAsync(message); + } + + private void UpdateFleets() { this.Fleets = KanColleClient.Current.Homeport.Organization.Fleets.Select(kvp => new FleetViewModel(kvp.Value)).ToArray(); this.SelectedFleet = this.Fleets.FirstOrDefault(); - this.Fleets.ForEach(x => x.Expedition.IsNotifyReturned = this.IsNotifyReturned); } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/HomeportViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/HomeportViewModel.cs new file mode 100644 index 000000000..0fedc287a --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/HomeportViewModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + /// + /// 母港で待機中の艦隊のステータスを表します。 + /// + public class HomeportViewModel : QuickStateViewViewModel + { + // QuickStateView は ContentControl に対し型ごとの DataTemplate を適用する形で実現するので + // 状況に応じた型がそれぞれ必要。これはその 1 つ。 + + public ConditionViewModel Condition { get; private set; } + + public HomeportViewModel(FleetState state) + : base(state) + { + this.Condition = new ConditionViewModel(state.Condition); + this.CompositeDisposable.Add(this.Condition); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/QuickStateViewViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/QuickStateViewViewModel.cs new file mode 100644 index 000000000..200295573 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/QuickStateViewViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + public abstract class QuickStateViewViewModel : ViewModel + { + public FleetState State { get; private set; } + + protected QuickStateViewViewModel(FleetState state) + { + this.State = state; + } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ReSortieBarViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ReSortieBarViewModel.cs deleted file mode 100644 index 89d51147f..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ReSortieBarViewModel.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleViewer.Properties; -using Grabacr07.KanColleWrapper; -using Grabacr07.KanColleWrapper.Models; -using Livet; -using Livet.EventListeners; -using Livet.Messaging.Windows; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets -{ - /// - /// 艦隊の再出撃に関する情報を提供します。 - /// - public class ReSortieBarViewModel : ViewModel - { - private readonly FleetReSortie source; - - #region CanReSortie 変更通知プロパティ - - private bool _CanReSortie; - - public bool CanReSortie - { - get { return this._CanReSortie; } - set - { - if (this._CanReSortie != value) - { - this._CanReSortie = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Message 変更通知プロパティ - - private string _Message; - - public string Message - { - get { return this._Message; } - set - { - if (this._Message != value) - { - this._Message = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Remaining 変更通知プロパティ - - private string _Remaining; - - public string Remaining - { - get { return this._Remaining; } - set - { - if (this._Remaining != value) - { - this._Remaining = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public ReSortieBarViewModel(FleetViewModel parent, FleetReSortie reSortie) - { - this.source = reSortie; - this.CompositeDisposable.Add(new PropertyChangedEventListener(reSortie) - { - { () => reSortie.Reason, (sender, args) => this.UpdateMessage() }, - { () => reSortie.Remaining, (sender, args) => this.UpdateRemaining() }, - }); - - reSortie.Readied += (sender, args) => - { - if (Models.Settings.Current.EnableFatigueNotification) - { - WindowsNotification.Notifier.Show( - Resources.ReSortie_NotificationMessage_Title, - string.Format(Resources.ReSortie_NotificationMessage, parent.Name), - () => App.ViewModelRoot.Activate()); - } - }; - - reSortie.CriticalCondition += (sender, args) => - { - if (Models.Settings.Current.EnableCriticalNotify) - { - WindowsNotification.Notifier.Show( - Resources.ReSortie_CriticalConditionMessage_Title, - string.Format(Resources.ReSortie_CriticalConditionMessage, args.Ship.Info.Name, parent.Name), - () => App.ViewModelRoot.Activate()); - } - - if (Models.Settings.Current.EnableCriticalAccent) - App.ViewModelRoot.Mode = Mode.CriticalCondition; - }; - - reSortie.CriticalCleared += (sender, args) => - { - App.ViewModelRoot.Mode = Mode.Started; - }; - - this.UpdateMessage(); - this.UpdateRemaining(); - } - - - private void UpdateMessage() - { - if (this.source.CanReSortie) - { - this.Message = Properties.Resources.MessageBar_ReSortie_CanReSortie; - this.CanReSortie = true; - return; - } - - var list = new List(); - - if (this.source.Reason.HasFlag(CanReSortieReason.Wounded)) - { - list.Add(Properties.Resources.MessageBar_ReSortie_Wounded); - } - if (this.source.Reason.HasFlag(CanReSortieReason.LackForResources)) - { - list.Add(Properties.Resources.MessageBar_ReSortie_LackForResources); - } - if (this.source.Reason.HasFlag(CanReSortieReason.BadCondition)) - { - list.Add(Properties.Resources.MessageBar_ReSortie_BadCondition); - } - - this.Message = string.Format(Properties.Resources.MessageBar_ReSortie_CanNotReSortie, list.ToString(Properties.Resources.MessageBar_ReSortie_Separator)); - this.CanReSortie = false; - } - - private void UpdateRemaining() - { - this.Remaining = this.source.Remaining.HasValue ? Properties.Resources.MessageBar_ReSortie_Remaining + this.source.Remaining.Value.ToString(@"mm\:ss") : ""; - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/RepairingBarViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/RepairingBarViewModel.cs deleted file mode 100644 index 20d69cd88..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/RepairingBarViewModel.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reactive.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleWrapper; -using Grabacr07.KanColleWrapper.Models; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets -{ - public class RepairingBarViewModel : TimerViewModel - { - private readonly Fleet source; - - public RepairingBarViewModel(Fleet fleet) - { - this.source = fleet; - } - - protected override string CreateMessage() - { - var dock = source.Ships - .Join(KanColleClient.Current.Homeport.Repairyard.Docks.Values.Where(d => d.Ship != null), s => s.Id, d => d.Ship.Id, (s, d) => d) - .OrderByDescending(d => d.CompleteTime) - .FirstOrDefault(); - if (dock == null) - { - return Properties.Resources.MessageBar_Repairing_Null; - } - var remaining = dock.CompleteTime.Value.LocalDateTime - DateTimeOffset.Now - TimeSpan.FromMinutes(1.0); - return string.Format(@Properties.Resources.MessageBar_Repairing, - dock.CompleteTime.Value.LocalDateTime, (int)remaining.TotalHours, remaining); - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/SortieViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/SortieViewModel.cs new file mode 100644 index 000000000..b8b639626 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/SortieViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets +{ + public class SortieViewModel : QuickStateViewViewModel + { + // QuickStateView は ContentControl に対し型ごとの DataTemplate を適用する形で実現するので + // 状況に応じた型がそれぞれ必要。これはその 1 つ。 + + public SortieViewModel(FleetState state) : base(state) { } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/TimerViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/TimerViewModel.cs deleted file mode 100644 index 71942ab82..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/TimerViewModel.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Livet; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets -{ - public abstract class TimerViewModel : ViewModel - { - public Func TimerProc - { - get { return this.CreateMessage; } - } - - protected abstract string CreateMessage(); - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/OverviewViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/OverviewViewModel.cs index f2eb71c86..aa74a3cb9 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/OverviewViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/OverviewViewModel.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleViewer.ViewModels.Catalogs; -using Livet; using Livet.Messaging; namespace Grabacr07.KanColleViewer.ViewModels.Contents @@ -17,7 +15,7 @@ public override string Name get { return Resources.IntegratedView; } protected set { throw new NotImplementedException(); } } - + public MainContentViewModel Content { get; private set; } @@ -43,10 +41,10 @@ public void Jump(string tabName) target = this.Content.Quests; break; case "Repairyard": - target = this.Content.Repairyard; + target = this.Content.Shipyard; break; case "Dockyard": - target = this.Content.Dockyard; + target = this.Content.Shipyard; break; } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairingDockViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/RepairingDockViewModel.cs similarity index 57% rename from Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairingDockViewModel.cs rename to Grabacr07.KanColleViewer/ViewModels/Contents/RepairingDockViewModel.cs index e754fcb5d..d65f6764e 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Docks/RepairingDockViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/RepairingDockViewModel.cs @@ -2,14 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; -using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleWrapper.Models; using Livet; using Livet.EventListeners; -using Livet.Messaging.Windows; -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks +namespace Grabacr07.KanColleViewer.ViewModels.Contents { public class RepairingDockViewModel : ViewModel { @@ -47,40 +44,10 @@ public RepairingDockState State get { return this.source.State; } } - #region IsNotifyCompleted 変更通知プロパティ - - private bool _IsNotifyCompleted; - - public bool IsNotifyCompleted - { - get { return this._IsNotifyCompleted; } - set - { - if (this._IsNotifyCompleted != value) - { - this._IsNotifyCompleted = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - public RepairingDockViewModel(RepairingDock source) { this.source = source; this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); - - source.Completed += (sender, args) => - { - if (this.IsNotifyCompleted) - { - WindowsNotification.Notifier.Show( - Resources.Repairyard_NotificationMessage_Title, - string.Format(Resources.Repairyard_NotificationMessage, this.Id, this.Ship), - () => App.ViewModelRoot.Activate()); - } - }; } public RepairingDockViewModel() { } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/ShipViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/ShipViewModel.cs index e2cea8c9c..acb1875fc 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/ShipViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/ShipViewModel.cs @@ -33,6 +33,8 @@ public string StatsToolTip string AddDetail = ""; if (this.Ship.Info.UntranslatedName != "") AddDetail += this.Ship.Info.UntranslatedName + "\n"; + if (this.Ship.Info.NextRemodelingLevel != null) + AddDetail += string.Format("{0}: Lv. {1}\n", Resources.Stats_RemodelLevel, this.Ship.Info.NextRemodelingLevel); AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_Firepower, this.Ship.Firepower.Current, (this.Ship.Firepower.IsMax ? @"MAX" : "+" + (this.Ship.Firepower.Max - this.Ship.Firepower.Current).ToString())); AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_Torpedo, this.Ship.Torpedo.Current, (this.Ship.Torpedo.IsMax ? @"MAX" : "+" + (this.Ship.Torpedo.Max - this.Ship.Torpedo.Current).ToString())); AddDetail += string.Format("{0}: {1} ({2})\n", Resources.Stats_AntiAir, this.Ship.AA.Current, (this.Ship.AA.IsMax ? @"MAX" : "+" + (this.Ship.AA.Max - this.Ship.AA.Current).ToString())); @@ -46,7 +48,7 @@ public string StatsToolTip public ShipViewModel(Ship ship) { this.Ship = ship; - this.SlotItems = ship.SlotItems.Select(i => new SlotItemViewModel(i.Info)).ToList(); + // this.SlotItems = ship.SlotItems.Select(i => new SlotItemViewModel(i.Info)).ToList(); } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/ShipyardViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/ShipyardViewModel.cs new file mode 100644 index 000000000..43cefe9f7 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/ShipyardViewModel.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper; +using Grabacr07.KanColleViewer.Properties; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents +{ + public class ShipyardViewModel : TabItemViewModel + { + public override string Name + { + get { return Resources.Shipyard; } + protected set { throw new NotImplementedException(); } + } + + #region RepairingDocks 変更通知プロパティ + + private RepairingDockViewModel[] _RepairingDocks; + + public RepairingDockViewModel[] RepairingDocks + { + get { return this._RepairingDocks; } + set + { + if (!Equals(this._RepairingDocks, value)) + { + this._RepairingDocks = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region BuildingDocks 変更通知プロパティ + + private BuildingDockViewModel[] _BuildingDocks; + + public BuildingDockViewModel[] BuildingDocks + { + get { return this._BuildingDocks; } + set + { + if (!Equals(this._BuildingDocks, value)) + { + this._BuildingDocks = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public CreatedSlotItemViewModel CreatedSlotItem { get; private set; } + + + public ShipyardViewModel() + { + this.CreatedSlotItem = new CreatedSlotItemViewModel(); + + this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Repairyard) + { + { "Docks", (sender, args) => this.UpdateRepairingDocks() }, + }); + this.UpdateRepairingDocks(); + + this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Dockyard) + { + { "Docks", (sender, args) => this.UpdateBuildingDocks() }, + { "CreatedSlotItem", (sender, args) => this.UpdateSlotItem() }, + }); + this.UpdateBuildingDocks(); + } + + + private void UpdateRepairingDocks() + { + this.RepairingDocks = KanColleClient.Current.Homeport.Repairyard.Docks.Select(kvp => new RepairingDockViewModel(kvp.Value)).ToArray(); + } + + private void UpdateBuildingDocks() + { + this.BuildingDocks = KanColleClient.Current.Homeport.Dockyard.Docks.Select(kvp => new BuildingDockViewModel(kvp.Value)).ToArray(); + } + + private void UpdateSlotItem() + { + this.CreatedSlotItem.Update(KanColleClient.Current.Homeport.Dockyard.CreatedSlotItem); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/SlotItemsViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/SlotItemsViewModel.cs index fd8cff73d..963e436d5 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/SlotItemsViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/SlotItemsViewModel.cs @@ -31,16 +31,16 @@ public int Count public SlotItemsViewModel() { - this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport) + this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Itemyard) { - { "SlotItems", (sender, args) => this.Update() } + { "SlotItemsCount", (sender, args) => this.Update() } }); this.Update(); } private void Update() { - this.Count = KanColleClient.Current.Homeport.SlotItems.Count; + this.Count = KanColleClient.Current.Homeport.Itemyard.SlotItemsCount; } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/CalculatorViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/CalculatorViewModel.cs deleted file mode 100644 index 8fedcd87b..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/CalculatorViewModel.cs +++ /dev/null @@ -1,398 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reactive; -using System.Reactive.Linq; -using System.Reactive.Subjects; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.ViewModels.Catalogs; -using Grabacr07.KanColleWrapper; -using Grabacr07.KanColleWrapper.Models; -using Livet.EventListeners; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Tools -{ - public class CalculatorViewModel : TabItemViewModel - { - /// - /// Completely experience table from 1 to 150. Each line = 20 levels - /// - public static int[] ExpTable = new int[] { 0, 0, 100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500, 6600, 7800, 9100, 10500, 12000, 13600, 15300, 17100, 19000, - 21000, 23100, 25300, 27600, 30000, 32500, 35100, 37800, 40600, 43500, 46500, 49600, 52800, 56100, 59500, 63000, 66600, 70300, 74100, 78000, - 82000, 86100, 90300, 94600, 99000, 103500, 108100, 112800, 117600, 122500, 127500, 132700, 138100, 143700, 149500, 155500, 161700, 168100, 174700, 181500, - 188500, 195800, 203400, 211300, 219500, 228000, 236800, 245900, 255300, 265000, 275000, 285400, 296200, 307400, 319000, 331000, 343400, 356200, 369400, 383000, - 397000, 411500, 426500, 442000, 458000, 474500, 491500, 509000, 527000, 545500, 564500, 584500, 606500, 631500, 661500, 701500, 761500, 851500, 1000000, 1000000, - 1010000, 1011000, 1013000, 1016000, 1020000, 1025000, 1031000, 1038000, 1046000, 1055000, 1065000, 1077000, 1091000, 1107000, 1125000, 1145000, 1168000, 1194000, 1223000, 1255000, - 1290000, 1329000, 1372000, 1419000, 1470000, 1525000, 1584000, 1647000, 1714000, 1785000, 1860000, 1940000, 2025000, 2115000, 2210000, 2310000, 2415000, 2525000, 2640000, 2760000, - 2887000, 3021000, 3162000, 3310000, 3465000, 3628000, 3799000, 3978000, 4165000, 4360000 }; - - /// - /// Sea exp table. Cannot be used properly in xaml without dumb workarounds. - /// - public IEnumerable SeaList { get; private set; } - public static Dictionary SeaExpTable = new Dictionary - { - {"1-1", 30}, {"1-2", 50}, {"1-3", 80}, {"1-4", 100}, {"1-5", 150}, - {"2-1", 120}, {"2-2", 150}, {"2-3", 200},{"2-4", 300}, - {"3-1", 310}, {"3-2", 320}, {"3-3", 330}, {"3-4", 350}, - {"4-1", 310}, {"4-2", 320}, {"4-3", 330}, {"4-4", 340}, - {"5-1", 360}, {"5-2", 380}, {"5-3", 400}, {"5-4", 420}, {"5-5", 450} - }; - - public IEnumerable ResultList { get; private set; } - public string[] Results = { "S", "A", "B", "C", "D", "E" }; - - private readonly Subject updateSource = new Subject(); - private readonly Homeport homeport = KanColleClient.Current.Homeport; - - public ShipCatalogSortWorker SortWorker { get; private set; } - - #region Ships 変更通知プロパティ - - private IReadOnlyCollection _Ships; - - public IReadOnlyCollection Ships - { - get { return this._Ships; } - set - { - if (this._Ships != value) - { - this._Ships = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region CurrentShip 変更通知プロパティ - - private Ship _CurrentShip; - - public Ship CurrentShip - { - get { return this._CurrentShip; } - set - { - if (this._CurrentShip != value) - { - this._CurrentShip = value; - if (value != null) - { - this.CurrentLevel = this.CurrentShip.Level; - this.TargetLevel = Math.Min(this.CurrentShip.Level + 1, 150); - this.CurrentExp = this.CurrentShip.Exp; - this.UpdateExpCalculator(); - this.RaisePropertyChanged(); - } - } - } - } - - #endregion - - #region CurrentLevel 変更通知プロパティ - - private int _CurrentLevel; - - public int CurrentLevel - { - get { return this._CurrentLevel; } - set - { - if (this._CurrentLevel != value && value >= 1 && value <= 150) - { - this._CurrentLevel = value; - this.CurrentExp = ExpTable[value]; - this.TargetLevel = Math.Max(this.TargetLevel, Math.Min(value + 1, 150)); - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region TargetLevel 変更通知プロパティ - - private int _TargetLevel; - - public int TargetLevel - { - get { return this._TargetLevel; } - set - { - if (this._TargetLevel != value && value >= 1 && value <= 150) - { - this._TargetLevel = value; - this.TargetExp = ExpTable[value]; - this.CurrentLevel = Math.Min(this.CurrentLevel, Math.Max(value - 1, 1)); - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region SelectedSea 変更通知プロパティ - - private string _SelectedSea; - - public string SelectedSea - { - get { return this._SelectedSea; } - set - { - if (_SelectedSea != value) - { - this._SelectedSea = value; - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region SelectedResult 変更通知プロパティ - - private string _SelectedResult; - - public string SelectedResult - { - get { return this._SelectedResult; } - set - { - if (this._SelectedResult != value) - { - this._SelectedResult = value; - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region IsFlagship 変更通知プロパティ - - private bool _IsFlagship; - - public bool IsFlagship - { - get { return this._IsFlagship; } - set - { - if (this._IsFlagship != value) - { - this._IsFlagship = value; - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region IsMVP 変更通知プロパティ - - private bool _IsMVP; - - public bool IsMVP - { - get { return this._IsMVP; } - set - { - if (this._IsMVP != value) - { - this._IsMVP = value; - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region IsReloading 変更通知プロパティ - - private bool _IsReloading; - - public bool IsReloading - { - get { return this._IsReloading; } - set - { - if (this._IsReloading != value) - { - this._IsReloading = value; - this.RaisePropertyChanged(); - this.UpdateExpCalculator(); - } - } - } - - #endregion - - #region CurrentExp 変更通知プロパティ - - private int _CurrentExp; - - public int CurrentExp - { - get { return this._CurrentExp; } - private set - { - if (this._CurrentExp != value) - { - this._CurrentExp = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region TargetExp 変更通知プロパティ - - private int _TargetExp; - - public int TargetExp - { - get { return this._TargetExp; } - private set - { - if (this._TargetExp != value) - { - this._TargetExp = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region SortieExp 変更通知プロパティ - - private int _SortieExp; - - public int SortieExp - { - get { return this._SortieExp; } - private set - { - if (this._SortieExp != value) - { - this._SortieExp = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region RemainingExp 変更通知プロパティ - - private int _RemainingExp; - - public int RemainingExp - { - get { return this._RemainingExp; } - private set - { - if (this._RemainingExp != value) - { - this._RemainingExp = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region RunCount 変更通知プロパティ - - private int _RunCount; - - public int RunCount - { - get { return this._RunCount; } - private set - { - if (this._RunCount != value) - { - this._RunCount = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public override string Name - { - get { return Properties.Resources.Tools_Calculator; } - protected set { throw new NotImplementedException(); } - } - - public CalculatorViewModel() - { - this.SeaList = SeaExpTable.Keys.ToList(); - this.ResultList = Results.ToList(); - - this.SortWorker = new ShipCatalogSortWorker(); - this.SortWorker.SetTarget(ShipCatalogSortTarget.Level, true); - - this.updateSource - .Do(_ => this.IsReloading = true) - .Throttle(TimeSpan.FromMilliseconds(7.0)) - .Do(_ => this.UpdateCore()) - .Subscribe(_ => this.IsReloading = false); - this.CompositeDisposable.Add(this.updateSource); - - this.CompositeDisposable.Add(new PropertyChangedEventListener(this.homeport.Organization) - { - { () => this.homeport.Organization.Ships, (sender, args) => this.Update() }, - }); - - SelectedSea = SeaExpTable.Keys.FirstOrDefault(); - SelectedResult = Results.FirstOrDefault(); - - this.Update(); - } - - public void Update() - { - this.RaisePropertyChanged("AllShipTypes"); - this.updateSource.OnNext(Unit.Default); - } - - private void UpdateCore() - { - var list = this.homeport.Organization.Ships.Values - .Where(x => x.Level != 1); - - this.Ships = this.SortWorker.Sort(list) - .Select(x => new ShipViewModel(x)).ToList(); - } - - /// - /// Calculates experience given parameters. Requires levels and experience to work with. - /// - public void UpdateExpCalculator() - { - if (this.TargetLevel < this.CurrentLevel || this.TargetExp < this.CurrentExp) - return; - - // Lawl at that this inline conditional. - double Multiplier = (this.IsFlagship ? 1.5 : 1) * (this.IsMVP ? 2 : 1) * (this.SelectedResult == "S" ? 1.2 : (this.SelectedResult == "C" ? 0.8 : (this.SelectedResult == "D" ? 0.7 : (this.SelectedResult == "E" ? 0.5 : 1)))); - - this.SortieExp = (int)Math.Round( SeaExpTable[this.SelectedSea] * Multiplier ); - this.RemainingExp = this.TargetExp - this.CurrentExp; - this.RunCount = (int)Math.Round( this.RemainingExp / (double)this.SortieExp ); - } - - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingViewModel.cs deleted file mode 100644 index 338d0cbf6..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingViewModel.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleWrapper.Models; -using Livet; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Tools -{ - public class RankingViewModel : ViewModel - { - #region Id - - private int _Id; - - public int Id - { - get { return this._Id; } - set - { - if (this._Id != value) - { - this._Id = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region NickName - - private string _NickName; - - public string NickName - { - get { return this._NickName; } - set - { - if (this._NickName != value) - { - this._NickName = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Comment - - private string _Comment; - - public string Comment - { - get { return this._Comment; } - set - { - if (this._Comment != value) - { - this._Comment = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Rate - - private int _Rate; - - public int Rate - { - get { return this._Rate; } - set - { - if (this._Rate != value) - { - this._Rate = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Rank - - private int _Rank; - - public int Rank - { - get { return this._Rank; } - set - { - if (this._Rank != value) - { - this._Rank = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Level - - private int _Level; - - public int Level - { - get { return this._Level; } - set - { - if (this._Level != value) - { - this._Level = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Experience - - private int _Experience; - - public int Experience - { - get { return this._Experience; } - set - { - if (this._Experience != value) - { - this._Experience = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Flag - - private int _Flag; - - public int Flag - { - get { return this._Flag; } - set - { - if (this._Flag != value) - { - this._Flag = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - public RankingViewModel(Ranking rank) - { - if (rank == null) - return; - - this.Id = rank.Id; - this.NickName = rank.NickName; - this.Comment = rank.Comment; - this.Rate = rank.Rate; - this.Rank = rank.Rank; - this.Level = rank.Level; - this.Experience = rank.Experience; - this.Flag = rank.Flag; - } - - public RankingViewModel() {} - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingsViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingsViewModel.cs deleted file mode 100644 index 574b789d4..000000000 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/Tools/RankingsViewModel.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Properties; -using Grabacr07.KanColleWrapper; -using Grabacr07.KanColleWrapper.Models; -using Livet.EventListeners; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents.Tools -{ - public class RankingsViewModel : TabItemViewModel - { - public override string Name - { - get { return Resources.Tools_Rankings; } - protected set { throw new NotImplementedException(); } - } - - #region Rankings - - private RankingViewModel[] _Rankings; - - public RankingViewModel[] Rankings - { - get { return this._Rankings; } - set - { - if (this._Rankings != value) - { - this._Rankings = value; - this.RaisePropertyChanged(); - - this.HasNoRankings = !(this._Rankings != null && this._Rankings.Length > 0); - } - } - } - - #endregion - - #region TotalRanked - - private int _TotalRanked; - - public int TotalRanked - { - get { return this._TotalRanked; } - set - { - if (this._TotalRanked != value) - { - this._TotalRanked = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region TotalPages - - private int _TotalPages; - - public int TotalPages - { - get { return this._TotalPages; } - set - { - if (this._TotalPages != value) - { - this._TotalPages = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region CurrentPage - - private int _CurrentPage; - - public int CurrentPage - { - get { return this._CurrentPage; } - set - { - if (this._CurrentPage != value) - { - this._CurrentPage = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region HasNoRankings - - private bool _HasNoRankings; - - public bool HasNoRankings - { - get { return this._HasNoRankings; } - set - { - if (this._HasNoRankings != value) - { - this._HasNoRankings = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - private void Update() - { - this.Rankings = KanColleClient.Current.Homeport.Rankings.Current.Select(x => new RankingViewModel(x)).ToArray(); - this.TotalRanked = KanColleClient.Current.Homeport.Rankings.TotalRanked; - this.TotalPages = KanColleClient.Current.Homeport.Rankings.TotalPages; - this.CurrentPage = KanColleClient.Current.Homeport.Rankings.CurrentPage; - } - - public RankingsViewModel() - { - this.Rankings = KanColleClient.Current.Homeport.Rankings.Current.Select(x => new RankingViewModel(x)).ToArray(); - this.TotalRanked = KanColleClient.Current.Homeport.Rankings.TotalRanked; - this.TotalPages = KanColleClient.Current.Homeport.Rankings.TotalPages; - this.CurrentPage = KanColleClient.Current.Homeport.Rankings.CurrentPage; - - this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Rankings) - { - { - () => KanColleClient.Current.Homeport.Rankings.Current, - (sender, args) => Update() - }, - }); - } - } -} diff --git a/Grabacr07.KanColleViewer/ViewModels/Contents/ToolsViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Contents/ToolsViewModel.cs index b9d687324..6e8c7b9be 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Contents/ToolsViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Contents/ToolsViewModel.cs @@ -1,60 +1,68 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Grabacr07.KanColleViewer.ViewModels.Contents.Tools; -using Livet; - -namespace Grabacr07.KanColleViewer.ViewModels.Contents -{ - public class ToolsViewModel : TabItemViewModel - { - public CalculatorViewModel Calculator { get; private set; } - public RankingsViewModel Rankings { get; private set; } - - public IList TabItems { get; private set; } - - #region SelectedItem 変更通知プロパティ - - private TabItemViewModel _SelectedItem; - - public TabItemViewModel SelectedItem - { - get { return this._SelectedItem; } - set - { - if (this._SelectedItem != value) - { - this._SelectedItem = value; - this.RaisePropertyChanged(); - - App.ViewModelRoot.StatusBar = value; - } - } - } - - #endregion - - public override string Name - { - get { return "Tools"; } - protected set { throw new NotImplementedException(); } - } - - public ToolsViewModel() - { - this.Calculator = new CalculatorViewModel(); - this.Rankings = new RankingsViewModel(); - - this.TabItems = new List - { - this.Calculator, - this.Rankings, - }; - - this.SelectedItem = this.TabItems.FirstOrDefault(); - } - - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; +using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleViewer.ViewModels.Composition; +using Grabacr07.KanColleWrapper; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels.Contents +{ + public class ToolsViewModel : TabItemViewModel + { + public override string Name + { + get { return Resources.Tools; } + protected set { throw new NotImplementedException(); } + } + + #region Items 変更通知プロパティ + + private List _Tools; + + public List Tools + { + get { return this._Tools; } + set + { + if (this._Tools != value) + { + this._Tools = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region SelectedTool 変更通知プロパティ + + private ToolViewModel _SelectedTool; + + public ToolViewModel SelectedTool + { + get { return this._SelectedTool; } + set + { + if (this._SelectedTool != value) + { + this._SelectedTool = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + + public ToolsViewModel() + { + this.Tools = new List(PluginHost.Instance.Tools.Select(x => new ToolViewModel(x))); + this.SelectedTool = this.Tools.FirstOrDefault(); + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/Dev/DebugTabViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/Dev/DebugTabViewModel.cs index 1498d3cf4..7da9d7fcc 100644 --- a/Grabacr07.KanColleViewer/ViewModels/Dev/DebugTabViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/Dev/DebugTabViewModel.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; -using Grabacr07.KanColleViewer.Models; +using Grabacr07.KanColleViewer.Composition; namespace Grabacr07.KanColleViewer.ViewModels.Dev { @@ -14,10 +13,11 @@ public override string Name get { return Properties.Resources.Debug; } protected set { throw new NotImplementedException(); } } - + public void Notify() { - WindowsNotification.Notifier.Show(Properties.Resources.Debug_NotificationMessage_Title, Properties.Resources.Debug_NotificationMessage, () => App.ViewModelRoot.Activate()); + PluginHost.Instance.GetNotifier() + .Show(NotifyType.Other, Properties.Resources.Debug_NotificationMessage_Title, Properties.Resources.Debug_NotificationMessage, () => App.ViewModelRoot.Activate()); } } diff --git a/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs new file mode 100644 index 000000000..9b19b501d --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive; +using System.Reactive.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleViewer.ViewModels.Contents; +using Grabacr07.KanColleViewer.ViewModels.Contents.Fleets; +using Grabacr07.KanColleWrapper; +using Livet; +using Livet.EventListeners; + +namespace Grabacr07.KanColleViewer.ViewModels +{ + public class FleetWindowViewModel : WindowViewModel + { + private FleetViewModel[] allFleets; + + public Organization Organization + { + get { return KanColleClient.Current.Homeport.Organization; } + } + + #region Fleets 変更通知プロパティ + + private ItemViewModel[] _Fleets; + + public ItemViewModel[] Fleets + { + get { return this._Fleets; } + set + { + if (this._Fleets != value) + { + this._Fleets = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region SelectedFleet 変更通知プロパティ + + private ItemViewModel _SelectedFleet; + + /// + /// 現在選択されている艦隊を取得または設定します。 + /// + public ItemViewModel SelectedFleet + { + get { return this._SelectedFleet; } + set + { + if (this._SelectedFleet != value) + { + if (this._SelectedFleet != null) this._SelectedFleet.IsSelected = false; + if (value != null) value.IsSelected = true; + + this._SelectedFleet = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + + public FleetWindowViewModel() + { + this.Title = Resources.FleetWindow_Title; + this.Fleets = new ItemViewModel[0]; + + this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Organization) + { + // Fleets の PropertyChanged が来るのは、最初と艦隊数が増えたときくらい っぽい + { "Fleets", (sender, args) => this.InitializeFleets() }, + { "Combined", (sender, args) => this.UpdateFleets() }, + { "CombinedFleet", (sender, args) => this.UpdateFleets() }, + }); + + this.InitializeFleets(); + } + + + private void InitializeFleets() + { + this.allFleets = KanColleClient.Current.Homeport.Organization.Fleets.Select(kvp => new FleetViewModel(kvp.Value)).ToArray(); + this.UpdateFleets(); + } + + private void UpdateFleets() + { + // ややこしいけど、CombinedFleetViewModel は連合艦隊が編成・解除される度に使い捨て + // FleetViewModel は InitializeFleets() で作ったインスタンスをずっと使う + + foreach (var f in this.Fleets.OfType()) f.Dispose(); + + if (KanColleClient.Current.Homeport.Organization.Combined) + { + var cfvm = new CombinedFleetViewModel(KanColleClient.Current.Homeport.Organization.CombinedFleet); + var fleets = this.allFleets.Where(x => cfvm.Source.Fleets.All(f => f != x.Source)); + + this.Fleets = EnumerableEx.Return(cfvm).Concat(fleets).ToArray(); + this.SelectedFleet = cfvm; + } + else + { + this.Fleets = this.allFleets.OfType().ToArray(); + + if (this.allFleets.All(x => x != this.SelectedFleet)) + { + // SelectedFleet が allFleets の中のどれでもないとき + // -> SelectedFleet は連合艦隊だったので、改めて第一艦隊を選択 + this.SelectedFleet = this.Fleets.FirstOrDefault(); + } + } + } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/ItemViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/ItemViewModel.cs new file mode 100644 index 000000000..d0c09b7e6 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/ItemViewModel.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels +{ + public class ItemViewModel : ViewModel + { + #region IsSelected 変更通知プロパティ + + private bool _IsSelected; + + public virtual bool IsSelected + { + get { return this._IsSelected; } + set + { + if (this._IsSelected != value) + { + this._IsSelected = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/ViewModels/MainContentViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/MainContentViewModel.cs index f86e3bd21..330eea2e8 100644 --- a/Grabacr07.KanColleViewer/ViewModels/MainContentViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/MainContentViewModel.cs @@ -3,7 +3,6 @@ using System.Linq; using System.Threading.Tasks; using Grabacr07.KanColleViewer.ViewModels.Contents; -using Grabacr07.KanColleViewer.ViewModels.Contents.Docks; using Grabacr07.KanColleViewer.ViewModels.Contents.Fleets; using Grabacr07.KanColleViewer.ViewModels.Dev; using Livet; @@ -18,11 +17,9 @@ public class MainContentViewModel : ViewModel public SlotItemsViewModel SlotItems { get; private set; } public FleetsViewModel Fleets { get; private set; } - public DockyardViewModel Dockyard { get; private set; } - public RepairyardViewModel Repairyard { get; private set; } + public ShipyardViewModel Shipyard { get; private set; } public QuestsViewModel Quests { get; private set; } public ExpeditionsViewModel Expeditions { get; private set; } - public ToolsViewModel Tools { get; private set; } public IList TabItems { get; set; } public IList SystemTabItems { get; set; } @@ -59,29 +56,26 @@ public MainContentViewModel() this.SlotItems = new SlotItemsViewModel(); this.Fleets = new FleetsViewModel(); - this.Dockyard = new DockyardViewModel(); - this.Repairyard = new RepairyardViewModel(); + this.Shipyard = new ShipyardViewModel(); this.Quests = new QuestsViewModel(); this.Expeditions = new ExpeditionsViewModel(this.Fleets); - this.Tools = new ToolsViewModel(); this.TabItems = new List { new OverviewViewModel(this), this.Fleets, - this.Repairyard, - this.Dockyard, + this.Shipyard, this.Quests, this.Expeditions, - this.Tools, + new ToolsViewModel(), }; this.SystemTabItems = new List { new SettingsViewModel(), #region DEBUG -// #if DEBUG -// new DebugTabViewModel(), -// #endif +#if DEBUG + new DebugTabViewModel(), +#endif #endregion }; this.SelectedItem = this.TabItems.FirstOrDefault(); diff --git a/Grabacr07.KanColleViewer/ViewModels/MainWindowViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/MainWindowViewModel.cs index 73cd9435a..5154aff5d 100644 --- a/Grabacr07.KanColleViewer/ViewModels/MainWindowViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/MainWindowViewModel.cs @@ -56,7 +56,6 @@ public Mode Mode KanColleClient.Current.Homeport.Logger.EnableLogging = Settings.EnableLogging; break; case Mode.InSortie: - // 今後の実装にご期待ください ThemeService.Current.ChangeAccent(Accent.Orange); break; case Mode.CriticalCondition: @@ -157,12 +156,13 @@ public MainWindowViewModel() }); this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current) { - { () => KanColleClient.Current.IsStarted, (sender, args) => this.Mode = Mode.Started }, + { () => KanColleClient.Current.IsStarted, (sender, args) => this.UpdateMode() }, + { () => KanColleClient.Current.IsInSortie, (sender, args) => this.UpdateMode() }, }); - this.Mode = Mode.NotStarted; _RefreshNavigator = new RelayCommand(Navigator.ReNavigate); + this.UpdateMode(); } public void TakeScreenshot() @@ -187,5 +187,14 @@ public void Activate() this.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate")); } + + private void UpdateMode() + { + this.Mode = KanColleClient.Current.IsStarted + ? KanColleClient.Current.IsInSortie + ? Mode.InSortie + : Mode.Started + : Mode.NotStarted; + } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/NullViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/NullViewModel.cs new file mode 100644 index 000000000..c17e5e8d4 --- /dev/null +++ b/Grabacr07.KanColleViewer/ViewModels/NullViewModel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Livet; + +namespace Grabacr07.KanColleViewer.ViewModels +{ + public sealed class NullViewModel : ViewModel + { + public static NullViewModel Instance { get; private set; } + + static NullViewModel() + { + Instance = new NullViewModel(); + } + + private NullViewModel() { } + } +} diff --git a/Grabacr07.KanColleViewer/ViewModels/SettingsViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/SettingsViewModel.cs index e0952f9b7..a4878b0c9 100644 --- a/Grabacr07.KanColleViewer/ViewModels/SettingsViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/SettingsViewModel.cs @@ -3,17 +3,15 @@ using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; -using System.Globalization; using System.IO; using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; using System.Threading.Tasks; -using System.Windows.Documents; using System.Net; using System.Xml.Linq; +using Grabacr07.KanColleViewer.Composition; using Grabacr07.KanColleViewer.Models; using Grabacr07.KanColleViewer.Properties; +using Grabacr07.KanColleViewer.ViewModels.Composition; using Grabacr07.KanColleViewer.ViewModels.Messages; using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; @@ -26,7 +24,7 @@ namespace Grabacr07.KanColleViewer.ViewModels { - public class SettingsViewModel : TabItemViewModel, INotifyDataErrorInfo + public class SettingsViewModel : TabItemViewModel { public override string Name { @@ -84,129 +82,6 @@ public SupportedImageFormat ScreenshotImageFormat #endregion - #region UseProxy 変更通知プロパティ - - public string UseProxy - { - get { return Settings.Current.EnableProxy.ToString(); } - set - { - bool booleanValue; - if (Boolean.TryParse(value, out booleanValue)) - { - Settings.Current.EnableProxy = booleanValue; - KanColleClient.Current.Proxy.UseProxyOnConnect = booleanValue; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region UseProxyForSSL 変更通知プロパティ - - public bool UseProxyForSSL - { - get { return Settings.Current.EnableSSLProxy; } - set - { - if (Settings.Current.EnableSSLProxy != value) - { - Settings.Current.EnableSSLProxy = value; - KanColleClient.Current.Proxy.UseProxyOnSSLConnect = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region ProxyHost 変更通知プロパティ - - public string ProxyHost - { - get { return Settings.Current.ProxyHost; } - set - { - if (Settings.Current.ProxyHost != value) - { - Settings.Current.ProxyHost = value; - KanColleClient.Current.Proxy.UpstreamProxyHost = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region ProxyPort 変更通知プロパティ - - public string ProxyPort - { - get { return Settings.Current.ProxyPort.ToString(); } - set - { - UInt16 numberPort; - if (UInt16.TryParse(value, out numberPort)) - { - Settings.Current.ProxyPort = numberPort; - KanColleClient.Current.Proxy.UpstreamProxyPort = numberPort; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region ReSortieCondition 変更通知プロパティ - - private string _ReSortieCondition = Settings.Current.ReSortieCondition.ToString(CultureInfo.InvariantCulture); - private string reSortieConditionError; - - public string ReSortieCondition - { - get { return this._ReSortieCondition; } - set - { - if (this._ReSortieCondition != value) - { - ushort cond; - if (ushort.TryParse(value, out cond) && cond <= 49) - { - Settings.Current.ReSortieCondition = cond; - this.reSortieConditionError = null; - } - else - { - this.reSortieConditionError = "Please enter a condition value between 0 and 49."; - } - - this._ReSortieCondition = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region EnableLogging 変更通知プロパティ - - public bool EnableLogging - { - get { return Settings.Current.EnableLogging; } - set - { - if (Settings.Current.EnableLogging != value) - { - Settings.Current.EnableLogging = value; - KanColleClient.Current.Homeport.Logger.EnableLogging = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - #region Libraries 変更通知プロパティ private IEnumerable _Libraries; @@ -299,6 +174,10 @@ public string Culture { ResourceService.Current.ChangeCulture(value); KanColleClient.Current.Translations.ChangeCulture(value); + if (KanColleClient.Current != null && KanColleClient.Current.Homeport != null && KanColleClient.Current.Homeport.Admiral != null) + { + KanColleClient.Current.Homeport.Admiral.Update(); + } this.RaisePropertyChanged(); } @@ -363,6 +242,24 @@ private set #endregion + #region EnableLogging 変更通知プロパティ + + public bool EnableLogging + { + get { return Settings.Current.KanColleClientSettings.EnableLogging; } + set + { + if (Settings.Current.KanColleClientSettings.EnableLogging != value) + { + Settings.Current.KanColleClientSettings.EnableLogging = value; + KanColleClient.Current.Homeport.Logger.EnableLogging = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + #region EnableCriticalNotify 変更通知プロパティ public bool EnableCriticalNotify @@ -550,7 +447,7 @@ public string OperationsOnlineVersion #region QuestsOnlineVersion 変更通知プロパティ private string _QuestsOnlineVersion; - public string QuestsOnlineVersionURL {get; set;} + public string QuestsOnlineVersionURL { get; set; } public string QuestsOnlineVersion { @@ -678,16 +575,18 @@ public string FlashWindow #endregion - #region EnableFatigueNotification 変更通知プロパティ + #region NotifierPlugins 変更通知プロパティ - public bool EnableFatigueNotification + private List _NotifierPlugins; + + public List NotifierPlugins { - get { return Settings.Current.EnableFatigueNotification; } + get { return this._NotifierPlugins; } set { - if (Settings.Current.EnableFatigueNotification != value) + if (this._NotifierPlugins != value) { - Settings.Current.EnableFatigueNotification = value; + this._NotifierPlugins = value; this.RaisePropertyChanged(); } } @@ -695,16 +594,18 @@ public bool EnableFatigueNotification #endregion - #region CustomSoundVolume 変更通知プロパティ + #region ToolPlugins 変更通知プロパティ + + private List _ToolPlugins; - public int CustomSoundVolume + public List ToolPlugins { - get { return Settings.Current.CustomSoundVolume; } + get { return this._ToolPlugins; } set { - if (Settings.Current.CustomSoundVolume != value) + if (this._ToolPlugins != value) { - Settings.Current.CustomSoundVolume = value; + this._ToolPlugins = value; this.RaisePropertyChanged(); } } @@ -712,12 +613,25 @@ public int CustomSoundVolume #endregion - public bool HasErrors + + #region ViewRangeSettingsCollection 変更通知プロパティ + + private List _ViewRangeSettingsCollection; + + public List ViewRangeSettingsCollection { - get { return this.reSortieConditionError != null; } + get { return this._ViewRangeSettingsCollection; } + set + { + if (this._ViewRangeSettingsCollection != value) + { + this._ViewRangeSettingsCollection = value; + this.RaisePropertyChanged(); + } + } } - public event EventHandler ErrorsChanged; + #endregion public SettingsViewModel() @@ -737,7 +651,7 @@ public SettingsViewModel() return list; }); - this.Cultures = new[] { new CultureViewModel { DisplayName = "(Auto)" } } + this.Cultures = new[] { new CultureViewModel { DisplayName = "(auto)" } } .Concat(ResourceService.Current.SupportedCultures .Select(x => new CultureViewModel { DisplayName = x.EnglishName, Name = x.Name }) .OrderBy(x => x.DisplayName)) @@ -763,7 +677,12 @@ public SettingsViewModel() (sender, args) => this.RaisePropertyChanged(args.PropertyName), }); + this.ViewRangeSettingsCollection = ViewRangeCalcLogic.Logics + .Select(x => new ViewRangeSettingsViewModel(x)) + .ToList(); + this.CheckForUpdates(); + this.ReloadPlugins(); } @@ -812,32 +731,6 @@ public void SetLocationLeft() App.ViewModelRoot.Messenger.Raise(new SetWindowLocationMessage { MessageKey = "Window/Location", Left = 0.0 }); } - - public IEnumerable GetErrors(string propertyName) - { - var errors = new List(); - - switch (propertyName) - { - case "ReSortieCondition": - if (this.reSortieConditionError != null) - { - errors.Add(this.reSortieConditionError); - } - break; - } - - return errors.HasItems() ? errors : null; - } - - protected void RaiseErrorsChanged([CallerMemberName]string propertyName = "") - { - if (this.ErrorsChanged != null) - { - this.ErrorsChanged(this, new DataErrorsChangedEventArgs(propertyName)); - } - } - public void CheckForUpdates() { if (KanColleClient.Current.Updater.LoadVersion(Properties.Settings.Default.KCVUpdateUrl.AbsoluteUri)) @@ -858,7 +751,7 @@ public void CheckForUpdates() } else { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, Resources.Updater_Notification_Title, Resources.Updater_Notification_CheckFailed, () => App.ViewModelRoot.Activate()); @@ -871,21 +764,21 @@ public void UpdateTranslations() if (UpdateStatus > 0) { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, Resources.Updater_Notification_Title, Resources.Updater_Notification_TransUpdate_Success, () => App.ViewModelRoot.Activate()); } else if (UpdateStatus < 0) { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, Resources.Updater_Notification_Title, Resources.Updater_Notification_TransUpdate_Fail, () => App.ViewModelRoot.Activate()); } else { - WindowsNotification.Notifier.Show( + PluginHost.Instance.GetNotifier().Show(NotifyType.Other, Resources.Updater_Notification_Title, Resources.Updater_Notification_TransUpdate_Same, () => App.ViewModelRoot.Activate()); @@ -906,5 +799,38 @@ public void OpenKCVLink() Debug.WriteLine(ex); } } + + public void ReloadPlugins() + { + this.NotifierPlugins = new List(PluginHost.Instance.Notifiers.Select(x => new NotifierViewModel(x))); + this.ToolPlugins = new List(PluginHost.Instance.Tools.Select(x => new ToolViewModel(x))); + } + + + public class ViewRangeSettingsViewModel + { + private bool selected; + + public ICalcViewRange Logic { get; set; } + + public bool Selected + { + get { return this.selected; } + set + { + this.selected = value; + if (value) + { + Settings.Current.KanColleClientSettings.ViewRangeCalcType = this.Logic.Id; + } + } + } + + public ViewRangeSettingsViewModel(ICalcViewRange logic) + { + this.Logic = logic; + this.selected = Settings.Current.KanColleClientSettings.ViewRangeCalcType == logic.Id; + } + } } } diff --git a/Grabacr07.KanColleViewer/ViewModels/StartContentViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/StartContentViewModel.cs index d8bda19d7..b355017bc 100644 --- a/Grabacr07.KanColleViewer/ViewModels/StartContentViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/StartContentViewModel.cs @@ -11,7 +11,7 @@ namespace Grabacr07.KanColleViewer.ViewModels { public class StartContentViewModel : ViewModel { - #region singleton + #region singleton private static readonly StartContentViewModel instance = new StartContentViewModel(); diff --git a/Grabacr07.KanColleViewer/ViewModels/TabItemViewModel.cs b/Grabacr07.KanColleViewer/ViewModels/TabItemViewModel.cs index 3e965bea7..274d42fb0 100644 --- a/Grabacr07.KanColleViewer/ViewModels/TabItemViewModel.cs +++ b/Grabacr07.KanColleViewer/ViewModels/TabItemViewModel.cs @@ -10,7 +10,7 @@ namespace Grabacr07.KanColleViewer.ViewModels { - public abstract class TabItemViewModel : ViewModel, ITabItem + public abstract class TabItemViewModel : ItemViewModel, ITabItem { #region Name 変更通知プロパティ @@ -43,25 +43,6 @@ protected set #endregion - #region IsSelected 変更通知プロパティ - - private bool _IsSelected; - - public virtual bool IsSelected - { - get { return this._IsSelected; } - set - { - if (this._IsSelected != value) - { - this._IsSelected = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - #region Status 変更通知プロパティ private ViewModel _Status; @@ -84,7 +65,7 @@ protected set #endregion - public TabItemViewModel() + protected TabItemViewModel() { if (Helper.IsInDesignMode) return; diff --git a/Grabacr07.KanColleViewer/Views/Behaviors/FlickFleetsAction.cs b/Grabacr07.KanColleViewer/Views/Behaviors/FlickFleetsAction.cs index b4b2ddda6..3aa503f2c 100644 --- a/Grabacr07.KanColleViewer/Views/Behaviors/FlickFleetsAction.cs +++ b/Grabacr07.KanColleViewer/Views/Behaviors/FlickFleetsAction.cs @@ -15,16 +15,15 @@ public enum FlickOrientation public class FlickFleetsAction : TargetedTriggerAction { - private FlickOrientation orientation = FlickOrientation.Horizontal; + public FlickOrientation Orientation { get; set; } - public FlickOrientation Orientation + public bool IsCyclic { get; set; } + + public FlickFleetsAction() { - get { return orientation; } - set { orientation = value; } + this.Orientation = FlickOrientation.Horizontal; } - public bool IsCyclic { get; set; } - protected override void Invoke(object parameter) { if (!(parameter is FlickDirection)) return; diff --git a/Grabacr07.KanColleViewer/Views/Behaviors/GridViewBehaviors.cs b/Grabacr07.KanColleViewer/Views/Behaviors/GridViewBehaviors.cs index 68badf81d..c002dfc93 100644 --- a/Grabacr07.KanColleViewer/Views/Behaviors/GridViewBehaviors.cs +++ b/Grabacr07.KanColleViewer/Views/Behaviors/GridViewBehaviors.cs @@ -44,4 +44,44 @@ static void AdjustWidth(object sender, DependencyPropertyChangedEventArgs e) header.Column.Width = double.NaN; // "Auto" } } + public class GridViewColumnVisibilityManager + { + static Dictionary originalCellTemplates = new Dictionary(); + static Dictionary originalColumnWidths = new Dictionary(); + + public static bool GetIsVisible(DependencyObject obj) + { + return (bool)obj.GetValue(IsVisibleProperty); + } + + public static void SetIsVisible(DependencyObject obj, bool value) + { + obj.SetValue(IsVisibleProperty, value); + } + + public static readonly DependencyProperty IsVisibleProperty = + DependencyProperty.RegisterAttached("IsVisible", typeof(bool), typeof(GridViewColumnVisibilityManager), new UIPropertyMetadata(true, OnIsVisibleChanged)); + + private static void OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + GridViewColumn gc = d as GridViewColumn; + if (gc == null) + return; + + if (GetIsVisible(gc) == false) + { + originalCellTemplates[gc] = gc.CellTemplate; + gc.CellTemplate = null; + originalColumnWidths[gc] = gc.Width; + gc.Width = 0; + } + else + { + if (gc.CellTemplate == null) + gc.CellTemplate = originalCellTemplates[gc]; + if (gc.Width == 0) + gc.Width = originalColumnWidths[gc]; + } + } + } } diff --git a/Grabacr07.KanColleViewer/Views/Behaviors/ScreenshotAction.cs b/Grabacr07.KanColleViewer/Views/Behaviors/ScreenshotAction.cs index 71c66f855..cfdc8a626 100644 --- a/Grabacr07.KanColleViewer/Views/Behaviors/ScreenshotAction.cs +++ b/Grabacr07.KanColleViewer/Views/Behaviors/ScreenshotAction.cs @@ -9,7 +9,7 @@ using Grabacr07.KanColleViewer.Win32; using Livet.Behaviors.Messaging; using Livet.Messaging; -using mshtml; +using MSHTML; using SHDocVw; using IServiceProvider = Grabacr07.KanColleViewer.Win32.IServiceProvider; using WebBrowser = System.Windows.Controls.WebBrowser; diff --git a/Grabacr07.KanColleViewer/Views/Behaviors/SetStyleSheetBehavior.cs b/Grabacr07.KanColleViewer/Views/Behaviors/SetStyleSheetBehavior.cs index 59b1124e3..bee67e8a0 100644 --- a/Grabacr07.KanColleViewer/Views/Behaviors/SetStyleSheetBehavior.cs +++ b/Grabacr07.KanColleViewer/Views/Behaviors/SetStyleSheetBehavior.cs @@ -9,7 +9,7 @@ using Grabacr07.Desktop.Metro; using Grabacr07.KanColleViewer.Properties; using MetroRadiance.Core; -using mshtml; +using MSHTML; namespace Grabacr07.KanColleViewer.Views.Behaviors { diff --git a/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml b/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml index d0c2d3046..23fa5b1f9 100644 --- a/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml +++ b/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml @@ -20,6 +20,7 @@ xmlns:catalogs="clr-namespace:Grabacr07.KanColleViewer.Views.Catalogs" xmlns:contentsVm="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents" xmlns:converters="clr-namespace:Grabacr07.KanColleViewer.Views.Converters" + xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:ShipCatalogWindowViewModel}" Title="{Binding Title}" @@ -76,10 +77,8 @@ + Style="{DynamicResource CaptionTextStyleKey}" + Margin="2,0,8,0" /> - + + - + - + - + - - + Margin="0,2" /> - + 1 @@ -170,7 +171,7 @@ - + 3 @@ -178,7 +179,7 @@ - + 5 @@ -186,7 +187,7 @@ - + 8 @@ -196,7 +197,7 @@ - + 7 @@ -205,7 +206,7 @@ - + 13 @@ -213,7 +214,7 @@ - + 6 @@ -222,6 +223,15 @@ + + + + 17 + 19 + 20 + + + @@ -260,19 +270,16 @@ - + - - - - - - - - - + + + @@ -285,19 +292,16 @@ - + - - - - - - - - - + + + @@ -310,13 +314,12 @@ - + - - - + @@ -331,19 +334,16 @@ - + - - - - - - - - - + + + @@ -356,19 +356,16 @@ - + - - - - - - - - - + + + @@ -381,19 +378,16 @@ - + - - - - - - - - - + + + @@ -434,12 +428,12 @@ - + + ToolTip="{Binding Resources.ShipCatalog_Filter_SaveSettings_ToolTip, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" /> @@ -454,7 +448,7 @@ - + @@ -464,22 +458,134 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Margin="8"> + ItemContainerStyle="{DynamicResource GridViewItemContainerStyleKey}" + ScrollViewer.PanningMode="Both"> @@ -122,26 +143,27 @@ + - + - + - + - - @@ -150,69 +172,125 @@ - + - - - - + - - - - - + + - - + + - - - + + + - - + + - + - + + + + + + + + + + + + + + - - - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -234,13 +312,12 @@ Padding="20" Visibility="{Binding IsReloading, Converter={StaticResource BooleanToVisibilityConverter}}" d:IsHidden="True"> - - \ No newline at end of file + diff --git a/Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml b/Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml deleted file mode 100644 index f80d358b8..000000000 --- a/Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Contents/Expeditions.xaml b/Grabacr07.KanColleViewer/Views/Contents/Expeditions.xaml index ea076a49c..2fc5f0786 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Expeditions.xaml +++ b/Grabacr07.KanColleViewer/Views/Contents/Expeditions.xaml @@ -18,145 +18,145 @@ d:DesignWidth="700" d:DesignHeight="300" d:DataContext="{d:DesignInstance vmContents:ExpeditionsViewModel}"> + + + + + + + + + + + + + + - + - - - - - + + + + + + + + - - - - - + + + - - - - - - - - - - - - - + + + + + + + + - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Contents/Fleets.xaml b/Grabacr07.KanColleViewer/Views/Contents/Fleets.xaml index 6cc9c1ab1..54d4a044a 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Fleets.xaml +++ b/Grabacr07.KanColleViewer/Views/Contents/Fleets.xaml @@ -6,281 +6,455 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf" + xmlns:metro2="clr-namespace:Grabacr07.Desktop.Metro.Controls;assembly=Desktop.Metro" xmlns:controls="clr-namespace:Grabacr07.KanColleViewer.Views.Controls" + xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties" xmlns:views="clr-namespace:Grabacr07.KanColleViewer.Views" xmlns:vm="clr-namespace:Grabacr07.KanColleViewer.ViewModels" + xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" xmlns:behaviors="clr-namespace:Grabacr07.KanColleViewer.Views.Behaviors" - xmlns:contents="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents" xmlns:fleets="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Fleets" - xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties" - xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" + xmlns:contents="clr-namespace:Grabacr07.KanColleViewer.Views.Contents" + xmlns:converters="clr-namespace:Grabacr07.KanColleViewer.Views.Converters" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="400" - d:DataContext="{d:DesignInstance fleets:FleetsViewModel}" - SnapsToDevicePixels="True"> + d:DataContext="{d:DesignInstance fleets:FleetsViewModel}"> - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - + - - - + - - - - - - - - - + - - - - - - - + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + - - + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - \ No newline at end of file + + diff --git a/Grabacr07.KanColleViewer/Views/Contents/Homeport.xaml b/Grabacr07.KanColleViewer/Views/Contents/Homeport.xaml index 4f5828a7d..85aa46f4f 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Homeport.xaml +++ b/Grabacr07.KanColleViewer/Views/Contents/Homeport.xaml @@ -13,6 +13,7 @@ xmlns:controls="clr-namespace:Grabacr07.KanColleViewer.Views.Controls" xmlns:contents="clr-namespace:Grabacr07.KanColleViewer.Views.Contents" xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" + xmlns:converters="clr-namespace:Grabacr07.KanColleViewer.Views.Converters" mc:Ignorable="d" d:DesignWidth="600" d:DataContext="{d:DesignInstance viewModels:MainContentViewModel}"> @@ -23,20 +24,21 @@ + - @@ -45,10 +47,10 @@ @@ -73,11 +75,11 @@ Grid.Column="1"> + Style="{DynamicResource EmphaticTextElementStyleKey}" /> + Style="{DynamicResource EmphaticTextElementStyleKey}" /> @@ -95,13 +97,13 @@ Grid.Column="1"> + Style="{DynamicResource EmphaticTextElementStyleKey}" /> + Style="{DynamicResource EmphaticTextElementStyleKey}" /> diff --git a/Grabacr07.KanColleViewer/Views/Contents/Overview.xaml b/Grabacr07.KanColleViewer/Views/Contents/Overview.xaml index 2ad2bf039..447229384 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Overview.xaml +++ b/Grabacr07.KanColleViewer/Views/Contents/Overview.xaml @@ -15,12 +15,13 @@ xmlns:catalogs="clr-namespace:Grabacr07.KanColleViewer.Views.Catalogs" xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" xmlns:behaviors="clr-namespace:Grabacr07.KanColleViewer.Views.Behaviors" - xmlns:fleets="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Fleets" mc:Ignorable="d" d:DataContext="{d:DesignInstance vmContents:OverviewViewModel}" d:DesignWidth="680"> + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/Views/Contents/Quests.xaml b/Grabacr07.KanColleViewer/Views/Contents/Quests.xaml index 90a59c7c3..6185c4846 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Quests.xaml +++ b/Grabacr07.KanColleViewer/Views/Contents/Quests.xaml @@ -16,177 +16,178 @@ d:DesignHeight="300" d:DataContext="{d:DesignInstance vmContents:QuestsViewModel}" Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}, Path=ActualWidth}"> - - - - - - - - - - - - - + + + + + + + + - - + - + + + + + + - - - - - - - + - - + + + + + + + - + + - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + - - - + - - - - - - + + + - - - - - - - + + + + + + - - + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml b/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml deleted file mode 100644 index 6ef890b48..000000000 --- a/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml.cs b/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml.cs deleted file mode 100644 index dd789d74f..000000000 --- a/Grabacr07.KanColleViewer/Views/Contents/Repairyard.xaml.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Controls; - -namespace Grabacr07.KanColleViewer.Views.Contents -{ - /// - /// Repairyard.xaml の相互作用ロジック - /// - public partial class Repairyard : UserControl - { - public Repairyard() - { - InitializeComponent(); - } - } -} diff --git a/Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml b/Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml new file mode 100644 index 000000000..f7428d915 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml @@ -0,0 +1,454 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml.cs b/Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml.cs similarity index 66% rename from Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml.cs rename to Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml.cs index afffe712a..8a7bdeb9a 100644 --- a/Grabacr07.KanColleViewer/Views/Contents/Dockyard.xaml.cs +++ b/Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml.cs @@ -7,11 +7,11 @@ namespace Grabacr07.KanColleViewer.Views.Contents { /// - /// Dockyard.xaml の相互作用ロジック + /// Shipyard.xaml の相互作用ロジック /// - public partial class Dockyard : UserControl + public partial class Shipyard : UserControl { - public Dockyard() + public Shipyard() { InitializeComponent(); } diff --git a/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml b/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml new file mode 100644 index 000000000..98b27d7c7 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml.cs b/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml.cs new file mode 100644 index 000000000..9b9e26092 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views.Contents +{ + /// + /// StateDetailIndicator.xaml の相互作用ロジック + /// + public partial class StateDetailIndicator : UserControl + { + public StateDetailIndicator() + { + InitializeComponent(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml b/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml new file mode 100644 index 000000000..eeff6f67e --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml.cs b/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml.cs new file mode 100644 index 000000000..74df2ca58 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views.Contents +{ + /// + /// StateIconIndicator.xaml の相互作用ロジック + /// + public partial class StateIconIndicator : UserControl + { + public StateIconIndicator() + { + InitializeComponent(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/Contents/Tools.xaml b/Grabacr07.KanColleViewer/Views/Contents/Tools.xaml new file mode 100644 index 000000000..134c63649 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Contents/Tools.xaml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Tools/Tools.xaml.cs b/Grabacr07.KanColleViewer/Views/Contents/Tools.xaml.cs similarity index 60% rename from Grabacr07.KanColleViewer/Views/Tools/Tools.xaml.cs rename to Grabacr07.KanColleViewer/Views/Contents/Tools.xaml.cs index dcf62358c..ea8dd6f37 100644 --- a/Grabacr07.KanColleViewer/Views/Tools/Tools.xaml.cs +++ b/Grabacr07.KanColleViewer/Views/Contents/Tools.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Grabacr07.KanColleViewer.Views.Tools -{ - /// - /// Interaction logic for Tools.xaml - /// - public partial class Tools : UserControl - { - public Tools() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views.Contents +{ + /// + /// Tools.xaml の相互作用ロジック + /// + public partial class Tools : UserControl + { + public Tools() + { + InitializeComponent(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/Controls/CrossFrameIE.cs b/Grabacr07.KanColleViewer/Views/Controls/CrossFrameIE.cs index d6283ab76..9637a0194 100644 --- a/Grabacr07.KanColleViewer/Views/Controls/CrossFrameIE.cs +++ b/Grabacr07.KanColleViewer/Views/Controls/CrossFrameIE.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; -using mshtml; +using MSHTML; namespace Grabacr07.KanColleViewer.Views.Controls { diff --git a/Grabacr07.KanColleViewer/Views/Controls/GridViewColumnCollapsible.cs b/Grabacr07.KanColleViewer/Views/Controls/GridViewColumnCollapsible.cs new file mode 100644 index 000000000..b39201333 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Controls/GridViewColumnCollapsible.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace Grabacr07.KanColleViewer.Views.Controls +{ + class GridViewColumnCollapsible : GridViewColumn + { + public Visibility Visibility + { + get + { + return (Visibility)GetValue(VisibilityProperty); + } + set + { + SetValue(VisibilityProperty, value); + } + } + + public static readonly DependencyProperty VisibilityProperty = + DependencyProperty.Register("Visibility", typeof(Visibility), + typeof(GridViewColumnCollapsible), + new FrameworkPropertyMetadata(Visibility.Visible, + FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, + new PropertyChangedCallback(OnVisibilityPropertyChanged))); + + private static void OnVisibilityPropertyChanged(DependencyObject d, + DependencyPropertyChangedEventArgs e) + { + var column = d as GridViewColumnCollapsible; + if (column != null) + { + column.OnVisibilityChanged((Visibility)e.NewValue); + } + } + + private void OnVisibilityChanged(Visibility visibility) + { + if (visibility == Visibility.Visible) + { + Width = _visibleWidth; + CellTemplate = _visibleTemplate; + } + else + { + _visibleWidth = Width; + _visibleTemplate = CellTemplate; + Width = 0.0; + CellTemplate = new DataTemplate(); + } + } + + private double _visibleWidth; + private DataTemplate _visibleTemplate; + } +} diff --git a/Grabacr07.KanColleViewer/Views/Controls/KanColleHost.cs b/Grabacr07.KanColleViewer/Views/Controls/KanColleHost.cs index a2d19658f..6c5816c12 100644 --- a/Grabacr07.KanColleViewer/Views/Controls/KanColleHost.cs +++ b/Grabacr07.KanColleViewer/Views/Controls/KanColleHost.cs @@ -9,7 +9,7 @@ using System.Windows.Navigation; using Grabacr07.KanColleViewer.Models; using MetroRadiance.Core; -using mshtml; +using MSHTML; using SHDocVw; using IServiceProvider = Grabacr07.KanColleViewer.Win32.IServiceProvider; using WebBrowser = System.Windows.Controls.WebBrowser; @@ -53,18 +53,20 @@ private static void WebBrowserPropertyChangedCallback(DependencyObject d, Depend if (oldBrowser != null) { - oldBrowser.LoadCompleted -= instance.ApplyStyleSheet; + oldBrowser.LoadCompleted -= instance.HandleLoadCompleted; oldBrowser.LoadCompleted -= instance.ApplyFlashQualityScript; } if (newBrowser != null) { - newBrowser.LoadCompleted += instance.ApplyStyleSheet; + newBrowser.LoadCompleted += instance.HandleLoadCompleted; newBrowser.LoadCompleted += instance.ApplyFlashQualityScript; } if (instance.scrollViewer != null) { instance.scrollViewer.Content = newBrowser; } + + WebBrowserHelper.SetAllowWebBrowserDrop(newBrowser, false); } #endregion @@ -165,7 +167,21 @@ private static void ApplyZoomFactor(WebBrowser target, int zoomFactor) } } - private void ApplyStyleSheet(object sender, NavigationEventArgs e) + private void HandleLoadCompleted(object sender, NavigationEventArgs e) + { + this.ApplyStyleSheet(); + WebBrowserHelper.SetScriptErrorsSuppressed(this.WebBrowser, true); + + this.Update(); + + var window = Window.GetWindow(this.WebBrowser); + if (window != null) + { + window.Width = this.WebBrowser.Width; + } + } + + private void ApplyStyleSheet() { try { @@ -192,6 +208,7 @@ private void ApplyStyleSheet(object sender, NavigationEventArgs e) { target.createStyleSheet().cssText = Properties.Settings.Default.OverrideStyleSheet; this.styleSheetApplied = true; + return; } } } @@ -200,13 +217,7 @@ private void ApplyStyleSheet(object sender, NavigationEventArgs e) StatusService.Current.Notify("failed to apply css: " + ex.Message); } - this.Update(); - - var window = Window.GetWindow(this.WebBrowser); - if (window != null) - { - window.Width = this.WebBrowser.Width; - } + return; } public void ApplyFlashQualityScript(object sender, NavigationEventArgs e) diff --git a/Grabacr07.KanColleViewer/Views/Controls/WebBrowserHelper.cs b/Grabacr07.KanColleViewer/Views/Controls/WebBrowserHelper.cs index edb82de45..0a591077f 100644 --- a/Grabacr07.KanColleViewer/Views/Controls/WebBrowserHelper.cs +++ b/Grabacr07.KanColleViewer/Views/Controls/WebBrowserHelper.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Reflection; using System.Threading.Tasks; @@ -34,20 +33,58 @@ private static void ScriptErrorsSuppressedChangedCallback(DependencyObject d, De try { - var axIWebBrowser2 = typeof(WebBrowser).GetProperty("AxIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic); - if (axIWebBrowser2 == null) return; + var axIWebBrowser2 = GetAxWebbrowser2(browser); + axIWebBrowser2.GetType().InvokeMember("Silent", BindingFlags.SetProperty, null, axIWebBrowser2, new[] { e.NewValue, }); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex); + } + } + + #endregion - var comObj = axIWebBrowser2.GetValue(browser, null); - if (comObj == null) return; + #region AllowWebBrowserDrop + + public static readonly DependencyProperty AllowWebBrowserDropProperty = + DependencyProperty.RegisterAttached("AllowWebBrowserDrop", typeof(bool), typeof(WebBrowserHelper), new PropertyMetadata(true, AllowWebBrowserDropChangedCallback)); + + public static void SetAllowWebBrowserDrop(DependencyObject element, bool value) + { + element.SetValue(AllowWebBrowserDropProperty, value); + } + + public static bool GetAllowWebBrowserDrop(DependencyObject element) + { + return (bool)element.GetValue(AllowWebBrowserDropProperty); + } + + + private static void AllowWebBrowserDropChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var browser = d as WebBrowser; + if (browser == null) return; + if (!(e.NewValue is bool)) return; + + try + { + var axIWebBrowser2 = GetAxWebbrowser2(browser); + axIWebBrowser2.GetType().InvokeMember("RegisterAsDropTarget", BindingFlags.SetProperty, null, axIWebBrowser2, new[] { e.NewValue, }); - comObj.GetType().InvokeMember("Silent", BindingFlags.SetProperty, null, comObj, new[] { e.NewValue, }); } catch (Exception ex) { - Debug.WriteLine(ex); + System.Diagnostics.Debug.WriteLine(ex); } } #endregion + + + private static object GetAxWebbrowser2(WebBrowser browser) + { + var axIWebBrowser2Prop = typeof(WebBrowser).GetProperty("AxIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic); + return axIWebBrowser2Prop == null ? null : axIWebBrowser2Prop.GetValue(browser, null); + } } } diff --git a/Grabacr07.KanColleViewer/Views/Converters/HasFlagConverter.cs b/Grabacr07.KanColleViewer/Views/Converters/HasFlagConverter.cs new file mode 100644 index 000000000..9ef66b5ce --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Converters/HasFlagConverter.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Grabacr07.KanColleViewer.Views.Converters +{ + public class HasFlagConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + var enumValue = value as Enum; + if (enumValue != null) + { + var p = parameter as string; + if (p != null) + { + return p.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) + .Select(x => x.Trim()) + .Select(x => Enum.Parse(enumValue.GetType(), x) as Enum) + .All(x => enumValue.HasFlag(x)); + } + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.Write(ex); + } + + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + + } +} diff --git a/Grabacr07.KanColleViewer/Views/Converters/RankIDToRankNameConverter.cs b/Grabacr07.KanColleViewer/Views/Converters/RankIDToRankNameConverter.cs new file mode 100644 index 000000000..82a1163a3 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Converters/RankIDToRankNameConverter.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Grabacr07.KanColleViewer.Properties; + + +namespace Grabacr07.KanColleViewer.Views.Converters +{ + public class RankIDToRankNameConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is int) + { + var ID = (int)value; + switch (ID) + { + case 1: + return Resources.Rank_Marshal_Admiral; + case 2: + return Resources.Rank_Admiral; + case 3: + return Resources.Rank_Vice_Admiral; + case 4: + return Resources.Rank_Rear_Admiral; + case 5: + return Resources.Rank_Captain; + case 6: + return Resources.Rank_Commander; + case 7: + return Resources.Rank_Novice_Commander; + case 8: + return Resources.Rank_Lieutenant_Commander; + case 9: + return Resources.Rank_Lieutenant; + case 10: + default: + return Resources.Rank_Novice_Lieutenant; + } + + } + return "N/A"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/FleetWindow.xaml b/Grabacr07.KanColleViewer/Views/FleetWindow.xaml new file mode 100644 index 000000000..0095760a6 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/FleetWindow.xaml @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Grabacr07.KanColleViewer/Views/FleetWindow.xaml.cs b/Grabacr07.KanColleViewer/Views/FleetWindow.xaml.cs new file mode 100644 index 000000000..5782da342 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/FleetWindow.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views +{ + /// + /// FleetWindow.xaml の相互作用ロジック + /// + partial class FleetWindow + { + public FleetWindow() + { + this.InitializeComponent(); + + MainWindow.Current.Closed += (sender, args) => this.Close(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/MainContent.xaml b/Grabacr07.KanColleViewer/Views/MainContent.xaml index e21f0fb2b..2748df4eb 100644 --- a/Grabacr07.KanColleViewer/Views/MainContent.xaml +++ b/Grabacr07.KanColleViewer/Views/MainContent.xaml @@ -16,17 +16,15 @@ xmlns:contents="clr-namespace:Grabacr07.KanColleViewer.Views.Contents" xmlns:vm="clr-namespace:Grabacr07.KanColleViewer.ViewModels" xmlns:vmContents="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents" - xmlns:vmDocks="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Docks" xmlns:vmFleets="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Fleets" xmlns:settings="clr-namespace:Grabacr07.KanColleViewer.Views.Settings" - xmlns:tools="clr-namespace:Grabacr07.KanColleViewer.Views.Tools" xmlns:devVm="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Dev" xmlns:dev="clr-namespace:Grabacr07.KanColleViewer.Views.Dev" mc:Ignorable="d" d:DesignWidth="800" + d:DesignHeight="400" d:DataContext="{d:DesignInstance vm:MainContentViewModel}" Background="{DynamicResource ThemeBrushKey}"> - @@ -96,8 +94,9 @@ - - + @@ -121,43 +120,62 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/MainWindow.xaml b/Grabacr07.KanColleViewer/Views/MainWindow.xaml index ce8ccf3d6..2e72da289 100644 --- a/Grabacr07.KanColleViewer/Views/MainWindow.xaml +++ b/Grabacr07.KanColleViewer/Views/MainWindow.xaml @@ -25,7 +25,9 @@ Foreground="{DynamicResource ActiveForegroundBrushKey}" IsRestoringWindowPlacement="True" SnapsToDevicePixels="True" - TextOptions.TextFormattingMode="Display"> + TextOptions.TextFormattingMode="Display" + UseLayoutRounding="True"> + @@ -66,10 +68,8 @@ + Style="{DynamicResource CaptionTextStyleKey}" + Margin="2,0,8,0" /> - + @@ -22,47 +28,53 @@ - + + + + + + + MethodName="ClearZoomFactor" + Padding="20,4" + HorizontalAlignment="Left"> + FontSize="13" + HorizontalAlignment="Center"> + StringFormat="Return game to {0}% scale" + Mode="OneWay" /> - + + Fill="{DynamicResource ForegroundBrushKey}" + Stretch="Fill" + Margin="1" + Width="35" + Height="30" /> - - - - + Style="{DynamicResource DefaultTextStyleKey}" + Text="You can change the display size of the game (IE) with the zoom button at the top of the window. Screenshots are not affected by this setting and will always be taken at 100% scale." + Foreground="{DynamicResource ActiveForegroundBrushKey}" /> - - + @@ -102,14 +114,23 @@ Grid.Column="1" Grid.Row="1" /> - + + + + + + + + - - - + - \ No newline at end of file + diff --git a/Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs b/Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs index bd1f2b664..58a290d55 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs +++ b/Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs @@ -16,7 +16,7 @@ namespace Grabacr07.KanColleViewer.Views.Settings { /// - /// Interaction logic for Browser.xaml + /// Browser.xaml の相互作用ロジック /// public partial class Browser : UserControl { diff --git a/Grabacr07.KanColleViewer/Views/Settings/Common.xaml b/Grabacr07.KanColleViewer/Views/Settings/Common.xaml index e9e30d357..64cda59ac 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Common.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Common.xaml @@ -1,82 +1,19 @@  - - - + - - \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/Language.xaml b/Grabacr07.KanColleViewer/Views/Settings/Language.xaml index 3555d9511..64a99fc93 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Language.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Language.xaml @@ -22,7 +22,7 @@ + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> diff --git a/Grabacr07.KanColleViewer/Views/Settings/Network.xaml b/Grabacr07.KanColleViewer/Views/Settings/Network.xaml index 87a576e8c..bf244b609 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Network.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Network.xaml @@ -3,11 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf" xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls" xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties" xmlns:controls="clr-namespace:Grabacr07.Desktop.Metro.Controls;assembly=Desktop.Metro" xmlns:viewModels="clr-namespace:Grabacr07.KanColleViewer.ViewModels" xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="300" @@ -22,13 +24,13 @@ + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> - - + IsChecked="{Binding Source={x:Static models:Settings.Current}, Path=ProxySettings.IsEnabled}" /> + @@ -39,24 +41,67 @@ - - + - - + + Width="80"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml.cs b/Grabacr07.KanColleViewer/Views/Settings/Notification.xaml.cs similarity index 58% rename from Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml.cs rename to Grabacr07.KanColleViewer/Views/Settings/Notification.xaml.cs index 14818f46d..b5674f4f1 100644 --- a/Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml.cs +++ b/Grabacr07.KanColleViewer/Views/Settings/Notification.xaml.cs @@ -13,16 +13,16 @@ using System.Windows.Navigation; using System.Windows.Shapes; -namespace Grabacr07.KanColleViewer.Views.Tools +namespace Grabacr07.KanColleViewer.Views.Settings { - /// - /// Interaction logic for Calculator.xaml - /// - public partial class Calculator : UserControl - { - public Calculator() - { - InitializeComponent(); - } - } + /// + /// Notification.xaml の相互作用ロジック + /// + public partial class Notification : UserControl + { + public Notification() + { + InitializeComponent(); + } + } } diff --git a/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml b/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml index 4573de044..87c54fc3f 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml @@ -20,19 +20,11 @@ - - - - - + - - - - + + @@ -41,14 +33,21 @@ - + + + + + + + + + + Style="{DynamicResource DetailTextStyleKey}"> @@ -58,10 +57,42 @@ Style="{DynamicResource SeparatorRectangleStyleKey}" /> - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/Others.xaml b/Grabacr07.KanColleViewer/Views/Settings/Others.xaml index 6601368c5..795806f7a 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Others.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Others.xaml @@ -1,8 +1,10 @@  + + + + + + - + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> + @@ -44,8 +53,8 @@ - - + + - - + + - - - - - - + + - + - + @@ -119,12 +126,12 @@ Style="{DynamicResource SeparatorRectangleStyleKey}" /> - + + Margin="0,0,24,0"> --> + Style="{DynamicResource SeparatorRectangleStyleKey}" />--> + + + + + - + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml b/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml new file mode 100644 index 000000000..631ef97a9 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml.cs b/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml.cs new file mode 100644 index 000000000..d0dd4eb2b --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views.Settings +{ + /// + /// PluginInfo.xaml の相互作用ロジック + /// + public partial class PluginInfo : UserControl + { + public PluginInfo() + { + InitializeComponent(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/Settings/Settings.xaml b/Grabacr07.KanColleViewer/Views/Settings/Settings.xaml index ac52b655b..c6ae4a2c7 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Settings.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Settings.xaml @@ -5,15 +5,8 @@ xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf" - xmlns:metro="http://schemes.grabacr.net/winfx/2014/controls" - xmlns:metro2="clr-namespace:Grabacr07.Desktop.Metro.Controls;assembly=Desktop.Metro" xmlns:root="clr-namespace:Grabacr07.KanColleViewer" - xmlns:views="clr-namespace:Grabacr07.KanColleViewer.Views" - xmlns:viewModels="clr-namespace:Grabacr07.KanColleViewer.ViewModels" - xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties" xmlns:settings="clr-namespace:Grabacr07.KanColleViewer.Views.Settings" - xmlns:controls="clr-namespace:Grabacr07.KanColleViewer.Views.Controls" xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" mc:Ignorable="d" d:DesignWidth="700" @@ -25,333 +18,95 @@ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/Updates.xaml b/Grabacr07.KanColleViewer/Views/Settings/Updates.xaml index 91f1c0388..1794f97e9 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Updates.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Updates.xaml @@ -23,7 +23,7 @@ + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> @@ -195,7 +195,7 @@ Margin="0,10" Style="{DynamicResource SeparatorRectangleStyleKey}" /> - + - - diff --git a/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml b/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml new file mode 100644 index 000000000..70c9a4fc4 --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml.cs b/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml.cs new file mode 100644 index 000000000..03bc4155d --- /dev/null +++ b/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Views.Settings +{ + /// + /// VersionInfo.xaml の相互作用ロジック + /// + public partial class VersionInfo : UserControl + { + public VersionInfo() + { + InitializeComponent(); + } + } +} diff --git a/Grabacr07.KanColleViewer/Views/Settings/Window.xaml b/Grabacr07.KanColleViewer/Views/Settings/Window.xaml index 2a0b90567..71220d757 100644 --- a/Grabacr07.KanColleViewer/Views/Settings/Window.xaml +++ b/Grabacr07.KanColleViewer/Views/Settings/Window.xaml @@ -23,25 +23,21 @@ + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> - - - + + Style="{DynamicResource DefaultTextStyleKey}" + FontSize="11" + HorizontalAlignment="Center" /> diff --git a/Grabacr07.KanColleViewer/Views/StartContent.xaml b/Grabacr07.KanColleViewer/Views/StartContent.xaml index b02e22f4a..12c6bc39c 100644 --- a/Grabacr07.KanColleViewer/Views/StartContent.xaml +++ b/Grabacr07.KanColleViewer/Views/StartContent.xaml @@ -117,8 +117,7 @@ - + @@ -129,22 +128,28 @@ - - - - - - - - + + + + + + + + + + @@ -325,12 +331,12 @@ - + - - - + + + @@ -345,10 +351,23 @@ Margin="0,8,0,0" DataContext="{Binding Source={x:Static root:App.ViewModelRoot}, Path=Settings}" Visibility="{Binding ElementName=SettingsTab, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"> - + + Style="{StaticResource VerticalTabControlStyleKey}"> + + + + Style="{DynamicResource TabHeaderTextStyleKey}" /> - + Style="{DynamicResource TabHeaderTextStyleKey}" /> - - + + + + + + + @@ -406,11 +424,8 @@ + Style="{DynamicResource TabHeaderTextStyleKey}" /> - diff --git a/Grabacr07.KanColleViewer/Views/StatusBar.xaml b/Grabacr07.KanColleViewer/Views/StatusBar.xaml index be1531dc3..5f077478d 100644 --- a/Grabacr07.KanColleViewer/Views/StatusBar.xaml +++ b/Grabacr07.KanColleViewer/Views/StatusBar.xaml @@ -9,17 +9,13 @@ xmlns:contents="clr-namespace:Grabacr07.KanColleViewer.Views.Contents" xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties" xmlns:vm="clr-namespace:Grabacr07.KanColleViewer.ViewModels" - xmlns:vmDocks="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Docks" xmlns:vmFleets="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Fleets" xmlns:vmContents="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents" xmlns:dev="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Dev" xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models" - xmlns:views="clr-namespace:Grabacr07.KanColleViewer.Views" - xmlns:vmTools="clr-namespace:Grabacr07.KanColleViewer.ViewModels.Contents.Tools" mc:Ignorable="d" d:DesignHeight="25" d:DesignWidth="780"> - @@ -30,8 +26,9 @@ Margin="5,0" /> @@ -43,25 +40,30 @@ - - - - - @@ -71,39 +73,41 @@ - - - - - - - - + + - - - diff --git a/Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml b/Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml deleted file mode 100644 index c15fbcd76..000000000 --- a/Grabacr07.KanColleViewer/Views/Tools/Calculator.xaml +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - 1 - 150 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - x - - - - - - - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/Views/Tools/Common.xaml b/Grabacr07.KanColleViewer/Views/Tools/Common.xaml deleted file mode 100644 index c2e3e74cc..000000000 --- a/Grabacr07.KanColleViewer/Views/Tools/Common.xaml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml b/Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml deleted file mode 100644 index c63718759..000000000 --- a/Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/Views/Tools/Tools.xaml b/Grabacr07.KanColleViewer/Views/Tools/Tools.xaml deleted file mode 100644 index f4f7673bf..000000000 --- a/Grabacr07.KanColleViewer/Views/Tools/Tools.xaml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Grabacr07.KanColleViewer/Win32/NativeMethods.cs b/Grabacr07.KanColleViewer/Win32/NativeMethods.cs index 1acd16172..ad0dc0be1 100644 --- a/Grabacr07.KanColleViewer/Win32/NativeMethods.cs +++ b/Grabacr07.KanColleViewer/Win32/NativeMethods.cs @@ -8,5 +8,7 @@ namespace Grabacr07.KanColleViewer.Win32 { internal static class NativeMethods { + [DllImport("Avrt.dll")] + public static extern IntPtr AvSetMmThreadCharacteristics(string taskName, ref uint taskIndex); } } diff --git a/Grabacr07.KanColleViewer/license.txt b/Grabacr07.KanColleViewer/license.txt new file mode 100644 index 000000000..16eb31911 --- /dev/null +++ b/Grabacr07.KanColleViewer/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Grabacr07 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Grabacr07.KanColleViewer/packages.config b/Grabacr07.KanColleViewer/packages.config index 4eb802679..26b44ba73 100644 --- a/Grabacr07.KanColleViewer/packages.config +++ b/Grabacr07.KanColleViewer/packages.config @@ -3,14 +3,11 @@ - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/readme.txt b/Grabacr07.KanColleViewer/readme.txt new file mode 100644 index 000000000..deaa29ab4 --- /dev/null +++ b/Grabacr07.KanColleViewer/readme.txt @@ -0,0 +1,111 @@ + +‹ƂZI (KanColleViewer) + version 3.8 2015/05/18 + + + +̃\tgEFAɂ‚ + +u‹ƂZIv́ADMM.com zMĂuEUQ[ +u͑ꂭ `͂`vVт₷邽߂̃c[łB + + +ȋ@\ + +ECނ⍂ (Q[ŊmFɂ) ̃A^C\ +EĂ͖̐AۗLĂ鑕̐̃A^C\ +E͑ƁA͑ɑ͖̈ꗗ\ +EƁAꂼ𑕔Ă͖̈ꗗ\ +ERfBV񕜂͑o”\ɂȂ^C~Oł̃g[Xgʒm +EhbNEhbN̎gp󋵂ƁAEĨg[Xgʒm +Eݐs̔C̈ꗗ\ƁAcĂfC[/EB[N[C̈ꗗ\ +Ȅ󋵂ƁAĨg[Xgʒm +EXN[Vbgۑ +E~[g + + +‹ + +EWindows 8 ȍ~ +EWindows 7 + +J҂ Windows 8.1 Pro ł̂ݓmFsĂ܂B +Windows 7 ł́A⌚̏Ĩg[Xgʒm삵܂ (ɁA^XNgC̃o[ʒmɂȂ܂)B +Windows 8 ȍ~ł̎gp𐄏܂B + +E.NET Framework 4.5 + +Windows 7 ŎgpꍇA.NET Framework 4.5 ̃CXg[KvłB +Windows 8 ȍ~̏ꍇ͕WŃCXg[Ă܂B + +IE R|[lggpĂAuEU[ Internet Explorer ̐ݒɈˑ܂B +͂{̂̃Abvf[gȂǂɃXNvgG[pꍇ́AIE ̃LbV폜ĂB +܂AQ[\Ȃ̌ۂꍇ́AIE ̐ݒAIE Flash \ł邩ǂmFB + +ȂA͂Q[̃TCY (800 x 480) Internet Explorer (WebBrowser control) ̃TCY҂荇킹ĕ\Ă邾ŁAFlash osĂ܂B + + +gp + +I[v\[X / t[\tgEFAłBłp܂B +\[XR[h́AMIT CZX̉ GitHub ɂČJĂ܂B + + +gp@ + + KanColleViewer.exe NĂB +eʂ̉ http://grabacr.net/kancolleviewer QƂĂB + + + +J‹EECu + +C# + WPF ŊJĂ܂B +J‹ Windows 8.1 Pro + Visual Studio Premium 2013 łB +ȉ̃CugpĂ܂B + +EReactive Extensions / Interactive Extensions +EWindows API Code Pack +ELivet (http://ugaya40.net/livet) +EDynamicJson (http://dynamicjson.codeplex.com/) +EFiddlerCore (http://fiddler2.com/fiddlercore) + + +Ɛӎ + +{\tgEFA̎gṕAׂĎȐӔCōsĂB +̃\tgEFAgpʐQɂ‚āAJ҂ +ؐӔC𕉂܂B + + +XV + +2015/05/18 - version 3.8 [X +2015/05/03 - version 3.7 [X +2015/02/07 - version 3.5 [X +2014/09/26 - version 3.4 [X +2014/08/12 - version 3.3 [X +2014/08/10 - version 3.2 [X +2014/08/09 - version 3.1 [X +2014/08/07 - version 3.0 [X +2014/05/16 - version 2.6 [X +2014/04/29 - version 2.6 beta rev.2 [X +2014/04/23 - version 2.6 beta [X +2014/03/21 - version 2.4 [X +2014/03/04 - version 2.3 [X +2014/03/02 - version 2.2 [X +2014/02/19 - version 2.1 [X +2014/02/06 - version 2.0.1 [X +2014/02/01 - version 2.0 [X +2014/01/20 - version 1.2.1 [X +2013/12/29 - version 1.2 [X +2013/12/27 - version 1.1 [X +2013/12/22 - version 1.0 [X + + + Product name: ‹ƂZI + Product URL: http://grabacr.net/kancolleviewer + Source code: https://github.com/Grabacr07/KanColleViewer + License: MIT License + Author: @Grabacr07 + diff --git a/Grabacr07.KanColleViewer/tasks.txt b/Grabacr07.KanColleViewer/tasks.txt new file mode 100644 index 000000000..1575bfb59 --- /dev/null +++ b/Grabacr07.KanColleViewer/tasks.txt @@ -0,0 +1,19 @@ +✔退避なのにインジケーターが大破扱いのままになってる +✔縦表示の各艦隊名の背景を BorderBrushKey に +✔補給時に詳細エリアのステータス (制空戦力) が更新されない +・入渠した瞬間に詳細エリアのステータスが更新されない +・総合タブと艦隊タブに HasFlagConverter 適用 +✔退避した艦を索敵と制空の計算から省く +✔母港帰還直後に退避設定がまだ生きているっぽい +✔艦名とレベルが離れすぎ感 +✔Condigion と HP が離れすぎ感 +・連合艦隊、横に広げるモードほしい + +・UI のご提案 + ┌────┐┌─────────────┐ + ├─艦隊─┤├──────┬──────┤ + ├─選択─┤├─ インジケータ -┼──────┤ + └────┘└──────┴──────┘ + ┌───────────────────┐ + └──────── ステータス -───────┘ + \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Calculator.cs b/Grabacr07.KanColleWrapper/Calculator.cs index 9b9b725b9..a467ca2b5 100644 --- a/Grabacr07.KanColleWrapper/Calculator.cs +++ b/Grabacr07.KanColleWrapper/Calculator.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; using Grabacr07.KanColleWrapper.Models; namespace Grabacr07.KanColleWrapper { - static class Calculator + internal static class Calculator { /// /// 装備と搭載数を指定して、スロット単位の制空能力を計算します。 @@ -30,7 +30,25 @@ public static int CalcAirSuperiorityPotential(this SlotItem slotItem, int onslot /// public static int CalcAirSuperiorityPotential(this Ship ship) { - return ship.SlotItems.Zip(ship.OnSlot, (item, i) => item.CalcAirSuperiorityPotential(i)).Sum(); + return ship.EquippedSlots.Select(x => x.Item.CalcAirSuperiorityPotential(x.Current)).Sum(); + } + + public static double CalcViewRange(this Fleet fleet) + { + return ViewRangeCalcLogic.Get(KanColleClient.Current.Settings.ViewRangeCalcType).Calc(fleet.Ships); + } + + public static bool IsHeavilyDamage(this LimitedValue hp) + { + return (hp.Current / (double)hp.Maximum) <= 0.25; + } + + /// + /// 現在のシーケンスから護衛退避した艦娘を除きます。 + /// + public static IEnumerable WithoutEvacuated(this IEnumerable ships) + { + return ships.Where(ship => !ship.Situation.HasFlag(ShipSituation.Evacuation) && !ship.Situation.HasFlag(ShipSituation.Tow)); } } -} +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Counter.cs b/Grabacr07.KanColleWrapper/Counter.cs new file mode 100644 index 000000000..03a142a3f --- /dev/null +++ b/Grabacr07.KanColleWrapper/Counter.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; +using Grabacr07.KanColleWrapper.Models.Raw; +using Livet; + +namespace Grabacr07.KanColleWrapper +{ + public abstract class CounterBase : NotificationObject + { + #region Count 変更通知プロパティ + + private int _Count; + + public int Count + { + get { return this._Count; } + set + { + if (this._Count != value) + { + this._Count = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public void Reset() + { + this.Count = 0; + } + } + + public class ItemDestroyCounter : CounterBase + { + public ItemDestroyCounter(KanColleProxy proxy) + { + proxy.api_req_kousyou_destroyitem2 + .TryParse() + .Where(x => x.IsSuccess) + .Subscribe(_ => this.Count++); + } + } + + public class SupplyCounter : CounterBase + { + public SupplyCounter(KanColleProxy proxy) + { + proxy.api_req_hokyu_charge + .TryParse() + .Where(x => x.IsSuccess) + .Subscribe(_ => this.Count++); + } + } + + + public class MissionCounter : CounterBase + { + public MissionCounter(KanColleProxy proxy) + { + proxy.api_req_mission_result + .TryParse() + .Where(x => x.IsSuccess) + .Where(x => x.Data.api_clear_result == 1) + .Subscribe(_ => this.Count++); + } + } +} diff --git a/Grabacr07.KanColleWrapper/DisposableNotifier.cs b/Grabacr07.KanColleWrapper/DisposableNotifier.cs new file mode 100644 index 000000000..205d4bba1 --- /dev/null +++ b/Grabacr07.KanColleWrapper/DisposableNotifier.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; + +namespace Grabacr07.KanColleWrapper +{ + public class DisposableNotifier : NotificationObject, IDisposable + { + protected LivetCompositeDisposable CompositeDisposable { get; private set; } + + public DisposableNotifier() + { + this.CompositeDisposable = new LivetCompositeDisposable(); + } + + public void Dispose() + { + this.Dispose(true); + this.CompositeDisposable.Dispose(); + + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { } + } +} diff --git a/Grabacr07.KanColleWrapper/Dockyard.cs b/Grabacr07.KanColleWrapper/Dockyard.cs index 990ce8ec4..724f27278 100644 --- a/Grabacr07.KanColleWrapper/Dockyard.cs +++ b/Grabacr07.KanColleWrapper/Dockyard.cs @@ -34,6 +34,28 @@ public MemberTable Docks #endregion + #region CreatedSlotItem 変更通知プロパティ + + private CreatedSlotItem _CreatedSlotItem; + + /// + /// 最後に開発された装備アイテムの情報を取得します。 + /// + public CreatedSlotItem CreatedSlotItem + { + get { return this._CreatedSlotItem; } + private set + { + if (this._CreatedSlotItem != value) + { + this._CreatedSlotItem = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + internal Dockyard(KanColleProxy proxy) { @@ -42,6 +64,7 @@ internal Dockyard(KanColleProxy proxy) proxy.api_get_member_kdock.TryParse().Subscribe(x => this.Update(x.Data)); proxy.api_req_kousyou_getship.TryParse().Subscribe(x => this.GetShip(x.Data)); proxy.api_req_kousyou_createship_speedchange.TryParse().Subscribe(this.ChangeSpeed); + proxy.api_req_kousyou_createitem.TryParse().Subscribe(this.CreateSlotItem); } @@ -81,5 +104,10 @@ private void ChangeSpeed(SvData svd) System.Diagnostics.Debug.WriteLine("高速建造材使用の解析に失敗しました: {0}", ex); } } + + private void CreateSlotItem(SvData svd) + { + this.CreatedSlotItem = new CreatedSlotItem(svd.Data); + } } } diff --git a/Grabacr07.KanColleWrapper/Extensions.cs b/Grabacr07.KanColleWrapper/Extensions.cs index d15d521e7..f107efa9d 100644 --- a/Grabacr07.KanColleWrapper/Extensions.cs +++ b/Grabacr07.KanColleWrapper/Extensions.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; +using System.Reactive.Linq; using System.Threading.Tasks; -using Grabacr07.KanColleWrapper.Models; namespace Grabacr07.KanColleWrapper { diff --git a/Grabacr07.KanColleWrapper/Homeport.cs b/Grabacr07.KanColleWrapper/Homeport.cs index a31bf88ec..f031c5a85 100644 --- a/Grabacr07.KanColleWrapper/Homeport.cs +++ b/Grabacr07.KanColleWrapper/Homeport.cs @@ -1,14 +1,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.Linq; using System.Reactive.Linq; -using System.Text; -using System.Threading.Tasks; using Grabacr07.KanColleWrapper.Models; using Grabacr07.KanColleWrapper.Models.Raw; -using Grabacr07.KanColleWrapper.Internal; using Livet; namespace Grabacr07.KanColleWrapper @@ -28,6 +24,11 @@ public class Homeport : NotificationObject /// public Materials Materials { get; private set; } + /// + /// 装備や消費アイテムの保有状況にアクセスできるようにします。 + /// + public Itemyard Itemyard { get; private set; } + /// /// 複数の建造ドックを持つ工廠を取得します。 /// @@ -76,59 +77,12 @@ private set #endregion - #region SlotItems 変更通知プロパティ - - private MemberTable _SlotItems; - - /// - /// 艦隊司令部が保有しているすべての装備を取得します。 - /// イベントによる変更通知をサポートします。 - /// - public MemberTable SlotItems - { - get { return this._SlotItems; } - set - { - if (this._SlotItems != value) - { - this._SlotItems = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region UseItems 変更通知プロパティ - - private MemberTable _UseItems; - - /// - /// 母港が所有するすべての消費アイテムを取得します。 - /// イベントによる変更通知をサポートします。 - /// - public MemberTable UseItems - { - get { return this._UseItems; } - set - { - if (this._UseItems != value) - { - this._UseItems = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion internal Homeport(KanColleProxy proxy) { - this.SlotItems = new MemberTable(); - this.UseItems = new MemberTable(); - this.Materials = new Materials(proxy); + this.Itemyard = new Itemyard(proxy); this.Organization = new Organization(this, proxy); this.Repairyard = new Repairyard(this, proxy); this.Dockyard = new Dockyard(proxy); @@ -140,11 +94,12 @@ internal Homeport(KanColleProxy proxy) this.Organization.Update(x.Data.api_ship); this.Repairyard.Update(x.Data.api_ndock); this.Organization.Update(x.Data.api_deck_port); + this.Organization.Combined = x.Data.api_combined_flag != 0; this.Materials.Update(x.Data.api_material); + this.UpdateAdmiral(x.Data.api_basic); }); proxy.api_get_member_basic.TryParse().Subscribe(x => this.UpdateAdmiral(x.Data)); - proxy.api_get_member_slot_item.TryParse().Subscribe(x => this.UpdateSlotItems(x.Data)); - proxy.api_get_member_useitem.TryParse().Subscribe(x => this.UpdateUseItems(x.Data)); + proxy.api_req_member_updatecomment.TryParse().Subscribe(this.UpdateComment); this.Rankings = new Rankings(proxy); } @@ -155,14 +110,25 @@ internal void UpdateAdmiral(kcsapi_basic data) this.Admiral = new Admiral(data); } - internal void UpdateSlotItems(kcsapi_slotitem[] source) + private void UpdateComment(SvData data) { - this.SlotItems = new MemberTable(source.Select(x => new SlotItem(x))); - } + if (data == null || !data.IsSuccess) return; - internal void UpdateUseItems(kcsapi_useitem[] source) - { - this.UseItems = new MemberTable(source.Select(x => new UseItem(x))); + try + { + this.Admiral.Comment = data.Request["api_cmt"]; + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("艦隊名の変更に失敗しました: {0}", ex); } } + + + internal void StartConditionCount() + { + //Observable.Timer(TimeSpan.FromSeconds(10), TimeSpan.FromMinutes(3)) + } + + } } diff --git a/Grabacr07.KanColleWrapper/IProxySettings.cs b/Grabacr07.KanColleWrapper/IProxySettings.cs new file mode 100644 index 000000000..dbcb994a7 --- /dev/null +++ b/Grabacr07.KanColleWrapper/IProxySettings.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper +{ + public interface IProxySettings + { + bool IsEnabled { get; set; } + + bool IsEnabledOnSSL { get; set; } + + string Host { get; set; } + + ushort Port { get; set; } + + bool IsAuthRequired { get; set; } + + string Username { get; set; } + + string Password { get; set; } + } +} diff --git a/Grabacr07.KanColleWrapper/Internal/Extensions.cs b/Grabacr07.KanColleWrapper/Internal/Extensions.cs index 00f9bc4f9..9f3bab180 100644 --- a/Grabacr07.KanColleWrapper/Internal/Extensions.cs +++ b/Grabacr07.KanColleWrapper/Internal/Extensions.cs @@ -4,7 +4,6 @@ using System.Reactive.Linq; using System.Threading.Tasks; using Fiddler; -using Grabacr07.KanColleWrapper.Models; namespace Grabacr07.KanColleWrapper.Internal { @@ -20,35 +19,6 @@ public static void SafeDispose(this IDisposable resource) if (resource != null) resource.Dispose(); } - /// - /// FiddlerCore でフックした オブジェクトの データを - /// 型にパースします。 - /// - public static IObservable> TryParse(this IObservable source) - { - Func> converter = session => - { - SvData result; - return SvData.TryParse(session, out result) ? result : null; - }; - - return source.Select(converter).Where(x => x != null && x.IsSuccess); - } - - /// - /// FiddlerCore でフックした オブジェクトの データを - /// 型にパースします。 - /// - public static IObservable TryParse(this IObservable source) - { - Func converter = session => - { - SvData result; - return SvData.TryParse(session, out result) ? result : null; - }; - - return source.Select(converter).Where(x => x != null && x.IsSuccess); - } /// /// 型の配列に安全にアクセスします。 @@ -58,6 +28,11 @@ public static IObservable TryParse(this IObservable source) return array.Length > index ? (int?)array[index] : null; } + public static string Join(this IEnumerable values, string separator) + { + return string.Join(separator, values); + } + public static Task WhenAll(this IEnumerable tasks) { return Task.WhenAll(tasks); diff --git a/Grabacr07.KanColleWrapper/Itemyard.cs b/Grabacr07.KanColleWrapper/Itemyard.cs new file mode 100644 index 000000000..51a0cc66c --- /dev/null +++ b/Grabacr07.KanColleWrapper/Itemyard.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; +using Grabacr07.KanColleWrapper.Models; +using Grabacr07.KanColleWrapper.Models.Raw; +using Livet; + +namespace Grabacr07.KanColleWrapper +{ + public class Itemyard : NotificationObject + { + /// + /// 出撃中にドロップで入手した装備の数。 + /// 帰投して slot_item を取得するまでは新しい装備の ID が判らないので、数だけ控えておき、SlotItemsCount で使用する。 + /// + private int droppedItemsCount; + + /// + /// と、出撃中に入手したものを含んだ装備数を取得します。 + /// + public int SlotItemsCount + { + get { return this.SlotItems.Count + this.droppedItemsCount; } + } + + #region SlotItems 変更通知プロパティ + + private MemberTable _SlotItems; + + /// + /// 艦隊司令部が保有しているすべての装備を取得します。 + /// イベントによる変更通知をサポートします。 + /// + public MemberTable SlotItems + { + get { return this._SlotItems; } + set + { + if (this._SlotItems != value) + { + this._SlotItems = value; + this.RaiseSlotItemsChanged(); + } + } + } + + #endregion + + #region UseItems 変更通知プロパティ + + private MemberTable _UseItems; + + /// + /// 母港が所有するすべての消費アイテムを取得します。 + /// イベントによる変更通知をサポートします。 + /// + public MemberTable UseItems + { + get { return this._UseItems; } + set + { + if (this._UseItems != value) + { + this._UseItems = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + + internal Itemyard(KanColleProxy proxy) + { + this.SlotItems = new MemberTable(); + this.UseItems = new MemberTable(); + + proxy.api_get_member_slot_item.TryParse().Subscribe(x => this.Update(x.Data)); + proxy.api_req_kousyou_createitem.TryParse().Subscribe(x => this.CreateItem(x.Data)); + proxy.api_req_kousyou_destroyitem2.TryParse().Subscribe(this.DestroyItem); + // proxy.api_req_sortie_battleresult.TryParse().Subscribe(x => this.DropShip(x.Data)); // Not in the API any more + + proxy.api_get_member_useitem.TryParse().Subscribe(x => this.Update(x.Data)); + + proxy.api_req_kousyou_remodel_slot.TryParse().Subscribe(x => + { + this.RemoveFromRemodel(x.Data); + this.RemodelSlotItem(x.Data); + }); + } + + + internal void Update(kcsapi_slotitem[] source) + { + this.droppedItemsCount = 0; + this.SlotItems = new MemberTable(source.Select(x => new SlotItem(x))); + } + + internal void Update(kcsapi_useitem[] source) + { + this.UseItems = new MemberTable(source.Select(x => new UseItem(x))); + } + + internal void AddFromDock(kcsapi_kdock_getship source) + { + foreach (var x in source.api_slotitem.Select(x => new SlotItem(x))) + { + this.SlotItems.Add(x); + } + this.RaiseSlotItemsChanged(); + } + + internal void RemoveFromShip(Ship ship) + { + foreach (var x in ship.EquippedSlots.ToArray()) + { + this.SlotItems.Remove(x.Item); + } + this.RaiseSlotItemsChanged(); + } + + internal void RemoveFromRemodel(kcsapi_remodel_slot source) + { + if (source.api_use_slot_id != null) + { + foreach (var id in source.api_use_slot_id) + { + this.SlotItems.Remove(id); + } + this.RaiseSlotItemsChanged(); + } + } + + private void CreateItem(kcsapi_createitem source) + { + if (source.api_create_flag == 1 && source.api_slot_item != null) + { + this.SlotItems.Add(new SlotItem(source.api_slot_item)); + } + this.RaiseSlotItemsChanged(); + } + + private void DestroyItem(SvData data) + { + if (data == null || !data.IsSuccess) return; + + try + { + foreach (var x in data.Request["api_slotitem_ids"].Split(',').Select(int.Parse)) + { + this.SlotItems.Remove(x); + } + this.RaiseSlotItemsChanged(); + } + catch (Exception ex) + { + Debug.WriteLine("装備の破棄に失敗しました: {0}", ex); + } + } + + /* // Not in the API + private void DropShip(kcsapi_battleresult source) + { + try + { + if (source.api_get_ship == null) return; + + var target = KanColleClient.Current.Master.Ships[source.api_get_ship.api_ship_id]; + if (target == null) return; + + this.droppedItemsCount += target.RawData.api_defeq.Count(x => x != -1); + this.RaisePropertyChanged("SlotItemsCount"); + } + catch (Exception ex) + { + // defeq が消えてるっぽい暫定対応 (雑) + Debug.WriteLine(ex); + } + } + */ + + private void RemodelSlotItem(kcsapi_remodel_slot source) + { + if (source.api_after_slot == null) return; + + var target = this.SlotItems[source.api_after_slot.api_id]; + if (target != null) + { + target.Remodel(source.api_after_slot.api_level, source.api_after_slot.api_slotitem_id); + } + } + + + private void RaiseSlotItemsChanged() + { + this.RaisePropertyChanged("SlotItems"); + this.RaisePropertyChanged("SlotItemsCount"); + } + } +} diff --git a/Grabacr07.KanColleWrapper/KanColleClient.cs b/Grabacr07.KanColleWrapper/KanColleClient.cs index 414f8a957..d4769feb3 100644 --- a/Grabacr07.KanColleWrapper/KanColleClient.cs +++ b/Grabacr07.KanColleWrapper/KanColleClient.cs @@ -11,40 +11,39 @@ namespace Grabacr07.KanColleWrapper { - public class KanColleClient : NotificationObject - { - #region singleton + public class KanColleClient : NotificationObject + { + #region singleton - private static readonly KanColleClient current = new KanColleClient(); + private static KanColleClient current = new KanColleClient(); - public static KanColleClient Current - { - get { return current; } - } + public static KanColleClient Current + { + get { return current; } + } - #endregion + #endregion + /// + /// 艦これの通信をフックするプロキシを取得します。 + /// + public KanColleProxy Proxy { get; private set; } - /// - /// 艦これの通信をフックするプロキシを取得します。 - /// - public KanColleProxy Proxy { get; private set; } - - /// - /// ユーザーに依存しないマスター情報を取得します。 - /// - public Master Master { get; private set; } - - /// - /// 母港の情報を取得します。 - /// - public Homeport Homeport { get; private set; } + /// + /// ユーザーに依存しないマスター情報を取得します。 + /// + public Master Master { get; private set; } /// /// Application update notifications and downloads. /// public Updater Updater { get; private set; } + /// + /// 母港の情報を取得します。 + /// + public Homeport Homeport { get; private set; } + /// /// Translation engine for ships, equipment, quests, and sorties. /// @@ -52,64 +51,119 @@ public static KanColleClient Current #region IsStarted 変更通知プロパティ - private bool _IsStarted; - - /// - /// 艦これが開始されているかどうかを示す値を取得します。 - /// - public bool IsStarted - { - get { return this._IsStarted; } - set - { - if (this._IsStarted != value) - { - this._IsStarted = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - - private KanColleClient() - { - var proxy = new KanColleProxy(); - var basic = proxy.api_get_member_basic.TryParse().FirstAsync().ToTask(); - var kdock = proxy.api_get_member_kdock.TryParse().FirstAsync().ToTask(); - var sitem = proxy.api_get_member_slot_item.TryParse().FirstAsync().ToTask(); + private bool _IsStarted; + + /// + /// 艦これが開始されているかどうかを示す値を取得します。 + /// + public bool IsStarted + { + get { return this._IsStarted; } + set + { + if (this._IsStarted != value) + { + this._IsStarted = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region IsInSortie 変更通知プロパティ + + private bool _IsInSortie; + + /// + /// 艦隊が出撃中かどうかを示す値を取得します。 + /// + public bool IsInSortie + { + get { return this._IsInSortie; } + private set + { + if (this._IsInSortie != value) + { + this._IsInSortie = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Settings 変更通知プロパティ + + private KanColleClientSettings _Settings; + + public KanColleClientSettings Settings + { + get { return this._Settings ?? (this._Settings = new KanColleClientSettings()); } + set + { + if (this._Settings != value) + { + this._Settings = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + + private KanColleClient() + { + this.Initialieze(); + + var start = this.Proxy.api_req_map_start; + var end = this.Proxy.api_port; + + this.Proxy.ApiSessionSource + .SkipUntil(start.Do(_ => this.IsInSortie = true)) + .TakeUntil(end) + .Finally(() => this.IsInSortie = false) + .Repeat() + .Subscribe(); + } + + + public void Initialieze() + { + var proxy = this.Proxy ?? (this.Proxy = new KanColleProxy()); + var basic = proxy.api_get_member_basic.TryParse().FirstAsync().ToTask(); + var kdock = proxy.api_get_member_kdock.TryParse().FirstAsync().ToTask(); + var sitem = proxy.api_get_member_slot_item.TryParse().FirstAsync().ToTask(); this.Updater = new Updater(); this.Translations = new Translations(); - proxy.api_start2.FirstAsync().Subscribe(async session => - { - var timeout = Task.Delay(TimeSpan.FromSeconds(20)); - var canInitialize = await Task.WhenAny(new Task[] { basic, kdock, sitem }.WhenAll(), timeout) != timeout; - - // タイムアウト仕掛けてるのは、今後のアップデートで basic, kdock, slot_item のいずれかが来なくなったときに - // 起動できなくなる (IsStarted を true にできなくなる) のを防ぐため - // ----- - // ま、そんな規模の変更があったらそもそもまともに動作せんだろうがな ☝(◞‸◟)☝ 野良ツールはつらいよ - - SvData svd; - if (!SvData.TryParse(session, out svd)) return; - - this.Master = new Master(svd.Data); - this.Homeport = new Homeport(proxy); - - if (canInitialize) - { - this.Homeport.UpdateAdmiral((await basic).Data); - this.Homeport.UpdateSlotItems((await sitem).Data); - this.Homeport.Dockyard.Update((await kdock).Data); - } - - this.IsStarted = true; - }); - - this.Proxy = proxy; - } - } + proxy.api_start2.FirstAsync().Subscribe(async session => + { + var timeout = Task.Delay(TimeSpan.FromSeconds(20)); + var canInitialize = await Task.WhenAny(new Task[] { basic, kdock, sitem }.WhenAll(), timeout) != timeout; + + // タイムアウト仕掛けてるのは、今後のアップデートで basic, kdock, slot_item のいずれかが来なくなったときに + // 起動できなくなる (IsStarted を true にできなくなる) のを防ぐため + // ----- + // ま、そんな規模の変更があったらそもそもまともに動作せんだろうがな ☝(◞‸◟)☝ 野良ツールはつらいよ + + SvData svd; + if (!SvData.TryParse(session, out svd)) return; + + this.Master = new Master(svd.Data); + if (this.Homeport == null) this.Homeport = new Homeport(proxy); + + if (canInitialize) + { + this.Homeport.UpdateAdmiral((await basic).Data); + this.Homeport.Itemyard.Update((await sitem).Data); + this.Homeport.Dockyard.Update((await kdock).Data); + } + + this.IsStarted = true; + }); + } + } } diff --git a/Grabacr07.KanColleWrapper/KanColleClientSettings.cs b/Grabacr07.KanColleWrapper/KanColleClientSettings.cs new file mode 100644 index 000000000..34fd8b2d4 --- /dev/null +++ b/Grabacr07.KanColleWrapper/KanColleClientSettings.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models; +using Livet; + +namespace Grabacr07.KanColleWrapper +{ + [Serializable] + public class KanColleClientSettings : NotificationObject + { + #region NotificationShorteningTime 変更通知プロパティ + + private int _NotificationShorteningTime = 40; + + /// + /// 入渠完了と遠征帰還の通知における、通知短縮時間 (秒) を取得または設定します。 + /// + public int NotificationShorteningTime + { + get { return this._NotificationShorteningTime; } + set + { + if (this._NotificationShorteningTime != value) + { + this._NotificationShorteningTime = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region ReSortieCondition 変更通知プロパティ + + private int _ReSortieCondition = 40; + + /// + /// 艦隊が再出撃可能と判断する基準となるコンディション値を取得または設定します。 + /// + public int ReSortieCondition + { + get { return this._ReSortieCondition; } + set + { + if (this._ReSortieCondition != value) + { + this._ReSortieCondition = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region EnableLogging 変更通知プロパティ + + private bool _EnableLogging; + + public bool EnableLogging + { + get { return this._EnableLogging; } + set + { + if (this._EnableLogging != value) + { + this._EnableLogging = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region ViewRangeCalcType 変更通知プロパティ + + private string _ViewRangeCalcType; + + public string ViewRangeCalcType + { + get { return this._ViewRangeCalcType ?? (this._ViewRangeCalcType = new ViewRangeType1().Id); } + set + { + if (this._ViewRangeCalcType != value) + { + this._ViewRangeCalcType = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + } +} diff --git a/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs b/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs index dc62a4bf3..8788cbf76 100644 --- a/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs +++ b/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs @@ -8,13 +8,12 @@ using System.Reactive.Linq; using System.Threading.Tasks; using Fiddler; +// ReSharper disable InconsistentNaming namespace Grabacr07.KanColleWrapper { partial class KanColleProxy { - // ReSharper disable InconsistentNaming - /// /// エンド ポイント "/kcsapi/api_start2" からのセッションを配信します。 /// @@ -128,11 +127,11 @@ public IObservable api_get_member_questlist } /// - /// エンド ポイント "/kcsapi/api_req_sortie/battleresult" からのセッションを配信します。 + /// エンド ポイント "/kcsapi/api_get_member/ship_deck" からのセッションを配信します。 /// - public IObservable api_req_sortie_battleresult + public IObservable api_get_member_ship_deck { - get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_sortie/battleresult"); } + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_get_member/ship_deck"); } } /// @@ -143,6 +142,22 @@ public IObservable api_req_hensei_change get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_hensei/change"); } } + /// + /// エンド ポイント "/kcsapi/api_req_hokyu/charge" からのセッションを配信します。 + /// + public IObservable api_req_hokyu_charge + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_hokyu/charge"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_kaisou/powerup" からのセッションを配信します。 + /// + public IObservable api_req_kaisou_powerup + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kaisou/powerup"); } + } + /// /// エンド ポイント "/kcsapi/api_req_kousyou/getship" からのセッションを配信します。 /// @@ -191,6 +206,30 @@ public IObservable api_req_kousyou_destroyitem2 get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kousyou/destroyitem2"); } } + /// + /// エンド ポイント "/kcsapi/api_req_kousyou/remodel_slotlist" からのセッションを配信します。 + /// + public IObservable api_req_kousyou_remodel_slotlist + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kousyou/remodel_slotlist"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_kousyou/remodel_slotlist_detail" からのセッションを配信します。 + /// + public IObservable api_req_kousyou_remodel_slotlist_detail + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kousyou/remodel_slotlist_detail"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_kousyou/remodel_slot" からのセッションを配信します。 + /// + public IObservable api_req_kousyou_remodel_slot + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kousyou/remodel_slot"); } + } + /// /// エンド ポイント "/kcsapi/api_req_nyukyo/start" からのセッションを配信します。 /// @@ -208,22 +247,92 @@ public IObservable api_req_nyukyo_speedchange } /// - /// エンド ポイント "/kcsapi/api_req_hokyu/charge" からのセッションを配信します。 + /// エンド ポイント "/kcsapi/api_req_map/start" からのセッションを配信します。 /// - public IObservable api_req_hokyu_charge + public IObservable api_req_map_start { - get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_hokyu/charge"); } + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_map/start"); } } /// - /// エンド ポイント "/kcsapi/api_req_kaisou/powerup" からのセッションを配信します。 + /// エンド ポイント "/kcsapi/api_req_member/updatedeckname" からのセッションを配信します。 /// - public IObservable api_req_kaisou_powerup + public IObservable api_req_member_updatedeckname { - get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_kaisou/powerup"); } + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_member/updatedeckname"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_member/updatecomment" からのセッションを配信します。 + /// + public IObservable api_req_member_updatecomment + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_member/updatecomment"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_mission/result" からのセッションを配信します。 + /// + public IObservable api_req_mission_result + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_mission/result"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_sortie/battle" からのセッションを配信します。 + /// + public IObservable api_req_sortie_battle + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_sortie/battle"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_sortie/battleresult" からのセッションを配信します。 + /// + public IObservable api_req_sortie_battleresult + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_sortie/battleresult"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_hensei/combined" からのセッションを配信します。 + /// + public IObservable api_req_hensei_combined + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_hensei/combined"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_combined_battle/battle" からのセッションを配信します。 + /// + public IObservable api_req_combined_battle_battle + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_combined_battle/battle"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_combined_battle/airbattle" からのセッションを配信します。 + /// + public IObservable api_req_combined_battle_airbattle + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_combined_battle/airbattle"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_combined_battle/battleresult" からのセッションを配信します。 + /// + public IObservable api_req_combined_battle_battleresult + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_combined_battle/battleresult"); } + } + + /// + /// エンド ポイント "/kcsapi/api_req_combined_battle/goback_port" からのセッションを配信します。 + /// + public IObservable api_req_combined_battle_goback_port + { + get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_combined_battle/goback_port"); } } - // ReSharper restore InconsistentNaming } } - diff --git a/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt b/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt index b28ba1cdb..d5a336a8e 100644 --- a/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt +++ b/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt @@ -22,18 +22,32 @@ "/kcsapi/api_get_member/kdock", "/kcsapi/api_get_member/material", "/kcsapi/api_get_member/questlist", - "/kcsapi/api_req_sortie/battleresult", + "/kcsapi/api_get_member/ship_deck", "/kcsapi/api_req_hensei/change", + "/kcsapi/api_req_hokyu/charge", + "/kcsapi/api_req_kaisou/powerup", "/kcsapi/api_req_kousyou/getship", "/kcsapi/api_req_kousyou/createitem", "/kcsapi/api_req_kousyou/createship", "/kcsapi/api_req_kousyou/createship_speedchange", "/kcsapi/api_req_kousyou/destroyship", "/kcsapi/api_req_kousyou/destroyitem2", + "/kcsapi/api_req_kousyou/remodel_slotlist", + "/kcsapi/api_req_kousyou/remodel_slotlist_detail", + "/kcsapi/api_req_kousyou/remodel_slot", "/kcsapi/api_req_nyukyo/start", "/kcsapi/api_req_nyukyo/speedchange", - "/kcsapi/api_req_hokyu/charge", - "/kcsapi/api_req_kaisou/powerup", + "/kcsapi/api_req_map/start", + "/kcsapi/api_req_member/updatedeckname", + "/kcsapi/api_req_member/updatecomment", + "/kcsapi/api_req_mission/result", + "/kcsapi/api_req_sortie/battle", + "/kcsapi/api_req_sortie/battleresult", + "/kcsapi/api_req_hensei/combined", + "/kcsapi/api_req_combined_battle/battle", + "/kcsapi/api_req_combined_battle/airbattle", + "/kcsapi/api_req_combined_battle/battleresult", + "/kcsapi/api_req_combined_battle/goback_port", }; #> // @@ -46,13 +60,12 @@ using System.Linq; using System.Reactive.Linq; using System.Threading.Tasks; using Fiddler; +// ReSharper disable InconsistentNaming namespace Grabacr07.KanColleWrapper { partial class KanColleProxy { - // ReSharper disable InconsistentNaming - <# foreach (var endpoint in endpoints) { @@ -75,22 +88,5 @@ namespace Grabacr07.KanColleWrapper <# } #> - // ReSharper restore InconsistentNaming } } - -<#+ - private class Node - { - public string Name { get; private set; } - public List Methods { get; private set; } - public List Children { get; private set; } - - public Node(string name) - { - this.Name = name; - this.Methods = new List(); - this.Children = new List(); - } - } -#> \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/KanColleProxy.cs b/Grabacr07.KanColleWrapper/KanColleProxy.cs index 65a9573d7..31a9400e5 100644 --- a/Grabacr07.KanColleWrapper/KanColleProxy.cs +++ b/Grabacr07.KanColleWrapper/KanColleProxy.cs @@ -20,33 +20,15 @@ public partial class KanColleProxy public IObservable SessionSource { - get { return this.connectableSessionSource.AsObservable(); } + get { return this.connectableSessionSource.AsObservable(); } } - public IObservable ApiSessionSource - { - get { return this.apiSource.AsObservable(); } - } - - /// - /// Fiddler からリクエストが送られる際に使用されるプロキシサーバーのホスト名を取得または設定します。 - /// - public string UpstreamProxyHost { get; set; } - - /// - /// Fiddler からリクエストが送られる際に使用されるプロキシサーバーのポート番号を取得または設定します。 - /// - public ushort UpstreamProxyPort { get; set; } + public IObservable ApiSessionSource + { + get { return this.apiSource.AsObservable(); } + } - /// - /// リクエスト時にプロキシサーバーを経由するかどうかを取得または設定します。 - /// - public bool UseProxyOnConnect { get; set; } - - /// - /// SSL リクエスト時のみプロキシサーバーを経由するかどうかを取得または設定します。 - /// - public bool UseProxyOnSSLConnect { get; set; } + public IProxySettings UpstreamProxySettings { get; set; } public KanColleProxy() @@ -80,7 +62,7 @@ public KanColleProxy() public void Startup(int proxy = 37564) { - FiddlerApplication.Startup(proxy, false, true); + FiddlerApplication.Startup(proxy, false, true, false); FiddlerApplication.BeforeRequest += this.SetUpstreamProxyHandler; SetIESettings("localhost:" + proxy); @@ -123,13 +105,16 @@ private static void SetIESettings(string proxyUri) /// 通信を行おうとしているセッション。 private void SetUpstreamProxyHandler(Session requestingSession) { - var useGateway = !string.IsNullOrEmpty(this.UpstreamProxyHost) && this.UseProxyOnConnect; - if (!useGateway || (IsSessionSSL(requestingSession) && !this.UseProxyOnSSLConnect)) return; + var settings = this.UpstreamProxySettings; + if (settings == null) return; + + var useGateway = !string.IsNullOrEmpty(settings.Host) && settings.IsEnabled; + if (!useGateway || (IsSessionSSL(requestingSession) && !settings.IsEnabledOnSSL)) return; - var gateway = this.UpstreamProxyHost.Contains(":") + var gateway = settings.Host.Contains(":") // IPv6 アドレスをプロキシホストにした場合はホストアドレス部分を [] で囲う形式にする。 - ? string.Format("[{0}]:{1}", this.UpstreamProxyHost, this.UpstreamProxyPort) - : string.Format("{0}:{1}", this.UpstreamProxyHost, this.UpstreamProxyPort); + ? string.Format("[{0}]:{1}", settings.Host, settings.Port) + : string.Format("{0}:{1}", settings.Host, settings.Port); requestingSession["X-OverrideGateway"] = gateway; } diff --git a/Grabacr07.KanColleWrapper/KanColleProxyExtensions.cs b/Grabacr07.KanColleWrapper/KanColleProxyExtensions.cs new file mode 100644 index 000000000..4ffd57327 --- /dev/null +++ b/Grabacr07.KanColleWrapper/KanColleProxyExtensions.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Threading.Tasks; +using Fiddler; +using Grabacr07.KanColleWrapper.Models; + +namespace Grabacr07.KanColleWrapper +{ + public static class KanColleProxyExtensions + { + /// + /// FiddlerCore でフックした オブジェクトの データを + /// 型にパースします。 + /// + public static IObservable> TryParse(this IObservable source) + { + Func> converter = session => + { + SvData result; + return SvData.TryParse(session, out result) ? result : null; + }; + + return source.Select(converter).Where(x => x != null && x.IsSuccess); + } + + /// + /// FiddlerCore でフックした オブジェクトの データを + /// 型にパースします。 + /// + public static IObservable TryParse(this IObservable source) + { + Func converter = session => + { + SvData result; + return SvData.TryParse(session, out result) ? result : null; + }; + + return source.Select(converter).Where(x => x != null && x.IsSuccess); + } + } +} diff --git a/Grabacr07.KanColleWrapper/KanColleWrapper.csproj b/Grabacr07.KanColleWrapper/KanColleWrapper.csproj index 4c1bf883d..058fc21ac 100644 --- a/Grabacr07.KanColleWrapper/KanColleWrapper.csproj +++ b/Grabacr07.KanColleWrapper/KanColleWrapper.csproj @@ -52,7 +52,7 @@ False - assemblies\FiddlerCore4.dll + ..\assemblies\FiddlerCore4.dll ..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll @@ -67,19 +67,21 @@ ..\packages\Ix-Main.1.2.2\lib\net45\System.Interactive.dll - - ..\packages\Rx-Core.2.2.2\lib\net45\System.Reactive.Core.dll + + False + ..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll - ..\packages\Rx-Interfaces.2.2.2\lib\net45\System.Reactive.Interfaces.dll + ..\packages\Rx-Interfaces.2.2.4\lib\net45\System.Reactive.Interfaces.dll - - ..\packages\Rx-Linq.2.2.2\lib\net45\System.Reactive.Linq.dll + + False + ..\packages\Rx-Linq.2.2.4\lib\net45\System.Reactive.Linq.dll - - ..\packages\Rx-PlatformServices.2.2.2\lib\net45\System.Reactive.PlatformServices.dll + + False + ..\packages\Rx-PlatformServices.2.2.4\lib\net45\System.Reactive.PlatformServices.dll - @@ -95,11 +97,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True @@ -108,10 +143,8 @@ - - - + @@ -153,8 +186,8 @@ - - + + @@ -191,23 +224,21 @@ - + + + TextTemplatingFileGenerator KanColleProxy.Endpoints.cs - - - - diff --git a/Grabacr07.KanColleWrapper/Logger.cs b/Grabacr07.KanColleWrapper/Logger.cs index ddc827210..6a006f461 100644 --- a/Grabacr07.KanColleWrapper/Logger.cs +++ b/Grabacr07.KanColleWrapper/Logger.cs @@ -21,12 +21,14 @@ public class Logger : NotificationObject private bool waitingForShip; private int dockid; private readonly int[] shipmats; + private readonly string LogTimestampFormat = "yyyy-MM-dd HH:mm:ss"; private enum LogType { BuildItem, BuildShip, - ShipDrop + ShipDrop, + Materials }; internal Logger(KanColleProxy proxy) @@ -38,14 +40,18 @@ internal Logger(KanColleProxy proxy) proxy.api_req_kousyou_createship.TryParse().Subscribe(x => this.CreateShip(x.Request)); proxy.api_get_member_kdock.TryParse().Subscribe(x => this.KDock(x.Data)); proxy.api_req_sortie_battleresult.TryParse().Subscribe(x => this.BattleResult(x.Data)); + proxy.api_get_member_material.TryParse().Subscribe(x => this.MaterialsHistory(x.Data)); + proxy.api_req_hokyu_charge.TryParse().Subscribe(x => this.MaterialsHistory(x.Data.api_material)); + proxy.api_req_kousyou_destroyship.TryParse().Subscribe(x => this.MaterialsHistory(x.Data.api_material)); } private void CreateItem(kcsapi_createitem item, NameValueCollection req) { - Log(LogType.BuildItem, "{0},{1},{2},{3},{4},{5}", + Log(LogType.BuildItem, "{0},{1},{2},{3},{4},{5},{6}", + DateTime.Now.ToString(this.LogTimestampFormat), item.api_create_flag == 1 ? KanColleClient.Current.Master.SlotItems[item.api_slot_item.api_slotitem_id].Name : "Penguin", - //KanColleClient.Current.Homeport.Organization.Fleets[1].Ships[0].Info.ShipType.Name, - req["api_item1"], req["api_item2"], req["api_item3"], req["api_item4"], DateTime.Now.ToString("M/d/yyyy H:mm")); + KanColleClient.Current.Homeport.Organization.Fleets[1].Ships[0].Info.ShipType.Name, + req["api_item1"], req["api_item2"], req["api_item3"], req["api_item4"]); } private void CreateShip(NameValueCollection req) @@ -63,7 +69,7 @@ private void KDock(kcsapi_kdock[] docks) { foreach (var dock in docks.Where(dock => this.waitingForShip && dock.api_id == this.dockid)) { - this.Log(LogType.BuildShip, "{0},{1},{2},{3},{4},{5},{6}", KanColleClient.Current.Master.Ships[dock.api_created_ship_id].Name, this.shipmats[0], this.shipmats[1], this.shipmats[2], this.shipmats[3], this.shipmats[4], DateTime.Now.ToString("M/d/yyyy H:mm")); + this.Log(LogType.BuildShip, "{0},{1},{2},{3},{4},{5},{6}", DateTime.Now.ToString(this.LogTimestampFormat), KanColleClient.Current.Master.Ships[dock.api_created_ship_id].Name, this.shipmats[0], this.shipmats[1], this.shipmats[2], this.shipmats[3], this.shipmats[4]); this.waitingForShip = false; } } @@ -73,10 +79,34 @@ private void BattleResult(kcsapi_battleresult br) if (br.api_get_ship == null) return; - Log(LogType.ShipDrop, "{0},{1},{2},{3},{4}", KanColleClient.Current.Translations.GetTranslation(br.api_get_ship.api_ship_name, TranslationType.Ships, br), + Log(LogType.ShipDrop, "{0},{1},{2},{3},{4}", DateTime.Now.ToString(this.LogTimestampFormat), + KanColleClient.Current.Translations.GetTranslation(br.api_get_ship.api_ship_name, TranslationType.Ships, br), KanColleClient.Current.Translations.GetTranslation(br.api_quest_name, TranslationType.OperationMaps, br), KanColleClient.Current.Translations.GetTranslation(br.api_enemy_info.api_deck_name, TranslationType.OperationSortie, br), - br.api_win_rank, DateTime.Now.ToString("M/d/yyyy H:mm")); + br.api_win_rank); + } + + private void MaterialsHistory(kcsapi_material[] source) + { + if (source == null || source.Length != 7) + return; + + Log(LogType.Materials, "{0},{1},{2},{3},{4},{5},{6},{7}", + DateTime.Now.ToString(this.LogTimestampFormat), + source[0].api_value, source[1].api_value, source[2].api_value, source[3].api_value, source[6].api_value, source[5].api_value, source[4].api_value); + } + + private void MaterialsHistory(int[] source) + { + if (source == null || source.Length != 4) + return; + + Log(LogType.Materials, "{0},{1},{2},{3},{4},{5},{6},{7}", + DateTime.Now.ToString(this.LogTimestampFormat), + source[0], source[1], source[2], source[3], + KanColleClient.Current.Homeport.Materials.DevelopmentMaterials, + KanColleClient.Current.Homeport.Materials.InstantRepairMaterials, + KanColleClient.Current.Homeport.Materials.InstantBuildMaterials); } private void Log(LogType type, string format, params object[] args) @@ -94,7 +124,7 @@ private void Log(LogType type, string format, params object[] args) { using (var w = File.AppendText(mainFolder + "\\ItemBuildLog.csv")) { - w.WriteLine("Result,Secretary,Fuel,Ammo,Steel,Bauxite,Date", args); + w.WriteLine("Date,Result,Secretary,Fuel,Ammo,Steel,Bauxite"); } } using (var w = File.AppendText(mainFolder + "\\ItemBuildLog.csv")) @@ -108,7 +138,7 @@ private void Log(LogType type, string format, params object[] args) { using (var w = File.AppendText(mainFolder + "\\ShipBuildLog.csv")) { - w.WriteLine("Result,Fuel,Ammo,Steel,Bauxite,# of Build Materials,Date", args); + w.WriteLine("Date,Result,Fuel,Ammo,Steel,Bauxite,# of Build Materials"); } } using (var w = File.AppendText(mainFolder + "\\ShipBuildLog.csv")) @@ -122,7 +152,7 @@ private void Log(LogType type, string format, params object[] args) { using (var w = File.AppendText(mainFolder + "\\DropLog.csv")) { - w.WriteLine("Result,Operation,Enemy Fleet,Rank,Date", args); + w.WriteLine("Date,Result,Operation,Enemy Fleet,Rank"); } } using (var w = File.AppendText(mainFolder + "\\DropLog.csv")) @@ -130,6 +160,19 @@ private void Log(LogType type, string format, params object[] args) w.WriteLine(format, args); } break; + case LogType.Materials: + if (!File.Exists(mainFolder + "\\MaterialsLog.csv")) + { + using (var w = File.AppendText(mainFolder + "\\MaterialsLog.csv")) + { + w.WriteLine("Date,Fuel,Ammunition,Steel,Bauxite,DevKits,Buckets,Flamethrowers"); + } + } + using (var w = File.AppendText(mainFolder + "\\MaterialsLog.csv")) + { + w.WriteLine(format, args); + } + break; } } catch (Exception ex) diff --git a/Grabacr07.KanColleWrapper/Master.cs b/Grabacr07.KanColleWrapper/Master.cs index da8bcc507..9c1487307 100644 --- a/Grabacr07.KanColleWrapper/Master.cs +++ b/Grabacr07.KanColleWrapper/Master.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reactive.Linq; +using System.Reflection; +using System.Text; using System.Threading.Tasks; -using Grabacr07.KanColleWrapper.Internal; using Grabacr07.KanColleWrapper.Models; using Grabacr07.KanColleWrapper.Models.Raw; @@ -34,6 +36,21 @@ public class Master /// public MasterTable ShipTypes { get; private set; } + /// + /// すべての任務を取得します。 + /// + public MasterTable Missions { get; private set; } + + /// + /// すべての海域の定義を取得します。 + /// + public MasterTable MapAreas { get; private set; } + + /// + /// すべてのマップの定義を取得します。 + /// + public MasterTable MapInfos { get; private set; } + internal Master(kcsapi_start2 start2) { @@ -41,6 +58,9 @@ internal Master(kcsapi_start2 start2) this.Ships = new MasterTable(start2.api_mst_ship.Select(x => new ShipInfo(x))); this.SlotItems = new MasterTable(start2.api_mst_slotitem.Select(x => new SlotItemInfo(x))); this.UseItems = new MasterTable(start2.api_mst_useitem.Select(x => new UseItemInfo(x))); + this.Missions = new MasterTable(start2.api_mst_mission.Select(x => new Mission(x))); + this.MapAreas = new MasterTable(start2.api_mst_maparea.Select(x => new MapArea(x))); + this.MapInfos = new MasterTable(start2.api_mst_mapinfo.Select(x => new MapInfo(x, this.MapAreas))); } } } diff --git a/Grabacr07.KanColleWrapper/MasterTable.cs b/Grabacr07.KanColleWrapper/MasterTable.cs index 0d65d1c96..fcec3700f 100644 --- a/Grabacr07.KanColleWrapper/MasterTable.cs +++ b/Grabacr07.KanColleWrapper/MasterTable.cs @@ -20,11 +20,11 @@ public class MasterTable : IReadOnlyDictionary where TValue /// public TValue this[int key] { - get { return this.dictionary.ContainsKey(key) ? this.dictionary[key] : null; } + get { return this.dictionary.ContainsKey(key) ? this.dictionary[key] : null; } } - public MasterTable() : this(new List()) { } + public MasterTable() : this(new List()) { } public MasterTable(IEnumerable source) { @@ -40,15 +40,15 @@ public IEnumerator> GetEnumerator() IEnumerator IEnumerable.GetEnumerator() { - return GetEnumerator(); + return this.GetEnumerator(); } public int Count { - get { return this.dictionary.Count; } + get { return this.dictionary.Count; } } - public bool ContainsKey(int key) + public bool ContainsKey(int key) { return this.dictionary.ContainsKey(key); } @@ -60,14 +60,14 @@ public bool TryGetValue(int key, out TValue value) public IEnumerable Keys { - get { return this.dictionary.Keys; } + get { return this.dictionary.Keys; } } - public IEnumerable Values - { - get { return this.dictionary.Values; } - } + public IEnumerable Values + { + get { return this.dictionary.Values; } + } - #endregion + #endregion } } diff --git a/Grabacr07.KanColleWrapper/Materials.cs b/Grabacr07.KanColleWrapper/Materials.cs index d356c170e..55c6fa6f6 100644 --- a/Grabacr07.KanColleWrapper/Materials.cs +++ b/Grabacr07.KanColleWrapper/Materials.cs @@ -187,7 +187,7 @@ internal Materials(KanColleProxy proxy) internal void Update(kcsapi_material[] source) { - if (source != null && source.Length == 7) + if (source != null && source.Length >= 7) { this.Fuel = source[0].api_value; this.Ammunition = source[1].api_value; diff --git a/Grabacr07.KanColleWrapper/MemberTable.cs b/Grabacr07.KanColleWrapper/MemberTable.cs index 44689e788..086cb9899 100644 --- a/Grabacr07.KanColleWrapper/MemberTable.cs +++ b/Grabacr07.KanColleWrapper/MemberTable.cs @@ -33,11 +33,23 @@ public MemberTable(IEnumerable source) this.dictionary = source.ToDictionary(x => x.Id); } - public void Add(int Key, TValue Value) + + internal void Add(TValue value) + { + this.dictionary.Add(value.Id, value); + } + + internal void Remove(TValue value) { - this.dictionary.Add(Key, Value); + this.dictionary.Remove(value.Id); } + internal void Remove(int id) + { + this.dictionary.Remove(id); + } + + #region IReadOnlyDictionary members public IEnumerator> GetEnumerator() @@ -47,7 +59,7 @@ public IEnumerator> GetEnumerator() IEnumerator IEnumerable.GetEnumerator() { - return GetEnumerator(); + return this.GetEnumerator(); } public int Count diff --git a/Grabacr07.KanColleWrapper/Models/Admiral.cs b/Grabacr07.KanColleWrapper/Models/Admiral.cs index 4a49007a3..9a127f691 100644 --- a/Grabacr07.KanColleWrapper/Models/Admiral.cs +++ b/Grabacr07.KanColleWrapper/Models/Admiral.cs @@ -16,68 +16,137 @@ public class Admiral : RawDataWrapper { public string MemberId { - get { return this.RawData.api_member_id; } + get { return this.RawData.api_member_id; } } - public string Nickname - { - get { return this.RawData.api_nickname; } - } + public string Nickname + { + get { return this.RawData.api_nickname; } + } + + #region Comment 変更通知プロパティ + + private string _Comment; public string Comment { - get { return this.RawData.api_comment; } + get { return this._Comment; } + set + { + if (this._Comment != value) + { + this._Comment = value; + this.RaisePropertyChanged(); + } + } } + #endregion + + + #region Experience 変更通知プロパティ + /// /// 提督経験値を取得します。 /// + /// + private int _Experience; + public int Experience { - get { return this.RawData.api_experience; } + get { return this._Experience; } + set + { + if (this._Experience != value) + { + this._Experience = value; + this.RaisePropertyChanged(); + this.RaisePropertyChanged("ExperienceForNexeLevel"); + } + } } + #endregion + /// /// 次のレベルに上がるために必要な提督経験値を取得します。 /// public int ExperienceForNexeLevel - { - get { return Models.Experience.GetAdmiralExpForNextLevel(this.RawData.api_level, this.RawData.api_experience); } - } + { + get { return Models.Experience.GetAdmiralExpForNextLevel(this.Level, this.Experience); } + } + + #region Level 変更通知プロパティ /// /// 艦隊司令部レベルを取得します。 /// + + private int _Level; + public int Level { - get { return this.RawData.api_level; } + get { return this._Level; } + set + { + if (this._Level != value) + { + this._Level = value; + this.RaisePropertyChanged(); + } + } } + #endregion + /// /// 提督のランク名 (元帥, 大将, 中将, ...) を取得します。 /// public string Rank + { + get { return Models.Rank.GetName(this.RawData.api_rank); } + } + + #region RankID 変更通知プロパティ + + /// + /// 提督のランクを取得します。 + /// + + private int _RankID; + + public int RankID { - get { return Models.Rank.GetName(this.RawData.api_rank); } + get { return this.RawData.api_rank; } + set + { + if (this._RankID != value) + { + this._RankID = value; + this.RaisePropertyChanged(); + } + } } + #endregion + /// /// 出撃時の勝利数を取得します。 /// public int SortieWins - { - get { return this.RawData.api_st_win; } - } + { + get { return this.RawData.api_st_win; } + } - /// + /// /// 出撃時の敗北数を取得します。 /// public int SortieLoses - { - get { return this.RawData.api_st_lose; } - } + { + get { return this.RawData.api_st_lose; } + } - /// + /// /// 出撃時の勝率を取得します。 /// public double SortieWinningRate @@ -95,19 +164,30 @@ public double SortieWinningRate /// public int MaxShipCount { - get { return this.RawData.api_max_chara; } + get { return this.RawData.api_max_chara; } } - /// + /// /// 司令部が保有できる装備アイテムの最大値を取得します。 /// public int MaxSlotItemCount + { + get { return this.RawData.api_max_slotitem; } + } + + public void Update() { - get { return this.RawData.api_max_slotitem; } + this.RaisePropertyChanged("RankID"); } - - internal Admiral(kcsapi_basic rawData) : base(rawData) { } + internal Admiral(kcsapi_basic rawData) + : base(rawData) + { + this.Comment = this.RawData.api_comment; + this.Experience = this.RawData.api_experience; + this.Level = this.RawData.api_level; + this.RankID = this.RawData.api_rank; + } public override string ToString() { diff --git a/Grabacr07.KanColleWrapper/Models/BuildingDock.cs b/Grabacr07.KanColleWrapper/Models/BuildingDock.cs index cbcd56c65..eef5c38a6 100644 --- a/Grabacr07.KanColleWrapper/Models/BuildingDock.cs +++ b/Grabacr07.KanColleWrapper/Models/BuildingDock.cs @@ -11,7 +11,7 @@ namespace Grabacr07.KanColleWrapper.Models /// /// 建造ドックを表します。 /// - public class BuildingDock : TimerNotificator, IIdentifiable + public class BuildingDock : TimerNotifier, IIdentifiable { private bool notificated; diff --git a/Grabacr07.KanColleWrapper/Models/CanReSortieReason.cs b/Grabacr07.KanColleWrapper/Models/CanReSortieReason.cs deleted file mode 100644 index b8f9d3704..000000000 --- a/Grabacr07.KanColleWrapper/Models/CanReSortieReason.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleWrapper.Models -{ - /// - /// 艦隊の再出撃に関するステータスを示す識別子を定義します。 - /// - [Flags] - public enum CanReSortieReason - { - /// - /// 再出撃に際して問題がないことを表します。 - /// - NoProblem = 0, - - /// - /// 艦隊にダメージを受けている艦娘がいることを表します。 - /// - Wounded = 0x1, - - /// - /// 艦隊に資源が不十分な艦娘がいることを表します。 - /// - LackForResources = 0x2, - - /// - /// 艦隊に疲労している艦娘がいることを表します。 - /// - BadCondition = 0x4, - } - -} diff --git a/Grabacr07.KanColleWrapper/Models/CombinedFleet.cs b/Grabacr07.KanColleWrapper/Models/CombinedFleet.cs new file mode 100644 index 000000000..7096dc826 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/CombinedFleet.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; +using Livet.EventListeners; +using Livet.EventListeners.WeakEvents; + +namespace Grabacr07.KanColleWrapper.Models +{ + /// + /// 二個以上の常設艦隊で編成された連合艦隊を表します。 + /// + public class CombinedFleet : DisposableNotifier + { + #region Name 変更通知プロパティ + + private string _Name; + + public string Name + { + get { return this._Name; } + set + { + if (this._Name != value) + { + this._Name = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Fleets 変更通知プロパティ + + private Fleet[] _Fleets; + + public Fleet[] Fleets + { + get { return this._Fleets; } + set + { + if (this._Fleets != value) + { + this._Fleets = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public FleetState State { get; private set; } + + public CombinedFleet(Homeport parent, params Fleet[] fleets) + { + if (fleets == null || fleets.Length == 0) throw new ArgumentException(); + + this.Fleets = fleets; + this.State = new FleetState(parent, fleets); + this.CompositeDisposable.Add(this.State); + + foreach (var fleet in fleets) + { + this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet) + { + { "Name", (sender, args) => this.UpdateName() }, + }); + + var source = fleet; + this.CompositeDisposable.Add(new LivetWeakEventListener( + h => new EventHandler(h), + h => source.State.Updated += h, + h => source.State.Updated -= h, + (sender, args) => this.State.Update())); + this.CompositeDisposable.Add(new LivetWeakEventListener( + h => new EventHandler(h), + h => source.State.Calculated += h, + h => source.State.Calculated -= h, + (sender, args) => this.State.Calculate())); + } + + this.UpdateName(); + + this.State.Calculate(); + this.State.Update(); + } + + private void UpdateName() + { + this.Name = this.Fleets.Select(x => x.Name).Join(", "); + } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/ConditionRejuvenatedEventArgs.cs b/Grabacr07.KanColleWrapper/Models/ConditionRejuvenatedEventArgs.cs new file mode 100644 index 000000000..fcc9a5c72 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/ConditionRejuvenatedEventArgs.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + public class ConditionRejuvenatedEventArgs : EventArgs + { + public string FleetName { get; private set; } + + public int MinCondition { get; private set; } + + public ConditionRejuvenatedEventArgs(string fleetName, int minCondtion) + { + this.FleetName = fleetName; + this.MinCondition = minCondtion; + } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/CreatedSlotItem.cs b/Grabacr07.KanColleWrapper/Models/CreatedSlotItem.cs new file mode 100644 index 000000000..09128bf51 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/CreatedSlotItem.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models.Raw; + +namespace Grabacr07.KanColleWrapper.Models +{ + /// + /// 工廠で開発された装備アイテムを表します。 + /// + public class CreatedSlotItem : RawDataWrapper + { + public bool Succeed + { + get { return this.RawData.api_create_flag == 1; } + } + + public SlotItemInfo SlotItemInfo { get; private set; } + + public CreatedSlotItem(kcsapi_createitem rawData) + : base(rawData) + { + try + { + this.SlotItemInfo = this.Succeed + ? KanColleClient.Current.Master.SlotItems[rawData.api_slot_item.api_slotitem_id] + : KanColleClient.Current.Master.SlotItems[int.Parse(rawData.api_fdata.Split(',')[1])]; + + System.Diagnostics.Debug.WriteLine("createitem: {0} - {1}", this.Succeed, this.SlotItemInfo.Name); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex); + } + } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/Expedition.cs b/Grabacr07.KanColleWrapper/Models/Expedition.cs index eed52b5ed..5c2977ec0 100644 --- a/Grabacr07.KanColleWrapper/Models/Expedition.cs +++ b/Grabacr07.KanColleWrapper/Models/Expedition.cs @@ -10,26 +10,23 @@ namespace Grabacr07.KanColleWrapper.Models /// /// 遠征を表します。 /// - public class Expedition : TimerNotificator, IIdentifiable + public class Expedition : TimerNotifier, IIdentifiable { private readonly Fleet fleet; private bool notificated; - #region IsInExecution 変更通知プロパティ + #region Id 変更通知プロパティ - private bool _IsInExecution; + private int _Id; - /// - /// 現在遠征を実行中かどうかを示す値を取得します。 - /// - public bool IsInExecution + public int Id { - get { return this._IsInExecution; } + get { return this._Id; } private set { - if (this._IsInExecution != value) + if (this._Id != value) { - this._IsInExecution = value; + this._Id = value; this.RaisePropertyChanged(); } } @@ -37,18 +34,21 @@ private set #endregion - #region Id 変更通知プロパティ + #region Mission 変更通知プロパティ - private int _Id; + private Mission _Mission; - public int Id + /// + /// 実行中の遠征任務を取得します。 + /// + public Mission Mission { - get { return this._Id; } + get { return this._Mission; } private set { - if (this._Id != value) + if (this._Mission != value) { - this._Id = value; + this._Mission = value; this.RaisePropertyChanged(); } } @@ -56,7 +56,7 @@ private set #endregion - #region ReturnTime 変更通知プロパティ + #region ReturnTime / IsInExecution 変更通知プロパティ private DateTimeOffset? _ReturnTime; @@ -70,10 +70,20 @@ private set this._ReturnTime = value; this.notificated = false; this.RaisePropertyChanged(); + this.RaisePropertyChanged("IsInExecution"); } } } + + /// + /// 現在遠征を実行中かどうかを示す値を取得します。 + /// + public bool IsInExecution + { + get { return this.ReturnTime.HasValue; } + } + #endregion #region Remaining 変更通知プロパティ @@ -110,15 +120,16 @@ internal void Update(long[] rawData) { if (rawData.Length != 4 || rawData.All(x => x == 0)) { - this.IsInExecution = false; + this.Id = -1; + this.Mission = null; this.ReturnTime = null; this.Remaining = null; } else { this.Id = (int)rawData[1]; + this.Mission = KanColleClient.Current.Master.Missions[this.Id]; this.ReturnTime = Definitions.UnixEpoch.AddMilliseconds(rawData[2]); - this.IsInExecution = true; this.UpdateCore(); } } @@ -127,12 +138,14 @@ private void UpdateCore() { if (this.ReturnTime.HasValue) { - var remaining = this.ReturnTime.Value - TimeSpan.FromMinutes(1.0) - DateTimeOffset.Now; + var remaining = this.ReturnTime.Value - DateTimeOffset.Now; if (remaining.Ticks < 0) remaining = TimeSpan.Zero; this.Remaining = remaining; - if (!this.notificated && this.Returned != null && remaining.Ticks <= 0) + if (!this.notificated + && this.Returned != null + && remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime)) { this.Returned(this, new ExpeditionReturnedEventArgs(this.fleet.Name)); this.notificated = true; diff --git a/Grabacr07.KanColleWrapper/Models/Experience.cs b/Grabacr07.KanColleWrapper/Models/Experience.cs index 17ad246db..82709a663 100644 --- a/Grabacr07.KanColleWrapper/Models/Experience.cs +++ b/Grabacr07.KanColleWrapper/Models/Experience.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace Grabacr07.KanColleWrapper.Models @@ -24,144 +23,132 @@ private Experience(int level, int next, int total) #region table - private static readonly Experience[] table = + private static readonly Dictionary table = new Dictionary { - new Experience(1, 100, 0), - new Experience(2, 200, 100), - new Experience(3, 300, 300), - new Experience(4, 400, 600), - new Experience(5, 500, 1000), - new Experience(6, 600, 1500), - new Experience(7, 700, 2100), - new Experience(8, 800, 2800), - new Experience(9, 900, 3600), - new Experience(10, 1000, 4500), - new Experience(11, 1100, 5500), - new Experience(12, 1200, 6600), - new Experience(13, 1300, 7800), - new Experience(14, 1400, 9100), - new Experience(15, 1500, 10500), - new Experience(16, 1600, 12000), - new Experience(17, 1700, 13600), - new Experience(18, 1800, 15300), - new Experience(19, 1900, 17100), - new Experience(20, 2000, 19000), - new Experience(21, 2100, 21000), - new Experience(22, 2200, 23100), - new Experience(23, 2300, 25300), - new Experience(24, 2400, 27600), - new Experience(25, 2500, 30000), - new Experience(26, 2600, 32500), - new Experience(27, 2700, 35100), - new Experience(28, 2800, 37800), - new Experience(29, 2900, 40600), - new Experience(30, 3000, 43500), - new Experience(31, 3100, 46500), - new Experience(32, 3200, 49600), - new Experience(33, 3300, 52800), - new Experience(34, 3400, 56100), - new Experience(35, 3500, 59500), - new Experience(36, 3600, 63000), - new Experience(37, 3700, 66600), - new Experience(38, 3800, 70300), - new Experience(39, 3900, 74100), - new Experience(40, 4000, 78000), - new Experience(41, 4100, 82000), - new Experience(42, 4200, 86100), - new Experience(43, 4300, 90300), - new Experience(44, 4400, 94600), - new Experience(45, 4500, 99000), - new Experience(46, 4600, 103500), - new Experience(47, 4700, 108100), - new Experience(48, 4800, 112800), - new Experience(49, 4900, 117600), - new Experience(50, 5000, 122500), - new Experience(51, 5200, 127500), - new Experience(52, 5400, 132700), - new Experience(53, 5600, 138100), - new Experience(54, 5800, 143700), - new Experience(55, 6000, 149500), - new Experience(56, 6200, 155500), - new Experience(57, 6400, 161700), - new Experience(58, 6600, 168100), - new Experience(59, 6800, 174700), - new Experience(60, 7000, 181500), - new Experience(61, 7300, 188500), - new Experience(62, 7600, 195800), - new Experience(63, 7900, 203400), - new Experience(64, 8200, 211300), - new Experience(65, 8500, 219500), - new Experience(66, 8800, 228000), - new Experience(67, 9100, 236800), - new Experience(68, 9400, 245900), - new Experience(69, 9700, 255300), - new Experience(70, 10000, 265000), - new Experience(71, 10400, 275000), - new Experience(72, 10800, 285400), - new Experience(73, 11200, 296200), - new Experience(74, 11600, 307400), - new Experience(75, 12000, 319000), - new Experience(76, 12400, 331000), - new Experience(77, 12800, 343400), - new Experience(78, 13200, 356200), - new Experience(79, 13600, 369400), - new Experience(80, 14000, 383000), - new Experience(81, 14500, 397000), - new Experience(82, 15000, 411500), - new Experience(83, 15500, 426500), - new Experience(84, 16000, 442000), - new Experience(85, 16500, 458000), - new Experience(86, 17000, 474500), - new Experience(87, 17500, 491500), - new Experience(88, 18000, 509000), - new Experience(89, 18500, 527000), - new Experience(90, 19000, 545500), - new Experience(91, 20000, 564500), - new Experience(92, 22000, 584500), - new Experience(93, 25000, 606500), - new Experience(94, 30000, 631500), - new Experience(95, 40000, 661500), - new Experience(96, 60000, 701500), - new Experience(97, 90000, 761500), - new Experience(98, 148500, 851500), - new Experience(99, 300000, 1000000), - new Experience(100, 300000, 1300000), - new Experience(101, 300000, 1600000), - new Experience(102, 300000, 1900000), - new Experience(103, 400000, 2200000), - new Experience(104, 400000, 2600000), - new Experience(105, 500000, 3000000), - new Experience(106, 500000, 3500000), - new Experience(107, 600000, 4000000), - new Experience(108, 600000, 4600000), - new Experience(109, 700000, 5200000), - new Experience(110, 700000, 5900000), - new Experience(111, 800000, 6600000), - new Experience(112, 800000, 7400000), - new Experience(113, 900000, 8200000), - new Experience(114, 900000, 9100000), - new Experience(115, 0, 10000000), + { 1, new Experience(1, 100, 0) }, + { 2, new Experience(2, 200, 100) }, + { 3, new Experience(3, 300, 300) }, + { 4, new Experience(4, 400, 600) }, + { 5, new Experience(5, 500, 1000) }, + { 6, new Experience(6, 600, 1500) }, + { 7, new Experience(7, 700, 2100) }, + { 8, new Experience(8, 800, 2800) }, + { 9, new Experience(9, 900, 3600) }, + { 10, new Experience(10, 1000, 4500) }, + { 11, new Experience(11, 1100, 5500) }, + { 12, new Experience(12, 1200, 6600) }, + { 13, new Experience(13, 1300, 7800) }, + { 14, new Experience(14, 1400, 9100) }, + { 15, new Experience(15, 1500, 10500) }, + { 16, new Experience(16, 1600, 12000) }, + { 17, new Experience(17, 1700, 13600) }, + { 18, new Experience(18, 1800, 15300) }, + { 19, new Experience(19, 1900, 17100) }, + { 20, new Experience(20, 2000, 19000) }, + { 21, new Experience(21, 2100, 21000) }, + { 22, new Experience(22, 2200, 23100) }, + { 23, new Experience(23, 2300, 25300) }, + { 24, new Experience(24, 2400, 27600) }, + { 25, new Experience(25, 2500, 30000) }, + { 26, new Experience(26, 2600, 32500) }, + { 27, new Experience(27, 2700, 35100) }, + { 28, new Experience(28, 2800, 37800) }, + { 29, new Experience(29, 2900, 40600) }, + { 30, new Experience(30, 3000, 43500) }, + { 31, new Experience(31, 3100, 46500) }, + { 32, new Experience(32, 3200, 49600) }, + { 33, new Experience(33, 3300, 52800) }, + { 34, new Experience(34, 3400, 56100) }, + { 35, new Experience(35, 3500, 59500) }, + { 36, new Experience(36, 3600, 63000) }, + { 37, new Experience(37, 3700, 66600) }, + { 38, new Experience(38, 3800, 70300) }, + { 39, new Experience(39, 3900, 74100) }, + { 40, new Experience(40, 4000, 78000) }, + { 41, new Experience(41, 4100, 82000) }, + { 42, new Experience(42, 4200, 86100) }, + { 43, new Experience(43, 4300, 90300) }, + { 44, new Experience(44, 4400, 94600) }, + { 45, new Experience(45, 4500, 99000) }, + { 46, new Experience(46, 4600, 103500) }, + { 47, new Experience(47, 4700, 108100) }, + { 48, new Experience(48, 4800, 112800) }, + { 49, new Experience(49, 4900, 117600) }, + { 50, new Experience(50, 5000, 122500) }, + { 51, new Experience(51, 5200, 127500) }, + { 52, new Experience(52, 5400, 132700) }, + { 53, new Experience(53, 5600, 138100) }, + { 54, new Experience(54, 5800, 143700) }, + { 55, new Experience(55, 6000, 149500) }, + { 56, new Experience(56, 6200, 155500) }, + { 57, new Experience(57, 6400, 161700) }, + { 58, new Experience(58, 6600, 168100) }, + { 59, new Experience(59, 6800, 174700) }, + { 60, new Experience(60, 7000, 181500) }, + { 61, new Experience(61, 7300, 188500) }, + { 62, new Experience(62, 7600, 195800) }, + { 63, new Experience(63, 7900, 203400) }, + { 64, new Experience(64, 8200, 211300) }, + { 65, new Experience(65, 8500, 219500) }, + { 66, new Experience(66, 8800, 228000) }, + { 67, new Experience(67, 9100, 236800) }, + { 68, new Experience(68, 9400, 245900) }, + { 69, new Experience(69, 9700, 255300) }, + { 70, new Experience(70, 10000, 265000) }, + { 71, new Experience(71, 10400, 275000) }, + { 72, new Experience(72, 10800, 285400) }, + { 73, new Experience(73, 11200, 296200) }, + { 74, new Experience(74, 11600, 307400) }, + { 75, new Experience(75, 12000, 319000) }, + { 76, new Experience(76, 12400, 331000) }, + { 77, new Experience(77, 12800, 343400) }, + { 78, new Experience(78, 13200, 356200) }, + { 79, new Experience(79, 13600, 369400) }, + { 80, new Experience(80, 14000, 383000) }, + { 81, new Experience(81, 14500, 397000) }, + { 82, new Experience(82, 15000, 411500) }, + { 83, new Experience(83, 15500, 426500) }, + { 84, new Experience(84, 16000, 442000) }, + { 85, new Experience(85, 16500, 458000) }, + { 86, new Experience(86, 17000, 474500) }, + { 87, new Experience(87, 17500, 491500) }, + { 88, new Experience(88, 18000, 509000) }, + { 89, new Experience(89, 18500, 527000) }, + { 90, new Experience(90, 19000, 545500) }, + { 91, new Experience(91, 20000, 564500) }, + { 92, new Experience(92, 22000, 584500) }, + { 93, new Experience(93, 25000, 606500) }, + { 94, new Experience(94, 30000, 631500) }, + { 95, new Experience(95, 40000, 661500) }, + { 96, new Experience(96, 60000, 701500) }, + { 97, new Experience(97, 90000, 761500) }, + { 98, new Experience(98, 148500, 851500) }, + { 99, new Experience(99, 300000, 1000000) }, + { 100, new Experience(100, 300000, 1300000) }, + { 101, new Experience(101, 300000, 1600000) }, + { 102, new Experience(102, 300000, 1900000) }, + { 103, new Experience(103, 400000, 2200000) }, + { 104, new Experience(104, 400000, 2600000) }, + { 105, new Experience(105, 500000, 3000000) }, + { 106, new Experience(106, 500000, 3500000) }, + { 107, new Experience(107, 600000, 4000000) }, + { 108, new Experience(108, 600000, 4600000) }, + { 109, new Experience(109, 700000, 5200000) }, + { 110, new Experience(110, 700000, 5900000) }, + { 111, new Experience(111, 800000, 6600000) }, + { 112, new Experience(112, 800000, 7400000) }, + { 113, new Experience(113, 900000, 8200000) }, + { 114, new Experience(114, 900000, 9100000) }, + { 115, new Experience(115, 1000000, 10000000) }, + { 116, new Experience(116, 1000000, 11000000) }, + { 117, new Experience(117, 1000000, 12000000) }, + { 118, new Experience(118, 1000000, 13000000) }, + { 119, new Experience(119, 1000000, 14000000) }, + { 120, new Experience(120, 0, 15000000) } }; #endregion - - /// - /// 指定した艦娘のレベルにおいて、次のレベルに上がるために必要な経験値を取得します。 - /// - /// 艦娘の現在のレベル。 - /// 艦娘の現在の経験値。 - /// から次のレベルに上がるために必要となる経験値。 - public static int GetShipExpForNextLevel(int currentLevel, int currentExperience) - { - if (1 <= currentLevel && currentLevel <= 98) - { - return table[currentLevel].Total - currentExperience; - } - - return 0; - } - /// /// 指定した艦隊司令部のレベルにおいて、次のレベルに上がるために必要な経験値を取得します。 /// @@ -170,12 +157,7 @@ public static int GetShipExpForNextLevel(int currentLevel, int currentExperience /// から次のレベルに上がるために必要となる経験値。 public static int GetAdmiralExpForNextLevel(int currentLevel, int currentExperience) { - if (1 <= currentLevel && currentLevel <= 114) - { - return table[currentLevel].Total - currentExperience; - } - - return 0; + return table.ContainsKey(currentLevel + 1) ? table[currentLevel + 1].Total - currentExperience : 0; } } } diff --git a/Grabacr07.KanColleWrapper/Models/Fleet.cs b/Grabacr07.KanColleWrapper/Models/Fleet.cs index 067ea747c..2a633b564 100644 --- a/Grabacr07.KanColleWrapper/Models/Fleet.cs +++ b/Grabacr07.KanColleWrapper/Models/Fleet.cs @@ -3,12 +3,13 @@ using System.Linq; using System.Threading.Tasks; using Grabacr07.KanColleWrapper.Models.Raw; -using Grabacr07.KanColleWrapper.Internal; -using Livet; namespace Grabacr07.KanColleWrapper.Models { - public class Fleet : NotificationObject, IDisposable, IIdentifiable + /// + /// 複数の艦娘によって編成される、単一の常設艦隊を表します。 + /// + public class Fleet : DisposableNotifier, IIdentifiable { private readonly Homeport homeport; private Ship[] originalShips; // null も含んだやつ @@ -39,11 +40,12 @@ private set public string Name { get { return this._Name; } - private set + internal set { if (this._Name != value) { this._Name = value; + this.State.Condition.Name = value; this.RaisePropertyChanged(); } } @@ -73,136 +75,9 @@ private set #endregion - #region AverageLevel 変更通知プロパティ + public bool IsInSortie { get; private set; } - private double _AverageLevel; - - /// - /// 艦隊の平均レベルを取得します。 - /// - public double AverageLevel - { - get { return this._AverageLevel; } - private set - { - if (!this._AverageLevel.Equals(value)) - { - this._AverageLevel = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region TotalLevel 変更通知プロパティ - - private int _TotalLevel; - - public int TotalLevel - { - get { return this._TotalLevel; } - private set - { - if (this._TotalLevel != value) - { - this._TotalLevel = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region AirSuperiorityPotential 変更通知プロパティ - - private int _AirSuperiorityPotential; - - /// - /// 艦隊の制空能力を取得します。 - /// - public int AirSuperiorityPotential - { - get { return this._AirSuperiorityPotential; } - private set - { - if (this._AirSuperiorityPotential != value) - { - this._AirSuperiorityPotential = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region TotalViewRange 変更通知プロパティ - - private int _TotalViewRange; - - /// - /// 各艦娘の装備によるボーナスを含めた、艦隊の索敵合計値を取得します。 - /// - public int TotalViewRange - { - get { return this._TotalViewRange; } - private set - { - if (this._TotalViewRange != value) - { - this._TotalViewRange = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Speed 変更通知プロパティ - - private Speed _Speed; - - /// - /// 艦隊の速力を取得します。 - /// - public Speed Speed - { - get { return this._Speed; } - private set - { - if (this._Speed != value) - { - this._Speed = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region State 変更通知プロパティ - - private FleetState _State; - - public FleetState State - { - get { return this._State; } - set - { - if (this._State != value) - { - this._State = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - /// - /// 艦隊の再出撃に関するステータスを取得します。 - /// - public FleetReSortie ReSortie { get; private set; } + public FleetState State { get; private set; } /// /// 艦隊の遠征に関するステータスを取得します。 @@ -214,8 +89,11 @@ internal Fleet(Homeport parent, kcsapi_deck rawData) { this.homeport = parent; - this.ReSortie = new FleetReSortie(); + this.State = new FleetState(parent, this); this.Expedition = new Expedition(this); + this.CompositeDisposable.Add(this.State); + this.CompositeDisposable.Add(this.Expedition); + this.Update(rawData); } @@ -233,6 +111,8 @@ internal void Update(kcsapi_deck rawData) this.UpdateShips(rawData.api_ship.Select(id => this.homeport.Organization.Ships[id]).ToArray()); } + #region 艦の編成 (Change, Unset) + /// /// 艦隊の編成を変更します。 /// @@ -263,7 +143,6 @@ internal Ship Change(int index, Ship ship) return current; } - /// /// 指定したインデックスの艦を艦隊から外します。 /// @@ -292,54 +171,42 @@ internal void UnsetAll() this.UpdateShips(ships); } + #endregion - /// - /// 艦隊の平均レベルや制空戦力などの各種数値を再計算します。 - /// - internal void Calculate() + #region 出撃 (Sortie, Homing) + + internal void Sortie() { - this.TotalLevel = this.Ships.HasItems() ? this.Ships.Sum(x => x.Level) : 0; - this.AverageLevel = this.Ships.HasItems() ? (double)this.TotalLevel / this.Ships.Length : 0.0; - this.AirSuperiorityPotential = this.Ships.Sum(s => s.CalcAirSuperiorityPotential()); - this.TotalViewRange = this.Ships.Sum(s => s.ViewRange); - this.Speed = this.Ships.All(s => s.Info.Speed == Speed.Fast) ? Speed.Fast : Speed.Low; + if (!this.IsInSortie) + { + this.IsInSortie = true; + this.State.Update(); + } } - /// - /// 現在の艦隊情報を使用して、 および プロパティを更新します。 - /// - internal void UpdateStatus() + internal void Homing() { - this.ReSortie.Update(this.Ships, this.homeport.Repairyard); - - if (this.Ships.Length == 0) this.State = FleetState.Empty; - else if (this.Expedition.IsInExecution) this.State = FleetState.Expedition; - else if (this.homeport.Repairyard.CheckRepairing(this)) this.State = FleetState.Repairing; - else this.State = FleetState.Ready; + if (this.IsInSortie) + { + this.IsInSortie = false; + this.State.Update(); + } } + #endregion private void UpdateShips(Ship[] ships) { this.originalShips = ships; this.Ships = ships.Where(x => x != null).ToArray(); - this.Calculate(); - this.UpdateStatus(); + this.State.Calculate(); + this.State.Update(); } - public override string ToString() { return string.Format("ID = {0}, Name = \"{1}\", Ships = {2}", this.Id, this.Name, this.Ships.Select(s => "\"" + s.Info.Name + "\"").ToString(",")); } - - public virtual void Dispose() - { - this.ReSortie.Dispose(); - this.ReSortie.SafeDispose(); - this.Expedition.Dispose(); - this.Expedition.SafeDispose(); - } } } diff --git a/Grabacr07.KanColleWrapper/Models/FleetCondition.cs b/Grabacr07.KanColleWrapper/Models/FleetCondition.cs new file mode 100644 index 000000000..bcb4c0edc --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/FleetCondition.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + public class FleetCondition : TimerNotifier + { + private Ship[] ships; + private bool notificated; + private int minCondition; + + /// + /// 通知機能が有効かどうかを示す値を取得または設定します。 + /// + public bool IsEnabled { get; set; } + + public string Name { get; set; } + + #region RejuvenateTime / IsRejuvenating 変更通知プロパティ + + private DateTimeOffset? _RejuvenateTime; + + /// + /// 疲労回復の目安時間を取得します。 + /// + public DateTimeOffset? RejuvenateTime + { + get { return this._RejuvenateTime; } + private set + { + if (this._RejuvenateTime != value) + { + this._RejuvenateTime = value; + this.notificated = false; + this.RaisePropertyChanged(); + this.RaisePropertyChanged("IsRejuvenating"); + } + } + } + + /// + /// 艦隊に編成されている艦娘の疲労を自然回復しているかどうかを示す値を取得します。 + /// + public bool IsRejuvenating + { + get { return this.RejuvenateTime.HasValue; } + } + + #endregion + + #region Remaining 変更通知プロパティ + + private TimeSpan? _Remaining; + + /// + /// 疲労の回復が完了するまでの残り時間を取得します。1 秒ごとに更新されます。 + /// + public TimeSpan? Remaining + { + get { return this._Remaining; } + private set + { + if (this._Remaining != value) + { + this._Remaining = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public event EventHandler Rejuvenated; + + internal void Update(Ship[] s) + { + this.ships = s; + + if (this.ships.Length == 0) + { + this.RejuvenateTime = null; + return; + } + + var condition = this.ships.Min(x => x.Condition); + if (condition != this.minCondition) + { + this.minCondition = condition; + + var rejuvnate = DateTimeOffset.Now; // 回復完了予測時刻 + + while (condition < KanColleClient.Current.Settings.ReSortieCondition) + { + rejuvnate = rejuvnate.AddMinutes(3); + condition += 3; + if (condition > 49) condition = 49; + } + + this.RejuvenateTime = rejuvnate <= DateTimeOffset.Now + ? (DateTimeOffset?)null + : rejuvnate; + } + } + + + protected override void Tick() + { + base.Tick(); + + if (this.RejuvenateTime.HasValue && this.IsEnabled) + { + var remaining = this.RejuvenateTime.Value.Subtract(DateTimeOffset.Now); + if (remaining.Ticks < 0) remaining = TimeSpan.Zero; + + this.Remaining = remaining; + + if (!this.notificated && this.Rejuvenated != null && remaining.Ticks <= 0) + { + this.Rejuvenated(this, new ConditionRejuvenatedEventArgs(this.Name, 0)); + this.notificated = true; + } + } + else + { + this.Remaining = null; + } + } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/FleetReSortie.cs b/Grabacr07.KanColleWrapper/Models/FleetReSortie.cs deleted file mode 100644 index fa60309da..000000000 --- a/Grabacr07.KanColleWrapper/Models/FleetReSortie.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Diagnostics; - -namespace Grabacr07.KanColleWrapper.Models -{ - /// - /// 艦隊の再出撃のためのステータスを表します。 - /// - public class FleetReSortie : TimerNotificator - { - public static int ReSortieCondition { get; set; } - - private bool notificated; - private int minCondition; - private Dictionary CriticaledShips; - - #region ReadyTime 変更通知プロパティ - - private DateTimeOffset? _ReadyTime; - - /// - /// 再出撃の準備が完了する時刻を取得します。 - /// - public DateTimeOffset? ReadyTime - { - get { return this._ReadyTime; } - private set - { - if (this._ReadyTime != value) - { - this._ReadyTime = value; - this.notificated = false; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Remaining 変更通知プロパティ - - private TimeSpan? _Remaining; - - public TimeSpan? Remaining - { - get { return this._Remaining; } - private set - { - if (this._Remaining != value) - { - this._Remaining = value; - this.RaisePropertyChanged(); - } - } - } - - #endregion - - #region Reason 変更通知プロパティ - - private CanReSortieReason _Reason; - - public CanReSortieReason Reason - { - get { return this._Reason; } - private set - { - if (this._Reason != value) - { - this._Reason = value; - this.RaisePropertyChanged(); - this.RaisePropertyChanged(() => CanReSortie); - } - } - } - - #endregion - - /// - /// 艦隊が再出撃できるかどうかを示す値を取得します。 - /// - public bool CanReSortie - { - get { return this.Reason == CanReSortieReason.NoProblem; } - } - - /// - /// 艦隊の出撃準備が完了したときに発生します。 - /// - public event EventHandler Readied; - - public event EventHandler CriticalCondition; - public event EventHandler CriticalCleared; - - /// - /// 艦隊に編成されている艦娘の状態から、再出撃可能かどうかを判定します。 - /// - /// 艦隊に編成されている艦娘。 - internal void Update(Ship[] ships, Repairyard repairyard) - { - try - { - if (ships.Length == 0) - { - this.ReadyTime = null; - this.UpdateCore(); - if (this.CriticaledShips.Count > 0) - { - this.CriticalCleared(this, new EventArgs()); - this.CriticaledShips.Clear(); - } - return; - } - - var reason = CanReSortieReason.NoProblem; - - if (ships.Any(s => s.IsBadlyDamaged)) - { - reason |= CanReSortieReason.Wounded; - - // We only send out the event once, when the ships has reached critical from its previous state. - IEnumerable CriticalShips = ships.Where(s => s.IsBadlyDamaged); - foreach (Ship s in CriticalShips) - { - if (this.CriticalCondition != null && !repairyard.CheckRepairing(s.Id) && (this.CriticaledShips.Count == 0 || (this.CriticaledShips.Count > 0 && !this.CriticaledShips[s.Id]))) - { - this.CriticalCondition(this, new ShipCriticalConditionEventArgs(s)); - this.CriticaledShips.Add(s.Id, true); - } - } - - int RepairingCritShips = ships.Where(s => s.IsBadlyDamaged && repairyard.CheckRepairing(s.Id)).Count(); - - if (this.CriticalCleared != null && ships.Where(s => s.IsBadlyDamaged).Count() == RepairingCritShips) - { - this.CriticalCleared(this, new EventArgs()); - this.CriticaledShips.Clear(); - } - } - else if (this.CriticalCleared != null && this.CriticaledShips.Count > 0) - { - this.CriticaledShips.Clear(); - this.CriticalCleared(this, new EventArgs()); - } - - if (ships.Any(s => s.Fuel.Current < s.Fuel.Maximum || s.Bull.Current < s.Bull.Maximum)) - { - reason |= CanReSortieReason.LackForResources; - } - - var min = ships.Min(x => x.Condition); - if (min < 40) - { - reason |= CanReSortieReason.BadCondition; - - // コンディションの最小値が前回から変更された場合のみ、再出撃可能時刻を更新する - // (サーバーから来るコンディション値が 3 分に 1 回しか更新されないので、毎回カウントダウンし直すと最大 3 分くらいズレる) - if (min != this.minCondition) - { - this.ReadyTime = DateTimeOffset.Now.Add(TimeSpan.FromMinutes(40 - min)); - } - } - else - { - this.ReadyTime = null; - } - - this.minCondition = min; - this.Reason = reason; - - this.UpdateCore(); - } - catch (Exception ex) - { - Debug.WriteLine(ex); - } - } - - private void UpdateCore() - { - if (this.ReadyTime.HasValue) - { - var remaining = this.ReadyTime.Value - DateTimeOffset.Now; - if (remaining.Ticks < 0) remaining = TimeSpan.Zero; - - this.Remaining = remaining; - - if (!this.notificated && this.Readied != null && remaining.Ticks <= 0) - { - this.Readied(this, new EventArgs()); - this.notificated = true; - } - } - else - { - this.Remaining = null; - } - } - - protected override void Tick() - { - base.Tick(); - this.UpdateCore(); - } - - internal FleetReSortie() - { - this.CriticaledShips = new Dictionary(); - } - } -} diff --git a/Grabacr07.KanColleWrapper/Models/FleetSituation.cs b/Grabacr07.KanColleWrapper/Models/FleetSituation.cs new file mode 100644 index 000000000..c29866c23 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/FleetSituation.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + [Flags] + public enum FleetSituation + { + /// + /// 艦隊に艦娘が編成されていません。 + /// + Empty = 0, + + /// + /// 艦隊は母港で待機中です。 + /// + Homeport = 1, + + /// + /// この艦隊は連合艦隊です。 + /// + Combined = 1 << 1, + + /// + /// 艦隊は出撃中です。 + /// + Sortie = 1 << 2, + + /// + /// 艦隊は遠征中です。 + /// + Expedition = 1 << 3, + + /// + /// 艦隊に大破した艦娘がいます。 + /// + HeavilyDamaged = 1 << 4, + + /// + /// 艦隊に完全に補給されていない艦娘がいます。 + /// + InShortSupply = 1 << 5, + + /// + /// 艦隊に入渠中の艦娘がいます。 + /// + Repairing = 1 << 6, + } +} diff --git a/Grabacr07.KanColleWrapper/Models/FleetSpeed.cs b/Grabacr07.KanColleWrapper/Models/FleetSpeed.cs new file mode 100644 index 000000000..2f65738e2 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/FleetSpeed.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + public enum FleetSpeed + { + Fast, + Low, + Hybrid, + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/FleetState.cs b/Grabacr07.KanColleWrapper/Models/FleetState.cs index dcfb10051..cbe656396 100644 --- a/Grabacr07.KanColleWrapper/Models/FleetState.cs +++ b/Grabacr07.KanColleWrapper/Models/FleetState.cs @@ -1,28 +1,322 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; +using Livet.EventListeners.WeakEvents; namespace Grabacr07.KanColleWrapper.Models { - public enum FleetState + /// + /// 艦隊の状態を表します。 + /// + public class FleetState : DisposableNotifier { - Empty, + private readonly Homeport homeport; + private readonly Fleet[] source; /// - /// 出撃準備ができています。 + /// 艦隊に編成されている艦娘のコンディションを取得します。 /// - Ready, + public FleetCondition Condition { get; private set; } + + #region AverageLevel 変更通知プロパティ + + private double _AverageLevel; + + /// + /// 艦隊の平均レベルを取得します。 + /// + public double AverageLevel + { + get { return this._AverageLevel; } + private set + { + if (!this._AverageLevel.Equals(value)) + { + this._AverageLevel = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region TotalLevel 変更通知プロパティ + + private int _TotalLevel; + + public int TotalLevel + { + get { return this._TotalLevel; } + private set + { + if (this._TotalLevel != value) + { + this._TotalLevel = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region AirSuperiorityPotential 変更通知プロパティ + + private int _AirSuperiorityPotential; + + /// + /// 艦隊の制空能力を取得します。 + /// + public int AirSuperiorityPotential + { + get { return this._AirSuperiorityPotential; } + private set + { + if (this._AirSuperiorityPotential != value) + { + this._AirSuperiorityPotential = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region ViewRange 変更通知プロパティ + + private double _ViewRange; + + /// + /// 艦隊の索敵値を取得します。索敵の計算は で指定された方法を使用します。 + /// + public double ViewRange + { + get { return this._ViewRange; } + private set + { + if (this._ViewRange != value) + { + this._ViewRange = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region ViewRangeCalcType 変更通知プロパティ + + private string _ViewRangeCalcType; + + public string ViewRangeCalcType + { + get { return this._ViewRangeCalcType; } + set + { + if (this._ViewRangeCalcType != value) + { + this._ViewRangeCalcType = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Speed 変更通知プロパティ + + private FleetSpeed _Speed; + + public FleetSpeed Speed + { + get { return this._Speed; } + set + { + if (this._Speed != value) + { + this._Speed = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Situation 変更通知プロパティ + + private FleetSituation _Situation; + + public FleetSituation Situation + { + get { return this._Situation; } + private set + { + if (this._Situation != value) + { + this._Situation = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region IsReady 変更通知プロパティ + + private bool _IsReady; /// - /// 艦隊は遠征中です。 + /// 艦隊の出撃準備ができているかどうかを示す値を取得します。 /// - Expedition, + public bool IsReady + { + get { return this._IsReady; } + private set + { + if (this._IsReady != value) + { + this._IsReady = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public event EventHandler Updated; + public event EventHandler Calculated; + + + public FleetState(Homeport homeport, params Fleet[] fleets) + { + this.homeport = homeport; + this.source = fleets ?? new Fleet[0]; + + this.Condition = new FleetCondition(); + this.CompositeDisposable.Add(this.Condition); + this.CompositeDisposable.Add(new PropertyChangedWeakEventListener(KanColleClient.Current.Settings) + { + { "ViewRangeCalcType", (sender, args) => this.Calculate() }, + }); + } + /// - /// 艦隊に入渠中の艦娘がいます。 + /// 艦隊の平均レベルや制空戦力などの各種数値を再計算します。 /// - Repairing, + internal void Calculate() + { + var ships = this.source.SelectMany(x => x.Ships).WithoutEvacuated().ToArray(); + + this.TotalLevel = ships.HasItems() ? ships.Sum(x => x.Level) : 0; + this.AverageLevel = ships.HasItems() ? (double)this.TotalLevel / ships.Length : 0.0; + this.AirSuperiorityPotential = ships.Sum(s => s.CalcAirSuperiorityPotential()); + this.Speed = ships.All(x => x.Info.Speed == ShipSpeed.Fast) + ? FleetSpeed.Fast + : ships.All(x => x.Info.Speed == ShipSpeed.Low) + ? FleetSpeed.Low + : FleetSpeed.Hybrid; + + var logic = ViewRangeCalcLogic.Get(KanColleClient.Current.Settings.ViewRangeCalcType); + this.ViewRange = logic.Calc(ships.ToArray()); + this.ViewRangeCalcType = logic.Name; + + if (this.Calculated != null) + { + this.Calculated(this, new EventArgs()); + } + } + + internal void Update() + { + var state = FleetSituation.Empty; + var ready = true; + + var ships = this.source.SelectMany(x => x.Ships).ToArray(); + if (ships.Length == 0) + { + ready = false; + } + else + { + var first = this.source[0]; + + if (this.source.Length == 1) + { + if (first.IsInSortie) + { + state |= FleetSituation.Sortie; + ready = false; + } + else if (first.Expedition.IsInExecution) + { + state |= FleetSituation.Expedition; + ready = false; + } + else + { + state |= FleetSituation.Homeport; + } + } + else + { + state |= FleetSituation.Combined; + + if (first.IsInSortie) + { + state |= FleetSituation.Sortie; + ready = false; + } + else + { + state |= FleetSituation.Homeport; + } + } + } + + this.Condition.Update(ships); + this.Condition.IsEnabled = state.HasFlag(FleetSituation.Homeport); // 疲労回復通知は母港待機中の艦隊でのみ行う + + if (state.HasFlag(FleetSituation.Homeport)) + { + var repairing = ships.Any(x => this.homeport.Repairyard.CheckRepairing(x.Id)); + if (repairing) + { + state |= FleetSituation.Repairing; + ready = false; + } + + var inShortSupply = ships.Any(s => s.Fuel.Current < s.Fuel.Maximum || s.Bull.Current < s.Bull.Maximum); + if (inShortSupply) + { + state |= FleetSituation.InShortSupply; + ready = false; + } + + if (this.Condition.IsRejuvenating) + { + ready = false; + } + } + + var heavilyDamaged = ships + .Where(s => !this.homeport.Repairyard.CheckRepairing(s.Id)) + .Where(s => !s.Situation.HasFlag(ShipSituation.Evacuation) && !s.Situation.HasFlag(ShipSituation.Tow)) + .Where(s => !(state.HasFlag(FleetSituation.Sortie) && s.Situation.HasFlag(ShipSituation.DamageControlled))) + .Any(s => s.HP.IsHeavilyDamage()); + if (heavilyDamaged) + { + state |= FleetSituation.HeavilyDamaged; + ready = false; + } + + this.Situation = state; + this.IsReady = ready; + + if (this.Updated != null) + { + this.Updated(this, new EventArgs()); + } + } } } diff --git a/Grabacr07.KanColleWrapper/Models/MapArea.cs b/Grabacr07.KanColleWrapper/Models/MapArea.cs new file mode 100644 index 000000000..e80f4c712 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/MapArea.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models.Raw; + +namespace Grabacr07.KanColleWrapper.Models +{ + public class MapArea : RawDataWrapper, IIdentifiable + { + public int Id { get; private set; } + + public string Name { get; private set; } + + public MapArea(kcsapi_mst_maparea maparea) + : base(maparea) + { + this.Id = maparea.api_id; + this.Name = maparea.api_name; + } + + #region static members + + private static MapArea dummy = new MapArea(new kcsapi_mst_maparea() + { + api_id = 0, + api_name = "???", + }); + + public static MapArea Dummy + { + get { return dummy; } + } + + #endregion + } +} diff --git a/Grabacr07.KanColleWrapper/Models/MapInfo.cs b/Grabacr07.KanColleWrapper/Models/MapInfo.cs new file mode 100644 index 000000000..b99d52f6c --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/MapInfo.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models.Raw; + +namespace Grabacr07.KanColleWrapper.Models +{ + public class MapInfo : RawDataWrapper, IIdentifiable + { + public int Id { get; private set; } + + public string Name { get; private set; } + + public int MapAreaId { get; private set; } + + public MapArea MapArea { get; private set; } + + public int IdInEachMapArea { get; private set; } + + public int Level { get; private set; } + + public string OperationName { get; private set; } + + public string OperationSummary { get; private set; } + + public int RequiredDefeatCount { get; private set; } + + public MapInfo(kcsapi_mst_mapinfo mapinfo, MasterTable mapAreas) + : base(mapinfo) + { + this.Id = mapinfo.api_id; + this.Name = mapinfo.api_name; + this.MapAreaId = mapinfo.api_maparea_id; + this.MapArea = mapAreas[mapinfo.api_maparea_id] ?? MapArea.Dummy; + this.IdInEachMapArea = mapinfo.api_no; + this.Level = mapinfo.api_level; + this.OperationName = mapinfo.api_opetext; + this.OperationSummary = mapinfo.api_infotext; + this.RequiredDefeatCount = mapinfo.api_required_defeat_count ?? 1; + } + + #region static members + + private static MapInfo dummy = new MapInfo(new kcsapi_mst_mapinfo() + { + api_id = 0, + api_name = "???", + api_maparea_id = 0, + api_no = 0, + api_level = 0, + }, new MasterTable()); + + public static MapInfo Dummy + { + get { return dummy; } + } + + #endregion + } +} diff --git a/Grabacr07.KanColleWrapper/Models/Mission.cs b/Grabacr07.KanColleWrapper/Models/Mission.cs new file mode 100644 index 000000000..9e4aa9c75 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Mission.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Models.Raw; + +namespace Grabacr07.KanColleWrapper.Models +{ + [DebuggerDisplay("[{Id}] {Title} - {Detail}")] + public class Mission : RawDataWrapper, IIdentifiable + { + public int Id { get; private set; } + + public string Title { get; private set; } + + public string Detail { get; private set; } + + public Mission(kcsapi_mission mission) + : base(mission) + { + this.Id = mission.api_id; + this.Title = mission.api_name; + this.Detail = mission.api_details; + } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/ModernizableStatus.cs b/Grabacr07.KanColleWrapper/Models/ModernizableStatus.cs index 38cbaf31a..6fa71c36f 100644 --- a/Grabacr07.KanColleWrapper/Models/ModernizableStatus.cs +++ b/Grabacr07.KanColleWrapper/Models/ModernizableStatus.cs @@ -6,78 +6,78 @@ namespace Grabacr07.KanColleWrapper.Models { - /// - /// 近代化改修による数値の上昇が可能なステータスを表します。 - /// - public struct ModernizableStatus - { - /// - /// 艦娘ごとに定義されたステータスの最大値を取得します。 - /// - public int Max { get; internal set; } + /// + /// 近代化改修による数値の上昇が可能なステータスを表します。 + /// + public struct ModernizableStatus + { + /// + /// 艦娘ごとに定義されたステータスの最大値を取得します。 + /// + public int Max { get; internal set; } - /// - /// 艦娘ごとに定義されたステータスの初期値を取得します。 - /// - public int Default { get; internal set; } + /// + /// 艦娘ごとに定義されたステータスの初期値を取得します。 + /// + public int Default { get; internal set; } - /// - /// 近代化改修による現在の上昇値を取得します。 - /// - public int Upgraded { get; internal set; } + /// + /// 近代化改修による現在の上昇値を取得します。 + /// + public int Upgraded { get; internal set; } - /// - /// 近代化改修によって上昇した分を含む現在のステータス値を取得します。 - /// - public int Current - { - get { return this.Default + this.Upgraded; } - } + /// + /// 近代化改修によって上昇した分を含む現在のステータス値を取得します。 + /// + public int Current + { + get { return this.Default + this.Upgraded; } + } - /// - /// このステータスが上限に達するのに必要な値を取得します。 - /// - public int Shortfall - { - get { return this.Max - this.Current; } - } + /// + /// このステータスが上限に達するのに必要な値を取得します。 + /// + public int Shortfall + { + get { return this.Max - this.Current; } + } - /// - /// このステータスが上限に達しているかどうかを示す値を取得します。 - /// - public bool IsMax - { - get { return this.Max <= this.Current; } - } + /// + /// このステータスが上限に達しているかどうかを示す値を取得します。 + /// + public bool IsMax + { + get { return this.Max <= this.Current; } + } - internal ModernizableStatus(int[] status, int upgraded) - : this() - { - if (status.Length == 2) - { - this.Default = status[0]; - this.Max = status[1]; - } + internal ModernizableStatus(int[] status, int upgraded) + : this() + { + if (status.Length == 2) + { + this.Default = status[0]; + this.Max = status[1]; + } - this.Upgraded = upgraded; - } + this.Upgraded = upgraded; + } - public override string ToString() - { - return string.Format("Status = {0}->{1}, Current = {2}{3}", this.Default, this.Max, this.Current, this.IsMax ? "(max)" : ""); - } + public override string ToString() + { + return string.Format("Status = {0}->{1}, Current = {2}{3}", this.Default, this.Max, this.Current, this.IsMax ? "(max)" : ""); + } - #region static members + #region static members - private static readonly ModernizableStatus dummy = new ModernizableStatus(new[] { -1, -1 }, 0); + private static ModernizableStatus dummy = new ModernizableStatus(new[] { -1, -1 }, 0); - public static ModernizableStatus Dummy - { - get { return dummy; } - } + public static ModernizableStatus Dummy + { + get { return dummy; } + } - #endregion - } + #endregion + } } diff --git a/Grabacr07.KanColleWrapper/Models/Quest.cs b/Grabacr07.KanColleWrapper/Models/Quest.cs index 04d903bff..af450072e 100644 --- a/Grabacr07.KanColleWrapper/Models/Quest.cs +++ b/Grabacr07.KanColleWrapper/Models/Quest.cs @@ -51,10 +51,7 @@ public QuestProgress Progress /// public string Title { - get - { - return KanColleClient.Current.Translations.GetTranslation(RawData.api_title, TranslationType.QuestTitle, this.RawData); - } + get { return KanColleClient.Current.Translations.GetTranslation(RawData.api_title, TranslationType.QuestTitle, this.RawData, this.RawData.api_no); } } /// @@ -62,10 +59,7 @@ public string Title /// public string Detail { - get - { - return KanColleClient.Current.Translations.GetTranslation(RawData.api_detail, TranslationType.QuestDetail, this.RawData); - } + get { return KanColleClient.Current.Translations.GetTranslation(RawData.api_detail, TranslationType.QuestDetail, this.RawData, this.RawData.api_no); } } diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battle.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battle.cs new file mode 100644 index 000000000..2d4acee3d --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battle.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_battle + { + public int api_dock_id { get; set; } + } + // ReSharper restore InconsistentNaming + + + //public class Api_Data + //{ + // public int api_dock_id { get; set; } + // public int[] api_ship_ke { get; set; } + // public int[] api_ship_lv { get; set; } + // public int[] api_nowhps { get; set; } + // public int[] api_maxhps { get; set; } + // public int api_midnight_flag { get; set; } + // public int[][] api_eSlot { get; set; } + // public int[][] api_eKyouka { get; set; } + // public int[][] api_fParam { get; set; } + // public int[][] api_eParam { get; set; } + // public int[] api_search { get; set; } + // public int[] api_formation { get; set; } + // public int[] api_stage_flag { get; set; } + // public Api_Kouku api_kouku { get; set; } + // public int api_support_flag { get; set; } + // public object api_support_info { get; set; } + // public int api_opening_flag { get; set; } + // public Api_Opening_Atack api_opening_atack { get; set; } + // public int[] api_hourai_flag { get; set; } + // public Api_Hougeki1 api_hougeki1 { get; set; } + // public object api_hougeki2 { get; set; } + // public object api_hougeki3 { get; set; } + // public Api_Raigeki api_raigeki { get; set; } + //} + + //public class Api_Kouku + //{ + // public int[][] api_plane_from { get; set; } + // public Api_Stage1 api_stage1 { get; set; } + // public object api_stage2 { get; set; } + // public object api_stage3 { get; set; } + //} + + //public class Api_Stage1 + //{ + // public int api_f_count { get; set; } + // public int api_f_lostcount { get; set; } + // public int api_e_count { get; set; } + // public int api_e_lostcount { get; set; } + // public int api_disp_seiku { get; set; } + // public int[] api_touch_plane { get; set; } + //} + + //public class Api_Opening_Atack + //{ + // public int[] api_frai { get; set; } + // public int[] api_erai { get; set; } + // public int[] api_fdam { get; set; } + // public float[] api_edam { get; set; } + // public int[] api_fydam { get; set; } + // public int[] api_eydam { get; set; } + // public int[] api_fcl { get; set; } + // public int[] api_ecl { get; set; } + //} + + //public class Api_Hougeki1 + //{ + // public int[] api_at_list { get; set; } + // public int[] api_at_type { get; set; } + // public object[] api_df_list { get; set; } + // public object[] api_si_list { get; set; } + // public object[] api_cl_list { get; set; } + // public object[] api_damage { get; set; } + //} + + //public class Api_Raigeki + //{ + // public int[] api_frai { get; set; } + // public int[] api_erai { get; set; } + // public int[] api_fdam { get; set; } + // public float[] api_edam { get; set; } + // public int[] api_fydam { get; set; } + // public int[] api_eydam { get; set; } + // public int[] api_fcl { get; set; } + // public int[] api_ecl { get; set; } + //} + +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battleresult.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battleresult.cs index 93fcf6538..18e5c4c61 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battleresult.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battleresult.cs @@ -6,25 +6,45 @@ namespace Grabacr07.KanColleWrapper.Models.Raw { - // ReSharper disable InconsistentNaming - public class kcsapi_battleresult - { - public string api_win_rank { get; set; } - public string api_quest_name { get; set; } - public int api_quest_level { get; set; } - public kcsapi_enemyinfo api_enemy_info { get; set; } - public kcsapi_getship2 api_get_ship { get; set; } - } + // ReSharper disable InconsistentNaming + public class kcsapi_battleresult + { + public int[] api_ship_id { get; set; } + public string api_win_rank { get; set; } + public int api_get_exp { get; set; } + public int api_mvp { get; set; } + public int api_member_lv { get; set; } + public int api_member_exp { get; set; } + public int api_get_base_exp { get; set; } + public int[] api_get_ship_exp { get; set; } + public int[][] api_get_exp_lvup { get; set; } + public int api_dests { get; set; } + public int api_destsf { get; set; } + public int[] api_lost_flag { get; set; } + public string api_quest_name { get; set; } + public int api_quest_level { get; set; } + public kcsapi_battleresult_enemyinfo api_enemy_info { get; set; } + public int api_first_clear { get; set; } + public int[] api_get_flag { get; set; } + public kcsapi_battleresult_getship api_get_ship { get; set; } + public int api_get_eventflag { get; set; } + public int api_get_exmap_rate { get; set; } + public int api_get_exmap_useitem_id { get; set; } + } - public class kcsapi_getship2 - { - public int api_ship_id { get; set; } - public string api_ship_name { get; set; } - } + public class kcsapi_battleresult_enemyinfo + { + public string api_level { get; set; } + public string api_rank { get; set; } + public string api_deck_name { get; set; } + } - public class kcsapi_enemyinfo - { - public string api_deck_name { get; set; } - } - // ReSharper restore InconsistentNaming + public class kcsapi_battleresult_getship + { + public int api_ship_id { get; set; } + public string api_ship_type { get; set; } + public string api_ship_name { get; set; } + public string api_ship_getmes { get; set; } + } + // ReSharper restore InconsistentNaming } \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle.cs new file mode 100644 index 000000000..a20affde5 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_combined_battle + { + public string api_deck_id { get; set; } + public int[] api_ship_ke { get; set; } + public int[] api_ship_lv { get; set; } + public int[] api_nowhps { get; set; } + public int[] api_maxhps { get; set; } + public int[] api_nowhps_combined { get; set; } + public int[] api_maxhps_combined { get; set; } + public int api_midnight_flag { get; set; } + public int[][] api_eSlot { get; set; } + public int[][] api_eKyouka { get; set; } + public int[][] api_fParam { get; set; } + public int[][] api_eParam { get; set; } + public int[][] api_fParam_combined { get; set; } + public int[] api_search { get; set; } + public object[] api_formation { get; set; } + public int[] api_stage_flag { get; set; } + public Api_Kouku api_kouku { get; set; } + public int api_support_flag { get; set; } + public object api_support_info { get; set; } + public int api_opening_flag { get; set; } + public object api_opening_atack { get; set; } + public int[] api_hourai_flag { get; set; } + public Api_Hougeki1 api_hougeki1 { get; set; } + public Api_Raigeki api_raigeki { get; set; } + public Api_Hougeki2 api_hougeki2 { get; set; } + public Api_Hougeki3 api_hougeki3 { get; set; } + } + + public class Api_Kouku + { + public int[][] api_plane_from { get; set; } + public Api_Stage1 api_stage1 { get; set; } + public Api_Stage2 api_stage2 { get; set; } + public Api_Stage3 api_stage3 { get; set; } + public Api_Stage3_Combined api_stage3_combined { get; set; } + } + + public class Api_Stage1 + { + public int api_f_count { get; set; } + public int api_f_lostcount { get; set; } + public int api_e_count { get; set; } + public int api_e_lostcount { get; set; } + public int api_disp_seiku { get; set; } + public int[] api_touch_plane { get; set; } + } + + public class Api_Stage2 + { + public int api_f_count { get; set; } + public int api_f_lostcount { get; set; } + public int api_e_count { get; set; } + public int api_e_lostcount { get; set; } + } + + public class Api_Stage3 + { + public int[] api_frai_flag { get; set; } + public int[] api_erai_flag { get; set; } + public int[] api_fbak_flag { get; set; } + public int[] api_ebak_flag { get; set; } + public int[] api_fcl_flag { get; set; } + public int[] api_ecl_flag { get; set; } + public int[] api_fdam { get; set; } + public int[] api_edam { get; set; } + } + + public class Api_Stage3_Combined + { + public int[] api_frai_flag { get; set; } + public int[] api_fbak_flag { get; set; } + public int[] api_fcl_flag { get; set; } + public float[] api_fdam { get; set; } + } + + public class Api_Hougeki1 + { + public int[] api_at_list { get; set; } + public int[] api_at_type { get; set; } + public object[] api_df_list { get; set; } + public object[] api_si_list { get; set; } + public object[] api_cl_list { get; set; } + public object[] api_damage { get; set; } + } + + public class Api_Raigeki + { + public int[] api_frai { get; set; } + public int[] api_erai { get; set; } + public int[] api_fdam { get; set; } + public float[] api_edam { get; set; } + public int[] api_fydam { get; set; } + public int[] api_eydam { get; set; } + public int[] api_fcl { get; set; } + public int[] api_ecl { get; set; } + } + + public class Api_Hougeki2 + { + public int[] api_at_list { get; set; } + public int[] api_at_type { get; set; } + public object[] api_df_list { get; set; } + public object[] api_si_list { get; set; } + public object[] api_cl_list { get; set; } + public object[] api_damage { get; set; } + } + + public class Api_Hougeki3 + { + public int[] api_at_list { get; set; } + public int[] api_at_type { get; set; } + public object[] api_df_list { get; set; } + public object[] api_si_list { get; set; } + public object[] api_cl_list { get; set; } + public object[] api_damage { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_airbattle.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_airbattle.cs new file mode 100644 index 000000000..2c467d794 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_airbattle.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_combined_battle_airbattle + { + public string api_deck_id { get; set; } + public int[] api_ship_ke { get; set; } + public int[] api_ship_lv { get; set; } + public int[] api_nowhps { get; set; } + public int[] api_maxhps { get; set; } + public int[] api_nowhps_combined { get; set; } + public int[] api_maxhps_combined { get; set; } + public int api_midnight_flag { get; set; } + public int[][] api_eSlot { get; set; } + public int[][] api_eKyouka { get; set; } + public int[][] api_fParam { get; set; } + public int[][] api_eParam { get; set; } + public int[][] api_fParam_combined { get; set; } + public int[] api_search { get; set; } + public object[] api_formation { get; set; } + public int[] api_stage_flag { get; set; } + public Api_Kouku api_kouku { get; set; } + public int api_support_flag { get; set; } + public object api_support_info { get; set; } + public int[] api_stage_flag2 { get; set; } + public Api_Kouku2 api_kouku2 { get; set; } + } + + public class Api_Kouku2 + { + public int[][] api_plane_from { get; set; } + public Api_Stage11 api_stage1 { get; set; } + public Api_Stage21 api_stage2 { get; set; } + public Api_Stage31 api_stage3 { get; set; } + public Api_Stage3_Combined1 api_stage3_combined { get; set; } + } + + public class Api_Stage11 + { + public int api_f_count { get; set; } + public int api_f_lostcount { get; set; } + public int api_e_count { get; set; } + public int api_e_lostcount { get; set; } + public int api_disp_seiku { get; set; } + public int[] api_touch_plane { get; set; } + } + + public class Api_Stage21 + { + public int api_f_count { get; set; } + public int api_f_lostcount { get; set; } + public int api_e_count { get; set; } + public int api_e_lostcount { get; set; } + } + + public class Api_Stage31 + { + public int[] api_frai_flag { get; set; } + public int[] api_erai_flag { get; set; } + public int[] api_fbak_flag { get; set; } + public int[] api_ebak_flag { get; set; } + public int[] api_fcl_flag { get; set; } + public int[] api_ecl_flag { get; set; } + public int[] api_fdam { get; set; } + public int[] api_edam { get; set; } + } + + public class Api_Stage3_Combined1 + { + public int[] api_frai_flag { get; set; } + public int[] api_fbak_flag { get; set; } + public int[] api_fcl_flag { get; set; } + public int[] api_fdam { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_battleresult.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_battleresult.cs new file mode 100644 index 000000000..269b3a30c --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_combined_battle_battleresult.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_combined_battle_battleresult + { + public int[] api_ship_id { get; set; } + public string api_win_rank { get; set; } + public int api_get_exp { get; set; } + public int api_mvp { get; set; } + public int api_mvp_combined { get; set; } + public int api_member_lv { get; set; } + public int api_member_exp { get; set; } + public int api_get_base_exp { get; set; } + public int[] api_get_ship_exp { get; set; } + public int[] api_get_ship_exp_combined { get; set; } + public int[][] api_get_exp_lvup { get; set; } + public int[][] api_get_exp_lvup_combined { get; set; } + public int api_dests { get; set; } + public int api_destsf { get; set; } + public string api_quest_name { get; set; } + public int api_quest_level { get; set; } + public Api_Enemy_Info api_enemy_info { get; set; } + public int api_first_clear { get; set; } + public int[] api_get_flag { get; set; } + public Api_Get_Ship api_get_ship { get; set; } + public int api_get_exmap_rate { get; set; } + public int api_get_exmap_useitem_id { get; set; } + public int api_escape_flag { get; set; } + public Api_Escape api_escape { get; set; } + } + + public class Api_Enemy_Info + { + public string api_level { get; set; } + public string api_rank { get; set; } + public string api_deck_name { get; set; } + } + + public class Api_Get_Ship + { + public int api_ship_id { get; set; } + public string api_ship_type { get; set; } + public string api_ship_name { get; set; } + public string api_ship_getmes { get; set; } + } + + public class Api_Escape + { + public int[] api_escape_idx { get; set; } + public int[] api_tow_idx { get; set; } + } + + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createitem.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createitem.cs index fccf7f74c..c799677c6 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createitem.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createitem.cs @@ -9,12 +9,15 @@ namespace Grabacr07.KanColleWrapper.Models.Raw // ReSharper disable InconsistentNaming public class kcsapi_createitem { + public int api_id { get; set; } + public int api_slotitem_id { get; set; } public int api_create_flag { get; set; } public int api_shizai_flag { get; set; } public kcsapi_slotitem api_slot_item { get; set; } public int[] api_material { get; set; } public int api_type3 { get; set; } public int[] api_unsetslot { get; set; } + public string api_fdata { get; set; } } // ReSharper restore InconsistentNaming } \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyitem2.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyitem2.cs new file mode 100644 index 000000000..c39355e89 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyitem2.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_destroyitem2 + { + public int[] api_get_material { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyship.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyship.cs index 137f99319..023b6d8c6 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyship.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyship.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleWrapper.Models.Raw -{ - // ReSharper disable InconsistentNaming - public class kcsapi_destroyship - { - public int[] api_material { get; set; } - } - // ReSharper restore InconsistentNaming -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_destroyship + { + public int[] api_material { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_hensei_combined.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_hensei_combined.cs new file mode 100644 index 000000000..ab5dcab22 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_hensei_combined.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_hensei_combined + { + public int api_combined { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock_getship.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock_getship.cs index 685acef46..d881ac0c5 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock_getship.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock_getship.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleWrapper.Models.Raw -{ - // ReSharper disable InconsistentNaming - public class kcsapi_kdock_getship - { - public int api_id { get; set; } - public int api_ship_id { get; set; } - public kcsapi_kdock[] api_kdock { get; set; } - public kcsapi_ship2 api_ship { get; set; } - public kcsapi_slotitem[] api_slotitem { get; set; } - } - // ReSharper restore InconsistentNaming -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_kdock_getship + { + public int api_id { get; set; } + public int api_ship_id { get; set; } + public kcsapi_kdock[] api_kdock { get; set; } + public kcsapi_ship2 api_ship { get; set; } + public kcsapi_slotitem[] api_slotitem { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_map_start.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_map_start.cs new file mode 100644 index 000000000..dcc359e90 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_map_start.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_map_start + { + public int api_rashin_flg { get; set; } + public int api_rashin_id { get; set; } + public int api_maparea_id { get; set; } + public int api_mapinfo_no { get; set; } + public int api_no { get; set; } + public int api_color_no { get; set; } + public int api_event_id { get; set; } + public int api_event_kind { get; set; } + public int api_next { get; set; } + public int api_bosscell_no { get; set; } + public int api_bosscomp { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission.cs new file mode 100644 index 000000000..65cca4049 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_mission + { + public int api_id { get; set; } + public int api_maparea_id { get; set; } + public string api_name { get; set; } + public string api_details { get; set; } + public int api_time { get; set; } + public int api_difficulty { get; set; } + public float api_use_fuel { get; set; } + public float api_use_bull { get; set; } + public int[] api_win_item1 { get; set; } + public int[] api_win_item2 { get; set; } + } + // ReSharper restore InconsistentNaming +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission_result.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission_result.cs new file mode 100644 index 000000000..b3425e452 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission_result.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_mission_result + { + public int[] api_ship_id { get; set; } + public int api_clear_result { get; set; } + public int api_get_exp { get; set; } + public int api_member_lv { get; set; } + public int api_member_exp { get; set; } + public int[] api_get_ship_exp { get; set; } + public int[][] api_get_exp_lvup { get; set; } + public string api_maparea_name { get; set; } + public string api_detail { get; set; } + public string api_quest_name { get; set; } + public int api_quest_level { get; set; } + public int[] api_get_material { get; set; } + public int[] api_useitem_flag { get; set; } + public kcsapi_mission_result_item api_get_item1 { get; set; } + } + + + public class kcsapi_mission_result_item + { + public int api_useitem_id { get; set; } + public object api_useitem_name { get; set; } + public int api_useitem_count { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_maparea.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_maparea.cs new file mode 100644 index 000000000..06b5d0282 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_maparea.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_mst_maparea + { + public int api_id { get; set; } + public string api_name { get; set; } + public int api_type { get; set; } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_mapinfo.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_mapinfo.cs new file mode 100644 index 000000000..c26b36f20 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_mapinfo.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_mst_mapinfo + { + public int api_id { get; set; } + public int api_maparea_id { get; set; } + public int api_no { get; set; } + public string api_name { get; set; } + public int api_level { get; set; } + public string api_opetext { get; set; } + public string api_infotext { get; set; } + public int[] api_item { get; set; } + public int? api_max_maphp { get; set; } + public int? api_required_defeat_count { get; set; } + public int[] api_sally_flag { get; set; } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_ship.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_ship.cs index 51056ef55..fc1b3c157 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_ship.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_ship.cs @@ -13,51 +13,51 @@ public class kcsapi_mst_ship public string api_name { get; set; } public string api_yomi { get; set; } public int api_stype { get; set; } - public int api_ctype { get; set; } - public int api_cnum { get; set; } - public string api_enqflg { get; set; } + // public int api_ctype { get; set; } + // public int api_cnum { get; set; } + // public string api_enqflg { get; set; } public int api_afterlv { get; set; } public string api_aftershipid { get; set; } public int[] api_taik { get; set; } public int[] api_souk { get; set; } - public int[] api_tous { get; set; } + // public int[] api_tous { get; set; } public int[] api_houg { get; set; } public int[] api_raig { get; set; } - public int[] api_baku { get; set; } + // public int[] api_baku { get; set; } public int[] api_tyku { get; set; } - public int[] api_atap { get; set; } - public int[] api_tais { get; set; } - public int[] api_houm { get; set; } - public int[] api_raim { get; set; } - public int[] api_kaih { get; set; } - public int[] api_houk { get; set; } - public int[] api_raik { get; set; } - public int[] api_bakk { get; set; } - public int[] api_saku { get; set; } - public int[] api_sakb { get; set; } + // public int[] api_atap { get; set; } + // public int[] api_tais { get; set; } + // public int[] api_houm { get; set; } + // public int[] api_raim { get; set; } + // public int[] api_kaih { get; set; } + // public int[] api_houk { get; set; } + // public int[] api_raik { get; set; } + // public int[] api_bakk { get; set; } + // public int[] api_saku { get; set; } + // public int[] api_sakb { get; set; } public int[] api_luck { get; set; } - public int api_sokuh { get; set; } + // public int api_sokuh { get; set; } public int api_soku { get; set; } public int api_leng { get; set; } - public int[] api_grow { get; set; } + // public int[] api_grow { get; set; } public int api_slot_num { get; set; } public int[] api_maxeq { get; set; } - public int[] api_defeq { get; set; } + // public int[] api_defeq { get; set; } public int api_buildtime { get; set; } public int[] api_broken { get; set; } public int[] api_powup { get; set; } - public int[] api_gumax { get; set; } + // public int[] api_gumax { get; set; } public int api_backs { get; set; } public string api_getmes { get; set; } - public object api_homemes { get; set; } - public object api_gomes { get; set; } - public object api_gomes2 { get; set; } - public string api_sinfo { get; set; } + // public object api_homemes { get; set; } + // public object api_gomes { get; set; } + // public object api_gomes2 { get; set; } + // public string api_sinfo { get; set; } public int api_afterfuel { get; set; } public int api_afterbull { get; set; } - public object[] api_touchs { get; set; } - public object api_missions { get; set; } - public object api_systems { get; set; } + // public object[] api_touchs { get; set; } + // public object api_missions { get; set; } + // public object api_systems { get; set; } public int api_fuel_max { get; set; } public int api_bull_max { get; set; } public int api_voicef { get; set; } diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_port.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_port.cs index 8dd904667..c9806f706 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_port.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_port.cs @@ -14,6 +14,7 @@ public class kcsapi_port public kcsapi_ndock[] api_ndock { get; set; } public kcsapi_ship2[] api_ship { get; set; } public kcsapi_basic api_basic { get; set; } + public int api_combined_flag { get; set; } //public Api_Log[] api_log { get; set; } } diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_powerup.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_powerup.cs index 0e7b07595..73f999f42 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_powerup.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_powerup.cs @@ -1,19 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Grabacr07.KanColleWrapper.Models.Raw -{ - // ReSharper disable InconsistentNaming - public class kcsapi_powerup - { - public int api_powerup_flag { get; set; } - - public kcsapi_ship2 api_ship { get; set; } - - public kcsapi_deck[] api_deck { get; set; } - } - // ReSharper restore InconsistentNaming -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + public class kcsapi_powerup + { + public int api_powerup_flag { get; set; } + + public kcsapi_ship2 api_ship { get; set; } + + public kcsapi_deck[] api_deck { get; set; } + } + // ReSharper restore InconsistentNaming +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slot.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slot.cs new file mode 100644 index 000000000..93b89514a --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slot.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +// ReSharper disable InconsistentNaming + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_remodel_slot + { + public int api_remodel_flag { get; set; } + public int[] api_remodel_id { get; set; } + public int[] api_after_material { get; set; } + public string api_voice_id { get; set; } + public kcsapi_remodel_after_slot api_after_slot { get; set; } + public int[] api_use_slot_id { get; set; } + } + + public class kcsapi_remodel_after_slot + { + public int api_id { get; set; } + public int api_slotitem_id { get; set; } + public int api_locked { get; set; } + public int api_level { get; set; } + } +} diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist.cs new file mode 100644 index 000000000..d5b8f114c --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +// ReSharper disable InconsistentNaming + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_remodel_slotlist + { + public int api_id { get; set; } + public int api_slot_id { get; set; } + public int api_req_fuel { get; set; } + public int api_req_bull { get; set; } + public int api_req_steel { get; set; } + public int api_req_bauxite { get; set; } + public int api_req_buildkit { get; set; } + public int api_req_remodelkit { get; set; } + public int api_req_slot_id { get; set; } + public int api_req_slot_num { get; set; } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist_detail.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist_detail.cs new file mode 100644 index 000000000..a39041820 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist_detail.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +// ReSharper disable InconsistentNaming + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_remodel_slotlist_detail + { + public int api_req_buildkit { get; set; } + public int api_req_remodelkit { get; set; } + public int api_certain_buildkit { get; set; } + public int api_certain_remodelkit { get; set; } + public int api_req_slot_id { get; set; } + public int api_req_slot_num { get; set; } + public int api_change_flag { get; set; } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship2.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship2.cs index cfe344122..1cdb8e34f 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship2.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship2.cs @@ -35,6 +35,7 @@ public class kcsapi_ship2 public int[] api_sakuteki { get; set; } public int[] api_lucky { get; set; } public int api_locked { get; set; } + public int api_sally_area { get; set; } } // ReSharper restore InconsistentNaming } diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship_deck.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship_deck.cs new file mode 100644 index 000000000..70cdbdf4b --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship_deck.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + // ReSharper disable InconsistentNaming + + public class kcsapi_ship_deck + { + public kcsapi_ship2[] api_ship_data { get; set; } + public kcsapi_deck[] api_deck_data { get; set; } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slotitem.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slotitem.cs index a0b961c8a..4487e7f7a 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slotitem.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slotitem.cs @@ -1,16 +1,16 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; +// ReSharper disable InconsistentNaming namespace Grabacr07.KanColleWrapper.Models.Raw { - // ReSharper disable InconsistentNaming public class kcsapi_slotitem { public int api_id { get; set; } public int api_slotitem_id { get; set; } + public int api_locked { get; set; } + public int api_level { get; set; } } - // ReSharper restore InconsistentNaming } diff --git a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs index 6bbe938bf..0588fe233 100644 --- a/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs +++ b/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs @@ -14,6 +14,8 @@ public class kcsapi_start2 public kcsapi_mst_useitem[] api_mst_useitem { get; set; } public kcsapi_mst_stype[] api_mst_stype { get; set; } public kcsapi_mst_slotitem_equiptype[] api_mst_slotitem_equiptype { get; set; } + public kcsapi_mst_maparea[] api_mst_maparea { get; set; } + public kcsapi_mst_mapinfo[] api_mst_mapinfo { get; set; } // ↓ とりあえずそのまま。 @@ -23,11 +25,9 @@ public class kcsapi_start2 public Api_Mst_Furnituregraph[] api_mst_furnituregraph { get; set; } public Api_Mst_Payitem[] api_mst_payitem { get; set; } public Api_Mst_Item_Shop api_mst_item_shop { get; set; } - public Api_Mst_Maparea[] api_mst_maparea { get; set; } - public Api_Mst_Mapinfo[] api_mst_mapinfo { get; set; } public Api_Mst_Mapbgm[] api_mst_mapbgm { get; set; } public Api_Mst_Mapcell[] api_mst_mapcell { get; set; } - public Api_Mst_Mission[] api_mst_mission { get; set; } + public kcsapi_mission[] api_mst_mission { get; set; } public Api_Mst_Const api_mst_const { get; set; } public Api_Mst_Shipupgrade[] api_mst_shipupgrade { get; set; } } @@ -294,20 +294,6 @@ public class Api_Mst_Mapcell public int api_color_no { get; set; } } - public class Api_Mst_Mission - { - public int api_id { get; set; } - public int api_maparea_id { get; set; } - public string api_name { get; set; } - public string api_details { get; set; } - public int api_time { get; set; } - public int api_difficulty { get; set; } - public float api_use_fuel { get; set; } - public float api_use_bull { get; set; } - public int[] api_win_item1 { get; set; } - public int[] api_win_item2 { get; set; } - } - public class Api_Mst_Shipupgrade { public int api_id { get; set; } diff --git a/Grabacr07.KanColleWrapper/Models/RepairingCompletedEventArgs.cs b/Grabacr07.KanColleWrapper/Models/RepairingCompletedEventArgs.cs index 85cf90896..bb9fc6bbe 100644 --- a/Grabacr07.KanColleWrapper/Models/RepairingCompletedEventArgs.cs +++ b/Grabacr07.KanColleWrapper/Models/RepairingCompletedEventArgs.cs @@ -13,9 +13,15 @@ public class RepairingCompletedEventArgs /// public int DockId { get; private set; } - public RepairingCompletedEventArgs(int id) + /// + /// 入渠が完了した艦娘を取得します。 + /// + public Ship Ship { get; private set; } + + public RepairingCompletedEventArgs(int id, Ship ship) { this.DockId = id; + this.Ship = ship; } } } diff --git a/Grabacr07.KanColleWrapper/Models/RepairingDock.cs b/Grabacr07.KanColleWrapper/Models/RepairingDock.cs index 6e1e7f49d..bb0342f4f 100644 --- a/Grabacr07.KanColleWrapper/Models/RepairingDock.cs +++ b/Grabacr07.KanColleWrapper/Models/RepairingDock.cs @@ -10,7 +10,7 @@ namespace Grabacr07.KanColleWrapper.Models /// /// 入渠ドックを表します。 /// - public class RepairingDock : TimerNotificator, IIdentifiable + public class RepairingDock : TimerNotifier, IIdentifiable { private readonly Homeport homeport; private bool notificated; @@ -77,19 +77,24 @@ private set #region Ship 変更通知プロパティ - private Ship _Ship; + private Ship target; /// /// 入渠中の艦娘の情報を取得します。 /// public Ship Ship { - get { return this._Ship; } + get { return this.target; } private set { - if (this._Ship != value) + if (this.target != value) { - this._Ship = value; + var oldShip = this.target; + var newShip = value; + if (oldShip != null) oldShip.Situation &= ~ShipSituation.Repair; + if (newShip != null) newShip.Situation |= ShipSituation.Repair; + + this.target = value; this.RaisePropertyChanged(); } } @@ -181,14 +186,16 @@ protected override void Tick() if (this.CompleteTime.HasValue) { - var remaining = this.CompleteTime.Value - TimeSpan.FromMinutes(1.0) - DateTimeOffset.Now; + var remaining = this.CompleteTime.Value - DateTimeOffset.Now; if (remaining.Ticks < 0) remaining = TimeSpan.Zero; this.Remaining = remaining; - if (!this.notificated && this.Completed != null && remaining.Ticks <= 0) + if (!this.notificated + && this.Completed != null + && remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime)) { - this.Completed(this, new RepairingCompletedEventArgs(this.Id)); + this.Completed(this, new RepairingCompletedEventArgs(this.Id, this.Ship)); this.notificated = true; } } diff --git a/Grabacr07.KanColleWrapper/Models/Ship.cs b/Grabacr07.KanColleWrapper/Models/Ship.cs index e9f2789b6..3b41a8015 100644 --- a/Grabacr07.KanColleWrapper/Models/Ship.cs +++ b/Grabacr07.KanColleWrapper/Models/Ship.cs @@ -21,7 +21,10 @@ public class Ship : RawDataWrapper, IIdentifiable 185, 190, 195, 200, 205, 210, 225, 230, 235, 240, 245, 250, 255, 260, 265, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 345, 350, 355, 360, 365, 370, 375, 380, 385, 390, 395, 400, 405, 420, 425, 430, 435, 440, 445, 450, 455, 460, 465, 470, 475, 480, 485, 490, 505, 510, 515, 520, 525, 530, - 535, 540, 545, 550, 555, 560, 565, 570, 575, 580, 585, 600, 605, 610, 615, 620, 652, 630, 635, 635}; + 535, 540, 545, 550, 555, 560, 565, 570, 575, 580, 585, 600, 605, 610, 615, 620, 652, 630, 635, 635, + 650, 655, 660, 665, 670, 675, 680, 685, 690, 695, 700, 705, 710, 715, 720, 725, 730, 735, 740, 745, + 750, 755, 760, 765, 770, 775, 780, 785, 790, 795, 800, 805, 810, 815, 820, 825, 830, 835, 840, 845, + 850, 855, 860, 865, 870, 875, 880, 885, 890, 895, 900, 905, 910, 915}; /// /// この艦娘を識別する ID を取得します。 @@ -73,6 +76,7 @@ public int ExpForNextLevel get { return this.RawData.api_exp.Get(1) ?? 0; } } + #region HP 変更通知プロパティ private LimitedValue _HP; @@ -87,6 +91,15 @@ private set { this._HP = value; this.RaisePropertyChanged(); + + if (value.IsHeavilyDamage()) + { + this.Situation |= ShipSituation.HeavilyDamaged; + } + else + { + this.Situation &= ~ShipSituation.HeavilyDamaged; + } } } @@ -228,6 +241,45 @@ private set #endregion + #region Slots 変更通知プロパティ + + private ShipSlot[] _Slots; + + public ShipSlot[] Slots + { + get { return this._Slots; } + set + { + if (this._Slots != value) + { + this._Slots = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region EquippedSlots 変更通知プロパティ + + private ShipSlot[] _EquippedSlots; + + public ShipSlot[] EquippedSlots + { + get { return this._EquippedSlots; } + set + { + if (this._EquippedSlots != value) + { + this._EquippedSlots = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + /// /// 装備によるボーナスを含めた索敵ステータス値を取得します。 /// @@ -300,7 +352,7 @@ public string RepairDockTime { get { - return TimeSpan.FromSeconds(Math.Floor((this.HP.Maximum - this.HP.Current) * BaseRepairTime[Math.Min(this.Level, 99)] * this.Info.ShipType.RepairMultiplier) + 30).ToString(); + return TimeSpan.FromSeconds(Math.Floor((this.HP.Maximum - this.HP.Current) * BaseRepairTime[Math.Min(this.Level, 150)] * this.Info.ShipType.RepairMultiplier) + 30).ToString(); } } @@ -309,7 +361,7 @@ public string RepairFacilityTime get { // Time it takes to heal 1HP - double MinDockTime = Math.Floor(BaseRepairTime[Math.Min(this.Level, 99)] * this.Info.ShipType.RepairMultiplier) + 30; + double MinDockTime = Math.Floor(BaseRepairTime[Math.Min(this.Level, 150)] * this.Info.ShipType.RepairMultiplier) + 30; if (MinDockTime < 1200) return RepairDockTime; @@ -322,7 +374,6 @@ public bool IsDamaged { get { return (this.HP.Maximum - this.HP.Current) > 0; } } - public bool IsLightlyDamaged { get { return this.IsDamaged && (this.HP.Current / (double)this.HP.Maximum) > 0.5; } @@ -333,23 +384,26 @@ public bool IsBadlyDamaged get { return (this.HP.Current / (double)this.HP.Maximum) <= 0.25; } } - public SlotItem[] SlotItems { get; private set; } + /// + /// この艦が出撃した海域を識別する整数値を取得します。 + /// + public int SallyArea + { + get { return this.RawData.api_sally_area; } + } - #region OnSlot 変更通知プロパティ + #region Status 変更通知プロパティ - private int[] _OnSlot; + private ShipSituation situation; - /// - /// 各装備スロットの艦載機数を取得します。 - /// - public int[] OnSlot + public ShipSituation Situation { - get { return this._OnSlot; } - private set + get { return this.situation; } + set { - if (this._OnSlot != value) + if (this.situation != value) { - this._OnSlot = value; + this.situation = value; this.RaisePropertyChanged(); } } @@ -357,7 +411,6 @@ private set #endregion - internal Ship(Homeport parent, kcsapi_ship2 rawData) : base(rawData) { @@ -383,33 +436,32 @@ internal void Update(kcsapi_ship2 rawData) this.Luck = new ModernizableStatus(this.Info.RawData.api_luck, this.RawData.api_kyouka[4]); } - this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray(); - this.OnSlot = this.RawData.api_onslot; + this.Slots = this.RawData.api_slot + .Select(id => this.homeport.Itemyard.SlotItems[id]) + .Select((t, i) => new ShipSlot(t, this.Info.RawData.api_maxeq.Get(i) ?? 0, this.RawData.api_onslot.Get(i) ?? 0)) + .ToArray(); + this.EquippedSlots = this.Slots.Where(x => x.Equipped).ToArray(); // Minimum removes equipped values. - int EqAntiSub = 0, EqEvasion = 0, EqLineOfSight = 0; + this.AntiSub = new LimitedValue(this.RawData.api_taisen[0], this.RawData.api_taisen[1], this.RawData.api_taisen[0] - this.EquippedSlots.Sum(s => s.Item.Info.RawData.api_tais)); + this.Evasion = new LimitedValue(this.RawData.api_kaihi[0], this.RawData.api_kaihi[1], this.RawData.api_kaihi[0] - this.EquippedSlots.Sum(s => s.Item.Info.RawData.api_houk)); + this.LineOfSight = new LimitedValue(this.RawData.api_sakuteki[0], this.RawData.api_sakuteki[1], this.RawData.api_sakuteki[0] - this.EquippedSlots.Sum(s => s.Item.Info.RawData.api_saku)); - foreach (SlotItem item in this.SlotItems) + if (this.EquippedSlots.Any(x => x.Item.Info.Type == SlotItemType.応急修理要員)) { - if (item == null) - continue; - - EqAntiSub += item.Info.RawData.api_tais; - EqEvasion += item.Info.RawData.api_houk; - EqLineOfSight += item.Info.RawData.api_saku; + this.Situation |= ShipSituation.DamageControlled; + } + else + { + this.Situation &= ~ShipSituation.DamageControlled; } - - this.AntiSub = new LimitedValue(this.RawData.api_taisen[0], this.RawData.api_taisen[1], this.RawData.api_taisen[0] - EqAntiSub); - this.Evasion = new LimitedValue(this.RawData.api_kaihi[0], this.RawData.api_kaihi[1], this.RawData.api_kaihi[0] - EqEvasion); - this.LineOfSight = new LimitedValue(this.RawData.api_sakuteki[0], this.RawData.api_sakuteki[1], this.RawData.api_sakuteki[0] - EqLineOfSight); } - internal void Charge(int fuel, int bull, int[] onslot) { this.Fuel = this.Fuel.Update(fuel); this.Bull = this.Bull.Update(bull); - this.OnSlot = onslot; + for (var i = 0; i < this.Slots.Length; i++) this.Slots[i].Current = onslot.Get(i) ?? 0; } internal void Repair() diff --git a/Grabacr07.KanColleWrapper/Models/ShipInfo.cs b/Grabacr07.KanColleWrapper/Models/ShipInfo.cs index 16f2eea77..e053dc3d3 100644 --- a/Grabacr07.KanColleWrapper/Models/ShipInfo.cs +++ b/Grabacr07.KanColleWrapper/Models/ShipInfo.cs @@ -8,162 +8,162 @@ namespace Grabacr07.KanColleWrapper.Models { - /// - /// 艦娘の種類に基づく情報を表します。 - /// - public class ShipInfo : RawDataWrapper, IIdentifiable - { - private ShipType shipType; - - /// - /// 艦を一意に識別する ID を取得します。 - /// - public int Id - { - get { return this.RawData.api_id; } - } - - public int SortId - { - get { return this.RawData.api_sortno; } - } - - /// - /// 艦の名称を取得します。 - /// - public string Name - { - get - { - return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.Ships, this.RawData); - } - } + /// + /// 艦娘の種類に基づく情報を表します。 + /// + public class ShipInfo : RawDataWrapper, IIdentifiable + { + private ShipType shipType; + + /// + /// 艦を一意に識別する ID を取得します。 + /// + public int Id + { + get { return this.RawData.api_id; } + } + + public int SortId + { + get { return this.RawData.api_sortno; } + } + + /// + /// 艦の名称を取得します。 + /// + public string Name + { + get { return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.Ships, this.RawData); } + } /// /// Get the untranslated version of the name. If it is untranslated, return nothing. /// - public string UntranslatedName - { - get - { - return this.Name != RawData.api_name ? RawData.api_name : ""; - } - } - - /// - /// 艦種を取得します。 - /// - public ShipType ShipType - { - get { return shipType ?? (shipType = KanColleClient.Current.Master.ShipTypes[this.RawData.api_stype]) ?? ShipType.Dummy; } - } - - #region 用意したけど使わないっぽい? - - /// - /// 火力の最大値を取得します。 - /// - public int MaxFirepower - { - get { return this.RawData.api_houg.Get(1) ?? 0; } - } - - /// - /// 装甲の最大値を取得します。 - /// - public int MaxArmer - { - get { return this.RawData.api_souk.Get(1) ?? 0; } - } - - /// - /// 雷装の最大値を取得します。 - /// - public int MaxTorpedo - { - get { return this.RawData.api_raig.Get(1) ?? 0; } - } - - /// - /// 対空の最大値を取得します。 - /// - public int MaxAA - { - get { return this.RawData.api_tyku.Get(1) ?? 0; } - } - - - /// - /// 耐久値を取得します。 - /// - public int HP - { - get { return this.RawData.api_taik.Get(0) ?? 0; } - } - - /// - /// 回避の最大値を取得します。 - /// - public int MaxEvasion - { - get { return this.RawData.api_kaih.Get(1) ?? 0; } - } - - /// - /// 対潜の最大値を取得します (ASW: Anti-submarine warfare)。 - /// - public int MaxASW - { - get { return this.RawData.api_tais.Get(1) ?? 0; } - } - - /// - /// 索敵の最大値を取得します。 - /// - public int MaxLOS - { - get { return this.RawData.api_saku.Get(1) ?? 0; } - } - - #endregion - - /// - /// 速力を取得します。 - /// - public Speed Speed - { - get { return (Speed)this.RawData.api_sokuh; } - } - - /// - /// 次の改造が実施できるレベルを取得します。 - /// - public int? NextRemodelingLevel - { - get { return this.RawData.api_afterlv == 0 ? null : (int?)this.RawData.api_afterlv; } - } - - - internal ShipInfo(kcsapi_mst_ship rawData) : base(rawData) { } - - public override string ToString() - { - return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\"", this.Id, this.Name, this.ShipType.Name); - } - - #region static members - - private static readonly ShipInfo dummy = new ShipInfo(new kcsapi_mst_ship - { - api_id = 0, - api_name = "???" - }); - - public static ShipInfo Dummy - { - get { return dummy; } - } - - #endregion - } + public string UntranslatedName { + get { return this.Name != RawData.api_name ? RawData.api_name : ""; } + } + + /// + /// 艦種を取得します。 + /// + public ShipType ShipType + { + get { return this.shipType ?? (this.shipType = KanColleClient.Current.Master.ShipTypes[this.RawData.api_stype]) ?? ShipType.Dummy; } + } + + public int[] Slots + { + get { return this.RawData.api_maxeq; } + } + + #region 用意したけど使わないっぽい? + + /// + /// 火力の最大値を取得します。 + /// + public int MaxFirepower + { + get { return this.RawData.api_houg.Get(1) ?? 0; } + } + + /// + /// 装甲の最大値を取得します。 + /// + public int MaxArmer + { + get { return this.RawData.api_souk.Get(1) ?? 0; } + } + + /// + /// 雷装の最大値を取得します。 + /// + public int MaxTorpedo + { + get { return this.RawData.api_raig.Get(1) ?? 0; } + } + + /// + /// 対空の最大値を取得します。 + /// + public int MaxAA + { + get { return this.RawData.api_tyku.Get(1) ?? 0; } + } + + + /// + /// 耐久値を取得します。 + /// + public int HP + { + get { return this.RawData.api_taik.Get(0) ?? 0; } + } + + /* No longer in the API + /// + /// 回避の最大値を取得します。 + /// + public int MaxEvasion + { + get { return this.RawData.api_kaih.Get(1) ?? 0; } + } + + /// + /// 対潜の最大値を取得します (ASW: Anti-submarine warfare)。 + /// + public int MaxASW + { + get { return this.RawData.api_tais.Get(1) ?? 0; } + } + + /// + /// 索敵の最大値を取得します。 + /// + public int MaxLOS + { + get { return this.RawData.api_saku.Get(1) ?? 0; } + } + */ + + #endregion + + /// + /// 速力を取得します。 + /// + public ShipSpeed Speed + { + get { return (ShipSpeed)this.RawData.api_soku; } + } + + /// + /// 次の改造が実施できるレベルを取得します。 + /// + public int? NextRemodelingLevel + { + get { return this.RawData.api_afterlv == 0 ? null : (int?)this.RawData.api_afterlv; } + } + + + internal ShipInfo(kcsapi_mst_ship rawData) : base(rawData) { } + + public override string ToString() + { + return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\"", this.Id, this.Name, this.ShipType.Name); + } + + #region static members + + private static ShipInfo dummy = new ShipInfo(new kcsapi_mst_ship + { + api_id = 0, + api_name = "???" + }); + + public static ShipInfo Dummy + { + get { return dummy; } + } + + #endregion + } } diff --git a/Grabacr07.KanColleWrapper/Models/ShipSituation.cs b/Grabacr07.KanColleWrapper/Models/ShipSituation.cs new file mode 100644 index 000000000..d0ef1d98e --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/ShipSituation.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + [Flags] + public enum ShipSituation + { + None = 0, + //Sortie = 1, + Repair = 1 << 1, + Evacuation = 1 << 2, + Tow = 1 << 3, + //ModerateDamaged = 1 << 4, + HeavilyDamaged = 1 << 5, + DamageControlled = 1 << 6, + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/ShipSlot.cs b/Grabacr07.KanColleWrapper/Models/ShipSlot.cs new file mode 100644 index 000000000..b2bbce36a --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/ShipSlot.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; + +namespace Grabacr07.KanColleWrapper.Models +{ + public class ShipSlot : NotificationObject + { + public SlotItem Item { get; private set; } + + public int Maximum { get; private set; } + + public bool Equipped + { + get { return this.Item != null; } + } + + #region Current ύXʒmvpeB + + private int _Current; + + public int Current + { + get { return this._Current; } + set + { + if (this._Current != value) + { + this._Current = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public ShipSlot(SlotItem item, int maximum, int current) + { + this.Item = item; + this.Maximum = maximum; + this.Current = current; + } + } +} \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/Models/Speed.cs b/Grabacr07.KanColleWrapper/Models/ShipSpeed.cs similarity index 83% rename from Grabacr07.KanColleWrapper/Models/Speed.cs rename to Grabacr07.KanColleWrapper/Models/ShipSpeed.cs index ba7995f4c..ee7586542 100644 --- a/Grabacr07.KanColleWrapper/Models/Speed.cs +++ b/Grabacr07.KanColleWrapper/Models/ShipSpeed.cs @@ -9,16 +9,16 @@ namespace Grabacr07.KanColleWrapper.Models /// /// 速力を示す識別子を定義します。 /// - public enum Speed + public enum ShipSpeed { /// /// 低速。 /// - Low = 0, + Low = 5, /// /// 高速。 /// - Fast = 1, + Fast = 10, } } diff --git a/Grabacr07.KanColleWrapper/Models/ShipType.cs b/Grabacr07.KanColleWrapper/Models/ShipType.cs index 55cedb784..5f191ea2e 100644 --- a/Grabacr07.KanColleWrapper/Models/ShipType.cs +++ b/Grabacr07.KanColleWrapper/Models/ShipType.cs @@ -21,10 +21,7 @@ public int Id public string Name { - get - { - return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.ShipTypes, this.RawData, this.Id); - } + get { return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.ShipTypes, this.RawData, this.Id); } } public int SortNumber @@ -41,15 +38,17 @@ public double RepairMultiplier case ShipTypeId.Submarine: return 0.5; case ShipTypeId.HeavyCruiser: - case ShipTypeId.RepairShip: + case ShipTypeId.AerialCruiser: case ShipTypeId.FastBattleship: case ShipTypeId.LightAircraftCarrier: + case ShipTypeId.SubmarineTender: return 1.5; case ShipTypeId.Battleship: case ShipTypeId.Superdreadnought: case ShipTypeId.AerialBattleship: case ShipTypeId.AircraftCarrier: case ShipTypeId.ArmoredAircraftCarrier: + case ShipTypeId.RepairShip: return 2; default: return 1; @@ -66,7 +65,7 @@ public override string ToString() #region static members - private static readonly ShipType dummy = new ShipType(new kcsapi_mst_stype + private static ShipType dummy = new ShipType(new kcsapi_mst_stype { api_id = 999, api_sortno = 999, diff --git a/Grabacr07.KanColleWrapper/Models/ShipTypeId.cs b/Grabacr07.KanColleWrapper/Models/ShipTypeId.cs index 2b064b1d0..7e0ca0ded 100644 --- a/Grabacr07.KanColleWrapper/Models/ShipTypeId.cs +++ b/Grabacr07.KanColleWrapper/Models/ShipTypeId.cs @@ -103,6 +103,11 @@ public enum ShipTypeId /// /// 工作艦 /// - RepairShip = 19 + RepairShip = 19, + + /// + /// 潜水母艦 + /// + SubmarineTender = 20, } } diff --git a/Grabacr07.KanColleWrapper/Models/SlotItem.cs b/Grabacr07.KanColleWrapper/Models/SlotItem.cs index e9a1b4d89..4effce8df 100644 --- a/Grabacr07.KanColleWrapper/Models/SlotItem.cs +++ b/Grabacr07.KanColleWrapper/Models/SlotItem.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; -using System.Text; using System.Threading.Tasks; using Grabacr07.KanColleWrapper.Models.Raw; @@ -16,15 +14,42 @@ public int Id } public SlotItemInfo Info { get; private set; } + private bool IsLocked { get { return (this.RawData.api_locked > 0); } } - internal SlotItem(kcsapi_slotitem rawData) : base(rawData) + public int Level + { + get { return this.RawData.api_level; } + } + + public string LevelText + { + get { return this.Level >= 10 ? "★max" : this.Level >= 1 ? ("★+" + this.Level) : ""; } + } + + public string NameWithLevel + { + get { return string.Format("{0}{1}", this.Info.Name, this.Level >= 1 ? (" " + this.LevelText) : ""); } + } + + internal SlotItem(kcsapi_slotitem rawData) + : base(rawData) { this.Info = KanColleClient.Current.Master.SlotItems[this.RawData.api_slotitem_id] ?? SlotItemInfo.Dummy; } + + public void Remodel(int level, int masterId) + { + this.RawData.api_level = level; + this.Info = KanColleClient.Current.Master.SlotItems[masterId] ?? SlotItemInfo.Dummy; + + this.RaisePropertyChanged("Info"); + this.RaisePropertyChanged("Level"); + } + public override string ToString() { - return string.Format("ID = {0}, Name = \"{1}\"", this.Id, this.Info.Name); + return string.Format("ID = {0}, Name = \"{1}\", Level = {2}", this.Id, this.Info.Name, this.Level); } } } diff --git a/Grabacr07.KanColleWrapper/Models/SlotItemIconType.cs b/Grabacr07.KanColleWrapper/Models/SlotItemIconType.cs new file mode 100644 index 000000000..52fff4ede --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/SlotItemIconType.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models +{ + public enum SlotItemIconType + { + Unknown = 0, + + /// + /// 小口径主砲。 + /// + MainCanonLight = 1, + + /// + /// 中口径主砲。 + /// + MainCanonMedium = 2, + + /// + /// 大口径主砲。 + /// + MainCanonHeavy = 3, + + /// + /// 副砲。 + /// + SecondaryCanon = 4, + + /// + /// 魚雷。 + /// + Torpedo = 5, + + /// + /// 艦戦。 + /// + Fighter = 6, + + /// + /// 艦爆。 + /// + DiveBomber = 7, + + /// + /// 艦攻。 + /// + TorpedoBomber = 8, + + /// + /// 偵察機。 + /// + ReconPlane = 9, + + /// + /// 水上機。 + /// + ReconSeaplane = 10, + + /// + /// 電探。 + /// + Rader = 11, + + /// + /// 三式弾。 + /// + AAShell = 12, + + /// + /// 徹甲弾。 + /// + APShell = 13, + + /// + /// ダメコン。 + /// + DamageControl = 14, + + /// + /// 機銃。 + /// + AAGun = 15, + + /// + /// 高角砲。 + /// + HighAngleGun = 16, + + /// + /// 爆雷投射機。 + /// + ASW = 17, + + /// + /// ソナー。 + /// + Soner = 18, + + /// + /// 機関部強化。 + /// + EngineImprovement = 19, + + /// + /// 上陸用舟艇。 + /// + LandingCraft = 20, + + /// + /// オートジャイロ。 + /// + Autogyro = 21, + + /// + /// 指揮連絡機。 + /// + ArtillerySpotter = 22, + + /// + /// 増設バルジ。 + /// + AntiTorpedoBulge = 23, + + /// + /// 探照灯。 + /// + Searchlight = 24, + + /// + /// ドラム缶。 + /// + DrumCanister = 25, + + /// + /// 施設。 + /// + Facility = 26, + + /// + /// 照明弾。 + /// + Flare = 27, + + /// + /// 司令部施設。 + /// + FleetCommandFacility = 28, + + /// + /// 航空要員。 + /// + MaintenancePersonnel = 29, + + /// + /// 高射砲。 + /// + AntiAircraftFireDirector = 30, + + /// + /// ロケットランチャー。 + /// + RocketLauncher = 31, + + /// + /// 水上艦要員。 + /// + SurfaceShipPersonnel = 32, + + /// + /// 大型飛行艇。 + /// + FlyingBoat = 33, + } +} diff --git a/Grabacr07.KanColleWrapper/Models/SlotItemInfo.cs b/Grabacr07.KanColleWrapper/Models/SlotItemInfo.cs index 1fdb10468..b6673f862 100644 --- a/Grabacr07.KanColleWrapper/Models/SlotItemInfo.cs +++ b/Grabacr07.KanColleWrapper/Models/SlotItemInfo.cs @@ -14,6 +14,7 @@ namespace Grabacr07.KanColleWrapper.Models /// public class SlotItemInfo : RawDataWrapper, IIdentifiable { + private SlotItemType? type; private SlotItemIconType? iconType; private int? categoryId; @@ -24,18 +25,17 @@ public int Id public string Name { - get - { - return KanColleClient.Current.Translations.GetTranslation(this.RawData.api_name, TranslationType.Equipment, this.RawData); - } + get { return KanColleClient.Current.Translations.GetTranslation(this.RawData.api_name, TranslationType.Equipment, this.RawData); } } public string UntranslatedName { - get - { - return (this.RawData.api_name != this.Name ? this.RawData.api_name : ""); - } + get { return (this.RawData.api_name != this.Name ? this.RawData.api_name : ""); } + } + + public SlotItemType Type + { + get { return this.type ?? (SlotItemType)(this.type = (SlotItemType)(this.RawData.api_type.Get(2) ?? 0)); } } public SlotItemIconType IconType @@ -63,8 +63,10 @@ public bool IsAirSuperiorityFighter { get { - var type = this.RawData.api_type.Get(2); - return type.HasValue && (type == 6 || type == 7 || type == 8 || type == 11); + return this.Type == SlotItemType.艦上戦闘機 + || this.Type == SlotItemType.艦上攻撃機 + || this.Type == SlotItemType.艦上爆撃機 + || this.Type == SlotItemType.水上爆撃機; } } @@ -128,6 +130,18 @@ public int AttackRange get { return this.RawData.api_leng; } } + public bool IsNumerable + { + get + { + return this.Type == SlotItemType.艦上偵察機 + || this.Type == SlotItemType.艦上戦闘機 + || this.Type == SlotItemType.艦上攻撃機 + || this.Type == SlotItemType.艦上爆撃機 + || this.Type == SlotItemType.水上偵察機 + || this.Type == SlotItemType.水上爆撃機; + } + } internal SlotItemInfo(kcsapi_mst_slotitem rawData) : base(rawData) { } @@ -138,7 +152,7 @@ public override string ToString() #region static members - private static readonly SlotItemInfo dummy = new SlotItemInfo(new kcsapi_mst_slotitem() + private static SlotItemInfo dummy = new SlotItemInfo(new kcsapi_mst_slotitem() { api_id = 0, api_name = "???", diff --git a/Grabacr07.KanColleWrapper/Models/SlotItemType.cs b/Grabacr07.KanColleWrapper/Models/SlotItemType.cs index 5160a48ac..39f789045 100644 --- a/Grabacr07.KanColleWrapper/Models/SlotItemType.cs +++ b/Grabacr07.KanColleWrapper/Models/SlotItemType.cs @@ -6,133 +6,19 @@ namespace Grabacr07.KanColleWrapper.Models { - public enum SlotItemIconType + public enum SlotItemType { - Unknown = 0, - - /// - /// 小口径主砲。 - /// - MainCanonLight = 1, - - /// - /// 中口径主砲。 - /// - MainCanonMedium = 2, - - /// - /// 大口径主砲。 - /// - MainCanonHeavy = 3, - - /// - /// 副砲。 - /// - SecondaryCanon = 4, - - /// - /// 魚雷。 - /// - Torpedo = 5, - - /// - /// 艦戦。 - /// - Fighter = 6, - - /// - /// 艦爆。 - /// - DiveBomber = 7, - - /// - /// 艦攻。 - /// - TorpedoBomber = 8, - - /// - /// 偵察機。 - /// - ReconPlane = 9, - - /// - /// 水上機。 - /// - ReconSeaplane = 10, - - /// - /// 電探。 - /// - Rader = 11, - - /// - /// 三式弾。 - /// - AAShell = 12, - - /// - /// 徹甲弾。 - /// - APShell = 13, - - /// - /// ダメコン。 - /// - DamageControl = 14, - - /// - /// 機銃。 - /// - AAGun = 15, - - /// - /// 高角砲。 - /// - HighAngleGun = 16, - - /// - /// 爆雷投射機。 - /// - ASW = 17, - - /// - /// ソナー。 - /// - Soner = 18, - - /// - /// 機関部強化。 - /// - EngineImprovement = 19, - - /// - /// 上陸用舟艇。 - /// - LandingCraft = 20, - - /// - /// オートジャイロ。 - /// - Autogyro = 21, - - /// - /// 指揮連絡機。 - /// - ArtillerySpotter = 22, - - /// - /// 増設バルジ。 - /// - AntiTorpedoBulge = 23, - - /// - /// 探照灯。 - /// - Searchlight = 24, - - /// - /// ドラム缶。 - /// - DrumCanister = 25, + 艦上戦闘機 = 6, + 艦上爆撃機 = 7, + 艦上攻撃機 = 8, + 艦上偵察機 = 9, + 水上偵察機 = 10, + 水上爆撃機 = 11, + 小型電探 = 12, + 大型電探 = 13, + + 応急修理要員 = 23, + + 探照灯 = 29, } } diff --git a/Grabacr07.KanColleWrapper/Models/SvData.cs b/Grabacr07.KanColleWrapper/Models/SvData.cs index 3733b3f9c..49c177749 100644 --- a/Grabacr07.KanColleWrapper/Models/SvData.cs +++ b/Grabacr07.KanColleWrapper/Models/SvData.cs @@ -14,42 +14,42 @@ namespace Grabacr07.KanColleWrapper.Models { - internal class SvData : RawDataWrapper> + public class SvData : RawDataWrapper> { public NameValueCollection Request { get; private set; } public bool IsSuccess { - get { return this.RawData.api_result == 1; } + get { return this.RawData.api_result == 1; } } - public T Data - { - get { return this.RawData.api_data; } - } + public T Data + { + get { return this.RawData.api_data; } + } - public kcsapi_deck[] Fleets - { - get { return this.RawData.api_data_deck; } - } + public kcsapi_deck[] Fleets + { + get { return this.RawData.api_data_deck; } + } - public SvData(svdata rawData, string reqBody) + public SvData(svdata rawData, string reqBody) : base(rawData) { this.Request = HttpUtility.ParseQueryString(reqBody); } } - internal class SvData : RawDataWrapper + public class SvData : RawDataWrapper { public NameValueCollection Request { get; private set; } public bool IsSuccess { - get { return this.RawData.api_result == 1; } + get { return this.RawData.api_result == 1; } } - public SvData(svdata rawData, string reqBody) + public SvData(svdata rawData, string reqBody) : base(rawData) { this.Request = HttpUtility.ParseQueryString(reqBody); diff --git a/Grabacr07.KanColleWrapper/Models/UseItem.cs b/Grabacr07.KanColleWrapper/Models/UseItem.cs index 4da250795..68f914e31 100644 --- a/Grabacr07.KanColleWrapper/Models/UseItem.cs +++ b/Grabacr07.KanColleWrapper/Models/UseItem.cs @@ -15,20 +15,20 @@ public class UseItem : RawDataWrapper, IIdentifiable { public int Id { - get { return this.RawData.api_id; } + get { return this.RawData.api_id; } } - public string Name - { - get { return this.RawData.api_name; } - } + public string Name + { + get { return this.RawData.api_name; } + } - public int Count - { - get { return this.RawData.api_count; } - } + public int Count + { + get { return this.RawData.api_count; } + } - internal UseItem(kcsapi_useitem rawData) : base(rawData) { } + internal UseItem(kcsapi_useitem rawData) : base(rawData) { } public override string ToString() { diff --git a/Grabacr07.KanColleWrapper/Models/UseItemInfo.cs b/Grabacr07.KanColleWrapper/Models/UseItemInfo.cs index 2851f82b1..97744066c 100644 --- a/Grabacr07.KanColleWrapper/Models/UseItemInfo.cs +++ b/Grabacr07.KanColleWrapper/Models/UseItemInfo.cs @@ -15,15 +15,15 @@ public class UseItemInfo : RawDataWrapper, IIdentifiable { public int Id { - get { return this.RawData.api_id; } + get { return this.RawData.api_id; } } - public string Name - { - get { return this.RawData.api_name; } - } + public string Name + { + get { return this.RawData.api_name; } + } - internal UseItemInfo(kcsapi_mst_useitem rawData) : base(rawData) { } + internal UseItemInfo(kcsapi_mst_useitem rawData) : base(rawData) { } public override string ToString() { diff --git a/Grabacr07.KanColleWrapper/Models/ViewRange.cs b/Grabacr07.KanColleWrapper/Models/ViewRange.cs new file mode 100644 index 000000000..551dde8d8 --- /dev/null +++ b/Grabacr07.KanColleWrapper/Models/ViewRange.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; + +namespace Grabacr07.KanColleWrapper.Models +{ + /// + /// 索敵値計算を提供します。 + /// + public interface ICalcViewRange + { + string Id { get; } + + string Name { get; } + + string Description { get; } + + double Calc(Ship[] ships); + } + + + public abstract class ViewRangeCalcLogic : ICalcViewRange + { + private static readonly Dictionary logics = new Dictionary(); + + public static IEnumerable Logics + { + get { return logics.Values; } + } + + public static ICalcViewRange Get(string key) + { + ICalcViewRange logic; + return logics.TryGetValue(key, out logic) ? logic : new ViewRangeType1(); + } + + static ViewRangeCalcLogic() + { + // ひどぅい設計を見た + // ReSharper disable ObjectCreationAsStatement + new ViewRangeType1(); + new ViewRangeType2(); + new ViewRangeType3(); + // ReSharper restore ObjectCreationAsStatement + } + + public abstract string Id { get; } + public abstract string Name { get; } + public abstract string Description { get; } + public abstract double Calc(Ship[] ships); + + protected ViewRangeCalcLogic() + { + // ReSharper disable once DoNotCallOverridableMethodsInConstructor + var key = this.Id; + if (key != null && !logics.ContainsKey(key)) logics.Add(key, this); + } + } + + + public class ViewRangeType1 : ViewRangeCalcLogic + { + public override sealed string Id + { + get { return "KanColleViewer.Type1"; } + } + + public override string Name + { + get { return "単純計算"; } + } + + public override string Description + { + get { return "艦娘と装備の索敵値の単純な合計値"; } + } + + public override double Calc(Ship[] ships) + { + if (ships == null || ships.Length == 0) return 0; + + return ships.Sum(x => x.ViewRange); + } + } + + + public class ViewRangeType2 : ViewRangeCalcLogic + { + public override sealed string Id + { + get { return "KanColleViewer.Type2"; } + } + + public override string Name + { + get { return "2-5 式 (旧)"; } + } + + public override string Description + { + get { return "(偵察機 × 2) + (電探) + √(装備込みの艦隊索敵値合計 - 偵察機 - 電探)"; } + } + + public override double Calc(Ship[] ships) + { + if (ships == null || ships.Length == 0) return 0; + + // http://wikiwiki.jp/kancolle/?%C6%EE%C0%BE%BD%F4%C5%E7%B3%A4%B0%E8#area5 + // [索敵装備と装備例] によって示されている計算式 + // stype=7 が偵察機 (2 倍する索敵値)、stype=8 が電探 + + var spotter = ships.SelectMany( + x => x.EquippedSlots + .Where(s => s.Item.Info.RawData.api_type.Get(1) == 7) + .Where(s => s.Current > 0) + .Select(s => s.Item.Info.RawData.api_saku) + ).Sum(); + + var radar = ships.SelectMany( + x => x.EquippedSlots + .Where(s => s.Item.Info.RawData.api_type.Get(1) == 8) + .Select(s => s.Item.Info.RawData.api_saku) + ).Sum(); + + return (spotter * 2) + radar + (int)Math.Sqrt(ships.Sum(x => x.ViewRange) - spotter - radar); + } + } + + + public class ViewRangeType3 : ViewRangeCalcLogic + { + public override sealed string Id + { + get { return "KanColleViewer.Type3"; } + } + + public override string Name + { + get { return "2-5 式 (秋)"; } + } + + public override string Description + { + get + { + return @"(艦上爆撃機 × 1.04) + (艦上攻撃機 × 1.37) + (艦上偵察機 × 1.66) ++ (水上偵察機 × 2.00) + (水上爆撃機 × 1.78) + (探照灯 × 0.91) ++ (小型電探 × 1.00) + (大型電探 × 0.99) + (√各艦毎の素索敵 × 1.69) ++ (司令部レベルを 5 の倍数に切り上げ × -0.61)"; + } + } + + public override double Calc(Ship[] ships) + { + if (ships == null || ships.Length == 0) return 0; + + // http://wikiwiki.jp/kancolle/?%C6%EE%C0%BE%BD%F4%C5%E7%B3%A4%B0%E8#search-calc + // > 2-5式では説明出来ない事象を解決するため膨大な検証報告数より導き出した新式。2014年11月に改良され精度があがった。 + // > 索敵スコア + // > = 艦上爆撃機 × (1.04) + // > + 艦上攻撃機 × (1.37) + // > + 艦上偵察機 × (1.66) + // > + 水上偵察機 × (2.00) + // > + 水上爆撃機 × (1.78) + // > + 小型電探 × (1.00) + // > + 大型電探 × (0.99) + // > + 探照灯 × (0.91) + // > + √(各艦毎の素索敵) × (1.69) + // > + (司令部レベルを5の倍数に切り上げ) × (-0.61) + + var itemScore = ships + .SelectMany(x => x.EquippedSlots) + .Select(x => x.Item.Info) + .GroupBy( + x => x.Type, + x => x.RawData.api_saku, + (type, scores) => new { type, score = scores.Sum() }) + .Aggregate(.0, (score, item) => score + GetScore(item.type, item.score)); + + var shipScore = ships + .Select(x => x.ViewRange - x.EquippedSlots.Sum(s => s.Item.Info.RawData.api_saku)) + .Select(x => Math.Sqrt(x)) + .Sum() * 1.69; + + var level = (((KanColleClient.Current.Homeport.Admiral.Level + 4) / 5) * 5); + var admiralScore = level * -0.61; + + return itemScore + shipScore + admiralScore; + } + + private static double GetScore(SlotItemType type, int score) + { + switch (type) + { + case SlotItemType.艦上爆撃機: + return score * 1.04; + case SlotItemType.艦上攻撃機: + return score * 1.37; + case SlotItemType.艦上偵察機: + return score * 1.66; + + case SlotItemType.水上偵察機: + return score * 2.00; + case SlotItemType.水上爆撃機: + return score * 1.78; + + case SlotItemType.小型電探: + return score * 1.00; + case SlotItemType.大型電探: + return score * 0.99; + + case SlotItemType.探照灯: + return score * 0.91; + } + + return .0; + } + } +} diff --git a/Grabacr07.KanColleWrapper/Organization.cs b/Grabacr07.KanColleWrapper/Organization.cs index 78eefba01..336c8148f 100644 --- a/Grabacr07.KanColleWrapper/Organization.cs +++ b/Grabacr07.KanColleWrapper/Organization.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reactive.Linq; using System.Threading.Tasks; using Grabacr07.KanColleWrapper.Internal; using Grabacr07.KanColleWrapper.Models; @@ -16,6 +17,9 @@ public class Organization : NotificationObject { private readonly Homeport homeport; + private readonly List evacuatedShipsIds = new List(); + private readonly List towShipIds = new List(); + #region Ships 変更通知プロパティ private MemberTable _Ships; @@ -60,6 +64,48 @@ private set #endregion + #region Combined 変更通知プロパティ + + private bool _Combined; + + /// + /// 第一・第二艦隊による連合艦隊が編成されているかどうかを示す値を取得または設定します。 + /// + public bool Combined + { + get { return this._Combined; } + set + { + if (this._Combined != value) + { + this._Combined = value; + this.Combine(value); + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region CombinedFleet 変更通知プロパティ + + private CombinedFleet _CombinedFleet; + + public CombinedFleet CombinedFleet + { + get { return this._CombinedFleet; } + set + { + if (this._CombinedFleet != value) + { + this._CombinedFleet = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + public Organization(Homeport parent, KanColleProxy proxy) { @@ -82,12 +128,19 @@ public Organization(Homeport parent, KanColleProxy proxy) proxy.api_get_member_deck.TryParse().Subscribe(x => this.Update(x.Data)); proxy.api_get_member_deck_port.TryParse().Subscribe(x => this.Update(x.Data)); + proxy.api_get_member_ship_deck.TryParse().Subscribe(x => this.Update(x.Data)); proxy.api_req_hensei_change.TryParse().Subscribe(this.Change); proxy.api_req_hokyu_charge.TryParse().Subscribe(x => this.Charge(x.Data)); proxy.api_req_kaisou_powerup.TryParse().Subscribe(this.Powerup); proxy.api_req_kousyou_getship.TryParse().Subscribe(x => this.GetShip(x.Data)); proxy.api_req_kousyou_destroyship.TryParse().Subscribe(this.DestoryShip); + proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName); + + proxy.api_req_hensei_combined.TryParse() + .Subscribe(x => this.Combined = x.Data.api_combined != 0); + + this.SubscribeSortieSessions(proxy); } @@ -99,6 +152,30 @@ internal Fleet GetFleet(int shipId) return this.Fleets.Select(x => x.Value).SingleOrDefault(x => x.Ships.Any(s => s.Id == shipId)); } + private void UpdateFleetName(SvData data) + { + if (data == null || !data.IsSuccess) return; + + try + { + var fleet = this.Fleets[int.Parse(data.Request["api_deck_id"])]; + var name = data.Request["api_name"]; + + fleet.Name = name; + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("艦隊名の変更に失敗しました: {0}", ex); + } + } + + private void RaiseShipsChanged() + { + this.RaisePropertyChanged("Ships"); + } + + + #region 母港 / 艦隊編成 (Update / Change) /// /// 指定した 型の配列を使用して、 プロパティ値を更新します。 @@ -115,12 +192,18 @@ internal void Update(kcsapi_ship2[] source) target.Update(ship); var fleet = this.GetFleet(target.Id); - if (fleet != null) fleet.Calculate(); + if (fleet != null) fleet.State.Calculate(); } } else { this.Ships = new MemberTable(source.Select(x => new Ship(this.homeport, x))); + + if (KanColleClient.Current.IsInSortie) + { + foreach (var id in this.evacuatedShipsIds) this.Ships[id].Situation |= ShipSituation.Evacuation; + foreach (var id in this.towShipIds) this.Ships[id].Situation |= ShipSituation.Tow; + } } } @@ -140,7 +223,7 @@ internal void Update(kcsapi_deck[] source) } else { - this.Fleets.ForEach(x => x.Value.Dispose()); + this.Fleets.ForEach(x => x.Value.SafeDispose()); this.Fleets = new MemberTable(source.Select(x => new Fleet(this.homeport, x))); } } @@ -191,6 +274,19 @@ private void Change(SvData data) } } + + private void Combine(bool combine) + { + this.CombinedFleet.SafeDispose(); + this.CombinedFleet = combine + ? new CombinedFleet(this.homeport, this.Fleets.OrderBy(x => x.Key).Select(x => x.Value).Take(2).ToArray()) + : null; + } + + #endregion + + #region 補給 / 近代化改修 (Charge / Powerup) + private void Charge(kcsapi_charge source) { Fleet fleet = null; // 補給した艦が所属している艦隊。艦隊をまたいで補給はできないので、必ず 1 つに絞れる @@ -208,7 +304,11 @@ private void Charge(kcsapi_charge source) } } - if (fleet != null) fleet.UpdateStatus(); + if (fleet != null) + { + fleet.State.Update(); + fleet.State.Calculate(); + } } private void Powerup(SvData svd) @@ -225,11 +325,18 @@ private void Powerup(SvData svd) .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .Where(x => this.Ships.ContainsKey(x)) - .Select(x => this.Ships[x]); + .Select(x => this.Ships[x]) + .ToArray(); // (改修に使った艦娘のこと item って呼ぶのどうなの…) - this.Ships = new MemberTable(this.Ships.Select(kvp => kvp.Value).Except(items)); + foreach (var x in items) + { + this.homeport.Itemyard.RemoveFromShip(x); + this.Ships.Remove(x); + } + + this.RaiseShipsChanged(); this.Update(svd.Data.api_deck); } catch (Exception ex) @@ -238,9 +345,16 @@ private void Powerup(SvData svd) } } + #endregion + + #region 工廠 (Get / Destroy) + private void GetShip(kcsapi_kdock_getship source) { - this.Ships = new MemberTable(this.Ships.Select(kvp => kvp.Value).Concat(new[] { new Ship(this.homeport, source.api_ship) })); + this.homeport.Itemyard.AddFromDock(source); + + this.Ships.Add(new Ship(this.homeport, source.api_ship)); + this.RaiseShipsChanged(); } private void DestoryShip(SvData svd) @@ -250,7 +364,10 @@ private void DestoryShip(SvData svd) var ship = this.Ships[int.Parse(svd.Request["api_ship_id"])]; if (ship != null) { - this.Ships = new MemberTable(this.Ships.Select(kvp => kvp.Value).Except(new[] { ship })); + this.homeport.Itemyard.RemoveFromShip(ship); + + this.Ships.Remove(ship); + this.RaiseShipsChanged(); } } catch (Exception ex) @@ -258,5 +375,112 @@ private void DestoryShip(SvData svd) System.Diagnostics.Debug.WriteLine("解体による更新に失敗しました: {0}", ex); } } + + #endregion + + #region 出撃 (Sortie / Homing / Escape) + + private void SubscribeSortieSessions(KanColleProxy proxy) + { + proxy.ApiSessionSource + .SkipUntil(proxy.api_req_map_start.TryParse().Do(this.Sortie)) + .TakeUntil(proxy.api_port) + .Finally(this.Homing) + .Repeat() + .Subscribe(); + + int[] evacuationOfferedShipIds = null; + int[] towOfferedShipIds = null; + + proxy.api_req_combined_battle_battleresult + .TryParse() + .Where(x => x.Data.api_escape != null) + .Select(x => x.Data) + .Subscribe(x => + { + if (this.CombinedFleet == null) return; + var ships = this.CombinedFleet.Fleets.SelectMany(f => f.Ships).ToArray(); + evacuationOfferedShipIds = x.api_escape.api_escape_idx.Select(idx => ships[idx - 1].Id).ToArray(); + towOfferedShipIds = x.api_escape.api_tow_idx.Select(idx => ships[idx - 1].Id).ToArray(); + }); + proxy.api_req_combined_battle_goback_port + .Subscribe(_ => + { + if (KanColleClient.Current.IsInSortie + && evacuationOfferedShipIds != null + && evacuationOfferedShipIds.Length >= 1 + && towOfferedShipIds != null + && towOfferedShipIds.Length >= 1) + { + this.evacuatedShipsIds.Add(evacuationOfferedShipIds[0]); + this.towShipIds.Add(towOfferedShipIds[0]); + } + }); + proxy.api_get_member_ship_deck + .Subscribe(_ => + { + evacuationOfferedShipIds = null; + towOfferedShipIds = null; + }); + } + + + private void Sortie(SvData data) + { + if (data == null || !data.IsSuccess) return; + + try + { + var id = int.Parse(data.Request["api_deck_id"]); + var fleet = this.Fleets[id]; + fleet.Sortie(); + + if (this.Combined && id == 1) this.Fleets[2].Sortie(); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("艦隊の出撃を検知できませんでした: {0}", ex); + } + } + + private void Homing() + { + this.evacuatedShipsIds.Clear(); + this.towShipIds.Clear(); + + foreach (var ship in this.Ships.Values) + { + if (ship.Situation.HasFlag(ShipSituation.Evacuation)) ship.Situation &= ~ShipSituation.Evacuation; + if (ship.Situation.HasFlag(ShipSituation.Tow)) ship.Situation &= ~ShipSituation.Tow; + } + + foreach (var target in this.Fleets.Values) + { + target.Homing(); + } + } + + private void Update(kcsapi_ship_deck source) + { + if (source.api_ship_data != null) + { + foreach (var ship in source.api_ship_data) + { + var target = this.Ships[ship.api_id]; + target.Update(ship); + } + } + + if (source.api_deck_data != null) + { + foreach (var deck in source.api_deck_data) + { + var target = this.Fleets[deck.api_id]; + target.Update(deck); + } + } + } + + #endregion } } diff --git a/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs b/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs index 85d5b6666..6f9d7fea9 100644 --- a/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs +++ b/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("grabacr.net")] [assembly: AssemblyProduct("KanColleWrapper")] -[assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")] +[assembly: AssemblyCopyright("Copyright c 2013 Grabacr07")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Grabacr07.KanColleWrapper/Quests.cs b/Grabacr07.KanColleWrapper/Quests.cs index 7a2e3fc91..c69c04179 100644 --- a/Grabacr07.KanColleWrapper/Quests.cs +++ b/Grabacr07.KanColleWrapper/Quests.cs @@ -173,11 +173,6 @@ private void Update(kcsapi_questlist questlist) while (this.questPages.Count < questlist.api_page_count) this.questPages.Add(null); } - var page = questlist.api_disp_page - 1; - if (page >= this.questPages.Count) page = this.questPages.Count - 1; - - this.questPages[page] = new ConcurrentDictionary(); - if (questlist.api_list == null) { this.IsEmpty = true; @@ -185,6 +180,11 @@ private void Update(kcsapi_questlist questlist) } else { + var page = questlist.api_disp_page - 1; + if (page >= this.questPages.Count) page = this.questPages.Count - 1; + + this.questPages[page] = new ConcurrentDictionary(); + this.IsEmpty = false; questlist.api_list.Select(x => new Quest(x)) diff --git a/Grabacr07.KanColleWrapper/Repairyard.cs b/Grabacr07.KanColleWrapper/Repairyard.cs index 232d5dde0..fccba8481 100644 --- a/Grabacr07.KanColleWrapper/Repairyard.cs +++ b/Grabacr07.KanColleWrapper/Repairyard.cs @@ -97,7 +97,7 @@ private void Start(SvData data) ship.Repair(); var fleet = this.homeport.Organization.GetFleet(ship.Id); - if (fleet != null) fleet.UpdateStatus(); + if (fleet != null) fleet.State.Update(); } // 高速修復でない場合、別途 ndock が来るので、ここで何かする必要はなさげ @@ -119,7 +119,7 @@ private void ChangeSpeed(SvData data) ship.Repair(); var fleet = this.homeport.Organization.GetFleet(ship.Id); - if (fleet != null) fleet.UpdateStatus(); + if (fleet != null) fleet.State.Update(); } catch (Exception ex) { diff --git a/Grabacr07.KanColleWrapper/TimerNotificator.cs b/Grabacr07.KanColleWrapper/TimerNotifier.cs similarity index 83% rename from Grabacr07.KanColleWrapper/TimerNotificator.cs rename to Grabacr07.KanColleWrapper/TimerNotifier.cs index 200abf2ae..2e6cae31e 100644 --- a/Grabacr07.KanColleWrapper/TimerNotificator.cs +++ b/Grabacr07.KanColleWrapper/TimerNotifier.cs @@ -1,44 +1,44 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reactive.Linq; -using System.Reactive.Subjects; -using System.Text; -using System.Threading.Tasks; -using Grabacr07.KanColleWrapper.Internal; -using Livet; - -namespace Grabacr07.KanColleWrapper -{ - /// - /// 1 秒刻みのタイマー機能をサポートする変更通知オブジェクトを表します。 - /// - public class TimerNotificator : NotificationObject, IDisposable - { - #region static members - - private static readonly IConnectableObservable timer; - - static TimerNotificator() - { - timer = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1)).Publish(); - timer.Connect(); - } - - #endregion - - private readonly IDisposable subscriber; - - public TimerNotificator() - { - this.subscriber = timer.Subscribe(_ => this.Tick()); - } - - protected virtual void Tick() { } - - public virtual void Dispose() - { - this.subscriber.SafeDispose(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Reactive.Subjects; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper.Internal; +using Livet; + +namespace Grabacr07.KanColleWrapper +{ + /// + /// 1 秒刻みのタイマー機能をサポートする変更通知オブジェクトを表します。 + /// + public class TimerNotifier : NotificationObject, IDisposable + { + #region static members + + private static readonly IConnectableObservable timer; + + static TimerNotifier() + { + timer = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1)).Publish(); + timer.Connect(); + } + + #endregion + + private readonly IDisposable subscriber; + + public TimerNotifier() + { + this.subscriber = timer.Subscribe(_ => this.Tick()); + } + + protected virtual void Tick() { } + + public virtual void Dispose() + { + this.subscriber.SafeDispose(); + } + } +} diff --git a/Grabacr07.KanColleWrapper/Updater.cs b/Grabacr07.KanColleWrapper/Updater.cs index 08aac5c9b..b406b07e6 100644 --- a/Grabacr07.KanColleWrapper/Updater.cs +++ b/Grabacr07.KanColleWrapper/Updater.cs @@ -53,6 +53,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla { string CurrentCulture = (Culture == null || Culture == "en-US" || Culture == "ja-JP" || Culture == "en") ? "" : Culture; string CurrentCultureDir = (CurrentCulture != "" ? CurrentCulture + "\\" : ""); + string TranslationURL = (BaseTranslationURL.TrimEnd(new[] { '/' }) + "/" + CurrentCulture).TrimEnd(new[] { '/' }) + "/"; XDocument TestXML; int ReturnValue = 0; @@ -65,7 +66,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla // In every one of these we download it to a temp folder, check if the file works, then move it over. if (IsOnlineVersionGreater(TranslationType.Equipment, TranslationsRef.EquipmentVersion)) { - Client.DownloadFile(BaseTranslationURL + CurrentCulture + "/" + "Equipment.xml", "Translations\\tmp\\Equipment.xml"); + Client.DownloadFile(TranslationURL + "Equipment.xml", "Translations\\tmp\\Equipment.xml"); try { @@ -84,7 +85,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla if (IsOnlineVersionGreater(TranslationType.Operations, TranslationsRef.OperationsVersion)) { - Client.DownloadFile(BaseTranslationURL + CurrentCulture + "/" + "Operations.xml", "Translations\\tmp\\Operations.xml"); + Client.DownloadFile(TranslationURL + "Operations.xml", "Translations\\tmp\\Operations.xml"); try { @@ -103,7 +104,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla if (IsOnlineVersionGreater(TranslationType.Quests, TranslationsRef.QuestsVersion)) { - Client.DownloadFile(BaseTranslationURL + CurrentCulture + "/" + "Quests.xml", "Translations\\tmp\\Quests.xml"); + Client.DownloadFile(TranslationURL + "Quests.xml", "Translations\\tmp\\Quests.xml"); try { @@ -122,7 +123,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla if (IsOnlineVersionGreater(TranslationType.Ships, TranslationsRef.ShipsVersion)) { - Client.DownloadFile(BaseTranslationURL + CurrentCulture + "/" + "Ships.xml", "Translations\\tmp\\Ships.xml"); + Client.DownloadFile(TranslationURL + "Ships.xml", "Translations\\tmp\\Ships.xml"); try { @@ -141,7 +142,7 @@ public int UpdateTranslations(string BaseTranslationURL, string Culture, Transla if (IsOnlineVersionGreater(TranslationType.ShipTypes, TranslationsRef.ShipTypesVersion)) { - Client.DownloadFile(BaseTranslationURL + CurrentCulture + "/" + "ShipTypes.xml", "Translations\\tmp\\ShipTypes.xml"); + Client.DownloadFile(TranslationURL + "ShipTypes.xml", "Translations\\tmp\\ShipTypes.xml"); try { diff --git a/Grabacr07.KanColleWrapper/app.config b/Grabacr07.KanColleWrapper/app.config new file mode 100644 index 000000000..658d61c58 --- /dev/null +++ b/Grabacr07.KanColleWrapper/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.dll b/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.dll deleted file mode 100644 index 613479635..000000000 Binary files a/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.dll and /dev/null differ diff --git a/Grabacr07.KanColleWrapper/packages.config b/Grabacr07.KanColleWrapper/packages.config index cb2c977f7..49baf4d75 100644 --- a/Grabacr07.KanColleWrapper/packages.config +++ b/Grabacr07.KanColleWrapper/packages.config @@ -3,9 +3,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/KanColleViewer.sln b/KanColleViewer.sln index 2457a9179..345d9d7a3 100644 --- a/KanColleViewer.sln +++ b/KanColleViewer.sln @@ -1,9 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30110.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KanColleViewer", "Grabacr07.KanColleViewer\KanColleViewer.csproj", "{C5F0111F-3F68-4A74-BB20-BB762564D080}" + ProjectSection(ProjectDependencies) = postProject + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264} = {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264} + {A6B0A741-5BE0-479D-B813-E65672350057} = {A6B0A741-5BE0-479D-B813-E65672350057} + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D} = {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B8B36616-103B-4D8B-A752-A7C07FE1BA70}" ProjectSection(SolutionItems) = preProject @@ -22,6 +27,28 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{7F9428F0-290D-4DBC-80ED-A704ECB12C64}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Desktop.Metro", "Grabacr07.Desktop.Metro\Desktop.Metro.csproj", "{F00FC570-2A80-4F61-8364-798CD44514B2}" + ProjectSection(ProjectDependencies) = postProject + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264} = {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264} + {A6B0A741-5BE0-479D-B813-E65672350057} = {A6B0A741-5BE0-479D-B813-E65672350057} + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D} = {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{D844E42C-9406-43BF-9681-4F06F6CB3AD9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsNotifier", "Plugins\WindowsNotifier\WindowsNotifier.csproj", "{55C0036D-3206-4C63-A2C0-447C41CAFAF5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MetroRadiance", "MetroRadiance", "{6FE85CE3-7479-4630-B746-EA18BCE3311D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetroRadiance", "MetroRadiance\MetroRadiance\MetroRadiance.csproj", "{0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetroRadiance.Chrome", "MetroRadiance\MetroRadiance.Chrome\MetroRadiance.Chrome.csproj", "{21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}" + ProjectSection(ProjectDependencies) = postProject + {A6B0A741-5BE0-479D-B813-E65672350057} = {A6B0A741-5BE0-479D-B813-E65672350057} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetroRadiance.Core", "MetroRadiance\MetroRadiance.Core\MetroRadiance.Core.csproj", "{A6B0A741-5BE0-479D-B813-E65672350057}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Counter", "Plugins\Counter\Counter.csproj", "{DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Translations", "Translations", "{74D8B001-9382-4515-8709-5A09B55EB540}" ProjectSection(SolutionItems) = preProject @@ -32,6 +59,35 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Translations", "Translation resources\Translations\ShipTypes.xml = resources\Translations\ShipTypes.xml EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "German (de)", "German (de)", "{EB7BC13B-398E-4A1C-88D0-FE4D6BA44608}" + ProjectSection(SolutionItems) = preProject + resources\translations\de\Equipment.xml = resources\translations\de\Equipment.xml + resources\translations\de\Operations.xml = resources\translations\de\Operations.xml + resources\translations\de\Quests.xml = resources\translations\de\Quests.xml + resources\translations\de\Ships.xml = resources\translations\de\Ships.xml + resources\translations\de\ShipTypes.xml = resources\translations\de\ShipTypes.xml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Korean (ko-KR)", "Korean (ko-KR)", "{F356D021-8A8B-47F1-9235-3DFBBA09C03C}" + ProjectSection(SolutionItems) = preProject + resources\translations\ko-KR\Equipment.xml = resources\translations\ko-KR\Equipment.xml + resources\translations\ko-KR\Operations.xml = resources\translations\ko-KR\Operations.xml + resources\translations\ko-KR\Quests.xml = resources\translations\ko-KR\Quests.xml + resources\translations\ko-KR\Ships.xml = resources\translations\ko-KR\Ships.xml + resources\translations\ko-KR\ShipTypes.xml = resources\translations\ko-KR\ShipTypes.xml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chinese (zh-CN)", "Chinese (zh-CN)", "{7945DA4F-E951-4E9E-95CA-B48C0F5A392F}" + ProjectSection(SolutionItems) = preProject + resources\translations\zh-CN\Equipment.xml = resources\translations\zh-CN\Equipment.xml + resources\translations\zh-CN\Operations.xml = resources\translations\zh-CN\Operations.xml + resources\translations\zh-CN\Quests.xml = resources\translations\zh-CN\Quests.xml + resources\translations\zh-CN\Ships.xml = resources\translations\zh-CN\Ships.xml + resources\translations\zh-CN\ShipTypes.xml = resources\translations\zh-CN\ShipTypes.xml + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MasterDataViewer", "Plugins\MasterDataViewer\MasterDataViewer.csproj", "{08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -69,11 +125,74 @@ Global {F00FC570-2A80-4F61-8364-798CD44514B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {F00FC570-2A80-4F61-8364-798CD44514B2}.Release|Any CPU.Build.0 = Release|Any CPU {F00FC570-2A80-4F61-8364-798CD44514B2}.Release|x86.ActiveCfg = Release|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Debug|x86.ActiveCfg = Debug|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release (beta)|Any CPU.ActiveCfg = Release (beta)|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release (beta)|Any CPU.Build.0 = Release (beta)|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release (beta)|x86.ActiveCfg = Release (beta)|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release|Any CPU.Build.0 = Release|Any CPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5}.Release|x86.ActiveCfg = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Debug|x86.ActiveCfg = Debug|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release (beta)|Any CPU.ActiveCfg = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release (beta)|Any CPU.Build.0 = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release (beta)|x86.ActiveCfg = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release|Any CPU.Build.0 = Release|Any CPU + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D}.Release|x86.ActiveCfg = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Debug|x86.ActiveCfg = Debug|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release (beta)|Any CPU.ActiveCfg = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release (beta)|Any CPU.Build.0 = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release (beta)|x86.ActiveCfg = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release|Any CPU.Build.0 = Release|Any CPU + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264}.Release|x86.ActiveCfg = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Debug|x86.ActiveCfg = Debug|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release (beta)|Any CPU.ActiveCfg = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release (beta)|Any CPU.Build.0 = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release (beta)|x86.ActiveCfg = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release|Any CPU.Build.0 = Release|Any CPU + {A6B0A741-5BE0-479D-B813-E65672350057}.Release|x86.ActiveCfg = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release (beta)|Any CPU.ActiveCfg = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release (beta)|Any CPU.Build.0 = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release (beta)|x86.ActiveCfg = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release|Any CPU.Build.0 = Release|Any CPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7}.Release|x86.ActiveCfg = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Debug|x86.ActiveCfg = Debug|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release (beta)|Any CPU.ActiveCfg = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release (beta)|Any CPU.Build.0 = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release (beta)|x86.ActiveCfg = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release|Any CPU.Build.0 = Release|Any CPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {F00FC570-2A80-4F61-8364-798CD44514B2} = {7F9428F0-290D-4DBC-80ED-A704ECB12C64} + {55C0036D-3206-4C63-A2C0-447C41CAFAF5} = {D844E42C-9406-43BF-9681-4F06F6CB3AD9} + {0AF0B9FF-D981-4D0F-A41F-C3AB6FE2F16D} = {6FE85CE3-7479-4630-B746-EA18BCE3311D} + {21B4AD15-D9FA-4873-BFAD-1EEEFBC6C264} = {6FE85CE3-7479-4630-B746-EA18BCE3311D} + {A6B0A741-5BE0-479D-B813-E65672350057} = {6FE85CE3-7479-4630-B746-EA18BCE3311D} + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7} = {D844E42C-9406-43BF-9681-4F06F6CB3AD9} + {EB7BC13B-398E-4A1C-88D0-FE4D6BA44608} = {74D8B001-9382-4515-8709-5A09B55EB540} + {F356D021-8A8B-47F1-9235-3DFBBA09C03C} = {74D8B001-9382-4515-8709-5A09B55EB540} + {7945DA4F-E951-4E9E-95CA-B48C0F5A392F} = {74D8B001-9382-4515-8709-5A09B55EB540} + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E} = {D844E42C-9406-43BF-9681-4F06F6CB3AD9} EndGlobalSection EndGlobal diff --git a/KanColleViewer.sln.DotSettings b/KanColleViewer.sln.DotSettings index 8fe64d233..5b38d8d4d 100644 --- a/KanColleViewer.sln.DotSettings +++ b/KanColleViewer.sln.DotSettings @@ -1,111 +1,114 @@ - - Advanced - True - True - True - True - False - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - HINT - SUGGESTION - SUGGESTION - SUGGESTION - HINT - DO_NOT_SHOW - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - <?xml version="1.0" encoding="utf-16"?><Profile name="Full reformat (C#)"><CSReformatCode>True</CSReformatCode><CSShortenReferences>True</CSShortenReferences><CSUseVar><BehavourStyle>CAN_CHANGE_TO_IMPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><XMLReformatCode>True</XMLReformatCode><CSArrangeThisQualifier>True</CSArrangeThisQualifier></Profile> - <?xml version="1.0" encoding="utf-16"?><Profile name="Quick reformat (C#)"><CSUseVar><BehavourStyle>CAN_CHANGE_TO_IMPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><XMLReformatCode>True</XMLReformatCode><CSReformatCode>True</CSReformatCode><CSShortenReferences>True</CSShortenReferences><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings></Profile> - Full reformat (C#) - Quick reformat (C#) - OPTIMAL_FILL - True - TOGETHER_SAME_LINE - True - False - ALWAYS_USE - False - True - True - False - False - True - True - False - True - True - CHOP_IF_LONG - False - CHOP_IF_LONG - DoNotTouch - ByFirstAttr - False - System - System.Collections.Generic - System.Linq - System.Reactive.Linq - System.Threading.Tasks - System - System.Collections.Generic - System.Linq - System.Threading.Tasks - True - False - True - AA - AP - ASW - HP - IE - IO - LOS - OK - SSL - UI - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="PART_" Suffix="" Style="AaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy><Descriptor Staticness="Instance" AccessRightKinds="Protected" Description="Fileds (protected)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - True - True - False - False - False - False - False - True - True - VS - False - True - True - [74,-7](1088,752) - CsharpNamespaceImports - -173,-273 - True - False - 271 - 271 - 271 - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - NotOverridden - True - CSHARP + + Advanced + True + True + True + True + False + SUGGESTION + SUGGESTION + SUGGESTION + HINT + HINT + SUGGESTION + SUGGESTION + SUGGESTION + HINT + DO_NOT_SHOW + SUGGESTION + SUGGESTION + SUGGESTION + SUGGESTION + <?xml version="1.0" encoding="utf-16"?><Profile name="Full reformat (C#)"><CSReformatCode>True</CSReformatCode><CSShortenReferences>True</CSShortenReferences><CSUseVar><BehavourStyle>CAN_CHANGE_TO_IMPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><XMLReformatCode>True</XMLReformatCode><CSArrangeThisQualifier>True</CSArrangeThisQualifier></Profile> + <?xml version="1.0" encoding="utf-16"?><Profile name="Quick reformat (C#)"><CSUseVar><BehavourStyle>CAN_CHANGE_TO_IMPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><XMLReformatCode>True</XMLReformatCode><CSReformatCode>True</CSReformatCode><CSShortenReferences>True</CSShortenReferences><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings></Profile> + Full reformat (C#) + Quick reformat (C#) + OPTIMAL_FILL + All + True + TOGETHER_SAME_LINE + True + False + ALWAYS_USE + False + True + True + False + False + True + True + False + True + True + CHOP_IF_LONG + False + CHOP_IF_LONG + DoNotTouch + ByFirstAttr + False + System + System.Collections.Generic + System.Linq + System.Reactive.Linq + System.Threading.Tasks + System + System.Collections.Generic + System.Linq + System.Threading.Tasks + True + False + True + AA + AP + ASW + HP + IE + IO + LOS + OK + SSL + UI + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="PART_" Suffix="" Style="AaBb" /><ExtraRule Prefix="VisualState_" Suffix="" Style="AaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + <Policy><Descriptor Staticness="Instance" AccessRightKinds="Protected" Description="Fileds (protected)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True + False + False + False + False + False + True + True + True + True + VS + False + True + True + [74,-7](1088,752) + CsharpNamespaceImports + -173,-273 + True + False + 271 + 271 + 271 + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + NotOverridden + True + CSHARP MetroChrome \ No newline at end of file diff --git a/MetroRadiance b/MetroRadiance new file mode 160000 index 000000000..b469bd90c --- /dev/null +++ b/MetroRadiance @@ -0,0 +1 @@ +Subproject commit b469bd90cb47e304ac41db877652f5ad63dcd223 diff --git a/Plugins/Counter/Counter.csproj b/Plugins/Counter/Counter.csproj new file mode 100644 index 000000000..f96627f28 --- /dev/null +++ b/Plugins/Counter/Counter.csproj @@ -0,0 +1,169 @@ + + + + + Debug + AnyCPU + {DE2400A1-2AAE-4AB0-BCD5-A88DC78033A7} + library + Properties + Counter + Counter + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\assemblies\FiddlerCore4.dll + + + False + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll + + + + + + False + ..\..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll + + + False + ..\..\packages\Rx-Interfaces.2.2.4\lib\net45\System.Reactive.Interfaces.dll + + + False + ..\..\packages\Rx-Linq.2.2.4\lib\net45\System.Reactive.Linq.dll + + + False + ..\..\packages\Rx-PlatformServices.2.2.4\lib\net45\System.Reactive.PlatformServices.dll + + + False + ..\..\packages\Rx-Xaml.2.2.4\lib\net45\System.Reactive.Windows.Threading.dll + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + 4.0 + + + + + + + + + CounterView.xaml + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {f00fc570-2a80-4f61-8364-798cd44514b2} + Desktop.Metro + + + {c5f0111f-3f68-4a74-bb20-bb762564d080} + KanColleViewer + + + {0bc8cf79-76d9-46ad-867f-fec6c6ad4594} + KanColleWrapper + + + {21b4ad15-d9fa-4873-bfad-1eeefbc6c264} + MetroRadiance.Chrome + + + {a6b0a741-5be0-479d-b813-e65672350057} + MetroRadiance.Core + + + {0af0b9ff-d981-4d0f-a41f-c3ab6fe2f16d} + MetroRadiance + + + + + Designer + MSBuild:Compile + + + + + + + このプロジェクトは、このコンピューターにはない NuGet パッケージを参照しています。これらをダウンロードするには、NuGet パッケージの復元を有効にしてください。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。不足しているファイルは {0} です。 + + + + + mkdir $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins +xcopy /Y $(TargetDir)*.* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName) +move $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\$(TargetName).* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins + + + \ No newline at end of file diff --git a/Plugins/Counter/CounterView.xaml b/Plugins/Counter/CounterView.xaml new file mode 100644 index 000000000..82c3f366f --- /dev/null +++ b/Plugins/Counter/CounterView.xaml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml.cs b/Plugins/Counter/CounterView.xaml.cs similarity index 57% rename from Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml.cs rename to Plugins/Counter/CounterView.xaml.cs index 83bb5496c..284ea1638 100644 --- a/Grabacr07.KanColleViewer/Views/Tools/Rankings.xaml.cs +++ b/Plugins/Counter/CounterView.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Grabacr07.KanColleViewer.Views.Tools -{ - /// - /// Missions.xaml ????????? - /// - public partial class Rankings : UserControl - { - public Rankings() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Counter +{ + /// + /// CounterView.xaml の相互作用ロジック + /// + public partial class CounterView : UserControl + { + public CounterView() + { + InitializeComponent(); + } + } +} diff --git a/Plugins/Counter/CounterViewModel.cs b/Plugins/Counter/CounterViewModel.cs new file mode 100644 index 000000000..2f9724b23 --- /dev/null +++ b/Plugins/Counter/CounterViewModel.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper; +using Livet; + +namespace Counter +{ + public class CounterViewModel : ViewModel + { + #region Counters 変更通知プロパティ + + private ObservableCollection _Counters; + + public ObservableCollection Counters + { + get { return this._Counters; } + set + { + if (this._Counters != value) + { + this._Counters = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public CounterViewModel() + { + } + } +} diff --git a/Plugins/Counter/Counters.cs b/Plugins/Counter/Counters.cs new file mode 100644 index 000000000..ba0a5c688 --- /dev/null +++ b/Plugins/Counter/Counters.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleWrapper; +using Grabacr07.KanColleWrapper.Models.Raw; +using Livet; + +namespace Counter +{ + public abstract class CounterBase : NotificationObject + { + #region Text 変更通知プロパティ + + private string _Text; + + public string Text + { + get { return this._Text; } + set + { + if (this._Text != value) + { + this._Text = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Count 変更通知プロパティ + + private int _Count; + + public int Count + { + get { return this._Count; } + set + { + if (this._Count != value) + { + this._Count = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public void Reset() + { + this.Count = 0; + } + } + + public class ItemDestroyCounter : CounterBase + { + public ItemDestroyCounter(KanColleProxy proxy) + { + proxy.api_req_kousyou_destroyitem2 + .TryParse() + .Where(x => x.IsSuccess) + .Subscribe(_ => this.Count++); + + this.Text = "装備を破棄した回数"; + } + } + + public class SupplyCounter : CounterBase + { + public SupplyCounter(KanColleProxy proxy) + { + proxy.api_req_hokyu_charge + .TryParse() + .Where(x => x.IsSuccess) + .Subscribe(_ => this.Count++); + + this.Text = "艦娘に補給した回数"; + } + } + + + public class MissionCounter : CounterBase + { + public MissionCounter(KanColleProxy proxy) + { + proxy.api_req_mission_result + .TryParse() + .Where(x => x.IsSuccess) + .Where(x => x.Data.api_clear_result == 1 || x.Data.api_clear_result == 2) + .Subscribe(_ => this.Count++); + + this.Text = "遠征に成功した回数"; + } + } +} diff --git a/Plugins/Counter/KanColleCounter.cs b/Plugins/Counter/KanColleCounter.cs new file mode 100644 index 000000000..ffb6c46c5 --- /dev/null +++ b/Plugins/Counter/KanColleCounter.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.Composition; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; +using Grabacr07.KanColleWrapper; + +namespace Counter +{ + [Export(typeof(IToolPlugin))] + [ExportMetadata("Title", "KanColleCounter")] + [ExportMetadata("Description", "シンプルな回数カウント機能を提供します。")] + [ExportMetadata("Version", "1.0")] + [ExportMetadata("Author", "@Grabacr07")] + public class KanColleCounter : IToolPlugin + { + private readonly CounterViewModel viewmodel = new CounterViewModel + { + Counters = new ObservableCollection + { + new SupplyCounter(KanColleClient.Current.Proxy), + new ItemDestroyCounter(KanColleClient.Current.Proxy), + new MissionCounter(KanColleClient.Current.Proxy), + } + }; + + public string ToolName + { + get { return "Counter"; } + } + + public object GetSettingsView() + { + return null; + } + + public object GetToolView() + { + return new CounterView { DataContext = this.viewmodel, }; + } + } +} diff --git a/Plugins/Counter/Properties/AssemblyInfo.cs b/Plugins/Counter/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bf27a83c9 --- /dev/null +++ b/Plugins/Counter/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("Counter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Counter")] +[assembly: AssemblyCopyright("Copyright c 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +//ローカライズ可能なアプリケーションのビルドを開始するには、 +//.csproj ファイルの CultureYouAreCodingWith を +// 内部で設定します。たとえば、 +//ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、 +//下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を +//プロジェクト ファイルの UICulture 設定と一致するよう更新します。 + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所 + //(リソースがページ、 + //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます) + ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所 + //(リソースがページ、 + //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます) +)] + + +// アセンブリのバージョン情報は、以下の 4 つの値で構成されています: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を +// 既定値にすることができます: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Plugins/Counter/Properties/Resources.Designer.cs b/Plugins/Counter/Properties/Resources.Designer.cs new file mode 100644 index 000000000..3ace88c8a --- /dev/null +++ b/Plugins/Counter/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// このコードはツールによって生成されました。 +// ランタイム バージョン:4.0.30319.34014 +// +// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 +// コードが再生成されるときに損失したりします +// +//------------------------------------------------------------------------------ + +namespace Counter.Properties { + + + /// + /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 + /// + // このクラスは StronglyTypedResourceBuilder クラスによって ResGen + // または Visual Studio のようなツールを使用して自動生成されました。 + // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に + // ResGen を実行し直すか、または VS プロジェクトをリビルドします。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Counter.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 + /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Plugins/Counter/Properties/Resources.resx b/Plugins/Counter/Properties/Resources.resx new file mode 100644 index 000000000..ffecec851 --- /dev/null +++ b/Plugins/Counter/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Plugins/Counter/Properties/Settings.Designer.cs b/Plugins/Counter/Properties/Settings.Designer.cs new file mode 100644 index 000000000..9a73b6796 --- /dev/null +++ b/Plugins/Counter/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Counter.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Plugins/Counter/Properties/Settings.settings b/Plugins/Counter/Properties/Settings.settings new file mode 100644 index 000000000..8f2fd95d6 --- /dev/null +++ b/Plugins/Counter/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Plugins/Counter/app.config b/Plugins/Counter/app.config new file mode 100644 index 000000000..658d61c58 --- /dev/null +++ b/Plugins/Counter/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Plugins/Counter/packages.config b/Plugins/Counter/packages.config new file mode 100644 index 000000000..44cf574b4 --- /dev/null +++ b/Plugins/Counter/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Plugins/MasterDataViewer/MasterDataViewer.cs b/Plugins/MasterDataViewer/MasterDataViewer.cs new file mode 100644 index 000000000..a13d28809 --- /dev/null +++ b/Plugins/MasterDataViewer/MasterDataViewer.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.Linq; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; +using Grabacr07.KanColleViewer.Plugins.ViewModels; +using Grabacr07.KanColleViewer.Plugins.Views; + +namespace Grabacr07.KanColleViewer.Plugins +{ + [Export(typeof(IToolPlugin))] + [ExportMetadata("Title", "MastarData")] + [ExportMetadata("Description", "start2 で取得される、艦これのマスター データを閲覧するためのビュー機能を提供します。")] + [ExportMetadata("Version", "1.0")] + [ExportMetadata("Author", "@Grabacr07")] + public class MasterDataViewer : IToolPlugin + { + private readonly PortalViewModel portalViewModel = new PortalViewModel(); + + public string ToolName + { + get { return "MasterView"; } + } + + + public object GetSettingsView() + { + return null; + } + + public object GetToolView() + { + return new Portal { DataContext = this.portalViewModel }; + } + } +} diff --git a/Plugins/MasterDataViewer/MasterDataViewer.csproj b/Plugins/MasterDataViewer/MasterDataViewer.csproj new file mode 100644 index 000000000..30e59a552 --- /dev/null +++ b/Plugins/MasterDataViewer/MasterDataViewer.csproj @@ -0,0 +1,144 @@ + + + + + Debug + AnyCPU + {08226BB3-A7A0-49E3-84DE-ED5B7A7D293E} + library + Properties + Grabacr07.KanColleViewer.Plugins + ExPlugin.MasterDataViewer + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + ..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll + + + + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + 4.0 + + + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + Portal.xaml + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {f00fc570-2a80-4f61-8364-798cd44514b2} + Desktop.Metro + + + {c5f0111f-3f68-4a74-bb20-bb762564d080} + KanColleViewer + + + {0bc8cf79-76d9-46ad-867f-fec6c6ad4594} + KanColleWrapper + + + {21b4ad15-d9fa-4873-bfad-1eeefbc6c264} + MetroRadiance.Chrome + + + {a6b0a741-5be0-479d-b813-e65672350057} + MetroRadiance.Core + + + {0af0b9ff-d981-4d0f-a41f-c3ab6fe2f16d} + MetroRadiance + + + + + Designer + MSBuild:Compile + + + + + rem mkdir $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins +rem xcopy /Y $(TargetDir)*.* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName) +rem move $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\$(TargetName).* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins + + + + + このプロジェクトは、このコンピューターにはない NuGet パッケージを参照しています。これらをダウンロードするには、NuGet パッケージの復元を有効にしてください。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。不足しているファイルは {0} です。 + + + + + \ No newline at end of file diff --git a/Plugins/MasterDataViewer/Properties/AssemblyInfo.cs b/Plugins/MasterDataViewer/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..748eb0102 --- /dev/null +++ b/Plugins/MasterDataViewer/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("MasterDataViewer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MasterDataViewer")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +//ローカライズ可能なアプリケーションのビルドを開始するには、 +//.csproj ファイルの CultureYouAreCodingWith を +// 内部で設定します。たとえば、 +//ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、 +//下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を +//プロジェクト ファイルの UICulture 設定と一致するよう更新します。 + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所 + //(リソースがページ、 + //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます) + ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所 + //(リソースがページ、 + //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます) +)] + + +// アセンブリのバージョン情報は、以下の 4 つの値で構成されています: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を +// 既定値にすることができます: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Plugins/MasterDataViewer/Properties/Resources.Designer.cs b/Plugins/MasterDataViewer/Properties/Resources.Designer.cs new file mode 100644 index 000000000..7f9d4b627 --- /dev/null +++ b/Plugins/MasterDataViewer/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// このコードはツールによって生成されました。 +// ランタイム バージョン:4.0.30319.34209 +// +// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 +// コードが再生成されるときに損失したりします。 +// +//------------------------------------------------------------------------------ + +namespace Grabacr07.KanColleViewer.Plugins.Properties { + using System; + + + /// + /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 + /// + // このクラスは StronglyTypedResourceBuilder クラスが ResGen + // または Visual Studio のようなツールを使用して自動生成されました。 + // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に + // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Grabacr07.KanColleViewer.Plugins.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 + /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Plugins/MasterDataViewer/Properties/Resources.resx b/Plugins/MasterDataViewer/Properties/Resources.resx new file mode 100644 index 000000000..ffecec851 --- /dev/null +++ b/Plugins/MasterDataViewer/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Plugins/MasterDataViewer/Properties/Settings.Designer.cs b/Plugins/MasterDataViewer/Properties/Settings.Designer.cs new file mode 100644 index 000000000..479c385f6 --- /dev/null +++ b/Plugins/MasterDataViewer/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// このコードはツールによって生成されました。 +// ランタイム バージョン:4.0.30319.34209 +// +// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 +// コードが再生成されるときに損失したりします。 +// +//------------------------------------------------------------------------------ + +namespace Grabacr07.KanColleViewer.Plugins.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Plugins/MasterDataViewer/Properties/Settings.settings b/Plugins/MasterDataViewer/Properties/Settings.settings new file mode 100644 index 000000000..8f2fd95d6 --- /dev/null +++ b/Plugins/MasterDataViewer/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Plugins/MasterDataViewer/ViewModels/PortalViewModel.cs b/Plugins/MasterDataViewer/ViewModels/PortalViewModel.cs new file mode 100644 index 000000000..bbf2897ba --- /dev/null +++ b/Plugins/MasterDataViewer/ViewModels/PortalViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Livet; + +namespace Grabacr07.KanColleViewer.Plugins.ViewModels +{ + public class PortalViewModel : ViewModel + { + } +} diff --git a/Plugins/MasterDataViewer/Views/Portal.xaml b/Plugins/MasterDataViewer/Views/Portal.xaml new file mode 100644 index 000000000..41a450347 --- /dev/null +++ b/Plugins/MasterDataViewer/Views/Portal.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/MasterDataViewer/Views/Portal.xaml.cs b/Plugins/MasterDataViewer/Views/Portal.xaml.cs new file mode 100644 index 000000000..da6817a08 --- /dev/null +++ b/Plugins/MasterDataViewer/Views/Portal.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Grabacr07.KanColleViewer.Plugins.Views +{ + /// + /// Portal.xaml の相互作用ロジック + /// + public partial class Portal : UserControl + { + public Portal() + { + InitializeComponent(); + } + } +} diff --git a/Plugins/MasterDataViewer/packages.config b/Plugins/MasterDataViewer/packages.config new file mode 100644 index 000000000..f97acc18f --- /dev/null +++ b/Plugins/MasterDataViewer/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Grabacr07.KanColleViewer/Models/CustomSound.cs b/Plugins/WindowsNotifier/CustomSound.cs similarity index 97% rename from Grabacr07.KanColleViewer/Models/CustomSound.cs rename to Plugins/WindowsNotifier/CustomSound.cs index af201a755..8c15ddf4c 100644 --- a/Grabacr07.KanColleViewer/Models/CustomSound.cs +++ b/Plugins/WindowsNotifier/CustomSound.cs @@ -8,8 +8,10 @@ using System.Media; using NAudio.Wave; using Settings = Grabacr07.KanColleViewer.Models.Settings; +using StatusService = Grabacr07.KanColleViewer.Models.StatusService; +using Volume = Grabacr07.KanColleViewer.Models.Volume; -namespace Grabacr07.KanColleViewer.Models +namespace Grabacr07.KanColleViewer.Plugins { class CustomSound { diff --git a/Plugins/WindowsNotifier/Properties/AssemblyInfo.cs b/Plugins/WindowsNotifier/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0dcf6c372 --- /dev/null +++ b/Plugins/WindowsNotifier/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("提督業も忙しい! Windows 通知プラグイン")] +[assembly: AssemblyDescription("提督業も忙しい! Windows 通知プラグイン")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("grabacr.net")] +[assembly: AssemblyProduct("KanColleViewer")] +[assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +// アセンブリのバージョン情報は、以下の 4 つの値で構成されています: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を +// 既定値にすることができます: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] diff --git a/Grabacr07.KanColleViewer/Win32/ShellHelpers.cs b/Plugins/WindowsNotifier/ShellHelpers.cs similarity index 95% rename from Grabacr07.KanColleViewer/Win32/ShellHelpers.cs rename to Plugins/WindowsNotifier/ShellHelpers.cs index f02395014..1a031afb8 100644 --- a/Grabacr07.KanColleViewer/Win32/ShellHelpers.cs +++ b/Plugins/WindowsNotifier/ShellHelpers.cs @@ -7,7 +7,7 @@ using MS.WindowsAPICodePack.Internal; using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -namespace Grabacr07.KanColleViewer.Win32 +namespace Grabacr07.KanColleViewer.Plugins { // ReSharper disable InconsistentNaming internal enum STGM : long diff --git a/Grabacr07.KanColleViewer/Models/Toast.cs b/Plugins/WindowsNotifier/Toast.cs similarity index 87% rename from Grabacr07.KanColleViewer/Models/Toast.cs rename to Plugins/WindowsNotifier/Toast.cs index 0861d66c7..56fcb6e89 100644 --- a/Grabacr07.KanColleViewer/Models/Toast.cs +++ b/Plugins/WindowsNotifier/Toast.cs @@ -5,7 +5,7 @@ using Windows.Foundation; using Windows.UI.Notifications; -namespace Grabacr07.KanColleViewer.Models +namespace Grabacr07.KanColleViewer.Plugins { /// /// Windows 8 のトースト通知機能を提供します。 @@ -22,7 +22,12 @@ public class Toast /// public static bool IsSupported { - get { return Helper.IsWindows8OrGreater; } + get + { + var version = Environment.OSVersion.Version; + return (version.Major == 6 && version.Minor >= 2) || version.Major > 6; + + } } #endregion diff --git a/Grabacr07.KanColleViewer/Models/Internal/Windows7Notifier.cs b/Plugins/WindowsNotifier/Windows7Notifier.cs similarity index 66% rename from Grabacr07.KanColleViewer/Models/Internal/Windows7Notifier.cs rename to Plugins/WindowsNotifier/Windows7Notifier.cs index 7e1b715fd..619366c8d 100644 --- a/Grabacr07.KanColleViewer/Models/Internal/Windows7Notifier.cs +++ b/Plugins/WindowsNotifier/Windows7Notifier.cs @@ -2,15 +2,14 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; +using System.Threading.Tasks; using System.Windows.Forms; +using Grabacr07.KanColleViewer.Composition; using Application = System.Windows.Application; -namespace Grabacr07.KanColleViewer.Models.Internal +namespace Grabacr07.KanColleViewer.Plugins { - /// - /// 通知領域アイコンを利用した通知機能を提供します。 - /// - internal class Windows7Notifier : IWindowsNotifier + internal class Windows7Notifier : INotifier { CustomSound sound = new CustomSound(); private NotifyIcon notifyIcon; @@ -21,10 +20,12 @@ public void Initialize() const string iconUri = "pack://application:,,,/KanColleViewer;Component/Assets/app.ico"; Uri uri; - if (!Uri.TryCreate(iconUri, UriKind.Absolute, out uri)) return; + if (!Uri.TryCreate(iconUri, UriKind.Absolute, out uri)) + return; var streamResourceInfo = Application.GetResourceStream(uri); - if (streamResourceInfo == null) return; + if (streamResourceInfo == null) + return; using (var stream = streamResourceInfo.Stream) { @@ -37,9 +38,10 @@ public void Initialize() } } - public void Show(string header, string body, Action activated, Action failed = null) + public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) { - if (this.notifyIcon == null) return; + if (this.notifyIcon == null) + return; if (activated != null) { @@ -53,6 +55,11 @@ public void Show(string header, string body, Action activated, Action notifyIcon.ShowBalloonTip(1000, header, body, ToolTipIcon.None); } + public object GetSettingsView() + { + return null; + } + public void Dispose() { if (this.notifyIcon != null) diff --git a/Grabacr07.KanColleViewer/Models/Internal/Windows8Notifier.cs b/Plugins/WindowsNotifier/Windows8Notifier.cs similarity index 74% rename from Grabacr07.KanColleViewer/Models/Internal/Windows8Notifier.cs rename to Plugins/WindowsNotifier/Windows8Notifier.cs index 0cd2769c9..ea4d642e0 100644 --- a/Grabacr07.KanColleViewer/Models/Internal/Windows8Notifier.cs +++ b/Plugins/WindowsNotifier/Windows8Notifier.cs @@ -4,17 +4,13 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using Windows.UI.Notifications; -using Grabacr07.KanColleViewer.Win32; +using Grabacr07.KanColleViewer.Composition; using Microsoft.WindowsAPICodePack.Shell.PropertySystem; using MS.WindowsAPICodePack.Internal; -namespace Grabacr07.KanColleViewer.Models.Internal +namespace Grabacr07.KanColleViewer.Plugins { - /// - /// トーストを使用した通知機能を提供します。 - /// - internal class Windows8Notifier : IWindowsNotifier + internal class Windows8Notifier : INotifier { CustomSound sound = new CustomSound(); #region static members @@ -67,16 +63,24 @@ private static void InstallShortcut(string shortcutPath) ErrorHelper.VerifySucceeded(newShortcutSave.Save(shortcutPath, true)); } - public void Show(string header, string body, Action activated, Action failed = null) + public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) { var toast = new Toast(header, body); toast.Activated += (sender, args) => activated(); - if (failed != null) toast.ToastFailed += (sender, args) => failed(args.ErrorCode); + if (failed != null) + toast.ToastFailed += (sender, args) => failed(args.ErrorCode); sound.SoundOutput(header, true); toast.Show(); } - public void Dispose() { } + public object GetSettingsView() + { + return null; + } + + public void Dispose() + { + } } } diff --git a/Plugins/WindowsNotifier/WindowsNotifier.cs b/Plugins/WindowsNotifier/WindowsNotifier.cs new file mode 100644 index 000000000..65a4bb3ad --- /dev/null +++ b/Plugins/WindowsNotifier/WindowsNotifier.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Composition; + +namespace Grabacr07.KanColleViewer.Plugins +{ + [Export(typeof(INotifier))] + [ExportMetadata("Title", "WindowsNotifier")] + [ExportMetadata("Description", "Windows OS の機能 (トースト通知・バルーン通知) を使用して通知します。")] + [ExportMetadata("Version", "1.0")] + [ExportMetadata("Author", "@Grabacr07")] + public class WindowsNotifier : INotifier + { + private readonly INotifier notifier; + + public WindowsNotifier() + { + this.notifier = Windows8Notifier.IsSupported + ? (INotifier) new Windows8Notifier() + : new Windows7Notifier(); + } + + public void Dispose() + { + this.notifier.Dispose(); + } + + public void Initialize() + { + this.notifier.Initialize(); + } + + public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) + { + this.notifier.Show(type, header, body, activated, failed); + } + + public object GetSettingsView() + { + return this.notifier.GetSettingsView(); + } + } +} diff --git a/Plugins/WindowsNotifier/WindowsNotifier.csproj b/Plugins/WindowsNotifier/WindowsNotifier.csproj new file mode 100644 index 000000000..1eb7bc5cc --- /dev/null +++ b/Plugins/WindowsNotifier/WindowsNotifier.csproj @@ -0,0 +1,129 @@ + + + + + Debug + AnyCPU + {55C0036D-3206-4C63-A2C0-447C41CAFAF5} + Library + Properties + Grabacr07.KanColleViewer.Plugins + WindowsNotifier + v4.5 + 8.1 + 512 + + ..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + bin\Release %28beta%29\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\assemblies\CoreAudioApi.dll + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll + + + ..\..\packages\LivetExtensions.1.1.0.0\lib\net45\Livet.Extensions.dll + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll + + + ..\..\packages\LivetExtensions.1.1.0.0\lib\net45\Microsoft.WindowsAPICodePack.dll + + + ..\..\packages\LivetExtensions.1.1.0.0\lib\net45\Microsoft.WindowsAPICodePack.Shell.dll + + + ..\..\packages\NAudio.1.7.1\lib\net35\NAudio.dll + + + + + + + + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.dll + + + + ..\..\packages\LivetCask.1.1.0.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + + + + + + + + + + + + {c5f0111f-3f68-4a74-bb20-bb762564d080} + KanColleViewer + + + + + + + + + + + + mkdir $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins +xcopy /Y $(TargetDir)*.* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName) +move $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\$(TargetName).* $(SolutionDir)Grabacr07.KanColleViewer\bin\$(ConfigurationName)\Plugins + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/Plugins/WindowsNotifier/app.config b/Plugins/WindowsNotifier/app.config new file mode 100644 index 000000000..658d61c58 --- /dev/null +++ b/Plugins/WindowsNotifier/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Plugins/WindowsNotifier/packages.config b/Plugins/WindowsNotifier/packages.config new file mode 100644 index 000000000..972941bd4 --- /dev/null +++ b/Plugins/WindowsNotifier/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 17f87176c..225367d8e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,16 @@ -KanColleViewer! (提督業も忙しい!) +KanColleViewer! (提督業も忙しい!) -- -KCV is a browser utility that makes it easy to play Kantai Collection. +## Important Note +This KCV 3.8.x branch is no longer supported and is hosted here for archival purposes. + +**The 4.x development happens over at [my primary repository](https://github.com/Yuubari/KanColleViewer) and is a restart from scratch with a new translation engine.** + +## About + +**Old versions (check the Releases section to verify which version is the current) are not (and will not be) supported.** + +KCV is a Windows-only browser utility that makes it easy to play Kantai Collection. This is the translation project of the original [KanColleViewer](http://grabacr.net/kancolleviewer) ##### Main Contributors @@ -16,16 +25,22 @@ This is the translation project of the original [KanColleViewer](http://grabacr. ## Downloads All builds can be found in the following links below. -* [GitHub Releases](https://github.com/Zharay/KanColleViewer/releases) -- Major revision binaries -* [SkyDrive](http://sdrv.ms/1b01S24) -- Major revision binaries +* [GitHub Releases](https://github.com/Yuubari/KanColleViewer/releases) -- Major revision binaries +* [KCV Downloads](http://kcv.koumakan.jp/downloads/) -- Yuubari's personal mirror (Paris, France) + +## To Do +* An update of the horizontal version of KCV — work in progress +* Some changes to the way construction/drop/development logging is handled — postponed ## Frequently Asked Questions +###Refer to the standalone [FAQ](https://github.com/Yuubari/KanColleViewer/blob/master/FAQ.md) if your question is not answered below. + #### Is KCV safe? -Yes. You are mainly playing off Internet Explorer (IE). The program itself wraps itself around IE and captures all network coming in and out. It only looks for incoming data and uses that for displaying in game information such as ships, expeditions, quests, and so on. **This does not change the game itself in any way**. **It does not change the packets in any way**. For other solutions to say that their version is "safer" while they are asking you to use an API link are just as much a problem as it is with this program. +Yes. You are mainly playing off Internet Explorer (IE). The program itself wraps itself around IE and captures all network traffic coming in and out. It only looks for incoming data and uses that for displaying game information such as ships, expeditions, quests, and so on. **This does not change the game itself in any way**. **KCV does not change the packets in any way**. #### How do I use KCV to play Kancolle without a VPN? -Before or after logging in, press the "Set Regional Cookie" button. This will change your status from being an IP from outside Japan to being a Japanese native one. It doesn't change your IP or do anything else except change a flag value on your visitor cookie. +Before or after logging in, press the "Set Regional Cookie" button; note: DMM.com should be fully loaded for it to work, don't click it too fast or the script will fail to execute. This will make DMM think of you as of a user located in Japan. It doesn't change your IP or do anything else except change a flag value on your visitor cookie. #### Is this cookie safe? By all means it is. But it does mean that it makes playing Kancolle a ton easier for regions that DMM does not support. From their twitter responses, they are alright with foreigners playing the game, but they will not provide any support for those outside of Japan. Until they change this rather open method of delegating foreigners from non-foreigners, this is probably the easiest way to play (and possibly register for) the game itself. @@ -42,21 +57,24 @@ Install [Flash for Internet Explorer](http://get.adobe.com/flashplayer/othervers You need to have [.NET Framework 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=30653) installed for your version of Windows. Those on Windows 8 do not have to do this. #### I'm on Windows XP/Mac/Linux and I want to have fun too! -Sadly, Microsoft doesn't fully support .NET 4.5. There may be 3rd party ways of getting support for the package, but Microsoft has basically abandoned the XP and other OSs in terms of support. Your only two choices realistically is to either get to Windows 7/8 or use [Logbook](https://github.com/Zharay/logbook) which is another Kancolle project that is being worked on that uses Java and is multi-platform also being worked on by [@Zharay](http://twitter.com/Zharay). It is much simpler, but does an awesome job at what it does. +Sadly, Microsoft doesn't fully support .NET 4.5 on systems below Windows 7. There may be 3rd party ways of getting support for the package, but Microsoft has basically abandoned the XP and other OSs in terms of support. Your only two choices realistically is to either get to Windows 7/8 or use [Sanaechan Logbook](https://github.com/silfumus/logbook-EN/releases) which is another Kancolle project that is being worked on that uses Java and is multi-platform. It is much simpler, but does an awesome job at what it does. + +Regarding non-Windows systems: WPF applications are completely unsupported on OS X, Linux, *BSD and other *NIX systems. + +Important note: while Microsoft has announced that they will be open-sourcing the .NET Core Run-time (which means functional run-times for *NIX systems will be soon developed), porting KCV to *NIX/Linux systems (BSD, OS X, Linux) is not currently possible. KCV depends on two Windows x86/x86_64-only components: Livet and Fiddler. Reimplementing these frameworks would take unrealistic amounts of time. #### I have a white screen / error message about being unable to connect. Please let me know if this is happening and tell me what OS you are using and the version of IE. My suspicion is an outdated version of IE. Reports have also shown that clearing your cache+cookies and re-installing flash will also fix this issue. -If you are getting connection errors, try changing the program's proxy server port within KanColleViewer.exe.config. Find the number 37564 and replace it with 37565 or another random number. Restart KCV and see if the problem goes away. - -#### My Fleets and Expeditions don't show/update! +If you are getting connection errors, try changing the program's proxy server port within KanColleViewer.exe.config. Find the number 37564 and replace it with 37565 or another random number. Restart KCV and see if the problem goes away +#### My Fleets and Expeditions don't show/update with a new translation engine! Clear your cache and relaunch KCV again. Especially after updates or playing between versions of KCV, this should fix any issues regarding this. #### I want the original Japanese names for ships/items/etc. Easiest way is to just disable translations in the options menu. You can also set the UI's language to Japanese which will disable all translations by default. If you only want certain things translated, deleting the corresponding XML file in the translation folder is your best bet (just be sure to disable auto update). #### I'm missing XXXX translations! (XXXX is in Japanese) -Please help me with these when you run into them. The translation engine has the ability to add untranslated text to the corresponding XML file found in translations. Find the untranslated parts at the bottom of the list and message it to me through pastebin on twitter (@Zharay) or as a bug in GitHub. +Please help me with these when you run into them. The translation engine has the ability to add untranslated text to the corresponding XML file found in translations. Find the untranslated parts at the bottom of the list and attach them to a new issue on GitHub. #### Custom Sound Notifications - What? These are sounds that play immediately when a normal windows notification is to be displayed. Supported formats are WAV and MP3. You must place them in the "Sounds" and under the sub-directory corresponding to the notification you require. It doesn't matter the name or the number you have; a random file will be chosen to be played every time. @@ -71,7 +89,7 @@ Note! For those not in English UI, you may need to place them in the folders tha * Ranking information * EXP Calculator * Auto updating and version checking -* Regional cookie setting. +* Regional cookie setting * Flash quality settings * Custom sound notifications * Extra stat display on ships and equipment @@ -84,7 +102,7 @@ KanColleViewer uses the web browser component of the Windows Presentation Founda Of course, we do not change the contents of the packets in anyway and is used to provide information to the program's components. ### About The Translation -Main work on the translation of ships, equipment, and quests fall solely on the now defunct [silfumus' version of KanColleViewer](https://github.com/silfumus/KanColleViewer) and those who contributed to it. I manually merged the changes to this version of the fork and went from there. +Main work on the translation of ships, equipment, and quests fall solely on the now defunct [silfumus' version of KanColleViewer](https://github.com/silfumus/KanColleViewer) and those who contributed to it. Zharay manually merged the changes to this version of the fork and went from there. The way the translation works is that it manually loads the translation from several text files which holds both the Japanese name and the English translation of the item in question. This can theoretically be used to translate the contents of the game easily to any language needed. @@ -98,16 +116,16 @@ The way the translation works is that it manually loads the translation from sev * Sound muting ### Requirements -* Windows 8 or later +* Windows 8 or later (including 8.1 and 10) * Windows 7 (limited functionality) -* [.NET Framework 4.5](http://www.microsoft.com/ja-jp/download/details.aspx?id=30653) +* [.NET Framework 4.5](http://www.microsoft.com/ja-jp/download/details.aspx?id=30653) (pre-installed in Windows 8, 8.1 and 10) -Developed and tested mainly in Windows 8.1 Pro. Windows 7 can also be used to run the program, but you will not have the built in notification system that is found in Windows 8. +Developed and tested mainly in Windows 10 Technical Preview. Windows 7 can also be used to run the program, but you will not have the built in notification system that is found in Windows 8. Windows 7 requires that you install .NET Framework 4.5. Windows 8 already has this installed by default. ### Development Environment, Language, Libraries -This was mainly developed using C# + WPF in Windows 8.1 Pro and Visual Studio Premium 2013. +This is currently being developed using C# + WPF in Windows 10 Technical Preview and Visual Studio 2013.4 Community Edition. * [Reactive Extensions](http://rx.codeplex.com/) * Interactive Extensions diff --git a/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.XML b/assemblies/FiddlerCore4.XML similarity index 90% rename from Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.XML rename to assemblies/FiddlerCore4.XML index bf3ae97c7..e071e3e91 100644 --- a/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.XML +++ b/assemblies/FiddlerCore4.XML @@ -1,6432 +1,6789 @@ - - - - FiddlerCore4 - - - - - Wrapper for WinINET cache APIs. - - - - - Clear all HTTP Cookies from the WinINET Cache - - - - - Clear all files from the WinINET Cache - - - - - Delete all permanent WinINET cookies for sHost; won't clear memory-only session cookies. Supports hostnames with an optional leading wildcard, e.g. *example.com. NOTE: Will not work on VistaIE Protected Mode cookies. - - The hostname whose cookies should be cleared - - - - Clear the Cache items. Note: May be synchronous, may be asynchronous. - - TRUE if cache files should be cleared - TRUE if cookies should be cleared - - - - For PInvoke: Contains information about an entry in the Internet cache - - - - - Wrapper for WinINET proxy configuration APIs - - - - - Hostnames of sites to bypass proxy. <local> is common. - - - - - Allow direct connection to host - - - - - Attempt WPAD autoproxy detection - - - - - Ignore WinINET "no autoproxy unticks box" optimization - - - - - Use user-supplied URL to get FindProxyForURL script - - - - - Use user-supplied manual/fixed proxy address list - - - - - WPAD script url that may be used if _bUseScript true - - - - - Gathers proxy information from a named connection. - - Pass DefaultLAN to look for the "null" connection - Proxy info, or null - - - - Get a string describing the proxy settings - - Returns a multi-line string representing the proxy settings - - - - Calculate a string suitable for passing into WinINET APIs. - - Returns a string containing proxy information, or NULL. NB: I've seen WinINET blow up when passed String.Empty rather than null. - - - - - Given a proxy string, we crack out the proxy gateways for each protocol - - e.g. HTTP=itgproxy:80;FTP=ftpprox:21; - false on error - - - - Fills this WinINETProxyInfo instance with settings from specified WinINET connection. - - Name of the connection. Pass NULL for LAN connection. - TRUE if the settings were successfully retrieved. - - - - Sets WinINET proxy settings for specified connection to those specified in this WinINETProxy instance. - - Name of the connection. Pass NULL for LAN connection. - - - - Semi-colon delimited list of hostnames that should bypass the fixed proxy - - - - - TRUE if manually-specified proxy should be used. - - - - - TRUE if a direct HTTP connection may be made if AutoProxy/PAC is unreachable or corrupt - - - - - True if the proxy should be bypassed for dotless hostnames. - NOTE: Simply looks at the bypassList string to see if it contains a LOCAL rule. - - - - - String representing the endpoint of the proxy for HTTP-traffic, if configured - - - - - String representing the endpoint of the proxy for HTTPS-traffic, if configured - - - - - String representing the endpoint of the proxy for FTP-traffic, if configured - - - - - String representing the endpoint of the proxy for SOCKS-traffic, if configured - - - - - Bool indicating whether this connection is set to autodetect the proxy - - - - - Returns a string pointing to the ProxyAutoConfig script, or null if there is no such URL or it is not enabled - - - - - Provides simple utility functions common to both ClientHello and ServerHello parsing - - - - - Gets a textual string from a TLS extension - - - - - Builds a string from an ALPN List of strings - - - - - Converts a HTTPS version to a "Major.Minor (Friendly)" string - - - - - The HTTPSClientHello class is used to parse the bytes of a HTTPS ClientHello message. - - - - - Map cipher id numbers to names. See http://www.iana.org/assignments/tls-parameters/ - - - - - Parse a single extension using the list from http://tools.ietf.org/html/rfc6066 - http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xml - - - - - - - Parse a single extension using the list from http://tools.ietf.org/html/rfc6066 - - - - - - - Did client use ALPN to go to SPDY? - http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-01#section-3.1 - - - - - Did this ServerHello Handshake specify an upgrade to SPDY? - - - - - The Session object manages the complete HTTP session including the UI listitem, the ServerChatter, and the ClientChatter. - - - - - Should we try to use the SPNToken type? - Cached for performance reasons - - - - - Sorta hacky, we may use a .NET WebRequest object to generate a valid NTLM/Kerberos response if the server - demands authentication and the Session is configured to automatically respond. - - - - - Used if the Session is bound to a WebSocket or CONNECTTunnel - - - - - Sets or unsets the specified SessionFlag(s) - - SessionFlags - Desired set value - - - - Test the session's BitFlags - - One or more (OR'd) SessionFlags - TRUE if specified flag(s) are set - - - - Test the session's BitFlags - - One or more (OR'd) SessionFlags - TRUE if any of specified flag(s) are set - - - - Should response be buffered for tampering - - - - - Timers stored as this Session progresses - - - - - Field is set to False if socket is poisoned due to HTTP errors. - - - - - Object representing the HTTP Response. - - - - - Object representing the HTTP Request. - - - - - Fiddler-internal flags set on the Session. - - TODO: ARCH: This shouldn't be exposed directly; it should be wrapped by a ReaderWriterLockSlim to prevent - exceptions while enumerating the flags for storage, etc - - - - Contains the bytes of the request body. - - - - - Contains the bytes of the response body. - - - - - IP Address of the client for this session. - - - - - Client port attached to Fiddler. - - - - - IP Address of the server for this session. - - - - - Event object used for pausing and resuming the thread servicing this session - - - - - Returns TRUE if the Session's HTTP Method is available and matches the target method. - - The target HTTP Method being compared. - true, if the method is specified and matches sTestFor (case-insensitive); otherwise false. - - - - Returns TRUE if the Session's target hostname (no port) matches sTestHost (case-insensitively). - - The host to which this session's host should be compared. - True if this session is targeted to the specified host. - - - - Replaces any characters in a filename that are unsafe with safe equivalents, and trim to 160 characters. - - - - - - - Notify extensions if this Session naturally led to another (e.g. due to redirect chasing or Automatic Authentication) - - The original session - The new session created - - - - Returns HTML representing the session. Call Utilities.StringToCF_HTML on the result of this function before placing it on the clipboard. - - TRUE if only the headers should be copied. - A HTML-formatted fragment representing the current session. - - - - Store this session's request and response to a string. - - If true, return only the request and response headers - String representing this session - - - - Store this session's request and response to a string. - - A string containing the content of the request and response. - - - - This private method pauses the Session's thread to allow breakpoint debugging - - - - - This method resumes the Session's thread in response to "Continue" commands from the UI - - - - - Set the SessionFlags.Ignore bit for this Session, also configuring it to stream, drop read data, and bypass event handlers. - - - - - Called by an AcceptConnection-spawned background thread, create a new session object from a client socket and execute the session - - Parameter object defining client socket and endpoint's HTTPS certificate, if present - - - - Call this method to AuthenticateAsServer on the client pipe. If configured, the pipe will first sniff the request - for the SubjectCN expected, which might be advertised in the TLS ServerNameIndicator extension. - - The default certificate to use - TRUE if a HTTPS handshake was achieved; FALSE for any exceptions or other errors. - - - - Call this function while in the "reading response" state to update the responseBodyBytes array with - the partially read response. - - TRUE if the peek succeeded; FALSE if not in the ReadingResponse state - - - - Prevents the server pipe from this session from being pooled for reuse - - - - - Ensures that, after the response is complete, the client socket is closed and not reused. - Does NOT (and must not) close the pipe. - - - - - Immediately close client and server sockets. Call in the event of errors-- doesn't queue server pipes for future reuse. - - - - - - Closes both client and server pipes and moves state to Aborted; unpauses thread if paused. - - - - - Save HTTP response body to Fiddler Captures folder. You likely want to call utilDecodeResponse first. - - True if the response body was successfully saved - - - - Save HTTP response body to specified location. You likely want to call utilDecodeResponse first. - - The name of the file to which the response body should be saved. - True if the file was successfully written. - - - - Save the request body to a file. You likely want to call utilDecodeRequest first. - - The name of the file to which the request body should be saved. - True if the file was successfully written. - - - - Save the request and response to a single file. - - The filename to which the session should be saved. - TRUE if only the headers should be written. - - - - Save the request to a file; the headers' Request Line will not contain the scheme or host - - The name of the file to which the request should be saved. - TRUE to save only the headers - - - - Save the request to a file - - The name of the file to which the request should be saved. - TRUE to save only the headers. - TRUE to include the Scheme and Host in the Request Line. - - - - Read metadata about this session from a stream. NB: Closes the Stream when done. - - The stream of XML text from which session metadata will be loaded. - True if the Metadata was successfully loaded; False if any exceptions were trapped. - - - - Writes this session's metadata to a file. - - The name of the file to which the metadata should be saved in XML format. - True if the file was successfully written. - - - - Saves the response (headers and body) to a file - - The File to write - TRUE if only heaers should be written - - - - Write the metadata about this Session to a stream. The Stream is left open! - - The Stream to write to - - - - Write the session's Request to the specified stream - - TRUE if only the headers should be be written - TRUE if the Scheme and Host should be written in the Request Line - The Stream to which the request should be written - True if the request was written to the stream. False if the request headers do not exist. Throws on other stream errors. - - - - Write the session's Request to the specified stream - - TRUE if only the headers should be be written - TRUE if the Scheme and Host should be written in the Request Line - TRUE if binary bodies should be encoded in base64 for text-safe transport - The Stream to which the request should be written - True if the request was written to the stream. False if the request headers do not exist. Throws on other stream errors. - - - - Write the session's Response to the specified stream - - The stream to which the response should be written - TRUE if only the headers should be written - TRUE if the response was written to the stream. False if the response headers do not exist. Throws on other stream errors. - - - - Write the session to the specified stream - - The stream to which the session should be written - TRUE if only the request and response headers should be written - False on any exceptions; True otherwise - - - - Replace HTTP request headers and body using the specified file. - - The file containing the request - True if the file was successfully loaded as the request body - - - - Replace HTTP response headers and body using the specified stream. - - The stream containing the response. - True if the Stream was successfully loaded. - - - - Replace HTTP response headers and body using the specified file. - - The file containing the response. - True if the file was successfully loaded. - - - - Return a string generated from the request body, decoding it and converting from a codepage if needed. Throws on errors. - - A string containing the request body. - - - - Return a string generated from the response body, decoding it and converting from a codepage if needed. Throws on errors. - - A string containing the response body. - - - - Find the text encoding of the request - - Returns the Encoding of the requestBodyBytes - - - - Find the text encoding of the response - - The Encoding of the responseBodyBytes - - - - Returns true if the absolute request URI contains the specified string. Case-insensitive. - - Case-insensitive string to find - TRUE if the URI contains the string - - - - Removes chunking and HTTP Compression from the Response. Adds or updates Content-Length header. - - Returns TRUE if the response was decoded; returns FALSE on failure, or if response didn't have headers that showed encoding. - - - - Removes chunking and HTTP Compression from the Response. Adds or updates Content-Length header. - - TRUE if error messages should be suppressed. False otherwise. - TRUE if the decoding was successsful. - - - - Removes chunking and HTTP Compression from the Request. Adds or updates Content-Length header. - - Returns TRUE if the request was decoded; returns FALSE on failure, or if request didn't have headers that showed encoding. - - - - Use GZIP to compress the request body. Throws exceptions to caller. - - TRUE if compression succeeded - - - - Use GZIP to compress the response body. Throws exceptions to caller. - - TRUE if compression succeeded - - - - Use DEFLATE to compress the response body. Throws exceptions to caller. - - TRUE if compression succeeded - - - - Use BZIP2 to compress the response body. Throws exceptions to caller. - - TRUE if compression succeeded - - - - Introduces HTTP Chunked encoding on the response body - - The number of chunks to try to create - TRUE if the chunking could be performed. - - - - Perform a string replacement on the request body. Adjusts the Content-Length header if needed. - - The case-sensitive string to search for. - The text to replace. - TRUE if one or more replacements occurred. - - - - Call inside OnBeforeRequest to create a response object and bypass the server. - - - - - Perform a regex-based string replacement on the response body. Adjusts the Content-Length header if needed. - - The regular expression used to search the body. Specify RegEx Options via leading Inline Flags, e.g. (?im) for case-Insensitive Multi-line. - The text or expression used to replace - TRUE if replacements occured - - - - Perform a string replacement on the response body (potentially multiple times). Adjust the Content-Length header if needed. - - String to find (case-sensitive) - String to use to replace - TRUE if replacements occurred - - - - Perform a one-time string replacement on the response body. Adjust the Content-Length header if needed. - - String to find (case-sensitive) - String to use to replace - TRUE for Case-Sensitive - TRUE if a replacement occurred - - - - Replaces the request body with sString as UTF8. Sets Content-Length header and removes Transfer-Encoding/Content-Encoding. - - The desired request Body as a string - - - - Replaces the response body with sString. Sets Content-Length header and removes Transfer-Encoding/Content-Encoding - - The desired response Body as a string - - - - Add a string to the top of the response body, updating Content-Length. (Call utilDecodeResponse first!) - - The string to prepend - - - - Find a string in the request body. Return its index, or -1. - - Term to search for - Require case-sensitive match? - Location of sSearchFor,or -1 - - - - Find a string in the response body. Return its index, or -1. - - Term to search for - Require case-sensitive match? - Location of sSearchFor,or -1 - - - - Reset the SessionID counter to 0. This method can lead to confusing UI, so use sparingly. - - - - - Create a session object from two byte[] representing request and response. - - The client data bytes - The server data bytes - - - - Create a Session object from a (serializable) SessionData object - - - - - - Create a session object from two byte[] representing request and response. This is used when loading a Session Archive Zip. - - The client data bytes - The server data bytes - SessionFlags for this session - - - - Creates a new session and attaches it to the pipes passed as arguments - - The client pipe from which the request is read and to which the response is written. - The server pipe to which the request is sent and from which the response is read. May be null. - - - - Initialize a new session from a given request headers and body request builder data. Note: No Session ID is assigned here. - - NB: If you're copying an existing request, use oRequestHeaders.Clone() - The bytes of the request's body - - - - THREADHACK: - TODO: Use an I/O Completion Port to wait for traffic on the client socket without blocking a threadpool thread - - - - - Called when the Session is ready to begin processing. Eats exceptions to prevent unhandled exceptions on background threads from killing the application. - - Unused parameter (required by ThreadPool) - - - - InnerExecute() implements Fiddler's HTTP Pipeline - - - - - If the response demands credentials and the Session is configured to have Fiddler provide those - credentials, try to do so now. - - TRUE if Fiddler has generated a response to an Auth challenge; FALSE otherwise. - - - - This method will perform obtain authentication credentials from System.NET using a reflection trick to grab the internal value. - It's needed to cope with CBT. - - This MUST live within its own non-inlined method such that when it's run on an outdated version of the .NET Framework, the outdated - version of the target object triggers a TypeLoadException in such a way that the caller can catch it and warn the user without - killing Fiddler.exe. - - - - - - Returns a Kerberos-usable SPN for the target - http://dev.chromium.org/developers/design-documents/http-authentication - "HttpAuthHandlerNegotiate::CreateSPN" - http://blog.michelbarneveld.nl/michel/archive/2009/11/14/the-reason-why-kb911149-and-kb908209-are-not-the-soluton.aspx - - - - - - - Returns the fully-qualified URL to which this Session's response points, or null. - This method is needed because many servers (illegally) return a relative url in HTTP/3xx Location response headers. - - null, or Target URL. Note, you may want to call Utilities.TrimAfter(sTarget, '#'); on the response - - - - Gets a redirect-target from a base URI and a Location header - - - - null, or Target URL. Note, you may want to call Utilities.TrimAfter(sTarget, '#'); - - - - Fiddler can only auto-follow redirects to HTTP/HTTPS/FTP. - - The BASE URL to which a relative redirection should be applied - Response "Location" header - TRUE if the auto-redirect target is allowed - - - - Handles a Response's Redirect if the Session is configured to do so. - - TRUE if a redirect was handled, FALSE otherwise - - - - Check for common mistakes in HTTP Responses and notify the user if they are found. Called only if Linting is enabled. - - - - - Assign a Session ID. Called by ClientChatter when headers are available - - - - - Called only by InnerExecute, this method reads a request from the client and performs tampering/manipulation on it. - - TRUE if there's a Request object and we should continue processing. FALSE if reading the request failed - *OR* if script or an extension changed the session's State to DONE or ABORTED. - - - - - Returns TRUE if response is a NTLM or NEGO challenge - - True for HTTP/401,407 with NEGO or NTLM demand - - - - Returns TRUE if response is a Digest, NTLM, or Nego challenge - - True for HTTP/401,407 with Digest, NEGO, NTLM demand - - - - Replace the "ipv*.fiddler "fake" hostnames with the IP-literal equvalents. - - - - - Determines if request host is pointing directly at Fiddler. - - - - - - Echo the client's request back as a HTTP Response, encoding to prevent XSS. - - - - - Send a Proxy Configuration script back to the client. - - - - - Send a Proxy Configuration script back to WinHTTP, so that Fiddler can use an upstream proxy specified - by a script on a fileshare. (WinHTTP only allows HTTP/HTTPS-hosted script files) - - - - - Send the Fiddler Root certificate back to the client - - - - - This method indicates to the client that a secure tunnel was created, - without actually talking to an upstream server. - - If Fiddler's AutoResponder is enabled, and that autoresponder denies passthrough, - then Fiddler itself will always indicate "200 Connection Established" and wait for - another request from the client. That subsequent request can then potentially be - handled by the AutoResponder engine. - - BUG BUG: This occurs even if Fiddler isn't configured for HTTPS Decryption - - - The hostname to use in the Certificate returned to the client - - - - This method adds a Proxy-Support: Session-Based-Authentication header and indicates whether the response is Nego:Type2. - - Returns TRUE if server returned a credible Type2 NTLM Message - - - - This helper evaluates the conditions for client socket reuse. - - - - - - Sends the Response that Fiddler received from the server back to the client socket. - - Should the client and server pipes be tightly-bound together? - True, if the response was successfully sent to the client - - - - Sets up the next Session on these pipes, binding this Session's pipes to that new Session, as appropriate. When this method is called, - the nextSession variable is populated with the new Session, and that object is executed at the appropriate time. - - TRUE if both the client and server pipes should be bound regardless of the serverPipe's ReusePolicy - - - - Refresh the UI elements for the session. - - Use TRUE to call Invoke, use FALSE to call BeginInvoke. - - - - Bitflags of commonly-queried session attributes - - - - - Returns True if this is a HTTP CONNECT tunnel. - - - - - A common use for the Tag property is to store data that is closely associated with the Session. - It is NOT marshalled during drag/drop and is NOT serialized to a SAZ file. - - - - - This event fires at any time the session's State changes. Use with caution due to the potential for performance impact. - - - - - This event fires if this Session automatically yields a new one, for instance, if Fiddler is configured to automatically - follow redirects or perform multi-leg authentication (X-AutoAuth). - - - - - If this session is a Tunnel, and the tunnel's IsOpen property is TRUE, returns TRUE. Otherwise returns FALSE. - - - - - If this session is a Tunnel, returns number of bytes sent from the Server to the Client - - - - - If this session is a Tunnel, returns number of bytes sent from the Client to the Server - - - - - Gets or Sets the HTTP Request body bytes. - Setter adjusts Content-Length header, and removes Transfer-Encoding and Content-Encoding headers. - Setter DOES NOT CLONE the passsed array. - Setter will throw if the Request object does not exist for some reason. - Use utilSetRequestBody(sStr) to ensure proper character encoding if you need to use a string. - - - - - Gets or Sets the HTTP Response body bytes. - Setter adjusts Content-Length header, and removes Transfer-Encoding and Content-Encoding headers. - Setter DOES NOT CLONE the passsed array. - Setter will throw if the Response object has not yet been created. (See utilCreateResponseAndBypassServer) - Use utilSetResponseBody(sStr) to ensure proper character encoding if you need to use a string. - - - - - When true, this session was conducted using the HTTPS protocol. - - - - - When true, this session was conducted using the FTP protocol. - - - - - Get the process ID of the application which made this request, or 0 if it cannot be determined. - - - - - Gets a path-less filename suitable for saving the Response entity. Uses Content-Disposition if available. - - - - - Set to true in OnBeforeRequest if this request should bypass the gateway - - - - - Returns the port used by the client to communicate to Fiddler. - - - - - State of session. Note Side-Effects: If setting to .Aborted, calls FinishUISession. If setting to/from a Tamper state, calls RefreshMyInspectors - - - - - Returns the path and query part of the URL. (For a CONNECT request, returns the host:port to be connected.) - - - - - Retrieves the complete URI, including protocol/scheme, in the form http://www.host.com/filepath?query. - Or sets the complete URI, adjusting the UriScheme and/or Host. - - - - - Gets or sets the URL (without protocol) being requested from the server, in the form www.host.com/filepath?query. - - - - - DNS Name of the host server targeted by this request. May include IPv6 literal brackets. NB: a port# may be included. - - - - - DNS Name of the host server (no port) targeted by this request. Will include IPv6-literal brackets for IPv6-literal addresses - - - - - Returns the server port to which this request is targeted. - - - - - Returns the sequential number of this session. Note, by default numbering is restarted at zero when the session list is cleared. - - - - - Returns the Address used by the client to communicate to Fiddler. - - - - - Gets or Sets the HTTP Status code of the server's response - - - - - Checks whether this is a WebSocket, and if so, whether it has logged any parsed messages. - - - - - Returns TRUE if this session's State > ReadingResponse, and oResponse, oResponse.headers, and responseBodyBytes are all non-null. Note that - bHasResponse returns FALSE if the session is currently reading, even if a body was copied using the COMETPeek feature - - - - - Indexer property into SESSION flags, REQUEST headers, and RESPONSE headers. e.g. oSession["Request", "Host"] returns string value for the Request host header. If null, returns String.Empty - - SESSION, REQUEST or RESPONSE - The name of the flag or header - String value or String.Empty - - - - Simple indexer into the Session's oFlags object; returns null if flag is not present. - - - Returns the string value if the specified flag is present, or null if it is not. - - - - - This object holds Session information as a set of four easily-marshalled byte arrays. - It is serializable, which enables cross-process transfer of this data (as in a drag/drop operation). - (Internally, data is serialized as if it were being stored in a SAZ file) - - - - - Create a SessionData object. - Note: Method must run as cheaply as possible, since it runs on all Drag/Dropped sessions within Fiddler itself. - - - - - - Parameters passed into the AcceptConnection method. - - - - - The Socket which represents the newly-accepted Connection - - - - - The Certificate to pass to SecureClientPipeDirect immediately after accepting the connection. - Normally null, this will be set if the proxy endpoint is configured as a "Secure" endpoint - by AssignEndpointCertificate / ActAsHTTPSEndpointForHostname. - - - - - The DateTime of Creation of this connection - - - - - Unknown - - - - - The new Session is needed to respond to an Authentication Challenge - - - - - The new Session is needed to follow a Redirection - - - - - The new Session is needed to generate a CONNECT tunnel - - - - - Event arguments constructed for the OnStateChanged event raised when a Session's state property changed - - - - - The prior state of this session - - - - - The new state of this session - - - - - Constructor for the change in state - - The old state - The new state - - - - This class holds a specialized memory stream with growth characteristics more suitable for reading from a HTTP Stream. - The default MemoryStream's Capacity will always grow to 256 bytes, then at least ~2x current capacity up to 1gb, then to the exact length after that. - This has two problems: - - The capacity may unnecessarily grow to >85kb, putting the object on the LargeObjectHeap even if we didn't really need 85kb. - After the capacity reaches 1gb in length, the capacity growth never exceeds the length, leading to huge reallocations and copies on every write. - - In some cases, the client can "hint" what the proper capacity ultimately needs to be by adding the Header size in bytes to the Content-Length specified size. - - - - - Used by the caller to supply a hint on the expected total size of reads from the pipe. - We cannot blindly trust this value because sometimes the client or server will lie and provide a - huge value that it will never use. This is common for RPC-over-HTTPS tunnels like that used by Outlook, for instance. - - Suggested total buffer size in bytes - - - - Interface for the WebSocket and CONNECT Tunnel classes - - - - - The CONNECTTunnel class represents a "blind tunnel" through which a CONNECT request is serviced to shuffle bytes between a client and the server. - - - See pg 206 in HTTP: The Complete Reference for details on how Tunnels work. - When HTTPS Decryption is disabled, Fiddler accepts a CONNECT request from the client. Then, we open a connection to the remote server. - We shuttle bytes back and forth between the client and the server in this tunnel, keeping Fiddler itself out of the loop - (no tampering, etc). - - - - - Number of bytes received from the client - - - - - Number of bytes received from the server - - - - - TRUE if this is a Blind tunnel, FALSE if decrypting - - - - - This "Factory" method creates a new HTTPS Tunnel and executes it on a background (non-pooled) thread. - - The Session containing the HTTP CONNECT request - - - - Creates a HTTPS tunnel. External callers instead use the CreateTunnel static method. - - The session for which this tunnel was initially created. - Client Pipe - Server Pipe - - - - This function keeps the thread alive until it is signaled that the traffic is complete - - - - - Executes the HTTPS tunnel inside an All-it-can-eat exception handler. - Call from a background thread. - - - - - Close the HTTPS tunnel and signal the event to let the service thread die. - WARNING: This MUST not be allowed to throw any exceptions, because it will do so on threads that don't catch them, and this will kill the application. - - - - - Called when we have received data from the local client. - Incoming data will immediately be forwarded to the remote host. - - The result of the asynchronous operation. - - - Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.
- The result of the asynchronous operation. -
- - Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.
- The result of the asynchronous operation. -
- - Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.
- The result of the asynchronous operation. -
- - - Returns number of bytes sent from the Server to the Client - - - - - Returns number of bytes sent from the Client to the Server - - - - - Common functions we'll want to use on Strings. Fiddler makes extensive use of strings which - should be interpreted in a case-insensitive manner. - - - - - Holds a variety of useful functions used in Fiddler and its addons. - - - - - Ensures a value is within a specified range. - - Type of the value - Current value - Min value - Max value - Returns the provided value, unless it is outside of the specified range, in which case the nearest "fencepost" is returned. - - - - A static byte array containing 0 elements. Use to avoid having many copies of an empty byte[] floating around. - - - - - Queries the user for a filename - - Dialog title - String representing file dialog filter - Filename or null - - - - Queries the user for a filename - - Dialog title - String representing file dialog filter - Initial directory or null - Filename or null - - - - Queries the user for an OPEN filename - - Dialog title - String representing file dialog filter (e.g. "All files (*.*)|*.*") - Filename or null - - - - Queries the user for an OPEN filename - - Dialog title - String representing file dialog filter - Initial directory or null - Filename or null - - - - Check to see that the target assembly defines a RequiredVersionAttribute and that the current Fiddler instance meets that requirement - - The assembly to test - The "type" of extension for display in error message - TRUE if the assembly includes a requirement and Fiddler meets it. - - - - Typically, a version number is displayed as "major number.minor number.build number.private part number". - - Version required - Version of the binary being tested - Returns 0 if exact match, else greater than 0 if Required version greater than verTest - - - - Shrinks a path string to fit within a certain number of characters, replacing segments with ellipses if needed. - - The Path to compact - Number of characters to shrink to - The compacted string, or the original string if compaction wasn't needed or failed - - - - Convert a full path into one that uses environment variables - - e.g. C:\windows\system32\foo.dll - %WINDIR%\System32\foo.dll - - - - Address the problem where the target "PATH" calls for a directoryname is already a filename - - - - - - - Ensure that the target file does not yet exist. If it does, generates a new filename with an embedded identifier, e.g. out[1].txt instead. - Attempts to ensure filename is creatable; e.g. if a path component needs to be a directory but is a file already, injects [#] into that - path component. - - Candidate filename - New filename which does not yet exist - - - - Ensure that the target path exists and if a file exists there, it is not readonly or hidden. - WARNING: Can throw if target "Filename" calls for a parent directoryname that is already used as a filename by a non-directory. - E.g. EnsureOverwriteable(C:\io.sys\filename.txt); would throw. - - The candidate filename - - - - Writes arrBytes to a file, creating the target directory and overwriting if the file exists. - - Path to File to write. - Bytes to write. - - - - Fills an array completely using the provided stream. Unlike a normal .Read(), this one will always fully fill the array unless the Stream throws. - - The stream from which to read. - The byte array into which the data should be stored. - The count of bytes read. - - - - Create a new byte[] containing the contents of two other byte arrays. - - - - - - - - Returns the Value from a (case-insensitive) token in the header string. Correctly handles double-quoted strings. Allows comma and semicolon as delimiter - - Name of the header - Name of the token - Value of the token if present; otherwise, null - - - - Ensures that the target string is iMaxLength or fewer characters - - The string to trim from - The maximum number of characters to return - Up to iMaxLength characters from the "Head" of the string. - - - - Ensures that the target string is iMaxLength or fewer characters, appending ... if truncation occurred - - The string to trim from - The maximum number of characters to return - The string, or up to iMaxLength-1 characters from the "Head" of the string, with \u2026 appeneded. - - - - Returns the "Head" of a string, before and not including a specified search string. - - The string to trim from - The delimiting string at which the trim should end. - Part of a string up to (but not including) sDelim, or the full string if sDelim was not found. - - - - Returns the "Head" of a string, before and not including the first instance of specified delimiter. - - The string to trim from. - The delimiting character at which the trim should end. - Part of a string up to (but not including) chDelim, or the full string if chDelim was not found. - - - - [Deprecated] Ensures that the target string is iMaxLength or fewer characters - - The string to trim from - The maximum number of characters to return - Identical to the method. - Up to iMaxLength characters from the "Head" of the string. - - - - Returns the "Tail" of a string, after (but NOT including) the First instance of specified delimiter. - - - The string to trim from. - The delimiting character after which the text should be returned. - Part of a string after (but not including) chDelim, or the full string if chDelim was not found. - - - - Returns the "Tail" of a string, after (but NOT including) the First instance of specified search string. - - - The string to trim from. - The delimiting string after which the text should be returned. - Part of a string after (but not including) sDelim, or the full string if sDelim was not found. - - - - Returns the "Tail" of a string, after (and including) the first instance of specified search string. - - The string to trim from. - The delimiting string at which the text should be returned. - Part of the string starting with sDelim, or the entire string if sDelim not found. - - - - Returns the "Tail" of a string, after (but not including) the Last instance of specified delimiter. - - - The string to trim from. - The delimiting character after which text should be returned. - Part of a string after (but not including) the final chDelim, or the full string if chDelim was not found. - - - - Returns the "Tail" of a string, after (but not including) the Last instance of specified substring. - - - The string to trim from. - The delimiting string after which text should be returned. - Part of a string after (but not including) the final sDelim, or the full string if sDelim was not found. - - - - Determines true if a request with the specified HTTP Method/Verb MUST contain a entity body - - The Method/Verb - TRUE if the HTTP Method MUST contain a request body. - - - - Returns true if a request with the specified HTTP Method/Verb may contain a entity body - - The Method/Verb - TRUE if the HTTP Method MAY contain a request body. - - - - Detects whether string ends in a file extension generally recognized as an image file extension. - Pass lowercase into this function. - - *Lowercase* string - TRUE if string ends with common image file extension - - - - Determines if the specified MIME type is "binary" in nature. - - The MIME type - TRUE if the MIME type is likely binary in nature - - - - Gets a string from a byte-array, stripping a Byte Order Marker preamble if present. - - - This function really shouldn't need to exist. Why doesn't calling .GetString on a string with a preamble remove the preamble??? - - The byte array - The encoding to convert from *if* there's no Byte-order-marker - The string - - - - Gets (via Headers or Sniff) the provided body's text Encoding. If not found, returns CONFIG.oHeaderEncoding (usually UTF-8). Potentially slow. - - HTTP Headers, ideally containing a Content-Type header with a charset attribute. - byte[] containing the entity body. - A character encoding, if one could be determined - - - - Gets (via Headers or Sniff) the Response Text Encoding. Returns CONFIG.oHeaderEncoding (usually UTF-8) if unknown. - Perf: May be quite slow; cache the response - - The session - The encoding of the response body - - - - Set of encodings for which we'll attempt to sniff. (List order matters, I think) - - - - - HtmlEncode a string. - In Fiddler itself, this is a simple wrapper for the System.Web.HtmlEncode function. - The .NET3.5/4.0 Client Profile doesn't include System.Web, so we must provide our - own implementation of HtmlEncode for FiddlerCore's use. - - String to encode - String encoded according to the rules of HTML Encoding, or null. - - - - This function accepts a string and an offset into the string. It reads one or more %XX sequences from the - string converting them into a UTF-8 string based on the input text - - - - - - - - Convert the %-encoded string into a string, interpreting %-escape sequences as UTF-8 characters - - %-encoded string - Unencoded string - - - - Replaces System.Web.HttpUtility.UrlPathEncode(str). - - String to encode as a URL Path - Encoded string - - - - Tokenize a string into tokens. Delimits on unquoted whitespace ; quote marks are dropped unless preceded by \ characters. - BUG BUG: Doesn't do what you expect with a path like this, due to the trailing slash: - prefs set fiddler.config.path.webtestexport.plugins "F:\users\ericlaw\documents\fiddler2\importexport\VSWebTest\" - For now, the simple bet is to drop the final backslash (since it'll get put back by other code) - - The string to tokenize - An array of strings - - - - Pretty-print a Hex view of a byte array. Slow. - - The byte array - Number of bytes per line - String containing a pretty-printed array - - - - Pretty-print a Hex view of a byte array. Slow. - - The byte array - Number of bytes per line - The maximum number of bytes to pretty-print - String containing a pretty-printed array - - - - Pretty-print a Hex view of a byte array. Slow. - - The byte array - Number of bytes per line - The maximum number of bytes to pretty-print - Show ASCII text at the end of each line - String containing a pretty-printed array - - - - Print an byte array to a hex string. - Slow. - - Byte array - String of hex bytes, or "null"/"empty" if no bytes provided - - - - Create a string in CF_HTML format - - The HTML string - The HTML string wrapped with a CF_HTML prelude - - - - Returns an integer from the registry, or a default. - - The Registry key in which to find the value. - The registry value name. - Default to return if the registry key is missing or cannot be used as an integer - The retrieved integer, or the default. - - - - Save a string to the registry. Correctly handles null Value, saving as String.Empty - - The registry key into which the value will be written. - The name of the value. - The value to write. - - - - Returns an Float from the registry, or a default. - - Registry key in which to find the value. - The value name. - The default float value if the registry key is missing or cannot be used as a float. - Float representing the value, or the default. - - - - Get a bool from the registry - - The RegistryKey - The Value name - The default value - Returns an bool from the registry, or bDefault if the registry key is missing or cannot be used as an bool. - - - - Maps a MIMEType to a file extension. Note: May hit the registry, so consider the performance implications. - Pass only the TYPE (e.g. use oResponse.MIMEType), to ensure no charset info in the string. - - The MIME Type - A file extension for the type, or .TXT - - - - Return the content type of a target file, or application/octet-stream if unknown. - - A filename, including the extension - - - - - Use the system registry to find the proper MIME-Type for a given file extension. - WARNING: Calling Path.GetExtension may throw on bad input. Use to guard against that. - - Dot-prefixed file extension (e.g. ".js") - Content-Type, or null if one cannot be determined - - - - Determines if we have a complete chunked response body (RFC2616 Section 3.6.1) - - The session object, used for error reporting - The response data stream. Note: We do not touch the POSITION property. - The start of the HTTP body to scan for chunk size info - Returns the start of the final received/partial chunk - End of byte data in stream representing this chunked content, or -1 if error - True, if we've found the complete last chunk, false otherwise. - - - - Takes a byte array and applies HTTP Chunked Transfer Encoding to it - - The byte array to convert - The number of chunks to try to create - The byte array with Chunked Transfer Encoding applied - - - - Removes HTTP chunked encoding from the data in writeData and returns the resulting array. - - Some chunked data - Unchunked data. Warning: Throws on data format errors - - - - Returns TRUE if the Array contains nulls. TODO: Extend to check for other chars which are clearly non-Unicode - - - - - - - Implements a BlockList for "unknown" encodings that the utilDecode* functions cannot handle - - Transfer-Encoding - Content-Encoding - TRUE if any encoding is known to be unsupported - - - - Removes one or more encodings in the proper order to reconstruct the unencoded body. - If removing Transfer-Encoding and Content-Encoding, ALWAYS remove Transfer-Encoding first. - - The list of encodings in the order that they were applied - RFC2616: If multiple encodings have been applied to an entity, the content codings MUST be listed in the order in which they were applied. - Should unchunking be permitted (TRUE for Transfer-Encoding, FALSE for Content-Encoding) - The bytes of the body - - - - Remove all encodings from arrBody, based on those specified in the supplied HTTP headers; does NOT modify headers. - Throws on errors. - - *Readonly* headers specifying what encodings are applied - In/Out array to be modified - - - - Decompress an array compressed using an Zlib DEFLATE stream. Not a HTTP Encoding; it's used internally in the PNG format. - - The array to expand - byte[] of decompressed data - - - - GZIPs a byte-array - - Input byte array - byte[] containing a gzip-compressed copy of writeData[] - - - - GZIP-Expand function which shows no UI and will throw on error - - TRUE if you want to use Xceed to decompress; false if you want to use System.IO - byte[] to decompress - A decompressed byte array, or byte[0]. Throws on errors. - - - - Expands a GZIP-compressed byte array - - The array to decompress - byte[] containing an un-gzipped copy of compressedData[] - - - - Compress a byte array using RFC1951 DEFLATE - - Array to compress - byte[] containing a DEFLATE'd copy of writeData[] - - - - UnDeflate function which shows no UI and will throw on error - - TRUE if you want to use Xceed to decompress; false if you want to use System.IO - byte[] to decompress - A decompressed byte array, or byte[0]. Throws on errors. - - - - Decompress a byte array that was compressed using RFC1951 DEFLATE - - Array to decompress - byte[] of decompressed data - - - - Compress a byte[] using the bzip2 algorithm - - Array to compress - byte[] of data compressed using bzip2 - - - - Decompress an array compressed using bzip2 - - The array to expand - byte[] of decompressed data - - - - Decompress an array compressed using bzip2 - - The array to expand - byte[] of decompressed data - - - - Try parsing the string for a Hex-formatted int. If it fails, return false and 0 in iOutput. - - The hex number - The int value - TRUE if the parsing succeeded - - - - Returns TRUE if two ORIGIN (scheme+host+port) values are functionally equivalent. - - The first ORIGIN - The second ORIGIN - The default port, if a port is not specified - TRUE if the two origins are equivalent - - - - This function cracks a sHostPort string to determine if the address - refers to a "local" site - - The string to evaluate, potentially containing a port - True if the address is local - - - - This function cracks a sHostPort string to determine if the address - refers to the local computer - - The string to evaluate, potentially containing a port - True if the address is 127.0.0.1, 'localhost', or ::1 - - - - Determines if the specified Hostname is a either 'localhost' or an IPv4 or IPv6 loopback literal - - Hostname (no port) - TRUE if the hostname is equivalent to localhost - - - - This function cracks the Hostname/Port combo, removing IPV6 brackets if needed - - Hostname/port combo, like www.foo.com or www.example.com:8888 or [::1]:80 - The hostname, minus any IPv6 literal brackets, if present - Port #, 80 if not specified, -1 if corrupt - - - - Given a string/list in the form HOSTNAME:PORT#;HOSTNAME2:PORT2#, this function returns the FIRST IPEndPoint. Defaults to port 80 if not specified. - Warning: DNS resolution is slow, so use this function wisely. - - HOSTNAME:PORT#;OPTHOST2:PORT2# - An IPEndPoint or null - - - - Given a string/list in the form HOSTNAME:PORT#;HOSTNAME2:PORT2#, this function returns all IPEndPoints for ALL listed hosts. Defaults to port 80 if not specified. - Warning: DNS resolution is slow, so use this function wisely. - - HOSTNAME:PORT#;OPTHOST2:PORT2# - An array of IPEndPoints or null if no results were obtained - - - - This function attempts to be a ~fast~ way to return an IP from a hoststring that contains an IP-Literal. - - Hostname - IPAddress, or null, if the sHost wasn't an IP-Literal - - - - Launch the user's browser to a hyperlink. This function traps exceptions and notifies the user via UI dialog. - - The URL to ShellExecute. - TRUE if the ShellExecute call succeeded. - - - - Wrapper for Process.Start that shows error messages in the event of failure. - - Fully-qualified filename to execute. - Command line parameters to pass. - TRUE if the execution succeeded. FALSE if the execution failed. An error message will be shown for any error except the user declining UAC. - - - - Run an executable and wait for it to exit, notifying the user of any exceptions. - - Fully-qualified filename of file to execute. - Command-line parameters to pass. - TRUE if the execution succeeded. FALSE if the error message was shown. - - - - Run an executable, wait for it to exit, and return its output as a string. - NOTE: Uses CreateProcess, so you cannot launch applications which require Elevation. - - Fully-qualified filename of file to Execute - Command-line parameters to pass - Exit code returned by the executable - String containing the standard-output of the executable - - - - Copy a string to the clipboard, notifying the user of any exceptions - - The text to copy - TRUE if the copy succeeded - - - - Copy an object to the clipboard, notifying the user of any exceptions - - The object to copy - True if successful - - - - This method prepares a string to be converted into a regular expression by escaping special characters. - This method was originally meant for parsing WPAD proxy script strings, but is now used in other places. You should probably be using the Static RegEx.Escape method for most purposes instead. - - - - - - - - - Determines whether the arrData array STARTS WITH with the supplied arrMagics bytes. Used for Content-Type sniffing. - - The data, or null - The MagicBytes to look for - TRUE if arrData begins with arrMagics - - - - Determines whether the arrData array begins with the supplied sMagics ASCII text. Used for Content-Type sniffing. - - The data, or null - The ASCII text to look for - TRUE if arrData begins with sMagics (encoded as ASCII octets) - - - - Is this HTTPMethod used for RPC-over-HTTPS? - - - - - Determine if a given byte array has the start of a HTTP/1.* 200 response. - Useful primarily to determine if a CONNECT request to a proxy returned success. - - - - - - - Determine if a given byte array has the start of a HTTP/1.* 200 response. - Useful primarily to determine if a CONNECT request to a proxy returned success. - - - - - - - For a given process name, returns a bool indicating whether this is a known browser process name. - - The Process name (e.g. "abrowser.exe") - Returns true if the process name starts with a common browser process name (e.g. ie, firefox, etc) - - - - Ensure that a given path is absolute, if not, applying the root path - - - - - - - - If sFilename is absolute, returns it, otherwise, combines the leaf filename with local response folders hunting for a match. - Trims at the first ? character, if any - - Either a fully-qualified path, or a leaf filename - File path - - - - Format an Exception message, including InnerException message if present. - - - - - - - Get a TickCount (milliseconds since system start) as an unsigned 64bit value. On Vista+, uses the GetTickCount64 API that won't rollover, - but on XP, this unsigned wrapper moves the rollover point to 49 days of uptime. - - Number of ms since Windows started - - - - Returns TRUE if the user is running Elevated. Requires WinXP to Win8 - - TRUE if the user is an Admin and the process is Elevated - - - - Returns a succinct version of Environment.OSVersion.VersionString - - - - - - Duplicate a byte array, replacing null with byte[0]. - Doing this instead of .Clone() because it better handles nulls and it may be faster. - - The array to copy - The new array. - - - - Returns TRUE if the array is null or contains 0 bytes - - byte[] to test - - - - - - - - True if ClientChatter is non-null and its headers are non-null - - - - True if ClientChatter is non-null and its headers are non-null - - - True if ClientChatter is non-null and its headers are non-null - - - - Return a multi-line string describing the NetworkInterfaces[] - - - - - - Checks a DLL's filename for signals that it doesn't contain extensions. - TODO: This is only needed because I wasn't smart enough to require that the assembly be named something like Fiddler.* - - DLL filename - TRUE if we should skip this assembly during enumeration - - - - Create a Session Archive Zip file containing the specified sessions - - The filename of the SAZ file to store - Array of sessions to store - Password to encrypt the file with, or null - TRUE if verbose error dialogs should be shown. - - - - - This is a refactored helper function which writes a single session to an open SAZ file. - - The session to write to the file - The ZIP File - The number of this file - The format string (e.g. "D3") to use when formatting the file number - The HTML String builder to write index information - TRUE to show verbose error dialog information - - - - Reads a Session Archive Zip file into an array of Session objects - - Filename to load - - Loaded array of sessions or null, in case of failure - - - - URLMon Interop Class - - - - - Set the user-agent string for the current process - - New UA string - - - - Query WinINET for the current process' proxy settings. Oddly, there's no way to UrlMkGetSessionOption for the current proxy. - - String of hex suitable for display - - - - Configures the current process to use the system proxy for URLMon/WinINET traffic. - - - - - Configures the current process to use no Proxy for URLMon/WinINET traffic. - - - - - Sets the proxy for the current process to the specified list. See http://msdn.microsoft.com/en-us/library/aa383996(VS.85).aspx - - e.g. "127.0.0.1:8888" or "http=insecProxy:80;https=secProxy:444" - Semi-colon delimted list of hosts to bypass proxy; use <local> to bypass for Intranet - - - - States for the (future) Session-processing State Machine. - NOT YET USED. - - - - - State of the current session - - - - - Object created but nothing's happening yet - - - - - Thread is reading the HTTP Request - - - - - AutoTamperRequest pass 1 (Only used by IAutoTamper) - - - - - User can tamper using Fiddler Inspectors - - - - - AutoTamperRequest pass 2 (Only used by IAutoTamper) - - - - - Thread is sending the Request to the server - - - - - Thread is reading the HTTP Response - - - - - AutoTamperResponse pass 1 (Only used by IAutoTamper) - - - - - User can tamper using Fiddler Inspectors - - - - - AutoTamperResponse pass 2 (Only used by IAutoTamper) - - - - - Sending response to client application - - - - - Session complete - - - - - Session was aborted (client didn't want response, fatal error, etc) - - - - - This enumeration provides the values for the Session object's BitFlags field - - - - - No flags are set - - - - - The request originally arrived with a URL specifying the HTTPS protocol. - - - - - The request originally arrived with a URL specifying the FTP protocol. - - - - - Ignore this traffic; do not buffer, store, or call event handlers - - - - - The client pipe was reused - - - - - The server pipe was reused - - - - - The request was streamed (e.g. on an RPC_OUT_DATA request) - - - - - The response was streamed - - - - - The request was generated by Fiddler itself (e.g. the Composer tab) - - - - - The response was generated by Fiddler itself (e.g. AutoResponder or utilCreateResponseAndBypassServer) - - - - - This session was loaded from a .SAZ File - - - - - This session was loaded from some other tool - - - - - This request was sent to an upstream (CERN) gateway proxy - - - - - This is a "blind" CONNECT tunnel for HTTPS traffic - - - - - This is a CONNECT tunnel which decrypts HTTPS traffic as it flows through - - - - - This response was served from a client cache, bypassing Fiddler. Fiddler only "sees" this session because other software reported it to Fiddler - - - - - There was a HTTP Protocol violation in the client's request - - - - - There was a HTTP Protocol violation in the server's response - - - - - Response body was dropped, e.g due to fiddler.network.streaming.ForgetStreamedData - - - - - This is a CONNECT tunnel for WebSocket traffic - - - - - This request was sent using the SOCKS protocol - - - - - This class maintains the Proxy Bypass List for the upstream gateway. - In the constructor, pass the desired proxy bypass string, as retrieved from WinINET for the Fiddler Options screen. - Then, call the IsBypass(sTarget) method to determine if the Gateway should be bypassed - - - - - List of regular expressions for matching against request Scheme://HostPort. - NB: This list is either null or contains at least one item. - - - - - Boolean flag indicating whether the bypass list contained a <local> token. - - - - - Pass the desired proxy bypass string retrieved from WinINET. - - - - - - Given the rules for this bypasslist, should this target bypass the proxy? - - The URI Scheme - The Host and PORT - True if this request should not be sent to the gateway proxy - - - - Convert the string representing the bypass list into an array of rules escaped and ready to be turned into regular expressions - - - - - - Does the bypassList contain any rules at all? - - - - - Flags that indicate what problems, if any, were encountered in parsing HTTP headers - - - - - There were no problems parsing the HTTP headers - - - - - The HTTP headers ended incorrectly with \n\n - - - - - The HTTP headers ended incorrectly with \n\r\n - - - - - The HTTP headers were malformed. - - - - - The Parser class exposes static methods used to parse strings or byte arrays into HTTP messages. - - - - - Given a byte[] representing a request, determines the offsets of the components of the line. WARNING: Input MUST contain a LF or an exception will be thrown - - Byte array of the request - Returns the index of the byte of the URI in the Request line - Returns the length of the URI in the Request line - Returns the index of the first byte of the name/value header pairs - - - - Parse out HTTP Header lines. - - Header collection to update - Array of Strings - Index into array at which parsing should start - String containing any errors encountered - TRUE if there were no errors, false otherwise - - - - Given a byte array, determines the Headers length - - Input array of data - Returns the calculated length of the headers. - Returns the calculated start of the response body. - Any HTTPHeaderParseWarnings discovered during parsing. - True, if the parsing was successful. - - - - Parse the HTTP Request into a headers object. - - The HTTP Request string, including *at least the headers* with a trailing CRLFCRLF - HTTPRequestHeaders parsed from the string. - - - - Parse the HTTP Response into a headers object. - - The HTTP response as a string, including at least the headers. - HTTPResponseHeaders parsed from the string. - - - - The RASInfo class is used to enumerate Network Connectoids so Fiddler can adjust proxy configuration for all connectoids, not just the DefaultLAN - - - - - Ask RAS for the list of network connectoids. We'll always add "DefaultLAN" to this list as well. - - - - - - Abstract base class for the ClientPipe and ServerPipe classes. A Pipe represents a connection to either the client or the server, optionally encrypted using SSL/TLS. - - - - - The base socket wrapped in this pipe - - - - - The number of times that this Pipe has been used - - - - - The HTTPS stream wrapped around the base socket - - - - - The display name of this Pipe - - - - - Number of milliseconds to delay each 1024 bytes transmitted - - - - - Create a new pipe, an enhanced wrapper around a socket - - Socket which this pipe wraps - Identification string used for debugging purposes - - - - Poll the underlying socket for readable data (or closure/errors) - - TRUE if this Pipe requires attention - - - - Call this method when about to reuse a socket. Currently, increments the socket's UseCount and resets its transmit delay to 0. - - The session identifier of the new session, or zero - - - - Sends a byte array through this pipe - - The bytes - - - - Sends the data specified in oBytes (between iOffset and iOffset+iCount-1 inclusive) down the pipe. - - - - - - - - Receive bytes from the pipe into the DATA buffer. - - Throws IO exceptions from the socket/stream - Array of data read - Bytes read - - - - Return the raw socket this pipe wraps. Avoid calling this method if at all possible. - - The Socket object this Pipe wraps. - - - - Shutdown and close the socket inside this pipe. Eats exceptions. - - - - - Abruptly closes the socket by sending a RST packet - - - - - Return the Connected status of the base socket - - - - - Returns a bool indicating if the socket in this Pipe is CURRENTLY connected and wrapped in a SecureStream - - - - - Returns the SSL/TLS protocol securing this connection - - - - - Return the Remote Port to which this socket is attached. - - - - - Return the Local Port to which the base socket is attached. Note: May return a misleading port if the ISA Firewall Client is in use. - - - - - Returns the remote address to which this Pipe is connected, or 0.0.0.0 on error. - - - - - Gets or sets the transmission delay on this Pipe, used for performance simulation purposes. - - - - - Summary description for frmPrompt. - - - - - Required designer variable. - - - - - GetUserString prompts the user for a string. - - Title of the dialog - The prompt text in the dialog - The default response - If true, will return null if user hits cancel. Else returns sDefault. - The user's result, or null if user cancelled and bReturnNullIfCancelled set. - - - - Clean up any resources being used. - - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - To override default certificate handling, your class should implement this interface in an assembly - referenced by the fiddler.certmaker.assembly preference; by default, "certmaker.dll" in the application - folder is loaded - - - - - Implement ICertificateProvider2 instead - - - - - Return a certificate to secure this traffic. Generally, it's expected that this method WILL create a new certificate if needed. - - Hostname (e.g. "www.example.com") - An X509Certificate, or null on error - - - - Return the root certificate to which Host Certificates are chained. Generally, it's expected that this method will NOT create a root certificate. - - An X509Certificate, or null on error - - - - When this method is called, your extension should create a Root certificate. - - TRUE if the operation was successful - - - - When this method is called, your extension should copy the your Root certificate into - the user's (or machines's) Root certificate store. - - TRUE if the operation was successful - - - - When this method is called, your extension should discard all certificates and - clear any certificates that have been added to the user's certificate store. - - TRUE, if all certificates were removed; FALSE if any certificates were preserved - - - - When this method is called, your extension should check to see if the User or Machine Root - certificate store contains your Root certificate. - - Set to TRUE if StoreLocation.CurrentUser StoreName.Root has the certificate - Set to TRUE if StoreLocation.LocalMachine StoreName.Root has the certificate - TRUE if either bUserTrusted or bMachineTrusted - - - - When this method is called, your extension should discard all certificates and - clear any certificates that have been added to the user's certificate store - - TRUE if the root certificate should also be cleared - TRUE, if all certificates were removed; FALSE if any certificates were preserved - - - - Call this function to cache a certificate in the Certificate Provider - - The hostname to match - The certificate that the Provider should later provide when GetCertificateForHost is called - True if the request was successful - - - - File path pointing to the location of MakeCert.exe - - - - - Cache of previously-generated EE certificates. Thread safety managed by _oRWLock - - - - - Cache of previously-generated Root certificate - - - - - Reader/Writer lock gates access to the certificate cache and generation functions. - - We must set the SupportsRecursion flag because there are cases where the thread holds the lock in Write mode and then enters Read mode in a nested call. - - - - Constructor: Simply cache the path to MakeCert - - - - - Find certificates that have the specified full subject. - - The store to search - FindBySubject{Distinguished}Name requires a complete match of the SUBJECT, including CN, O, and OU - Matching certificates - - - - Find certificates that have the specified issuer. - - The store to search - FindByIssuer{Distinguished}Name requires a complete match of the SUBJECT, including CN, O, and OU - Matching certificates - - - - Interface method: Clear the in-memory caches and Windows certificate stores - - TRUE to clear the Root Certificate from the cache and Windows stores - TRUE if successful - - - - Interface method: Clear the in-memory caches and Windows certificate stores - - - - - - Use MakeCert to generate a unique self-signed certificate - - TRUE if the Root certificate was generated successfully - - - - Get the root certificate from cache or storage, only if it already exists. - - - - - - Returns an Interception certificate for the specified hostname - - Hostname for the target certificate - This method uses a Reader lock when checking the cache and a Writer lock when updating the cache. - An Interception Certificate, or NULL - - - - Find a certificate from the certificate store, creating a new certificate if it was not found. - - A SubjectCN hostname, of the form www.example.com - TRUE if the cert wasn't found in the Windows Certificate store and this function attempted to create it. - No locks are acquired by this method itself. - A certificate or /null/ - - - - Find a certificate from the certificate store, if present. - - No locks are acquired by this method itself. - A certificate or /null/ - - - - Updates the Server Certificate cache under the Writer lock - - The target hostname - The certificate to cache - - - - - Creates a certificate for ServerAuth. If isRoot is set, designates that this is a self-signed root. - - Uses a reader lock when checking for the Root certificate. Uses a Writer lock when creating a certificate. - A string of the form: "www.hostname.com" - A boolean indicating if this is a request to create the root certificate - Newly-created certificate, or Null - - - - The ClientChatter object, exposed as the oRequest object on the Session object, represents a single web request. - - - - - Size of buffer passed to pipe.Receive when reading from the client - - - - - The ClientPipe object which is connected to the client, or null. - - - - - Parsed Headers - - - - - The session object which owns this ClientChatter - - - - - The host pulled from the URI, usually null except while reading/parsing the request - - - - - Buffer holds this request's data as it is read from the pipe. - - - - - Offset to first byte of body in m_requestData - - - - - Optimization: tracks how far we've previously looked when determining iEntityBodyOffset - - - - - Create a ClientChatter object initialized with a set of HTTP headers - Called primarily when loading session data from a file. - - The session object which will own this request - The string containing the request data - - - - Loads a HTTP request from a file rather than a memory stream. TODO: Why not make this public and have a responsebody version? - - The file to load - TRUE if the file existed. - - - - Based on this session's data, determine the expected Transfer-Size of the request body. See RFC2616 Section 4.4 Message Length. - Note, there's currently no support for "multipart/byteranges" requests anywhere in Fiddler. - - Expected Transfer-Size of the body, in bytes. - - - - Free Request data. Called by TakeEntity or by ReadRequest method on request failure - - - - - Extract a byte array representing the entity, put any excess bytes back in the socket, delete the requestData stream, and return the entity. - - Byte array containing the entity - - - - Send a HTTP/XXX Error Message to the Client, calling FiddlerApplication.BeforeReturningError and DoReturningError in FiddlerScript. - Note: This method does not poison either the client or server pipe, so if poisoning is desired, it's the caller's responsibility to do that. - - Response code - Response status text - Body of the HTTP Response - - - - Parse the headers from the requestData buffer. - Precondition: Call AFTER having set the correct iEntityBodyOffset. - - Note: This code used to be a lot simpler before, when it used strings instead of byte[]s. Sadly, - we've gotta use byte[]s to ensure nothing in the URI gets lost. - - TRUE if successful. Frees arrRequest if successful. - - - - This function decides if the request string represents a complete HTTP request - - - - - - Scans requestData stream for the \r\n\r\n (or variants) sequence - which indicates that the header block is complete. - - SIDE EFFECTS: - iBodySeekProgress is updated and maintained across calls to this function - iEntityBodyOffset is updated if the end of headers is found - - True, if requestData contains a full set of headers - - - - Read a complete HTTP Request from the Client. - - TRUE, if a request could be read. FALSE, otherwise. - - - - Peek at number of bytes received from the client thus far. - - - - - HTTP Headers sent in the client request, or null. - - - - - Was this request received from a reused client connection? - - - - - Note: This returns the HTTP_HOST header, which may include a trailing port #. - - - - - Simple indexer into the Request Headers object - - - - - The PipePool maintains a collection of connected ServerPipes for reuse - - - - - Minimum idle time of pipes to be expired from the pool. - Note, we don't check the pipe's ulLastPooled value when extracting a pipe, - so its age could exceed the allowed lifetime by up to MSEC_POOL_CLEANUP_INTERVAL - - - - - The Pool itself. - - - - - Time at which a "Clear before" operation was conducted. We store this - so that we don't accidentally put any pipes that were in use back into - the pool after a clear operation - - - - - Remove any pipes from Stacks if they exceed the age threshold - Remove any Stacks from pool if they are empty - - - - - Clear all pooled Pipes, calling .End() on each. - - - - - Return a string representing the Pipes in the Pool - - A string representing the pipes in the pool - - - - Get a Server connection for reuse, or null if a suitable connection is not in the pool. - - The key which identifies the connection to search for. Good syntax is [HTTPS:]HOSTNAME:PORT - The ProcessID of the client requesting the Pipe - HACK to be removed; the SessionID# of the request - A Pipe to reuse, or NULL - - - - Store a pipe for later use, if reuse is allowed by settings and state of the pipe. - - The Pipe to place in the pool - - - - A ClientPipe wraps a socket connection to a client application. - - - - - Does this Pipe have data (or closure/errors) to read? - - TRUE if this Pipe requires attention - - - - If you previously read more bytes than you needed from this client socket, you can put some back. - - Array of bytes to put back - - - - Sets the receiveTimeout based on whether this is a freshly opened client socket or a reused one. - - - - - Returns a semicolon-delimited string describing this ClientPipe - - A semicolon-delimited string - - - - Perform a HTTPS Server handshake to the client. Swallows exception and returns false on failure. - - - - - - - This function sends the client socket a CONNECT ESTABLISHED, and then performs a HTTPS authentication - handshake, with Fiddler acting as the server. - - Hostname Fiddler is pretending to be (NO PORT!) - The set of headers to be returned to the client in response to the client's CONNECT tunneling request - true if the handshake succeeds - - - - ID of the process that opened this socket, assuming that Port Mapping is enabled, and the connection is from the local machine - - - - - Name of the Process referred to by LocalProcessID, or String.Empty if unknown - - - - - Timestamp of either 1> The underlying socket's creation from a .Accept() call, or 2> when this ClientPipe was created. - - - - - The Logger object is a simple event log - - - - - Queue of Messages that are be logged (usually during application startup) until another object has loaded and registered for notification of such Messages - - - - - Creates a Logger object - - True if a queue should be created to store messages during Fiddler's startup - - - - Flushes previously-queued messages to the newly attached listener. - - - - - Log a string with specified string formatting - - The format string - The arguments to replace in the string - - - - Log a string - - The string to log - - - - The Event to raise when a string is logged - - - - - EventArgs class for the LogEvent handler - - - - - The String which has been logged - - - - - Fiddler Transcoders allow import and export of Sessions from Fiddler - - - - - Create the FiddlerTranscoders object - - - - - List all of the Transcoder objects that are loaded - - - - - - Add Import/Export encoders to FiddlerApplication.oTranscoders - - Assembly to import exporters and importers - FALSE on obvious errors - - - - Add Import/Export encoders to FiddlerApplication.oTranscoders - - Assembly to scan for transcoders - FALSE on obvious errors - - - - Loads any assembly in the specified path that ends with .dll and does not start with "_", checks that a compatible version requirement was specified, - and adds the importer and exporters within to the collection. - - The path to scan for extensions - - - - Ensures that Import/Export Transcoders have been loaded - - - - - Returns a TranscoderTuple willing to handle the specified format - - The Format - TranscoderTuple, or null - - - - Returns a TranscoderTuple willing to handle the specified format - - The Format - TranscoderTuple, or null - - - - Gets the format list of the specified type and adds that type to the collection. - - - - TRUE if any formats were found; FALSE otherwise - - - - Clear Importer and Exporter collections - - - - - True if one or more classes implementing ISessionImporter are available. - - - - - True if one or more classes implementing ISessionImporter are available. - - - - - The WebSocket class represents a "tunnel" through a WebSocket shuffles bytes between a client and the server. - The class' messages may be deserialized from a SAZ file. - - - - - Should this WebSocket Tunnel parse the WS traffic within into individual messages? - - - - - Writes all of the messages stored in this WebSocket to a stream. - - - - - - - Read headers from the stream. - - The Stream from which WebSocketSerializationHeaders should be read - The Array of headers, or String[0] - - - - Number of bytes received from the client - - - - - Number of bytes received from the server - - - - - Creates a "detached" WebSocket which contains messages loaded from the specified stream - - Session to which the WebSocket messages belong - The Stream containing messages, which will be closed upon completion - - - - This factory method creates a new WebSocket Tunnel and executes it on a background (non-pooled) thread. - - The Session containing the HTTP CONNECT request - - - - Creates a WebSocket tunnel. External callers instead use the CreateTunnel static method. - - The session for which this tunnel was initially created. - The client pipe - The server pipe - - - - This function keeps the Tunnel/Thread alive until it is signaled that the traffic is complete - - - - - Performs cleanup of the WebSocket instance. Call this after the WebSocket closes normally or after abort/exceptions. - - - - - Executes the WebSocket tunnel on a background thread - - - - - Interface Method - Close the WebSocket and signal the event to let its service thread die. Also called by oSession.Abort() - WARNING: This should not be allowed to throw any exceptions, because it will do so on threads that don't - catch them, and this will kill the application. - - - - - When we get a buffer from the client, we push it into the memory stream - - - - - When we get a buffer from the server, we push it into the memory stream - - - - - This method parses the data in strmClientBytes to extact one or more WebSocket messages. It then sends each message - through the pipeline. - - - - This method parses the data in strmServerBytes to extact one or more WebSocket messages. It then sends each message - through the pipeline. - - - - Called when we have received data from the local client. - - The result of the asynchronous operation. - - - Called when we have received data from the remote host. Incoming data will immediately be forwarded to the local client. - The result of the asynchronous operation. - - - Called when we have sent data to the local client. - The result of the asynchronous operation. - - - Called when we have sent data to the remote host. - The result of the asynchronous operation. - - - - Is this WebSocket open/connected? - - - - - Boolean that determines whether the WebSocket tunnel tracks messages. - - - - - Returns number of bytes sent from the Server to the Client on this WebSocket - - - - - Returns number of bytes sent from the Client to the Server on this WebSocket - - - - - A WebSocketMessage stores a single frame of a single WebSocket message - http://tools.ietf.org/html/rfc6455 - - - - - Unmasks the first array into the third, using the second as a masking key. - - - - - - - - Masks the first array's data using the key in the second - - The data to be masked - A 4-byte obfuscation key, or null. - - - - Replaces the WebSocketMessage's payload with the specified string, masking if needed. - - - - - - Copies the provided byte array over the WebSocketMessage's payload, masking if needed. - - - - - - Masks the provided array (if necessary) and assigns it to the WebSocketMessage's payload. - - New array of data - - - - Return the WebSocketMessage's payload as a string. - - - - - - Copy the WebSocketMessage's payload into a new Byte Array. - - A new byte array containing the (unmasked) payload. - - - - Is this a Request message? - - - - - Was this Message eaten? - - - - - Should this message be paused for tampering? - TODO: Not yet implemented - - - - - The WebSocketTimers collection tracks the timestamps for this message - - - - - The raw payload data, which may be masked - - - - - The four-byte payload masking key, if any - - - - - The type of the WebSocket Message's frame - - - - - Timers - - - - - When was this message read from the sender - - - - - When did transmission of this message to the recipient begin - - - - - When did transmission of this message to the recipient end - - - - - Return the timers formatted to be placed in pseudo-headers used in saving the WebSocketMessage to a stream (SAZ) - - - - - - Utilities for WebSocket interop. - - - - - Servers must indicate that they speak the WebSocket protocol by echo'ing back a SHA1-hash of the - client's [Sec-WebSocket-Key] header appended with the magic value [258EAFA5-E914-47DA-95CA-C5AB0DC85B11]. - This challenge-response is provided in the server's [Sec-WebSocket-Accept] response header. - - The value of the Sec-WebSocket-Key header - A value suitable for the server's Sec-WebSocket-Accept header - - - - The MockTunnel represents a CONNECT tunnel which was reloaded from a SAZ file. - - - - - The CONFIG object is Fiddler's legacy settings object, introduced before the advent of the Preferences system. - - - - - Cached layout info for columns. - - - - - True if this is a "Viewer" instance of Fiddler that will not persist its settings - - - - - TODO: Why is this defaulted to FALSE? Has been since 2009, probably due to some bug. Should keep better records. (Sigh). - - - - - Boolean controls whether Fiddler should map inbound connections to their original process using IPHLPAPI - - - - - Boolean controls whether Fiddler should attempt to decrypt HTTPS Traffic - - - - - Boolean controls whether Fiddler will attempt to use the Server Name Indicator TLS extension to generate the SubjectCN for certificates - - - - - Should Audio/Video types automatically stream by default? - - - - - Returns 127.0.0.1:{ListenPort} or fiddler.network.proxy.RegistrationHostName:{ListenPort} - - - - - Use 128bit AES Encryption when password-protecting .SAZ files. Note that, while this - encryption is much stronger than the default encryption algorithm, it is significantly - slower to save and load these files, and the Windows Explorer ZIP utility cannot open them. - - - - - SSL/TLS Protocols we allow the client to choose from (when we call AuthenticateAsServer) - We allow all protocols by default (Ssl2,Ssl3,Tls1) and also 'Bitwise OR' in the constants for TLS1.1 and TLS1.2 in case we happen to be running on .NET4.5. - - - - - SSL/TLS Protocols we request the server use (when we call AuthenticateAsClient). By default, SSL3 and TLS1 are accepted; we exclude SSL2 so that TLS Extensions may be sent. - We do NOT enable TLS1.1 or TLS1.2 by default because many servers will fail if you offer them and unlike browsers, .NET has no fallback code. - - - - - Version information for the Fiddler/FiddlerCore assembly - - - - - Controls whether Fiddler will send traffic to the previously-set system proxy. - OBSOLETE. DO NOT USE. see instead. - - - - - The encoding with which HTTP Headers should be parsed. Defaults to UTF8, but may be overridden by specifying a REG_SZ containing the encoding name in the registry key \Fiddler2\HeaderEncoding - - - - - Controls whether Fiddler will reuse server connections for multiple sessions - - - - - Controls whether Fiddler will reuse client connections for multiple sessions - - - - - Controls whether Fiddler should register as the HTTPS proxy - - - - - Controls whether Fiddler should register as the FTP proxy - - - - - Controls whether Fiddler will try to write exceptions to the System Event log. Note: Usually fails due to ACLs on the Event Log. - - - - - Controls whether Fiddler will attempt to log on to the upstream proxy server to download the proxy configuration script - - - - - Controls whether Fiddler will attempt to connect to IPv6 addresses - - - - - Name of connection to which Fiddler should autoattach if MonitorAllConnections is not set - - - - - The username to send to the upstream gateway if the Version Checking webservice request requires authentication - - - - - The password to send to the upstream gateway if the Version Checking webservice request requires authentication - - - - - Set this flag if this is a "temporary" port (E.g. specified on command line) and it shouldn't be overridden in the registry - - - - - Controls whether Certificate-Generation output will be spewed to the Fiddler Log - - - - - Alternative hostname which Fiddler should recognize as an alias for the local machine. The - default value of ? will never be usable, as it's the QueryString delimiter - - - - - (Lowercase) Machine Name - - - - - (Lowercase) Machine Domain Name - - - - - List of hostnames for which HTTPS decryption (if enabled) should be skipped - - - - - True if Fiddler should be maximized on restart - - - - - Return a Special URL. - - String constant describing the URL to return. CASE-SENSITIVE! - Returns target URL - - - - Get a registry path for a named constant - - The path to retrieve [Root, UI, Dynamic, Prefs] - The registry path - - - - Return an app path (ending in Path.DirectorySeparatorChar) or a filename - - CASE-SENSITIVE - The specified filesystem path - - - - Ensure that the per-user folders used by Fiddler are present. - - - - - Control which processes have HTTPS traffic decryption enabled - - - - - Port to which Fiddler should forward inbound requests when configured to run as a Reverse Proxy - - - - - On attach, will configure WinINET to bypass Fiddler for these hosts. - - - - - Boolean indicating whether Fiddler will open the listening port exclusively - - - - - Controls whether server certificate errors are ignored when decrypting HTTPS traffic. - - - - - Controls whether notification dialogs and prompts should be shown. - - - - - The port upon which Fiddler is configured to listen. - - - - - Returns the path and filename of the editor used to edit the Rules script file. - - - - - Returns true if Fiddler should permit remote connections. Requires restart. - - - - - Traffic should be sent directly to the server - - - - - Traffic should be sent to a manually-specified proxy - - - - - Traffic should be sent to the System-configured proxy - - - - - Proxy should be automatically detected - - - - - A simple Process Type enumeration used by various filtering features - - - - - Include all Processes - - - - - Processes which appear to be Web Browsers - - - - - Processes which appear to NOT be Web Browsers - - - - - Include only traffic where Process ID isn't known (e.g. remote clients) - - - - - EventArgs for preference-change events. See http://msdn.microsoft.com/en-us/library/ms229011.aspx. - - - - - The name of the preference being added, changed, or removed - - - - - The string value of the preference, or null if the preference is being removed - - - - - Returns TRUE if ValueString=="true", case-insensitively - - - - - The IFiddlerPreferences Interface is exposed by the FiddlerApplication.Prefs object, and enables - callers to Add, Update, and Remove preferences, as well as observe changes to the preferences. - - - - - Store a boolean value for a preference - - The named preference - The boolean value to store - - - - Store an Int32 value for a preference - - The named preference - The int32 value to store - - - - Store a string value for a preference - - The named preference - The string value to store - - - - Get a preference's value as a boolean - - The Preference Name - The default value for missing or invalid preferences - A Boolean - - - - Gets a preference's value as a string - - The Preference Name - The default value for missing preferences - A string - - - - Gets a preference's value as a 32-bit integer - - The Preference Name - The default value for missing or invalid preferences - An integer - - - - Removes a named preference from storage - - The name of the preference to remove - - - - Add a Watcher that will be notified when a value has changed within the specified prefix. - - The prefix of preferences for which changes are interesting - The Event handler to notify - Returns the Watcher object added to the notification list - - - - Removes a previously-created preference Watcher from the notification queue - - The Watcher to remove - - - - Indexer. Returns the value of the preference as a string - - The Preference Name - The Preference value as a string, or null - - - - The PreferenceBag is used to maintain a threadsafe Key/Value list of preferences, persisted in the registry, and with appropriate eventing when a value changes. - - - - - Load the existing preferences from the Registry into the Preferences bag. - Note: Does not fire any events. - - - - - Serialize the existing preferences to the Registry. - - - - - Get a string array of the preference names - - string[] of preference names - - - - Gets a preference's value as a string - - The Preference Name - The default value if the preference is missing - A string - - - - Return a bool preference. - - The Preference name - The default value to return if the specified preference does not exist - The boolean value of the Preference, or the default value - - - - Return an Int32 Preference. - - The Preference name - The default value to return if the specified preference does not exist - The Int32 value of the Preference, or the default value - - - - Update or create a string preference. - - The name of the Preference - The value to assign to the Preference - - - - Update or create a Int32 Preference - - The name of the Preference - The value to assign to the Preference - - - - Update or create a Boolean preference. - - The name of the Preference - The value to assign to the Preference - - - - Delete a Preference from the collection. - - The name of the Preference to be removed. - - - - Remove all Watchers - - - - - Remove all watchers and write the registry. - - - - - Return a description of the contents of the preference bag - - Multi-line string - - - - Return a string-based serialization of the Preferences settings. - - TRUE for a multi-line format with all preferences - String - - - - Returns a CRLF-delimited string containing all Preferences whose Name case-insensitively contains the specified filter string. - - Partial string to match - A string - - - - Add a watcher for changes to the specified preference or preference branch. - - Preference branch to monitor, or String.Empty to watch all - The EventHandler accepting PrefChangeEventArgs to notify - Returns the PrefWatcher object which has been added, store to pass to RemoveWatcher later. - - - - Remove a previously attached Watcher - - The previously-specified Watcher - - - - This function executes on a single background thread and notifies any registered - Watchers of changes in preferences they care about. - - A string containing the name of the Branch that changed - - - - Spawn a background thread to notify any interested Watchers of changes to the Target preference branch. - - The arguments to pass to the interested Watchers - - - - Returns a string naming the current profile - - - - - Indexer into the Preference collection. - - The name of the Preference to update/create or return. - The string value of the preference, or null. - - - - A simple struct which contains a Branch identifier and EventHandler - - - - - The HostList allows fast determination of whether a given host is in the list. It supports leading wildcards (e.g. *.foo.com), and the special tokens <local> and <loopback>. - Note: List is *not* threadsafe; instead of updating it, construct a new one. - - - - - Generate an empty HostList - - - - - Create a hostlist and assign it an initial set of sites - - List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. - - - - Clear the HostList - - - - - Clear the List and assign the new string as the contents of the list. - - List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. - TRUE if the list was constructed without errors - - - - Clear the list and assign the new string as the contents of the list. - - List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. - Outparam string containing list of parsing errors - TRUE if the list was constructed without errors - - - - Return the current list of rules as a string - - String containing current rules, using "; " as a delimiter between entries - - - - Determine if a given Host is in the list - - A Host string, potentially including a port - TRUE if the Host's hostname matches a rule in the list - - - - Determine if a given Hostname is in the list - - A hostname, NOT including a port - TRUE if the hostname matches a rule in the list - - - - Determine if a given Host:Port pair matches an entry in the list - - A hostname, NOT including the port - The port - TRUE if the hostname matches a rule in the list - - - - This private tuple allows us to associate a Hostname and a Port - - - - - Port specified in the rule - - - - - Hostname specified in the rule - - - - - Create a new HostPortTuple - - - - - The policy which describes how this pipe may be reused by a later request. Ordered by least restrictive to most. - - - - - The ServerPipe may be freely reused by any subsequent request - - - - - The ServerPipe may be reused only by a subsequent request from the same client process - - - - - The ServerPipe may be reused only by a subsequent request from the same client pipe - - - - - The ServerPipe may not be reused for a subsequent request - - - - - A ServerPipe wraps a socket connection to a server. - - - - - User-controlled list of Certificate Serial #s for which Fiddler should not raise a warning about certificate errors - - - - - DateTime of the completion of the TCP/IP Connection - - - - - TickCount when this Pipe was last placed in a PipePool - - - - - Returns TRUE if this ServerPipe is connected to a Gateway - - - - - Returns TRUE if this ServerPipe is connected to a SOCKS gateway - - - - - The Pooling key used for reusing a previously pooled ServerPipe. See sPoolKey property. - - - - - This field, if set, tracks the process ID to which this Pipe is permanently bound; set by MarkAsAuthenticated. - NOTE: This isn't actually checked by anyone; instead the PID is added to the POOL Key - - - - - Backing field for the isAuthenticated property - - - - - String containing representation of the server's certificate - - - - - Wraps a socket in a Pipe - - The Socket - Pipe's human-readable name - True if the Pipe is attached to a gateway - The Pooling key used for socket reuse - - - - Marks this Pipe as having been authenticated. Depending on the preference "fiddler.network.auth.reusemode" this may impact the reuse policy for this pipe - - The client's process ID, if known. - - - - Sets the receiveTimeout based on whether this is a freshly opened server socket or a reused one. - - - - - Returns a semicolon-delimited string describing this ServerPipe - - A semicolon-delimited string - - - - Returns the Server's certificate Subject CN - - The CN field from the Subject of the certificate used to secure this HTTPS connection, or null if the connection is unsecure - - - - Return a string describing the HTTPS connection security, if this socket is secured - - A string describing the HTTPS connection's security. - - - - Returns a string describing how this connection is secured. - - - - - - Get the Transport Context for the underlying HTTPS connection so that Channel-Binding Tokens work correctly - - - - - - Get the user's default client cert for authentication; caching if if possible and permitted. - - - - - - This method is called by the HTTPS Connection establishment to optionally attach a client certificate to the request. - Test Page: https://tower.dartmouth.edu/doip/OracleDatabases.jspx https://roaming.officeapps.live.com/rs/roamingsoapservice.svc - - - - - - - - - - - This function secures an existing connection and authenticates as client. This is primarily useful when - the socket is connected to a Gateway/Proxy and we had to send a CONNECT and get a HTTP/200 Connected back before - we actually secure the socket. - http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx - - The CN to use in the certificate - Path to client certificate file - Reference-passed integer which returns the time spent securing the connection - TRUE if the connection can be secued - - - - Return a Certificate Collection containing certificate from the specified file. - - Path to the certificate. Relative Paths will be absolutified automatically - The Certificate collection, or null - - - - Policy for reuse of this pipe - - - - - Returns TRUE if there is an underlying, mutually-authenticated HTTPS stream. - - - - - Returns TRUE if this PIPE is marked as having been authenticated using a Connection-Oriented Auth protocol: NTLM, Kerberos, or HTTPS Client Certificate - - - - - Indicates if this pipe is connected to an upstream Proxy. - - - - - Indicates if this pipe is connected to a SOCKS gateway - - - - - Gets and sets the pooling key for this server pipe. - - - DIRECT->{http|https}/{serverhostname}:{serverport} - GW:{gatewayaddr:port}->* - GW:{gatewayaddr:port}->{http|https}/{serverhostname}:{serverport} - SOCKS:{gatewayaddr:port}->{http|https}/{serverhostname}:{serverport} - - - - - Returns the IPEndPoint to which this socket is connected - - - - - CodeDescription attributes are used to enable the FiddlerScript Editor to describe available methods, properties, fields, and events. - - - - - CodeDescription attributes should be constructed by annotating a property, method, or field. - - The descriptive string which should be displayed for this this property, method, or field - - - - The descriptive string which should be displayed for this this property, method, or field - - - - - Flags that can be passed into the Startup method - - - - - No options. - - - - - Register with WinINET as the System Proxy - - - - - Decrypt HTTPS Traffic - - - - - Accept requests from remote computers or devices - - - - - Set this flag to forward requests to any upstream gateway - - - - - Set this flag to set all WinINET connections to use Fiddler, otherwise only the Local LAN is pointed to Fiddler - - - - - Start FiddlerCore with the default set of options (RegisterAsSystemProxy | DecryptSSL | AllowRemoteClients | ChainToUpstreamGateway | MonitorAllConnections | CaptureLocalhostTraffic) - - - - - A simple event handling delegate for functions which accept no parameters. - - - - - An event handling delegate which is called during report calculation with the set of sessions being evaluated. - - The sessions in this report. - - - - An event handling delegate which is called as a part of the HTTP pipeline at various stages. - - The Web Session in the pipeline. - - - - This class acts as the central point for script/extensions to interact with Fiddler components. - - - - - TRUE if Fiddler is currently shutting down. Suspend all work that won't have side-effects. - - - - - The default certificate used for client authentication - - - - - Fiddler's "Janitor" clears up unneeded resources (e.g. server sockets, DNS entries) - - - - - Underlying Preferences container whose IFiddlerPreferences interface is exposed by the Prefs property - - - - - Gets Fiddler* version info - - A string indicating the build/flavor of the Fiddler* assembly - - - - Returns Help/About information. - - Display string describing the current Fiddler instance. - - - - Fiddler's core proxy object. - - - - - Fiddler Import/Export Transcoders - - - - - List of "leaked" temporary files to be deleted as Fiddler exits. - - - - - Checks if FiddlerCore is running. - - TRUE if FiddlerCore is started/listening; FALSE otherwise. - - - - Checks if FiddlerCore is running and registered as the System Proxy. - - TRUE if FiddlerCore IsStarted AND registered as the system proxy; FALSE otherwise. - - - - Recommended way to Start FiddlerCore listening on the specified port - - The port - The FiddlerCoreStartupFlags option you want to set; FiddlerCoreStartupFlags.Default is recommended - - - - Start the FiddlerCore engine; this overload is NOT RECOMMENDED - - - - - - - - Start the FiddlerCore engine; this overload is NOT RECOMMENDED - - Port to Listen on. - Boolean indicating if FiddlerCore should register as the system proxy. - Boolean indicating if FiddlerCore should decrypt secure traffic. If true, requires MakeCert.exe in the Application folder. - Boolean indicating if FiddlerCore should accept connections from remote computers. Note: You must ensure Firewall is configured to allow such connections to your program. - - - - Start a new proxy endpoint instance, listening on the specified port - - The port to listen on - TRUE if remote clients should be permitted to connect to this endpoint - A Hostname (e.g. EXAMPLE.com) if this endpoint should be treated as a HTTPS Server - A Proxy object, or null if unsuccessful - - - - Start a new proxy endpoint instance, listening on the specified port - - The port to listen on - TRUE if remote clients should be permitted to connect to this endpoint - A certificate to return when clients connect, or null - A Proxy object, or null if unsuccessful - - - - Shuts down the FiddlerCore proxy and disposes it. Note: If there's any traffic in progress while you're calling this method, - your background threads are likely to blow up with ObjectDisposedExceptions or NullReferenceExceptions. In many cases, you're - better off simply calling oProxy.Detach() and letting the garbage collector clean up when your program exits. - - - - - Notify a listener that a block of a response was read. - - The session for which the response is being read - byte buffer (not completely full) - bytes set. - FALSE if AbortReading was set - - - - Notify a listener that a block of a request was read. - - The session for which the response is being read - byte buffer (not completely full) - bytes set. - FALSE if AbortReading was set - - - - Export Sessions in the specified format - - Shortname of desired format - Sessions to export - Options to pass to the ISessionExport interface - Your callback event handler, or NULL to allow Fiddler to handle - TRUE if successful, FALSE if desired format doesn't exist or other error occurs - - - - Calls a Fiddler Session Importer and returns the list of loaded Sessions. - - String naming the Import format, e.g. HTTPArchive - Should sessions be added to WebSessions list? (Not meaningful for FiddlerCore) - Dictionary of Options to pass to the Transcoder - Your callback event handler, or NULL to allow Fiddler to handle - Loaded Session[], or null on Failure - - - - Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly. - - - - - Report an exception to the user. - - The Exception - The Title of the dialog - - - - Report an exception to the user. - - The Exception - The Title of the dialog - The intro text to show. If null or empty, the default "Fiddler has encountered an unexpected... " message is shown. - - - - Show the user a message when an HTTP Error was encountered - - Session with error - Set to true to prevent pooling/reuse of client connection - The SessionFlag which should be set to log this violation - Set to true to prevent pooling/reuse of server connection - Information about the problem - - - - We really don't want this method to get inlined, because that would cause the Xceed DLLs to get loaded in the Main() function instead - of when _SetXceedLicenseKeys is called; that, in turn, would delay the SplashScreen. - - - - - Used to track errors with addons. - - - - - - - Record that a temporary file was created and handed to an external tool. We'll do our best to delete this file on exit. - - The filename of the file to be deleted - - - - Clean up any Temporary files that were created - - - - - Fiddler's logging system - - - - - Fiddler's Preferences collection. Learn more at http://fiddler.wikidot.com/prefs - - - - - This event fires each time FiddlerCore reads data from network for the server's response. Note that this data - is not formatted in any way, and must be parsed by the recipient. - - - - - This event fires each time FiddlerCore reads data from network for the client's request. Note that this data - is not formatted in any way, and must be parsed by the recipient. - - - - - This event fires when a client request is received by Fiddler - - - - - This event fires when a server response is received by Fiddler - - - - - This event fires when Request Headers are available - - - - - This event fires when Response Headers are available - - - - - This event fires when an error response is generated by Fiddler - - - - - This event fires when a session has been completed - - - - - Sync this event to be notified when FiddlerCore has attached as the system proxy.")] - - - - - Sync this event to be notified when FiddlerCore has detached as the system proxy. - - - - - Fired each time Fiddler successfully establishes a TCP/IP connection - - - - - Fired each time Fiddler successfully accepts a TCP/IP connection - - - - - The Socket which was just Connected or Accepted - - - - - The Session which owns the this new connection - - - - - EventArgs class for the OnNotification handler - - - - - The string message of the notification - - - - - Enumeration of possible responses specified by the ValidateServerCertificateEventArgs as modified by FiddlerApplication's OnValidateServerCertificate event - - - - - The certificate will be considered valid if CertificatePolicyErrors == SslPolicyErrors.None, otherwise the certificate will be invalid unless the user manually allows the certificate. - - - - - The certificate will be confirmed with the user even if CertificatePolicyErrors == SslPolicyErrors.None. - Note: FiddlerCore does not support user-prompting and will always treat this status as ForceInvalid. - - - - - Force the certificate to be considered Valid, regardless of the value of CertificatePolicyErrors. - - - - - Force the certificate to be considered Invalid, regardless of the value of CertificatePolicyErrors. - - - - - These EventArgs are passed to the FiddlerApplication.OnValidateServerCertificate event handler when a server-provided HTTPS certificate is evaluated - - - - - EventArgs for the ValidateServerCertificateEvent that allows host to override default certificate handling policy - - The session - The CN expected for this session - The certificate provided by the server - The certificate chain of that certificate - Errors from default validation - - - - The port to which this request was targeted - - - - - The SubjectCN (e.g. Hostname) that should be expected on this HTTPS connection, based on the request's Host property. - - - - - The Session for which a HTTPS certificate was received. - - - - - The server's certificate chain. - - - - - The SslPolicyErrors found during default certificate evaluation. - - - - - Set this property to override the certificate validity - - - - - The X509Certificate provided by the server to vouch for its authenticity - - - - - These EventArgs are constructed when FiddlerApplication.OnClearCache is called. - - - - - Constructs the Event Args - - Should Cache Files be cleared? - Should Cookies be cleared? - - - - True if the user wants cache files to be cleared - - - - - True if the user wants cookies to be cleared - - - - - When the FiddlerApplication.OnReadResponseBuffer event fires, the raw bytes are available via this object. - - - - - Set to TRUE to request that upload or download process be aborted as soon as convenient - - - - - Session for which this responseRead is occurring - - - - - Byte buffer returned from read. Note: Always of fixed size, check iCountOfBytes to see which bytes were set - - - - - Count of latest read from Socket. If less than 1, response was ended. - - - - - Cache of Hostname->Address mappings - - - - - Number of milliseconds that a DNS cache entry may be reused without validation. - - - - - Maximum number of A/AAAA records to cache for DNS entries. - Beware: Changing this number changes how many IP-failovers Fiddler will perform if fiddler.network.dns.fallback is set, - and increasing the number will consume more memory in the cache. - - - - - Clear the DNS Cache. Called by the NetworkChange event handler in the oProxy object - - - - - Remove all expired DNSCache entries; called by the Janitor - - - - - Show the contents of the DNS Resolver cache - - - - - - Gets first available IP Address from DNS. Throws if address not found! - - String containing the host - True to use Fiddler's DNS cache. - IPAddress of target, if found. - - - - Gets IP Addresses for host from DNS. Throws if address not found! - - String containing the host - True to use Fiddler's DNS cache. - The Timers object to which the DNS lookup time should be stored, or null - List of IPAddresses of target, if any found. - - - - Trim an address list, removing the duplicate entries, any IPv6-entries if IPv6 is disabled, - and entries beyond the COUNT_MAX_A_RECORDS limit. - - The list to filter - A filtered address list - - - - A DNSCacheEntry holds a cached resolution from the DNS - - - - - TickCount of this record's creation - - - - - IPAddresses for this hostname - - - - - Construct a new cache entry - - The address information to add to the cache - - - - This class is used to find and create certificates for use in HTTPS interception. - The default implementation (DefaultCertProvider object) uses the Windows Certificate store, - but if a plugin ICertificateProvider is provided, it is used instead. - - - - - Enables specification of a delegate certificate provider that generates certificates for HTTPS interception. - - - - - Ensures that the Certificate Generator is ready. - - - - - Load a delegate Certificate Provider - - The provider, or null - - - - Removes Fiddler-generated certificates from the Windows certificate store - - - - - Removes Fiddler-generated certificates from the Windows certificate store - - Indicates whether Root certificates should also be cleaned up - - - - Returns the Root certificate that Fiddler uses to generate per-site certificates used for HTTPS interception. - - Returns the root certificate, if present, or null if the root certificate does not exist. - - - - Find a certificate from the certificate store. - - A string of the form: "www.hostname.com" - A certificate or /null/ - - - - Store an override Certificate in the Certificate Maker to return later. - - The hostname for which this certificate should be returned. - The X509Certificate2 with attached Private Key - TRUE if the Certificate Provider succeeded. FALSE if Provider doesn't support overrides. THROWS if Certificate lacked Private Key. - - - - Store an override Certificate in the Certificate Maker to return later. - - The hostname for which this certificate should be returned. - The filename of the PFX file containing the certificate and private key - The password for the PFX file - - - - Determine if the self-signed root certificate exists - - True if the Root certificate returned from GetRootCertificate is non-null, False otherwise. - - - - Is Fiddler's root certificate in the Root store? - - TRUE if so - - - - Is Fiddler's root certificate in the Machine Root store? - - TRUE if so - - - - Create a self-signed certificate to use for HTTPS interception - - TRUE if successful - - - - Finds the Fiddler root certificate and prompts the user to add it to the TRUSTED store - - True if successful - - - - Dispose of the Certificate Provider, if any. - - - - - This class allows fast-lookup of a ProcessName from a ProcessID. - - - - - Static constructur which registers for cleanup - - - - - Prune the cache of expiring PIDs - - - - - Map a Process ID (PID) to a Process Name - - The PID - A Process Name (e.g. IEXPLORE.EXE) or String.Empty - - - - Structure mapping a Process ID (PID) to a ProcessName - - - - - The TickCount when this entry was created - - - - - The ProcessName (e.g. IEXPLORE.EXE) - - - - - Create a PID->ProcessName mapping - - The ProcessName (e.g. IEXPLORE.EXE) - - - - The WinHTTPAutoProxy class is used to handle upstream gateways when the client was configured to use WPAD or an Proxy AutoConfig (PAC) script. - - - - - Indication as to whether AutoProxy information is valid. 0=Unknown/Enabled; 1=Valid/Enabled; -1=Invalid/Disabled - - - - - Returns a string containing the currently selected autoproxy options - - - - - - Get WPAD-discovered URL for display purposes (e.g. Help> About); note that we don't actually use this when determining the gateway, - instead relying on the WinHTTPGetProxyForUrl function to do this work for us. - - A WPAD url, if found, or String.Empty - - - - Return gateway endpoint for requested Url. TODO: Add caching layer! TODO: Support multiple results? - - The URL for which the gateway should be determined - The Endpoint of the Gateway, or null - TRUE if WinHttpGetProxyForUrl succeeded - - - - Close the WinHTTP Session handle - - - - - Note: Be sure to use the same hSession to prevent redownload of the proxy script - - - - - Set to true to send Negotiate creds when challenged to download the script - - - - - The DisplayName for this Connection - - - - - Is this Connectoid expected to be pointed at Fiddler? - - - - - The proxy settings collected from this connection before Fiddler was attached. - - - - - The WinINET Connectoids class contains the RAS/WinINET "connectoids" seen inside IE's Tools > Internet Options > Connections. - This class exposes methods to retrieve and update the proxy information for each connectoid in the list. - - - TODO: The methods of the class are not thread-safe and probably should be. - TODO: Need to refactor visibility here. Right now, _oConnectoids is (internal) instead of (private) because the - Options dialog iterates the list. And about:connectoids wants access too. Eventually ought to wrap as a ReadOnlyCollection getter - - - - - Dictionary of all Connectoids, indexed by the Connectoid's Name - - - - - Expensive Call. Enumerates all Connectoids using the RAS APIs, then determines the proxy information - for each connectoid. - - - - - Return the configured default connectoid's proxy information. - - Either proxy information from "DefaultLAN" or the user-specified connectoid - - - - Called when direct Registry groveling determines that the Default LAN connection's proxy was changed but InternetQueryOption - hasn't yet noticed. - - - - - Enumerates all of the connectoids and determines if the bIsHooked field is incorrect. If so, correct the value - and return TRUE to indicate that work was done. - - The Proxy:Port string to look for (e.g. Config.FiddlerListenHostPort) - TRUE if any of the connectoids' Hook state was inaccurate. - - - - Updates all (or CONFIG.sHookConnectionNamed-specified) connectoids to point at the argument-provided proxy information. - - The proxy info to set into the Connectoid - TRUE if updating at least one connectoid was successful - - - - Restore original proxy settings for any connectoid we changed. - - FALSE if any connectoids failed to unhook - - - - Map a local port number to the originating process ID - - The local port number - The originating process ID - - - - Calls the GetExtendedTcpTable function to map a port to a process ID. - This function is (over) optimized for performance. - - Client port - AF_INET or AF_INET6 - PID, if found, or 0 - - - - Given a local port number, uses GetExtendedTcpTable to find the originating process ID. - First checks the IPv4 connections, then looks at IPv6 connections. - - Client applications' port - ProcessID, or 0 if not found - - - - Enumeration of possible queries that can be issued using GetExtendedTcpTable - http://msdn2.microsoft.com/en-us/library/aa366386.aspx - - - - - The ServerChatter object is responsible for transmitting the Request to the destination server and retrieving its Response. - - - - - Size of buffer passed to pipe.Receive when reading from the server - - - - - The pipeServer represents Fiddler's connection to the server. - - - - - The session to which this ServerChatter belongs - - - - - The inbound headers on this response - - - - - Indicates whether this request was sent to the Gateway. - Session should have SessionFlags.SentToGateway set. - - - - - Buffer holds this response's data as it is read from the pipe. - - - - - The total count of bytes read for this response. Typically equals m_responseData.Length unless log-drop-response-body flag is set and - Streaming mode is enabled, in which case it will be larger since the m_responseData is cleared after every read. - - Note: This value is reset to 0 when clearing streamed data. It probably shouldn't be... - - - - - Pointer to first byte of Entity body (or to the start of the next set of headers in the case where there's a HTTP/1xx intermediate header) - Note: This gets reset to 0 if we're streaming and dropping the response body. - - - - - Optimization: tracks how far we've looked into the Request when determining iEntityBodyOffset - - - - - True if HTTP Response headers have been returned to the client. - - - - - Indicates how much of _responseData buffer has already been streamed to the client - - - - - Position in responseData of the start of the latest parsed chunk size information - - - - - Peek at the current response body and return it as an array - - The response body as an array, or byte[0] - - - - Create a new ServerChatter object. - - - - - - Create a ServerChatter object and initialize its headers from the specified string - - - - - - - Clear the current object and start over - - If TRUE, allocates a buffer (m_responseData) to read from a pipe. If FALSE, nulls m_responseData. - - - - Scans responseData stream for the \r\n\r\n (or variants) sequence - which indicates that the header block is complete. - - SIDE EFFECTS: - iBodySeekProgress is updated and maintained across calls to this function - iEntityBodyOffset is updated if the end of headers is found - - True, if responseData contains a full set of headers - - - - Parse the HTTP Response into Headers and Body. - - - - - - Attempts to get Headers from the stream. If a HTTP/100 Continue block is present, it is removed and ignored. - - - - - Deletes a single header block (at this point, always a HTTP/1xx header block) from the Response stream - and adjusts all header-reading state to start over from the top of the stream. If the fiddler.network.leakhttp1xx preference is TRUE, - then the 1xx message will have been leaked before calling this method. - - - - - Adjusts PipeServer's ReusePolicy if response headers require closure. Then calls _detachServerPipe() - - - - - Queues or End()s the ServerPipe, depending on its ReusePolicy - - - - - Determines whether a given PIPE is suitable for this session based on this session's target, PID, etc. - - The Client Process ID, if any - - - TRUE if the connection should be used, FALSE otherwise - - - - Connect to the Server or Gateway - Note that HTTPS Tunnels use a different code path. - - Note that this function is crazy complicated due to the intricacies of socket reuse. We want to avoid - redundant DNS lookups etc, and we need to be sensitive to the fact that the Gateway can change from request to request. - - TODO: Move this into the Pipe code and into the new PipePool. probably should be a static that returns a pipe? - - TRUE, if pipeServer was assigned a connection to the target server - - - - Performs a SOCKSv4A handshake on the socket - - - - - - - - - TODO: This entire function needs to go away. What we really want to do is generate a new Session that is a CONNECT tunnel and - pass it through the normal request processing pipeline. That allows us to automatically authenticate using the user's Windows - credentials. - - Sends a CONNECT to the specified socket acting as a gateway proxy and waits for a 200 OK response. This method is used when Fiddler needs - a HTTPS Connection through a proxy but the client didn't establish one (e.g. the Request Composer). Note: May THROW - - The Socket - The host to which the gateway should connect - The port to which the gateway should connect - The HTTPRequestHeaders from the original request - TRUE if a 200 OK was received, FALSE if something else was received, THROWS EXCEPTION on network errors - - - - Given an address list and port, attempts to create a socket to the first responding host in the list (retrying via DNS Failover if needed). - - IPEndpoints to attempt to reach - Session object to annotate with timings and errors - Connected Socket. Throws Exceptions on errors. - - - - Sends the HTTP Request to the upstream server or proxy. If the request is a CONNECT and there's no - gateway, this method ~only~ establishes the connection to the target, but does NOT send a request. - - True if connection and send succeeded, False otherwise - - - - Replaces body with an error message - - Error to send if client was remote - Error to send if cilent was local - - - - Loads a HTTP response from a file - - The name of the file from which a response should be loaded - False if the file wasn't found. Throws on other errors. - - - - Reads the response from the Server Pipe. - - - - - - Leak the current bytes of the response to client. We wait for the full header - set before starting to stream for a variety of impossible-to-change reasons. - - Returns TRUE if response bytes were leaked, false otherwise (e.g. write error) - - - - Get the MIME type (sans Character set or other attributes) from the HTTP Content-Type response header, or String.Empty if missing. - - - - - Peek at number of bytes downloaded thus far. - - - - - DEPRECATED: You should use the Timers object on the Session object instead. - The number of milliseconds between the start of sending the request to the server to the first byte of the server's response - - - - - DEPRECATED: You should use the Timers object on the Session object instead. - The number of milliseconds between the start of sending the request to the server to the last byte of the server's response. - - - - - Was this request forwarded to a gateway? - - - - - Was this request serviced from a reused server connection? - - - - - The HTTP headers of the server's response - - - - - Simple indexer into the Response Headers object - - - - - HTTP Response headers object - - - - - Base class for RequestHeaders and ResponseHeaders - - - - - Text encoding to be used when converting this header object to/from a byte array - - - - - HTTP version (e.g. HTTP/1.1) - - - - - Storage for individual HTTPHeaderItems in this header collection - - - - - Get byte count of this HTTP header instance. - - Byte Count - - - - Number of HTTP headers - - Number of HTTP headers - - - - Returns all instances of the named header - - Header name - List of instances of the named header - - - - Returns the count of instances of the named header - - Header name - Count of instances of the named header - - - - Enumerator for HTTPHeader storage collection - - Enumerator - - - - Adds a new header containing the specified name and value. - - Name of the header to add. - Value of the header. - Returns the newly-created HTTPHeaderItem. - - - - Determines if the Headers collection contains a header of the specified name, with any value. - - The name of the header to check. (case insensitive) - True, if the header exists. - - - - Returns the Value from a token in the header. Correctly handles double-quoted strings. Requires semicolon for delimiting tokens - - Name of the header - Name of the token - Value of the token if present; otherwise, null - - - - Determines if the Headers collection contains one or more headers of the specified name, and sHeaderValue is part of one of those Headers' value. - - The name of the header to check. (case insensitive) - The partial header value. (case insensitive) - True if the header is found and the value case-insensitively contains the parameter - - - - Determines if the Headers collection contains a header of the specified name, and sHeaderValue=Header's value. Similar to a case-insensitive version of: headers[sHeaderName]==sHeaderValue, although it checks all instances of the named header. - - The name of the header to check. (case insensitive) - The full header value. (case insensitive) - True if the header is found and the value case-insensitively matches the parameter - - - - Removes all headers from the header collection which have the specified name. - - The name of the header to remove. (case insensitive) - - - - Removes all headers from the header collection which have the specified names. - - Array of names of headers to remove. (case insensitive) - - - - Removes a HTTPHeader item from the collection - - The HTTPHeader item to be removed - - - - Removes all HTTPHeader items from the collection - - - - - Renames all headers in the header collection which have the specified name. - - The name of the header to rename. (case insensitive) - The new name for the header. - True if one or more replacements were made. - - - - Gets or sets the value of a header. In the case of Gets, the value of the first header of that name is returned. - If the header does not exist, returns null. - In the case of Sets, the value of the first header of that name is updated. - If the header does not exist, it is added. - - - - - Indexer property. Returns HTTPHeaderItem by index. Throws Exception if index out of bounds - - - - - Clone this HTTPResponseHeaders object and return the result cast to an Object - - The new response headers object, cast to an object - - - - Status code from HTTP Response. If setting, also set HTTPResponseStatus too! - - - - - Status text from HTTP Response (e.g. '200 OK'). - - - - - Constructor for HTTP Response headers object - - - - - Constructor for HTTP Response headers object - - Text encoding to be used for this set of Headers when converting to a byte array - - - - Returns a byte array representing the HTTP headers. - - TRUE if the response status line should be included - TRUE if there should be a trailing \r\n byte sequence included - Byte[] containing the headers - - - - Returns a string containing http headers - - TRUE if the response status line should be included - TRUE if there should be a trailing CRLF included - String containing http headers - - - - Returns a string containing the http headers - - - Returns a string containing http headers with a status line but no trailing CRLF - - - - - Parses a string and assigns the headers parsed to this object - - The header string - TRUE if the operation succeeded, false otherwise - - - - HTTP Request headers object - - - - - Clones the HTTP request headers - - The new HTTPRequestHeaders object, cast to an object - - - - The HTTP Method (e.g. GET, POST, etc) - - - - - Constructor for HTTP Request headers object - - - - - Constructor for HTTP Request headers object - - Text encoding to be used for this set of Headers when converting to a byte array - - - - Parses a string and assigns the headers parsed to this object - - The header string - TRUE if the operation succeeded, false otherwise - - - - Returns a byte array representing the HTTP headers. - - TRUE if the HTTP REQUEST line (method+path+httpversion) should be included - TRUE if there should be a trailing \r\n byte sequence included - TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE - The HTTP headers as a byte[] - - - - Returns a byte array representing the HTTP headers. - - TRUE if the HTTP REQUEST line (method+path+httpversion) should be included - TRUE if there should be a trailing \r\n byte sequence included - TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE - Only meaningful if prependVerbLine is TRUE, the host to use in the HTTP REQUEST LINE - The HTTP headers as a byte[] - - - - Returns a string representing the HTTP headers. - - TRUE if the HTTP REQUEST line (method+path+httpversion) should be included - TRUE if there should be a trailing CRLF sequence included - TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE (Automatically set to FALSE for CONNECT requests) - The HTTP headers as a string. - - - - Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP REQUEST line - - TRUE if the HTTP REQUEST line (method+path+httpversion) should be included - TRUE if there should be a trailing CRLF sequence included - The header string - - - - Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP request line, and no trailing CRLF - - The header string - - - - The (lowercased) URI scheme for this request (https, http, or ftp) - - - - - Username:Password info for FTP URLs. (either null or "user:pass@") - - - - - Get or set the request path as a string - - - - - Get or set the request path as a byte array - - - - - Represents a single HTTP header - - - - - Clones a single HTTP header and returns the clone cast to an object - - HTTPHeader Name: Value pair, cast to an object - - - - The name of the HTTP header - - - - - The value of the HTTP header - - - - - Creates a new HTTP Header item - - Header name - Header value - - - - Return a string of the form "NAME: VALUE" - - "NAME: VALUE" Header string - - - - A SessionTimers object holds timing information about a single Session. - - - - - The time at which the client's HTTP connection to Fiddler was established - - - - - The time at which the request's first Send() to Fiddler completes - - - - - The time at which the request headers were received - - - - - The time at which the request to Fiddler completes (aka RequestLastWrite) - - - - - The time at which the server connection has been established - - - - - The time at which Fiddler begins sending the HTTP request to the server (FiddlerRequestFirstSend) - - - - - The time at which Fiddler has completed sending the HTTP request to the server (FiddlerRequestLastSend). - BUG: Should be named "FiddlerEndRequest". - NOTE: Value here is often misleading due to buffering inside WinSock's send() call. - - - - - The time at which Fiddler receives the first byte of the server's response (ServerResponseFirstRead) - - - - - The time at which Fiddler received the server's headers - - - - - The time at which Fiddler has completed receipt of the server's response (ServerResponseLastRead) - - - - - The time at which Fiddler has begun sending the Response to the client (ClientResponseFirstSend) - - - - - The time at which Fiddler has completed sending the Response to the client (ClientResponseLastSend) - - - - - The number of milliseconds spent determining which gateway should be used to handle this request - (Should be mutually exclusive to DNSTime!=0) - - - - - The number of milliseconds spent waiting for DNS - - - - - The number of milliseconds spent waiting for the server TCP/IP connection establishment - - - - - The number of milliseconds elapsed while performing the HTTPS handshake with the server - - - - - Override of ToString shows timer info in a fancy format - - Timing information as a string - - - - Override of ToString shows timer info in a fancy format - - TRUE if the result can contain linebreaks; false if comma-delimited format preferred - Timing information as a string - - - - Enables High-Resolution timers, which are bad for battery-life but good for the accuracy of timestamps. - See http://technet.microsoft.com/en-us/sysinternals/bb897568 for the ClockRes utility that shows current clock resolution. - NB: Exiting Fiddler reverts this to the default value. - - - - - Watch a registry key for changes to its values. - - The Registry Hive in which the key lives - The key, e.g. \Software\Microsoft\Fiddler2\ - The Event Handler to invoke when a change occurs. - A new RegistryWatcher object. - - - - Start monitoring. - - - - - Stops the monitoring thread. - - - - - Fires when the specified registry key has changed. - - - - - The GenericTunnel class represents a "blind tunnel" to shuffle bytes between a client and the server. - - - - - Is streaming started in the downstream direction? - - - - - Number of bytes received from the client - - - - - Number of bytes received from the server - - - - - This "Factory" method creates a new HTTPS Tunnel and executes it on a background (non-pooled) thread. - - The Session containing the HTTP CONNECT request - - - - Creates a tunnel. External callers instead use the CreateTunnel static method. - - The session for which this tunnel was initially created. - Client Pipe - Server Pipe - - - - This function keeps the thread alive until it is signaled that the traffic is complete - - - - - Executes the HTTPS tunnel inside an All-it-can-eat exception handler. - Call from a background thread. - - - - - Executes the WebSocket tunnel on a background thread - - - - - Instructs the tunnel to take over the server pipe and begin streaming responses to the client - - - - - Close the HTTPS tunnel and signal the event to let the service thread die. - WARNING: This MUST not be allowed to throw any exceptions, because it will do so on threads that don't catch them, and this will kill the application. - - - - - Called when we have received data from the local client. - Incoming data will immediately be forwarded to the remote host. - - The result of the asynchronous operation. - - - Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.
- The result of the asynchronous operation. -
- - Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.
- The result of the asynchronous operation. -
- - Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.
- The result of the asynchronous operation. -
- - - Returns number of bytes sent from the Server to the Client - - - - - Returns number of bytes sent from the Client to the Server - - - - - Attribute used to specify the minimum version of Fiddler compatible with this extension assembly. - - - - - Attribute used to specify the minimum version of Fiddler compatible with this extension assembly. - - The minimal version string (e.g. "2.2.8.8") - - - - Getter for the required version string - - - - - Attribute allowing developer to specify that a class supports the specified Import/Export Format - - - - - Attribute allowing developer to specify that a class supports the specified Import/Export Format - - Shortname of the Format (e.g. WebText XML) - Description of the format - - - - Returns the Shortname for this format - - - - - Returns the Description of this format - - - - - This tuple maps a display string to a Import/Export type - - - - - Textual description of the Format - - - - - Class implementing the format - - - - - Create a new Transcoder Tuple - - Format description - Type implementing this format - - - - ISessionImport allows loading of Session data - - - - - Import Sessions from a data source - - Shortname of the format - Dictionary of options that the Importer class may use - Callback event on which progress is reported or the host may cancel - Array of Session objects imported from source - - - - ISessionExport allows saving of Session data - - - - - Export Sessions to a data store - - Shortname of the format - Array of Sessions being exported - Dictionary of options that the Exporter class may use - Callback event on which progress is reported or the host may cancel - TRUE if the export was successful - - - - EventArgs class for the ISessionImporter and ISessionExporter interface callbacks - - - - - Progress Callback - - Float indicating completion ratio, 0.0 to 1.0. Set to 0 if unknown. - Short string describing current operation, progress, etc - - - - Set to TRUE to request that Import/Export process be aborted as soon as convenient - - - - - The string message of the notification - - - - - The percentage completed - - - - - The core proxy object which accepts connections from clients and creates session objects from those connections - - - - - The RegistryWatcher is used to monitor changes in the WinINET Proxy registry keys - to detect premature detaches. - - - - - Hostname if this Proxy Endpoint is terminating HTTPS connections - - - - - Certificate if this Proxy Endpoint is terminating HTTPS connections - - - - - Per-connectoid information about each WinINET connectoid - - - - - The default WinINET proxy as determined upon Fiddler startup. - - - - - The WinHTTP AutoProxy object, created if we're using WPAD or a PAC Script as a gateway - - - - - Allow binding to a specific egress adapter: "fiddler.network.egress.ip" - - - - - Watcher for Notification of Preference changes - - - - - Server connections may be pooled for performance reasons. - - - - - The Socket Endpoint on which this proxy receives requests - - - - - Flag indicating that Fiddler is in the process of detaching... - - - - - List of hosts which should bypass the upstream gateway - - - - - Returns a string of information about this instance and the ServerPipe reuse pool - - A multiline string - - - - Change the outbound IP address used to send traffic - - - - - - Watch for relevent changes on the Preferences object - - - - - - - Called whenever Windows reports that the system's NetworkAddress has changed - - - - - - - Called by Windows whenever network availability goes up or down. - - - - - - - Directly inject a session into the Fiddler pipeline, returning a reference to it. - NOTE: This method will THROW any exceptions to its caller. - - String representing the HTTP request. If headers only, be sure to end with CRLFCRLF - StringDictionary of Session Flags (or null) - The new session - - - - [DEPRECATED] Directly inject a session into the Fiddler pipeline. - NOTE: This method will THROW any exceptions to its caller. - - - HTTP Request Headers - HTTP Request body (or null) - StringDictionary of Session Flags (or null) - - - - [DEPRECATED] Directly inject a session into the Fiddler pipeline. - NOTE: This method will THROW any exceptions to its caller. - - - String representing the HTTP request. If headers only, be sure to end with CRLFCRLF - StringDictionary of Session Flags (or null) - - - - [DEPRECATED]: This version does no validation of the request data, and doesn't set SessionFlags.RequestGeneratedByFiddler - Send a custom HTTP request to Fiddler's listening endpoint (127.0.0.1:8888 by default). - NOTE: This method will THROW any exceptions to its caller and blocks the current thread. - - - String representing the HTTP request. If headers only, be sure to end with CRLFCRLF - - - - This function, when given a scheme host[:port], returns the gateway information of the proxy to forward requests to. - - URIScheme: use http, https, or ftp - Host for which to return gateway information - IPEndPoint of gateway to use, or NULL - - - - Accept the connection and pass it off to a handler thread - - - - - - Register as the system proxy for WinINET and set the Dynamic registry key for other FiddlerHook - - True if the proxy registration was successful - - - - If we get a notice that the proxy registry key has changed, wait 50ms and then check to see - if the key is pointed at us. If not, raise the alarm. - - - - - - - If we are suppsoed to be "attached", we re-verify the registry keys, and if they are corrupt, notify - our host of the discrepency. - - - - - This method sets up the connectoid list and updates gateway information. Called by the Attach() method, or - called on startup if Fiddler isn't configured to attach automatically. - - - - - Given an address list, walks the list until it's able to successfully make a connection. - Used for finding an available Gateway when we have a list to choose from - - A string, e.g. PROXY1:80 - The IP:Port of the first alive endpoint for the specified host/port - - - - Set internal fields pointing at upstream proxies. - - - - - Sets a registry key which indicates that Fiddler is in "Connected" mode. Used by the FiddlerHook Add-on - - TRUE if fiddler is Connected - - - - Detach the proxy by setting the registry keys and sending a Windows Message - - True if the proxy settings were successfully detached - - - - Detach the proxy by setting the registry keys and sending a Windows Message - - True if the proxy settings were successfully detached - - - - Write a .PAC file that user can point FireFox or some other non-WinINET browser to. This is a crutch - that simplifies using Fiddler with non-WinINET clients. - - - - - - Stop the proxy by closing the socket. - - - - - Start the proxy by binding to the local port and accepting connections - - Port to listen on - TRUE to allow remote connections - - - - - Dispose Fiddler's listening socket - - - - - Clear the pool of Server Pipes. May be called by extensions. - - - - - Assign HTTPS Certificate for this endpoint - - Certificate to return to clients who connect - - - - Sets the upstream gateway to match the specified ProxyInfo - - - - - - Generate or find a certificate for this endpoint - - Subject FQDN - TRUE if the certificate could be found/generated, false otherwise - - - - Return a simple string indicating what upstream proxy/gateway is in use. - - - - - - Show a message box indicating what upstream gateway/proxy is in use - - - - - The port on which this instance is listening - - - - - Returns true if Fiddler believes it is currently registered as the Local System proxy - - - - - This event handler fires when Fiddler detects that it is (unexpectedly) no longer the system's registered proxy - - - - - Somewhat similar to the Framework's "BackgroundWorker" class, the periodic worker performs a similar function on a periodic schedule. - - The PeriodicWorker class is used by Fiddler to perform "cleanup" style tasks on a timer. Put work in the queue, - and it will see that it's done at least as often as the schedule specified until Fiddler begins to close at which - point all work stops. - - Note that the callback occurs on a background thread. - - The underlying timer's interval is 1 second. - - - - I think a significant part of the reason that this class exists is that I thought the System.Threading.Timer consumed one thread for each - timer. In reality, per "CLR via C# 4e" all of the instances share one underlying thread and thus my concern was misplaced. Ah well. - - - - - Assigns a "job" to the Periodic worker, on the schedule specified by iMS. - - The function to run on the timer specified. - Warning: the function is NOT called on the UI thread, so use .Invoke() if needed. - The # of milliseconds to wait between runs - A taskItem which can be used to revokeWork later - - - - Revokes a previously-assigned task from this worker. - - - - - - The ScheduledTasks class allows addition of jobs by name. It ensures that ONE instance of the named - job will occur at *some* point in the future, between 0 and a specified max delay. If you queue multiple - instances of the same-named Task, it's only done once. - - - - - Under the lock, we enumerate the schedule to find work to do and remove that work from the schedule. - After we release the lock, we then do the queued work. - - - - - - A jobItem represents a Function+Time tuple. The function will run after the given time. - - - - - TickCount at which this job must run. - - - - - Method to invoke to complete the job - - -
-
+ + + + FiddlerCore4 + + + + + Wrapper for WinINET cache APIs. + + + + + Clear all HTTP Cookies from the WinINET Cache + + + + + Clear all files from the WinINET Cache + + + + + Delete all permanent WinINET cookies for sHost; won't clear memory-only session cookies. Supports hostnames with an optional leading wildcard, e.g. *example.com. NOTE: Will not work on VistaIE Protected Mode cookies. + + The hostname whose cookies should be cleared + + + + Clear the Cache items. Note: May be synchronous, may be asynchronous. + + TRUE if cache files should be cleared + TRUE if cookies should be cleared + + + + For PInvoke: Contains information about an entry in the Internet cache + + + + + Wrapper for WinINET proxy configuration APIs + + + + + Hostnames of sites to bypass proxy. <local> is common. + + + + + Allow direct connection to host + + + + + Attempt WPAD autoproxy detection + + + + + Ignore WinINET "no autoproxy unticks box" optimization + + + + + Use user-supplied URL to get FindProxyForURL script + + + + + Use user-supplied manual/fixed proxy address list + + + + + WPAD script url that may be used if _bUseScript true + + + + + Gathers proxy information from a named connection. + + Pass DefaultLAN to look for the "null" connection + Proxy info, or null + + + + Get a string describing the proxy settings + + Returns a multi-line string representing the proxy settings + + + + Calculate a string suitable for passing into WinINET APIs. + + Returns a string containing proxy information, or NULL. NB: I've seen WinINET blow up when passed String.Empty rather than null. + + + + + Given a proxy string, we crack out the proxy gateways for each protocol + + e.g. HTTP=itgproxy:80;FTP=ftpprox:21; + false on error + + + + Fills this WinINETProxyInfo instance with settings from specified WinINET connection. + + Name of the connection. Pass NULL for LAN connection. + TRUE if the settings were successfully retrieved. + + + + Sets WinINET proxy settings for specified connection to those specified in this WinINETProxy instance. + + Name of the connection. Pass NULL for LAN connection. + + + + Semi-colon delimited list of hostnames that should bypass the fixed proxy + + + + + TRUE if manually-specified proxy should be used. + + + + + TRUE if a direct HTTP connection may be made if AutoProxy/PAC is unreachable or corrupt + + + + + True if the proxy should be bypassed for dotless hostnames. + NOTE: Simply looks at the bypassList string to see if it contains a LOCAL rule. + + + + + String representing the endpoint of the proxy for HTTP-traffic, if configured + + + + + String representing the endpoint of the proxy for HTTPS-traffic, if configured + + + + + String representing the endpoint of the proxy for FTP-traffic, if configured + + + + + String representing the endpoint of the proxy for SOCKS-traffic, if configured + + + + + Bool indicating whether this connection is set to autodetect the proxy + + + + + Returns a string pointing to the ProxyAutoConfig script, or null if there is no such URL or it is not enabled + + + + + Provides simple utility functions common to both ClientHello and ServerHello parsing + + + + + Gets a textual string from a TLS extension + + + + + Builds a string from an ALPN List of strings + + + + + List defined ECC Curves from RFC4492 + + + + + + + List defined ECC Point Formats from RFC4492 + + + + + + + Converts a HTTPS version to a "Major.Minor (Friendly)" string + + + + + The HTTPSClientHello class is used to parse the bytes of a HTTPS ClientHello message. + + + + + Map cipher id numbers to names. See http://www.iana.org/assignments/tls-parameters/ + Format is PROTOCOL_KEYAGREEMENT_AUTHENTICATIONMECHANISM_CIPHER_MACPRIMITIVE + + + + + Parse a single extension using the list from http://tools.ietf.org/html/rfc6066 + http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xml + https://src.chromium.org/viewvc/chrome/trunk/src/net/third_party/nss/ssl/sslt.h + + + + + + + Parse a single extension using the list from http://tools.ietf.org/html/rfc6066 + + + + + + + Did client use ALPN to go to SPDY? + http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-01#section-3.1 + + + + + Did this ServerHello Handshake specify an upgrade to SPDY? + + + + + The Session object manages the complete HTTP session including the UI listitem, the ServerChatter, and the ClientChatter. + + + + + Should we try to use the SPNToken type? + Cached for performance reasons. + ISSUE: It's technically possible to use FiddlerCorev2/v3 on .NET/4.5 but we won't set this field if you do that. + + + + + Sorta hacky, we may use a .NET WebRequest object to generate a valid NTLM/Kerberos response if the server + demands authentication and the Session is configured to automatically respond. + + + + + Used if the Session is bound to a WebSocket or CONNECTTunnel + + + + + DO NOT USE. TEMPORARY WHILE REFACTORING VISIBILITY OF MEMBERS + + + + + + + Sets or unsets the specified SessionFlag(s) + + SessionFlags + Desired set value + + + + Test the session's BitFlags + + One or more (OR'd) SessionFlags + TRUE if specified flag(s) are set + + + + Test the session's BitFlags + + One or more (OR'd) SessionFlags + TRUE if any of specified flag(s) are set + + + + Should response be buffered for tampering + + + + + Timers stored as this Session progresses + + + + + Field is set to False if socket is poisoned due to HTTP errors. + + + + + Object representing the HTTP Response. + + + + + Object representing the HTTP Request. + + + + + Fiddler-internal flags set on the Session. + + TODO: ARCH: This shouldn't be exposed directly; it should be wrapped by a ReaderWriterLockSlim to prevent + exceptions while enumerating the flags for storage, etc + + + + Contains the bytes of the request body. + + + + + Contains the bytes of the response body. + + + + + IP Address of the client for this session. + + + + + Client port attached to Fiddler. + + + + + IP Address of the server for this session. + + + + + Event object used for pausing and resuming the thread servicing this session + + + + + Returns TRUE if the Session's HTTP Method is available and matches the target method. + + The target HTTP Method being compared. + true, if the method is specified and matches sTestFor (case-insensitive); otherwise false. + + + + Returns TRUE if the Session's target hostname (no port) matches sTestHost (case-insensitively). + + The host to which this session's host should be compared. + True if this session is targeted to the specified host. + + + + Replaces any characters in a filename that are unsafe with safe equivalents, and trim to 160 characters. + + + + + + + Examines the MIME type, and if ambiguous, returns sniffs the body. + + + + + + Notify extensions if this Session naturally led to another (e.g. due to redirect chasing or Automatic Authentication) + + The original session (typically == this, but maybe not in multiple-hops?) + The new session created + + + + Returns HTML representing the Session. Call Utilities.StringToCF_HTML on the result of this function before placing it on the clipboard. + + TRUE if only the headers should be copied. + A HTML-formatted fragment representing the current session. + + + + Store this session's request and response to a string. + + If true, return only the request and response headers + String representing this session + + + + Store this session's request and response to a string. + + A string containing the content of the request and response. + + + + This private method pauses the Session's thread to allow breakpoint debugging + + + + + This method resumes the Session's thread in response to "Continue" commands from the UI + + + + + Set the SessionFlags.Ignore bit for this Session, also configuring it to stream, drop read data, and bypass event handlers. + + + + + Called by an AcceptConnection-spawned background thread, create a new session object from a client socket and execute the session + + Parameter object defining client socket and endpoint's HTTPS certificate, if present + + + + Call this method to AuthenticateAsServer on the client pipe. If configured, the pipe will first sniff the request + for the SubjectCN expected, which might be advertised in the TLS ServerNameIndicator extension. + + The default certificate to use + TRUE if a HTTPS handshake was achieved; FALSE for any exceptions or other errors. + + + + Call this function while in the "reading response" state to update the responseBodyBytes array with + the partially read response. + + TRUE if the peek succeeded; FALSE if not in the ReadingResponse state + + + + Prevents the server pipe from this session from being pooled for reuse + + + + + Ensures that, after the response is complete, the client socket is closed and not reused. + Does NOT (and must not) close the pipe. + + + + + Immediately close client and server sockets. Call in the event of errors-- doesn't queue server pipes for future reuse. + + + + + + Closes both client and server pipes and moves state to Aborted; unpauses thread if paused. + + + + + Save HTTP response body to Fiddler Captures folder. You likely want to call utilDecodeResponse first. + + True if the response body was successfully saved + + + + Save HTTP response body to specified location. You likely want to call utilDecodeResponse first. + + The name of the file to which the response body should be saved. + True if the file was successfully written. + + + + Save the request body to a file. You likely want to call utilDecodeRequest first. + + The name of the file to which the request body should be saved. + True if the file was successfully written. + + + + Save the request and response to a single file. + + The filename to which the session should be saved. + TRUE if only the headers should be written. + + + + Save the request to a file. + The headers' Request Line will not contain the scheme or host, which is probably not what you want. + + The name of the file to which the request should be saved. + TRUE to save only the headers + + + + Save the request to a file. Throws if file cannot be written. + + The name of the file to which the request should be saved. + TRUE to save only the headers. + TRUE to include the Scheme and Host in the Request Line. + + + + Read metadata about this session from a stream. NB: Closes the Stream when done. + + The stream of XML text from which session metadata will be loaded. + True if the Metadata was successfully loaded; False if any exceptions were trapped. + + + + Writes this session's metadata to a file. + + The name of the file to which the metadata should be saved in XML format. + True if the file was successfully written. + + + + Saves the response (headers and body) to a file + + The File to write + TRUE if only heaers should be written + + + + Write the metadata about this Session to a stream. The Stream is left open! + + The Stream to write to + + + + Write the session's Request to the specified stream + + TRUE if only the headers should be be written + TRUE if the Scheme and Host should be written in the Request Line + The Stream to which the request should be written + True if the request was written to the stream. False if the request headers do not exist. Throws on other stream errors. + + + + Write the session's Request to the specified stream + + TRUE if only the headers should be be written + TRUE if the Scheme and Host should be written in the Request Line + TRUE if binary bodies should be encoded in base64 for text-safe transport (e.g. used by Composer drag/drop) + The Stream to which the request should be written + True if the request was written to the stream. False if the request headers do not exist. Throws on other stream errors. + + + + Write the session's Response to the specified stream + + The stream to which the response should be written + TRUE if only the headers should be written + TRUE if the response was written to the stream. False if the response headers do not exist. Throws on other stream errors. + + + + Write the session to the specified stream + + The stream to which the session should be written + TRUE if only the request and response headers should be written + False on any exceptions; True otherwise + + + + Replace HTTP request headers and body using the specified file. + + The file containing the request + True if the file was successfully loaded as the request body + + + + Replace HTTP response headers and body using the specified stream. + + The stream containing the response. + True if the Stream was successfully loaded. + + + + Replace HTTP response headers and body using the specified file. + + The file containing the response. + True if the file was successfully loaded. + + + + Return a string generated from the request body, decoding it and converting from a codepage if needed. Throws on errors. + + A string containing the request body. + + + + Return a string generated from the response body, decoding it and converting from a codepage if needed. Throws on errors. + + A string containing the response body. + + + + Find the text encoding of the request + WARNING: Will not decompress body to scan for indications of the character set + + Returns the Encoding of the requestBodyBytes + + + + Find the text encoding of the response + WARNING: Will not decompress body to scan for indications of the character set + + The Encoding of the responseBodyBytes + + + + Returns true if the absolute request URI contains the specified string. Case-insensitive. + + Case-insensitive string to find + TRUE if the URI contains the string + + + + Removes chunking and HTTP Compression from the Response. Adds or updates Content-Length header. + + Returns TRUE if the response was decoded; returns FALSE on failure, or if response didn't have headers that showed encoding. + + + + Removes chunking and HTTP Compression from the Response. Adds or updates Content-Length header. + + TRUE if error messages should be suppressed. False otherwise. + TRUE if the decoding was successsful. + + + + Removes chunking and HTTP Compression from the Request. Adds or updates Content-Length header. + + Returns TRUE if the request was decoded; returns FALSE on failure, or if request didn't have headers that showed encoding. + + + + Use GZIP to compress the request body. Throws exceptions to caller. + + TRUE if compression succeeded + + + + Use GZIP to compress the response body. Throws exceptions to caller. + + TRUE if compression succeeded + + + + Use DEFLATE to compress the response body. Throws exceptions to caller. + + TRUE if compression succeeded + + + + Use BZIP2 to compress the response body. Throws exceptions to caller. + + TRUE if compression succeeded + + + + Introduces HTTP Chunked encoding on the response body + + The number of chunks to try to create + TRUE if the chunking could be performed. + + + + Perform a string replacement on the request body. Adjusts the Content-Length header if needed. + + The case-sensitive string to search for. + The text to replace. + TRUE if one or more replacements occurred. + + + + Call inside OnBeforeRequest to create a response object and bypass the server. + + + + + Perform a regex-based string replacement on the response body. Adjusts the Content-Length header if needed. + + The regular expression used to search the body. Specify RegEx Options via leading Inline Flags, e.g. (?im) for case-Insensitive Multi-line. + The text or expression used to replace + TRUE if replacements occured + + + + Perform a string replacement on the response body (potentially multiple times). Adjust the Content-Length header if needed. + + String to find (case-sensitive) + String to use to replace + TRUE if replacements occurred + + + + Perform a one-time string replacement on the response body. Adjust the Content-Length header if needed. + + String to find (case-sensitive) + String to use to replace + TRUE for Case-Sensitive + TRUE if a replacement occurred + + + + Replaces the request body with sString as UTF8. Sets Content-Length header and removes Transfer-Encoding/Content-Encoding. + + The desired request Body as a string + + + + Replaces the response body with sString. Sets Content-Length header and removes Transfer-Encoding/Content-Encoding + + The desired response Body as a string + + + + Add a string to the top of the response body, updating Content-Length. (Call utilDecodeResponse first!) + + The string to prepend + + + + Find a string in the request body. Return its index, or -1. + + Term to search for + Require case-sensitive match? + Location of sSearchFor,or -1 + + + + Find a string in the response body. Return its index, or -1. + + Term to search for + Require case-sensitive match? + Location of sSearchFor,or -1 + + + + Reset the SessionID counter to 0. This method can lead to confusing UI, so use sparingly. + + + + + Create a session object from two byte[] representing request and response. + + The client data bytes + The server data bytes + + + + Create a Session object from a (serializable) SessionData object + + + + + + Create a session object from two byte[] representing request and response. This is used when loading a Session Archive Zip. + + The client data bytes + The server data bytes + SessionFlags for this session + + + + Creates a new session and attaches it to the pipes passed as arguments + + The client pipe from which the request is read and to which the response is written. + The server pipe to which the request is sent and from which the response is read. May be null. + + + + Initialize a new session from a given request headers and body request builder data. Note: No Session ID is assigned here. + + NB: If you're copying an existing request, use oRequestHeaders.Clone() + The bytes of the request's body + + + + Factory constructor + + + + + + + + + + + + THREADHACK: + TODO: Use an I/O Completion Port to wait for traffic on the client socket without blocking a threadpool thread + + + + + Called when the Session is ready to begin processing. Eats exceptions to prevent unhandled exceptions on background threads from killing the application. + + Unused parameter (required by ThreadPool) + + + + InnerExecute() implements Fiddler's HTTP Pipeline + + + + + Ensure that the Session's state is >= ss + + TargetState + + + + May this Session be resent on a different connection because reading of the response did not succeed? + + TRUE if the entire session may be resent on a new connection + + + + If the response demands credentials and the Session is configured to have Fiddler provide those + credentials, try to do so now. + + TRUE if Fiddler has generated a response to an Auth challenge; FALSE otherwise. + + + + This method will perform obtain authentication credentials from System.NET using a reflection trick to grab the internal value. + It's needed to cope with CBT. + + This MUST live within its own non-inlined method such that when it's run on an outdated version of the .NET Framework, the outdated + version of the target object triggers a TypeLoadException in such a way that the caller can catch it and warn the user without + killing Fiddler.exe. + + + + + + Copies process-owner information from a source session to a destination session. Used during handling of AutoRedirects + and auto-Authentications + + + + + + Returns a Kerberos-usable SPN for the target + http://dev.chromium.org/developers/design-documents/http-authentication + "HttpAuthHandlerNegotiate::CreateSPN" + http://blog.michelbarneveld.nl/michel/archive/2009/11/14/the-reason-why-kb911149-and-kb908209-are-not-the-soluton.aspx + + + + + + + Returns the fully-qualified URL to which this Session's response points, or null. + This method is needed because many servers (illegally) return a relative url in HTTP/3xx Location response headers. + + null, or Target URL. Note, you may want to call Utilities.TrimAfter(sTarget, '#'); on the response + + + + Gets a redirect-target from a base URI and a Location header + + + + null, or Target URL. Note, you may want to call Utilities.TrimAfter(sTarget, '#'); + + + + Fiddler can only auto-follow redirects to HTTP/HTTPS/FTP. + + The BASE URL to which a relative redirection should be applied + Response "Location" header + TRUE if the auto-redirect target is allowed + + + + Handles a Response's Redirect if the Session is configured to do so. + + TRUE if a redirect was handled, FALSE otherwise + + + + Check for common mistakes in HTTP Responses and notify the user if they are found. Called only if Linting is enabled. + + + + + Assign a Session ID. Called by ClientChatter when headers are available + + + + + Called only by InnerExecute, this method reads a request from the client and performs tampering/manipulation on it. + + TRUE if there's a Request object and we should continue processing. FALSE if reading the request failed + *OR* if script or an extension changed the session's State to DONE or ABORTED. + + + + + If the executeObtainRequest called failed, we perform cleanup + + + + + Returns TRUE if response is a NTLM or NEGO challenge + + True for HTTP/401,407 with NEGO or NTLM demand + + + + Returns TRUE if response is a Digest, NTLM, or Nego challenge + + True for HTTP/401,407 with Digest, NEGO, NTLM demand + + + + Replace the "ipv*.fiddler "fake" hostnames with the IP-literal equvalents. + + + + + Determines if request host is pointing directly at Fiddler. + + + + + + Echo the client's request back as a HTTP Response, encoding to prevent XSS. + + + + + Send a Proxy Configuration script back to the client. + + + + + Send a Proxy Configuration script back to WinHTTP, so that Fiddler can use an upstream proxy specified + by a script on a fileshare. (WinHTTP only allows HTTP/HTTPS-hosted script files) + + + + + Send the Fiddler Root certificate back to the client + + + + + This method indicates to the client that a secure tunnel was created, + without actually talking to an upstream server. + + If Fiddler's AutoResponder is enabled, and that autoresponder denies passthrough, + then Fiddler itself will always indicate "200 Connection Established" and wait for + another request from the client. That subsequent request can then potentially be + handled by the AutoResponder engine. + + BUG BUG: This occurs even if Fiddler isn't configured for HTTPS Decryption + + + The hostname to use in the Certificate returned to the client + + + + This method adds a Proxy-Support: Session-Based-Authentication header and indicates whether the response is Nego:Type2. + + Returns TRUE if server returned a credible Type2 NTLM Message + + + + This helper evaluates the conditions for client socket reuse. + + + + + + Sends the Response that Fiddler received from the server back to the client socket. + + Should the client and server pipes be tightly-bound together? + True, if the response was successfully sent to the client + + + + Sets up the next Session on these pipes, binding this Session's pipes to that new Session, as appropriate. When this method is called, + the nextSession variable is populated with the new Session, and that object is executed at the appropriate time. + + TRUE if both the client and server pipes should be bound regardless of the serverPipe's ReusePolicy + + + + Refresh the UI elements for the session. + + Use TRUE to call Invoke, use FALSE to call BeginInvoke. + + + + Bitflags of commonly-queried session attributes + + + + + Returns True if this is a HTTP CONNECT tunnel. + + + + + A common use for the Tag property is to store data that is closely associated with the Session. + It is NOT marshalled during drag/drop and is NOT serialized to a SAZ file. + + + + + This event fires at any time the session's State changes. Use with caution due to the potential for performance impact. + + + + + This event fires if this Session automatically yields a new one, for instance, if Fiddler is configured to automatically + follow redirects or perform multi-leg authentication (X-AutoAuth). + + + + + If this session is a Tunnel, and the tunnel's IsOpen property is TRUE, returns TRUE. Otherwise returns FALSE. + + + + + If this session is a Tunnel, returns number of bytes sent from the Server to the Client + + + + + If this session is a Tunnel, returns number of bytes sent from the Client to the Server + + + + + Gets or Sets the HTTP Request body bytes. + Setter adjusts Content-Length header, and removes Transfer-Encoding and Content-Encoding headers. + Setter DOES NOT CLONE the passsed array. + Setter will throw if the Request object does not exist for some reason. + Use utilSetRequestBody(sStr) to ensure proper character encoding if you need to use a string. + + + + + Gets or Sets the HTTP Response body bytes. + Setter adjusts Content-Length header, and removes Transfer-Encoding and Content-Encoding headers. + Setter DOES NOT CLONE the passsed array. + Setter will throw if the Response object has not yet been created. (See utilCreateResponseAndBypassServer) + Use utilSetResponseBody(sStr) to ensure proper character encoding if you need to use a string. + + + + + When true, this session was conducted using the HTTPS protocol. + + + + + When true, this session was conducted using the FTP protocol. + + + + + Get the process ID of the application which made this request, or 0 if it cannot be determined. + + + + + Gets a path-less filename suitable for saving the Response entity. Uses Content-Disposition if available. + + + + + Set to true in OnBeforeRequest if this request should bypass the gateway + + + + + Returns the port used by the client to communicate to Fiddler. + + + + + State of session. Note Side-Effects: If setting to .Aborted, calls FinishUISession. If setting to/from a Tamper state, calls RefreshMyInspectors + + + + + Returns the path and query part of the URL. (For a CONNECT request, returns the host:port to be connected.) + + + + + Retrieves the complete URI, including protocol/scheme, in the form http://www.host.com/filepath?query. + Or sets the complete URI, adjusting the UriScheme and/or Host. + + + + + Gets or sets the URL (without protocol) being requested from the server, in the form www.host.com/filepath?query. + + + + + DNS Name of the host server targeted by this request. May include IPv6 literal brackets. NB: a port# may be included. + + + + + DNS Name of the host server (no port) targeted by this request. Will include IPv6-literal brackets for IPv6-literal addresses + + + + + Returns the server port to which this request is targeted. + + + + + Returns the sequential number of this session. Note, by default numbering is restarted at zero when the session list is cleared. + + + + + Returns the Address used by the client to communicate to Fiddler. + + + + + Gets or Sets the HTTP Status code of the server's response + + + + + Checks whether this is a WebSocket, and if so, whether it has logged any parsed messages. + + + + + Returns TRUE if this session's State > ReadingResponse, and oResponse, oResponse.headers, and responseBodyBytes are all non-null. Note that + bHasResponse returns FALSE if the session is currently reading, even if a body was copied using the COMETPeek feature + + + + + Indexer property into SESSION flags, REQUEST headers, and RESPONSE headers. e.g. oSession["Request", "Host"] returns string value for the Request host header. If null, returns String.Empty + + SESSION, REQUEST or RESPONSE + The name of the flag or header + String value or String.Empty + + + + Simple indexer into the Session's oFlags object; returns null if flag is not present. + + + Returns the string value if the specified flag is present, or null if it is not. + + + + + This object holds Session information as a set of four easily-marshalled byte arrays. + It is serializable, which enables cross-process transfer of this data (as in a drag/drop operation). + (Internally, data is serialized as if it were being stored in a SAZ file) + + + + + Create a SessionData object. + Note: Method must run as cheaply as possible, since it runs on all Drag/Dropped sessions within Fiddler itself. + + + + + + Parameters passed into the AcceptConnection method. + + + + + The Socket which represents the newly-accepted Connection + + + + + The Certificate to pass to SecureClientPipeDirect immediately after accepting the connection. + Normally null, this will be set if the proxy endpoint is configured as a "Secure" endpoint + by AssignEndpointCertificate / ActAsHTTPSEndpointForHostname. + + + + + The DateTime of Creation of this connection + + + + + Unknown + + + + + The new Session is needed to respond to an Authentication Challenge + + + + + The new Session is needed to follow a Redirection + + + + + The new Session is needed to generate a CONNECT tunnel + + + + + Event arguments constructed for the OnStateChanged event raised when a Session's state property changed + + + + + The prior state of this session + + + + + The new state of this session + + + + + Constructor for the change in state + + The old state + The new state + + + + This class holds a specialized memory stream with growth characteristics more suitable for reading from a HTTP Stream. + The default MemoryStream's Capacity will always grow to 256 bytes, then at least ~2x current capacity up to 1gb, then to the exact length after that. + That has two problems: + + The capacity may unnecessarily grow to >85kb, putting the object on the LargeObjectHeap even if we didn't really need 85kb. + After the capacity reaches 1gb in length, the capacity growth never exceeds the length, leading to huge reallocations and copies on every write. + + TODO: In some cases, the client could "hint" what the proper capacity ultimately needs to be by adding the Header size in bytes to the Content-Length specified size. + + + + + Used by the caller to supply a hint on the expected total size of reads from the pipe. + We cannot blindly trust this value because sometimes the client or server will lie and provide a + huge value that it will never use. This is common for RPC-over-HTTPS tunnels like that used by Outlook, for instance. + + Suggested total buffer size in bytes + + + + Interface for the WebSocket and CONNECT Tunnel classes + + + + + The CONNECTTunnel class represents a "blind tunnel" through which a CONNECT request is serviced to shuffle bytes between a client and the server. + + + See pg 206 in HTTP: The Complete Reference for details on how Tunnels work. + When HTTPS Decryption is disabled, Fiddler accepts a CONNECT request from the client. Then, we open a connection to the remote server. + We shuttle bytes back and forth between the client and the server in this tunnel, keeping Fiddler itself out of the loop + (no tampering, etc). + + + + + Number of bytes received from the client + + + + + Number of bytes received from the server + + + + + TRUE if this is a Blind tunnel, FALSE if decrypting + + + + + This "Factory" method creates a new HTTPS Tunnel and executes it on a background (non-pooled) thread. + + The Session containing the HTTP CONNECT request + + + + Creates a HTTPS tunnel. External callers instead use the CreateTunnel static method. + + The session for which this tunnel was initially created. + Client Pipe + Server Pipe + + + + This function keeps the thread alive until it is signaled that the traffic is complete + + + + + Executes the HTTPS tunnel inside an All-it-can-eat exception handler. + Call from a background thread. + + + + + Close the HTTPS tunnel and signal the event to let the service thread die. + WARNING: This MUST not be allowed to throw any exceptions, because it will do so on threads that don't catch them, and this will kill the application. + + + + + Called when we have received data from the local client. + Incoming data will immediately be forwarded to the remote host. + + The result of the asynchronous operation. + + + Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.
+ The result of the asynchronous operation. +
+ + Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.
+ The result of the asynchronous operation. +
+ + Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.
+ The result of the asynchronous operation. +
+ + + Returns number of bytes sent from the Server to the Client + + + + + Returns number of bytes sent from the Client to the Server + + + + + Common functions we'll want to use on Strings. Fiddler makes extensive use of strings which + should be interpreted in a case-insensitive manner. + + + + + Holds a variety of useful functions used in Fiddler and its addons. + + + + + Ensures a value is within a specified range. + + Type of the value + Current value + Min value + Max value + Returns the provided value, unless it is outside of the specified range, in which case the nearest "fencepost" is returned. + + + + A static byte array containing 0 elements. Use to avoid having many copies of an empty byte[] floating around. + + + + + Queries the user for a filename + + Dialog title + String representing file dialog filter + Filename or null + + + + Queries the user for a filename + + Dialog title + String representing file dialog filter + Initial directory or null + Filename or null + + + + Queries the user for an OPEN filename + + Dialog title + String representing file dialog filter (e.g. "All files (*.*)|*.*") + Filename or null + + + + Queries the user for an OPEN filename + + Dialog title + String representing file dialog filter + Initial directory or null + Filename or null + + + + Check to see that the target assembly defines a RequiredVersionAttribute and that the current Fiddler instance meets that requirement + + The assembly to test + The "type" of extension for display in error message + TRUE if the assembly includes a requirement and Fiddler meets it. + + + + Typically, a version number is displayed as "major number.minor number.build number.private part number". + + Version required + Version of the binary being tested + Returns 0 if exact match, else greater than 0 if Required version greater than verTest + + + + Shrinks a path string to fit within a certain number of characters, replacing segments with ellipses if needed. + + The Path to compact + Number of characters to shrink to + The compacted string, or the original string if compaction wasn't needed or failed + + + + Convert a full path into one that uses environment variables + + e.g. C:\windows\system32\foo.dll + %WINDIR%\System32\foo.dll + + + + Address the problem where the target "PATH" calls for a directoryname is already a filename + + + + + + + Ensure that the target file does not yet exist. If it does, generates a new filename with an embedded identifier, e.g. out[1].txt instead. + Attempts to ensure filename is creatable; e.g. if a path component needs to be a directory but is a file already, injects [#] into that + path component. + + Candidate filename + New filename which does not yet exist + + + + Ensure that the target path exists and if a file exists there, it is not readonly or hidden. + WARNING: Can throw if target "Filename" calls for a parent directoryname that is already used as a filename by a non-directory. + E.g. EnsureOverwriteable(C:\io.sys\filename.txt); would throw. + + The candidate filename + + + + Writes arrBytes to a file, creating the target directory and overwriting if the file exists. + + Path to File to write. + Bytes to write. + + + + Fills an array completely using the provided stream. Unlike a normal .Read(), this one will always fully fill the array unless the Stream throws. + + The stream from which to read. + The byte array into which the data should be stored. + The count of bytes read. + + + + Create a new byte[] containing the contents of two other byte arrays. + + + + + + + + Returns the Value from a (case-insensitive) token in the header string. Correctly handles double-quoted strings. Allows comma and semicolon as delimiter + + Name of the header + Name of the token + Value of the token if present; otherwise, null + + + + Ensures that the target string is iMaxLength or fewer characters + + The string to trim from + The maximum number of characters to return + Up to iMaxLength characters from the "Head" of the string. + + + + Ensures that the target string is iMaxLength or fewer characters, appending ... if truncation occurred + + The string to trim from + The maximum number of characters to return + The string, or up to iMaxLength-1 characters from the "Head" of the string, with \u2026 appeneded. + + + + Returns the "Head" of a string, before and not including a specified search string. + + The string to trim from + The delimiting string at which the trim should end. + Part of a string up to (but not including) sDelim, or the full string if sDelim was not found. + + + + Returns the "Head" of a string, before and not including the first instance of specified delimiter. + + The string to trim from. + The delimiting character at which the trim should end. + Part of a string up to (but not including) chDelim, or the full string if chDelim was not found. + + + + [Deprecated] Ensures that the target string is iMaxLength or fewer characters + + The string to trim from + The maximum number of characters to return + Identical to the method. + Up to iMaxLength characters from the "Head" of the string. + + + + Returns the "Tail" of a string, after (but NOT including) the First instance of specified delimiter. + + + The string to trim from. + The delimiting character after which the text should be returned. + Part of a string after (but not including) chDelim, or the full string if chDelim was not found. + + + + Returns the "Tail" of a string, after (but NOT including) the First instance of specified search string. + + + The string to trim from. + The delimiting string after which the text should be returned. + Part of a string after (but not including) sDelim, or the full string if sDelim was not found. + + + + Returns the "Tail" of a string, after (and including) the first instance of specified search string. + + The string to trim from. + The delimiting string at which the text should be returned. + Part of the string starting with sDelim, or the entire string if sDelim not found. + + + + Returns the "Tail" of a string, after (but not including) the Last instance of specified delimiter. + + + The string to trim from. + The delimiting character after which text should be returned. + Part of a string after (but not including) the final chDelim, or the full string if chDelim was not found. + + + + Returns the "Tail" of a string, after (but not including) the Last instance of specified substring. + + + The string to trim from. + The delimiting string after which text should be returned. + Part of a string after (but not including) the final sDelim, or the full string if sDelim was not found. + + + + Determines true if a request with the specified HTTP Method/Verb MUST contain a entity body + + The Method/Verb + TRUE if the HTTP Method MUST contain a request body. + + + + http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.2.2 + + HTTPMethod + TRUE if the method is deemed idempotent + + + + Returns true if a request with the specified HTTP Method/Verb may contain a entity body + + The Method/Verb + TRUE if the HTTP Method MAY contain a request body. + + + + Detects whether string ends in a file extension generally recognized as an image file extension. + Pass lowercase into this function. + + *Lowercase* string + TRUE if string ends with common image file extension + + + + Determines if the specified MIME type is "binary" in nature. + + The MIME type + TRUE if the MIME type is likely binary in nature + + + + Gets a string from a byte-array, stripping a Byte Order Marker preamble if present. + + + This function really shouldn't need to exist. Why doesn't calling .GetString on a string with a preamble remove the preamble??? + + The byte array + The encoding to convert from *if* there's no Byte-order-marker + The string + + + + WARNING: Potentially slow. + WARNING: Does not decode the HTTP Response body; if compressed, embedded META or _charset_ will not be checked + Gets (via Headers or Sniff) the provided body's text Encoding. If not found, returns CONFIG.oHeaderEncoding (usually UTF-8). + + HTTP Headers, ideally containing a Content-Type header with a charset attribute. + byte[] containing the entity body. + A character encoding, if one could be determined + + + + Gets (via Headers or Sniff) the Response Text Encoding. Returns CONFIG.oHeaderEncoding (usually UTF-8) if unknown. + Perf: May be quite slow; cache the response + + The session + The encoding of the response body + + + + Set of encodings for which we'll attempt to sniff. (List order matters, I think) + + + + + HtmlEncode a string. + In Fiddler itself, this is a simple wrapper for the System.Web.HtmlEncode function. + The .NET3.5/4.0 Client Profile doesn't include System.Web, so we must provide our + own implementation of HtmlEncode for FiddlerCore's use. + + String to encode + String encoded according to the rules of HTML Encoding, or null. + + + + This function accepts a string and an offset into the string. It reads one or more %XX sequences from the + string converting them into a UTF-8 string based on the input text + + + + + + + + Convert the %-encoded string into a string, interpreting %-escape sequences as UTF-8 characters + + %-encoded string + Unencoded string + + + + Replaces System.Web.HttpUtility.UrlPathEncode(str). + + String to encode as a URL Path + Encoded string + + + + Tokenize a string into tokens. Delimits on unquoted whitespace ; quote marks are dropped unless preceded by \ characters. + BUG BUG: Doesn't do what you expect with a path like this, due to the trailing slash: + prefs set fiddler.config.path.webtestexport.plugins "F:\users\ericlaw\documents\fiddler2\importexport\VSWebTest\" + For now, the simple bet is to drop the final backslash (since it'll get put back by other code) + + The string to tokenize + An array of strings + + + + Pretty-print a Hex view of a byte array. Slow. + + The byte array + Number of bytes per line + String containing a pretty-printed array + + + + Pretty-print a Hex view of a byte array. Slow. + + The byte array + Number of bytes per line + The maximum number of bytes to pretty-print + String containing a pretty-printed array + + + + Pretty-print a Hex view of a byte array. Slow. + + The byte array + Number of bytes per line + The maximum number of bytes to pretty-print + Show ASCII text at the end of each line + String containing a pretty-printed array + + + + Print an byte array to a hex string. + Slow. + + Byte array + String of hex bytes, or "null"/"empty" if no bytes provided + + + + Create a string in CF_HTML format + + The HTML string + The HTML string wrapped with a CF_HTML prelude + + + + Returns an integer from the registry, or a default. + + The Registry key in which to find the value. + The registry value name. + Default to return if the registry key is missing or cannot be used as an integer + The retrieved integer, or the default. + + + + Save a string to the registry. Correctly handles null Value, saving as String.Empty + + The registry key into which the value will be written. + The name of the value. + The value to write. + + + + Returns an Float from the registry, or a default. + + Registry key in which to find the value. + The value name. + The default float value if the registry key is missing or cannot be used as a float. + Float representing the value, or the default. + + + + Get a bool from the registry + + The RegistryKey + The Value name + The default value + Returns an bool from the registry, or bDefault if the registry key is missing or cannot be used as an bool. + + + + Maps a MIMEType to a file extension. Note: May hit the registry, so consider the performance implications. + Pass only the TYPE (e.g. use oResponse.MIMEType), to ensure no charset info in the string. + + The MIME Type + A file extension for the type, or .TXT + + + + Return the content type of a target file, or application/octet-stream if unknown. + + A filename, including the extension + + + + + Use the system registry to find the proper MIME-Type for a given file extension. + WARNING: Calling Path.GetExtension may throw on bad input. Use to guard against that. + + Dot-prefixed file extension (e.g. ".js") + Content-Type, or null if one cannot be determined + + + + Determines if we have a complete chunked response body (RFC2616 Section 3.6.1) + + The session object, used for error reporting + The response data stream. Note: We do not touch the POSITION property. + The start of the HTTP body to scan for chunk size info + Returns the start of the final received/partial chunk + End of byte data in stream representing this chunked content, or -1 if error + True, if we've found the complete last chunk, false otherwise. + + + + Takes a byte array and applies HTTP Chunked Transfer Encoding to it + + The byte array to convert + The number of chunks to try to create + The byte array with Chunked Transfer Encoding applied + + + + Removes HTTP chunked encoding from the data in writeData and returns the resulting array. + + Some chunked data + Unchunked data. Warning: Throws on data format errors + + + + Returns TRUE if the Array contains nulls. TODO: Extend to check for other chars which are clearly non-Unicode + + + + + + + Implements a BlockList for "unknown" encodings that the utilDecode* functions cannot handle + + Transfer-Encoding + Content-Encoding + TRUE if any encoding is known to be unsupported + + + + Removes one or more encodings in the proper order to reconstruct the unencoded body. + If removing Transfer-Encoding and Content-Encoding, ALWAYS remove Transfer-Encoding first. + + The list of encodings in the order that they were applied + RFC2616: If multiple encodings have been applied to an entity, the content codings MUST be listed in the order in which they were applied. + Should unchunking be permitted (TRUE for Transfer-Encoding, FALSE for Content-Encoding) + The bytes of the body + + + + Remove all encodings from arrBody, based on those specified in the supplied HTTP headers; does NOT modify headers. + Throws on errors. + + *Readonly* headers specifying what encodings are applied + In/Out array to be modified + + + + Decompress an array compressed using an Zlib DEFLATE stream. Not a HTTP Encoding; it's used internally in the PNG format. + + The array to expand + byte[] of decompressed data + + + + GZIPs a byte-array + + Input byte array + byte[] containing a gzip-compressed copy of writeData[] + + + + GZIP-Expand function which shows no UI and will throw on error + + TRUE if you want to use Xceed to decompress; false if you want to use System.IO + byte[] to decompress + A decompressed byte array, or byte[0]. Throws on errors. + + + + Expands a GZIP-compressed byte array + + The array to decompress + byte[] containing an un-gzipped copy of compressedData[] + + + + Compress a byte array using RFC1951 DEFLATE + + Array to compress + byte[] containing a DEFLATE'd copy of writeData[] + + + + UnDeflate function which shows no UI and will throw on error + + TRUE if you want to use Xceed to decompress; false if you want to use System.IO + byte[] to decompress + A decompressed byte array, or byte[0]. Throws on errors. + + + + Decompress a byte array that was compressed using RFC1951 DEFLATE + + Array to decompress + byte[] of decompressed data + + + + Compress a byte[] using the bzip2 algorithm + + Array to compress + byte[] of data compressed using bzip2 + + + + Decompress an array compressed using bzip2 + + The array to expand + byte[] of decompressed data + + + + Decompress an array compressed using bzip2 + + The array to expand + byte[] of decompressed data + + + + Try parsing the string for a Hex-formatted int. If it fails, return false and 0 in iOutput. + + The hex number + The int value + TRUE if the parsing succeeded + + + + Returns TRUE if two ORIGIN (scheme+host+port) values are functionally equivalent. + + The first ORIGIN + The second ORIGIN + The default port, if a port is not specified + TRUE if the two origins are equivalent + + + + This function cracks a sHostPort string to determine if the address + refers to a "local" site + + The string to evaluate, potentially containing a port + True if the address is local + + + + This function cracks a sHostPort string to determine if the address + refers to the local computer + + The string to evaluate, potentially containing a port + True if the address is 127.0.0.1, 'localhost', or ::1 + + + + Determines if the specified Hostname is a either 'localhost' or an IPv4 or IPv6 loopback literal + + Hostname (no port) + TRUE if the hostname is equivalent to localhost + + + + This function cracks the Hostname/Port combo, removing IPV6 brackets if needed + + Hostname/port combo, like www.foo.com or www.example.com:8888 or [::1]:80 + The hostname, minus any IPv6 literal brackets, if present + Port #, 80 if not specified, -1 if corrupt + + + + Given a string/list in the form HOSTNAME:PORT#;HOSTNAME2:PORT2#, this function returns the FIRST IPEndPoint. Defaults to port 80 if not specified. + Warning: DNS resolution is slow, so use this function wisely. + + HOSTNAME:PORT#;OPTHOST2:PORT2# + An IPEndPoint or null + + + + Given a string/list in the form HOSTNAME:PORT#;HOSTNAME2:PORT2#, this function returns all IPEndPoints for ALL listed hosts. Defaults to port 80 if not specified. + Warning: DNS resolution is slow, so use this function wisely. + + HOSTNAME:PORT#;OPTHOST2:PORT2# + An array of IPEndPoints or null if no results were obtained + + + + This function attempts to be a ~fast~ way to return an IP from a hoststring that contains an IP-Literal. + + Hostname + IPAddress, or null, if the sHost wasn't an IP-Literal + + + + Launch the user's browser to a hyperlink. This function traps exceptions and notifies the user via UI dialog. + + The URL to ShellExecute. + TRUE if the ShellExecute call succeeded. + + + + Wrapper for Process.Start that shows error messages in the event of failure. + + Fully-qualified filename to execute. + Command line parameters to pass. + TRUE if the execution succeeded. FALSE if the execution failed. An error message will be shown for any error except the user declining UAC. + + + + Run an executable and wait for it to exit, notifying the user of any exceptions. + + Fully-qualified filename of file to execute. + Command-line parameters to pass. + TRUE if the execution succeeded. FALSE if the error message was shown. + + + + Run an executable, wait for it to exit, and return its output as a string. + NOTE: Uses CreateProcess, so you cannot launch applications which require Elevation. + + Fully-qualified filename of file to Execute + Command-line parameters to pass + Exit code returned by the executable + String containing the standard-output of the executable + + + + Copy a string to the clipboard, notifying the user of any exceptions + + The text to copy + TRUE if the copy succeeded + + + + Copy an object to the clipboard, notifying the user of any exceptions + + The object to copy + True if successful + + + + This method prepares a string to be converted into a regular expression by escaping special characters and CONVERTING WILDCARDS. + This method was originally meant for parsing WPAD proxy script strings. + + You typically should use the Static RegEx.Escape method for most purposes, as it doesn't convert "*" into ".*" + + + + + + + + + Determines whether the arrData array STARTS WITH with the supplied arrMagics bytes. Used for Content-Type sniffing. + + The data, or null + The MagicBytes to look for + TRUE if arrData begins with arrMagics + + + + Determines whether the arrData array begins with the supplied sMagics ASCII text. Used for Content-Type sniffing. + + The data, or null + The ASCII text to look for + TRUE if arrData begins with sMagics (encoded as ASCII octets) + + + + Is this HTTPMethod used for RPC-over-HTTPS? + + + + + Determine if a given byte array has the start of a HTTP/1.* 200 response. + Useful primarily to determine if a CONNECT request to a proxy returned success. + + + + + + + Determine if a given byte array has the start of a HTTP/1.* 200 response. + Useful primarily to determine if a CONNECT request to a proxy returned success. + + + + + + + For a given process name, returns a bool indicating whether this is a known browser process name. + + The Process name (e.g. "abrowser.exe") + Returns true if the process name starts with a common browser process name (e.g. ie, firefox, etc) + + + + Ensure that a given path is absolute, if not, applying the root path + + + + + + + + If sFilename is absolute, returns it, otherwise, combines the leaf filename with local response folders hunting for a match. + Trims at the first ? character, if any + + Either a fully-qualified path, or a leaf filename + File path + + + + Format an Exception message, including InnerException message if present. + + + + + + + Get a TickCount (milliseconds since system start) as an unsigned 64bit value. On Vista+, uses the GetTickCount64 API that won't rollover, + but on XP, this unsigned wrapper moves the rollover point to 49 days of uptime. + + Number of ms since Windows started + + + + Returns TRUE if the user is running Elevated. Requires WinXP to Win8 + + TRUE if the user is an Admin and the process is Elevated + + + + Returns a succinct version of Environment.OSVersion.VersionString + + + + + + Duplicate a byte array, replacing null with byte[0]. + Doing this instead of .Clone() because it better handles nulls and it may be faster. + + The array to copy + The new array. + + + + Returns TRUE if the array is null or contains 0 bytes + + byte[] to test + + + + + + + + True if ClientChatter is non-null and its headers are non-null + + + + True if ClientChatter is non-null and its headers are non-null + + + True if ClientChatter is non-null and its headers are non-null + + + + Return a multi-line string describing the NetworkInterfaces[] + + + + + + Checks a DLL's filename for signals that it doesn't contain extensions. + This hack is only needed because I wasn't smart enough to require that the assembly be named something like Fiddler.* in the original design. + + DLL filename + TRUE if we should skip this assembly during enumeration + + + + Create a Session Archive Zip file containing the specified sessions + + The filename of the SAZ file to store + Array of sessions to store + Password to encrypt the file with, or null + TRUE if verbose error dialogs should be shown. + + + + + This is a refactored helper function which writes a single session to an open SAZ file. + + The session to write to the file + The ZIP File + The number of this file + The format string (e.g. "D3") to use when formatting the file number + The HTML String builder to write index information + TRUE to show verbose error dialog information + + + + Reads a Session Archive Zip file into an array of Session objects + + Filename to load + + Loaded array of sessions or null, in case of failure + + + + URLMon Interop Class + + + + + Set the user-agent string for the current process + + New UA string + + + + Query WinINET for the current process' proxy settings. Oddly, there's no way to UrlMkGetSessionOption for the current proxy. + + String of hex suitable for display + + + + Configures the current process to use the system proxy for URLMon/WinINET traffic. + + + + + Configures the current process to use no Proxy for URLMon/WinINET traffic. + + + + + Sets the proxy for the current process to the specified list. See http://msdn.microsoft.com/en-us/library/aa383996(VS.85).aspx + + e.g. "127.0.0.1:8888" or "http=insecProxy:80;https=secProxy:444" + Semi-colon delimted list of hosts to bypass proxy; use <local> to bypass for Intranet + + + + States for the (future) Session-processing State Machine. + NOT YET USED. + + + + + State of the current session + + + + + Object created but nothing's happening yet + + + + + Thread is reading the HTTP Request + + + + + AutoTamperRequest pass 1 (IAutoTamper, OnBeforeRequest script method) + + + + + User can tamper using Fiddler Inspectors + + + + + AutoTamperRequest pass 2 (Only used by IAutoTamper) + + + + + Thread is sending the Request to the server + + + + + Thread is reading the HTTP Response + + + + + AutoTamperResponse pass 1 (Only used by IAutoTamper) + + + + + User can tamper using Fiddler Inspectors + + + + + AutoTamperResponse pass 2 (Only used by IAutoTamper) + + + + + Sending response to client application + + + + + Session complete + + + + + Session was aborted (client didn't want response, fatal error, etc) + + + + + This enumeration provides the values for the Session object's BitFlags field + + + + + No flags are set + + + + + The request originally arrived with a URL specifying the HTTPS protocol. + + + + + The request originally arrived with a URL specifying the FTP protocol. + + + + + Ignore this traffic; do not buffer, store, or call event handlers + + + + + The client pipe was reused + + + + + The server pipe was reused + + + + + The request was streamed (e.g. on an RPC_OUT_DATA request) + + + + + The response was streamed + + + + + The request was generated by Fiddler itself (e.g. the Composer tab) + + + + + The response was generated by Fiddler itself (e.g. AutoResponder or utilCreateResponseAndBypassServer) + + + + + This session was loaded from a .SAZ File + + + + + This session was loaded from some other tool + + + + + This request was sent to an upstream (CERN) gateway proxy + + + + + This is a "blind" CONNECT tunnel for HTTPS traffic + + + + + This is a CONNECT tunnel which decrypts HTTPS traffic as it flows through + + + + + This response was served from a client cache, bypassing Fiddler. Fiddler only "sees" this session because other software reported it to Fiddler + + + + + There was a HTTP Protocol violation in the client's request + + + + + There was a HTTP Protocol violation in the server's response + + + + + Response body was dropped, e.g due to fiddler.network.streaming.ForgetStreamedData + + + + + This is a CONNECT tunnel for WebSocket traffic + + + + + This request was sent using the SOCKS protocol + + + + + This class maintains the Proxy Bypass List for the upstream gateway. + In the constructor, pass the desired proxy bypass string, as retrieved from WinINET for the Fiddler Options screen. + Then, call the IsBypass(sTarget) method to determine if the Gateway should be bypassed + + + + + List of regular expressions for matching against request Scheme://HostPort. + NB: This list is either null or contains at least one item. + + + + + Boolean flag indicating whether the bypass list contained a <local> token. + + + + + Pass the desired proxy bypass string retrieved from WinINET. + + + + + + Given the rules for this bypasslist, should this target bypass the proxy? + + The URI Scheme + The Host and PORT + True if this request should not be sent to the gateway proxy + + + + Convert the string representing the bypass list into an array of rules escaped and ready to be turned into regular expressions + + + + + + Does the bypassList contain any rules at all? + + + + + Flags that indicate what problems, if any, were encountered in parsing HTTP headers + + + + + There were no problems parsing the HTTP headers + + + + + The HTTP headers ended incorrectly with \n\n + + + + + The HTTP headers ended incorrectly with \n\r\n + + + + + The HTTP headers were malformed. + + + + + The Parser class exposes static methods used to parse strings or byte arrays into HTTP messages. + + + + + Given a byte[] representing a request, determines the offsets of the components of the line. WARNING: Input MUST contain a LF or an exception will be thrown + + Byte array of the request + Returns the index of the byte of the URI in the Request line + Returns the length of the URI in the Request line + Returns the index of the first byte of the name/value header pairs + + + + Parse out HTTP Header lines. + + Header collection to *append* headers to + Array of Strings + Index into array at which parsing should start + String containing any errors encountered + TRUE if there were no errors, false otherwise + + + + Given a byte array, determines the Headers length + + Input array of data + Returns the calculated length of the headers. + Returns the calculated start of the response body. + Any HTTPHeaderParseWarnings discovered during parsing. + True, if the parsing was successful. + + + + Given a MemoryStream, attempts to parse a HTTP Request starting at the current position. + + TRUE if a request could be parsed, FALSE otherwise + + + + Given a MemoryStream, attempts to parse a HTTP Response starting at the current position + + TRUE if the response must not have a body (e.g. because Request method was HEAD) + TRUE if a response could be parsed, FALSE otherwise + + + + Parse the HTTP Request into a headers object. + + The HTTP Request string, including *at least the headers* with a trailing CRLFCRLF + HTTPRequestHeaders parsed from the string. + + + + Break headers off, then convert CRLFs into LFs + + + + + + + Parse the HTTP Response into a headers object. + + The HTTP response as a string, including at least the headers. + HTTPResponseHeaders parsed from the string. + + + + The RASInfo class is used to enumerate Network Connectoids so Fiddler can adjust proxy configuration for all connectoids, not just the DefaultLAN + + + + + Ask RAS for the list of network connectoids. We'll always add "DefaultLAN" to this list as well. + + + + + + Abstract base class for the ClientPipe and ServerPipe classes. A Pipe represents a connection to either the client or the server, optionally encrypted using SSL/TLS. + + + + + The base socket wrapped in this pipe + + + + + The number of times that this Pipe has been used + + + + + The HTTPS stream wrapped around the base socket + + + + + The display name of this Pipe + + + + + Number of milliseconds to delay each 1024 bytes transmitted + + + + + Create a new pipe, an enhanced wrapper around a socket + + Socket which this pipe wraps + Identification string used for debugging purposes + + + + Poll the underlying socket for readable data (or closure/errors) + + TRUE if this Pipe requires attention + + + + Call this method when about to reuse a socket. Currently, increments the socket's UseCount and resets its transmit delay to 0. + + The session identifier of the new session, or zero + + + + Sends a byte array through this pipe + + The bytes + + + + Sends the data specified in oBytes (between iOffset and iOffset+iCount-1 inclusive) down the pipe. + + + + + + + + Receive bytes from the pipe into the DATA buffer. + + Throws IO exceptions from the socket/stream + Array of data read + Bytes read + + + + Return the raw socket this pipe wraps. Avoid calling this method if at all possible. + + The Socket object this Pipe wraps. + + + + Shutdown and close the socket inside this pipe. Eats exceptions. + + + + + Abruptly closes the socket by sending a RST packet + + + + + Return the Connected status of the base socket. + WARNING: This doesn't work as you might expect; you can see Connected == false when a READ timed out but a WRITE will succeed. + + + + + Returns a bool indicating if the socket in this Pipe is CURRENTLY connected and wrapped in a SecureStream + + + + + Returns the SSL/TLS protocol securing this connection + + + + + Return the Remote Port to which this socket is attached. + + + + + Return the Local Port to which the base socket is attached. Note: May return a misleading port if the ISA Firewall Client is in use. + + + + + Returns the remote address to which this Pipe is connected, or 0.0.0.0 on error. + + + + + Gets or sets the transmission delay on this Pipe, used for performance simulation purposes. + + + + + The frmPrompt class is used to get information from the client. It's primarily used by calling one of the static functions. + + + + + Required designer variable. + + + + + Get a string value from the user. + + The title of the dialog + The prompt text + The default string value + The value entered by the user (or default, if unmodified) + + + + GetUserString prompts the user for a string. + + Title of the dialog + The prompt text in the dialog + The default response + If true, will return null if user hits cancel. Else returns sDefault. + The user's result, or null if user cancelled and bReturnNullIfCancelled set. + + + + Clean up any resources being used. + + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + To override default certificate handling, your class should implement this interface in an assembly + referenced by the fiddler.certmaker.assembly preference; by default, "certmaker.dll" in the application + folder is loaded + + + + + Implement ICertificateProvider2 instead + + + + + Return a certificate to secure this traffic. Generally, it's expected that this method WILL create a new certificate if needed. + + Hostname (e.g. "www.example.com") + An X509Certificate, or null on error + + + + Return the root certificate to which Host Certificates are chained. Generally, it's expected that this method will NOT create a root certificate. + + An X509Certificate, or null on error + + + + When this method is called, your extension should create a Root certificate. + + TRUE if the operation was successful + + + + When this method is called, your extension should copy the your Root certificate into + the user's (or machines's) Root certificate store. + + TRUE if the operation was successful + + + + When this method is called, your extension should discard all certificates and + clear any certificates that have been added to the user's certificate store. + + TRUE, if all certificates were removed; FALSE if any certificates were preserved + + + + When this method is called, your extension should check to see if the User or Machine Root + certificate store contains your Root certificate. + + Set to TRUE if StoreLocation.CurrentUser StoreName.Root has the certificate + Set to TRUE if StoreLocation.LocalMachine StoreName.Root has the certificate + TRUE if either bUserTrusted or bMachineTrusted + + + + When this method is called, your extension should discard all certificates and + clear any certificates that have been added to the user's certificate store + + TRUE if the root certificate should also be cleared + TRUE, if all certificates were removed; FALSE if any certificates were preserved + + + + Call this function to cache a certificate in the Certificate Provider + + The hostname to match + The certificate that the Provider should later provide when GetCertificateForHost is called + True if the request was successful + + + + File path pointing to the location of MakeCert.exe + + + + + Cache of previously-generated EE certificates. Thread safety managed by _oRWLock + + + + + Cache of previously-generated Root certificate + + + + + Reader/Writer lock gates access to the certificate cache and generation functions. + + We must set the SupportsRecursion flag because there are cases where the thread holds the lock in Write mode and then enters Read mode in a nested call. + + + + Constructor: Simply cache the path to MakeCert + + + + + Find certificates that have the specified full subject. + + The store to search + FindBySubject{Distinguished}Name requires a complete match of the SUBJECT, including CN, O, and OU + Matching certificates + + + + Find certificates that have the specified issuer. + + The store to search + FindByIssuer{Distinguished}Name requires a complete match of the SUBJECT, including CN, O, and OU + Matching certificates + + + + Interface method: Clear the in-memory caches and Windows certificate stores + + TRUE to clear the Root Certificate from the cache and Windows stores + TRUE if successful + + + + Interface method: Clear the in-memory caches and Windows certificate stores + + + + + + Use MakeCert to generate a unique self-signed certificate + + TRUE if the Root certificate was generated successfully + + + + Get the root certificate from cache or storage, only if it already exists. + + + + + + Returns an Interception certificate for the specified hostname + + Hostname for the target certificate + This method uses a Reader lock when checking the cache and a Writer lock when updating the cache. + An Interception Certificate, or NULL + + + + Find a certificate from the certificate store, creating a new certificate if it was not found. + + A SubjectCN hostname, of the form www.example.com + TRUE if the cert wasn't found in the Windows Certificate store and this function attempted to create it. + No locks are acquired by this method itself. + A certificate or /null/ + + + + Find (but do not create!) a certificate from the CurrentUser certificate store, if present. + + No locks are acquired by this method itself. + A certificate or /null/ + + + + Updates the Server Certificate cache under the Writer lock + + The target hostname + The certificate to cache + + + + + Creates a certificate for ServerAuth. If isRoot is set, designates that this is a self-signed root. + + Uses a reader lock when checking for the Root certificate. Uses a Writer lock when creating a certificate. + A string of the form: "www.hostname.com" + A boolean indicating if this is a request to create the root certificate + Newly-created certificate, or Null + + + + The ClientChatter object, exposed as the oRequest object on the Session object, represents a single web request. + + + + + Size of buffer passed to pipe.Receive when reading from the client. + + + + + Tracks the progress of reading the request from the client. Because of the multi-threaded nature of some users of this + field, most will make a local copy before accessing its members. + + + + + The ClientPipe object which is connected to the client, or null. + + + + + Parsed Headers + + + + + The session object which owns this ClientChatter + + + + + Create a ClientChatter object initialized with a set of HTTP headers + Called primarily when loading session data from a file. + + The Session object which will own this request + The string containing the request data + + + + Loads a HTTP request from a file rather than a memory stream. + + The file to load + TRUE if the file existed. THROWS on most errors other than File-Not-Found + + + + Based on this session's data, determine the expected Transfer-Size of the request body. See RFC2616 Section 4.4 Message Length. + Note, there's currently no support for "multipart/byteranges" requests anywhere in Fiddler. + + Expected Transfer-Size of the body, in bytes. + + + + Free Request data. Called by TakeEntity or by ReadRequest method on request failure + + + + + Extract byte array representing the entity, put any excess bytes back in the pipe, free the RequestReadState, and return the entity. + + Byte array containing the entity body + + + + Send a HTTP/XXX Error Message to the Client, calling FiddlerApplication.BeforeReturningError and DoReturningError in FiddlerScript. + Note: This method does not poison the Server pipe, so if poisoning is desired, it's the caller's responsibility to do that. + Note: Because this method uses Connection: close on the returned response, it has the effect of poisoning the client pipe + + Response code + Response status text + Body of the HTTP Response + + + + Return a HTTP response and signal that the client should close the connection + + A Delegate that fires to give one final chance to modify the Session before calling the DoBeforeReturningError and returning the response + + + + Parse the headers from the requestData buffer. + Precondition: Call AFTER having set the correct iEntityBodyOffset. + + Note: This code used to be a lot simpler before, when it used strings instead of byte[]s. Sadly, + we've gotta use byte[]s to ensure nothing in the URI gets lost. + + TRUE if successful. Frees arrRequest if successful. + + + + This function decides if the request string represents a complete HTTP request + + + + + + Scans requestData stream for the \r\n\r\n (or variants) sequence + which indicates that the header block is complete. + + SIDE EFFECTS: + iBodySeekProgress is updated and maintained across calls to this function + iEntityBodyOffset is updated if the end of headers is found + + True, if requestData contains a full set of headers + + + + Read a complete request from pipeClient. + + TRUE, if a request could be read. FALSE, otherwise. + + + + Verifies that the Hostname specified in the request line is compatible with the HOST header + + + + + Count of body bytes read from the client. If no body bytes have yet been read, returns count of header bytes. + + + + + HTTP Headers sent in the client request, or null. + + + + + Was this request received from a reused client connection? Looks at SessionFlags.ClientPipeReused flag on owning Session. + + + + + Note: This returns the request's HOST header, which may include a trailing port #. + If the Host is an IPv6 literal, it will be enclosed in brackets '[' and ']' + + + + + Simple indexer into the Request Headers object + + + + + Discardable State of Read Operation + + While it is reading a request from the client, the ClientChatter class uses a RequestReaderState object to track + the state of the read. This state is discarded when the request has been completely read. + + + + + The host pulled from the URI + + + + + Buffer holds this request's data as it is read from the pipe. + + + + + Offset to first byte of body in m_requestData + + + + + Optimization: Offset of most recent transfer-encoded chunk + + + + + Optimization: tracks how far we've previously looked when determining iEntityBodyOffset + + + + + Count of body bytes read from the client. If no body bytes have yet been read, returns count of header bytes. + + + + + + The PipePool maintains a collection of connected ServerPipes for reuse + + + + + Minimum idle time of pipes to be expired from the pool. + Note, we don't check the pipe's ulLastPooled value when extracting a pipe, + so its age could exceed the allowed lifetime by up to MSEC_POOL_CLEANUP_INTERVAL + + + + + The Pool itself. + + + + + Time at which a "Clear before" operation was conducted. We store this + so that we don't accidentally put any pipes that were in use back into + the pool after a clear operation + + + + + Remove any pipes from Stacks if they exceed the age threshold + Remove any Stacks from pool if they are empty + + + + + Clear all pooled Pipes, calling .End() on each. + + + + + Return a string representing the Pipes in the Pool + + A string representing the pipes in the pool + + + + Get a Server connection for reuse, or null if a suitable connection is not in the pool. + + The key which identifies the connection to search for. Good syntax is [HTTPS:]HOSTNAME:PORT + The ProcessID of the client requesting the Pipe + HACK to be removed; the SessionID# of the request + A Pipe to reuse, or NULL + + + + Store a pipe for later use, if reuse is allowed by settings and state of the pipe. + + The Pipe to place in the pool + + + + A ClientPipe wraps a socket connection to a client application. + + + + + Client process name (e.g. "iexplore") + + + + + Client process ProcessID + + + + + Data which was previously "over-read" from the client. Populated when HTTP-pipelining is attempted + + + + + Does this Pipe have data (or closure/errors) to read? + + TRUE if this Pipe requires attention + + + + If you previously read more bytes than you needed from this client socket, you can put some back. + + Array of bytes to put back; now owned by this object + + + + Sets the receiveTimeout based on whether this is a freshly opened client socket or a reused one. + + + + + Returns a semicolon-delimited string describing this ClientPipe + + A semicolon-delimited string + + + + Perform a HTTPS Server handshake to the client. Swallows exception and returns false on failure. + + + + + + + This function sends the client socket a CONNECT ESTABLISHED, and then performs a HTTPS authentication + handshake, with Fiddler acting as the server. + + Hostname Fiddler is pretending to be (NO PORT!) + The set of headers to be returned to the client in response to the client's CONNECT tunneling request + true if the handshake succeeds + + + + ID of the process that opened this socket, assuming that Port Mapping is enabled, and the connection is from the local machine + + + + + Name of the Process referred to by LocalProcessID, or String.Empty if unknown + + + + + Timestamp of either 1> The underlying socket's creation from a .Accept() call, or 2> when this ClientPipe was created. + + + + + The Logger object is a simple event log + + + + + Queue of Messages that are be logged (usually during application startup) until another object has loaded and registered for notification of such Messages + + + + + Creates a Logger object + + True if a queue should be created to store messages during Fiddler's startup + + + + Flushes previously-queued messages to the newly attached listener. + + + + + Log a string with specified string formatting + + The format string + The arguments to replace in the string + + + + Log a string + + The string to log + + + + The Event to raise when a string is logged + + + + + EventArgs class for the LogEvent handler + + + + + The String which has been logged + + + + + Fiddler Transcoders allow import and export of Sessions from Fiddler + + + + + Create the FiddlerTranscoders object + + + + + List all of the Transcoder objects that are loaded + + + + + + Add Import/Export encoders to FiddlerApplication.oTranscoders + + Assembly to import exporters and importers + FALSE on obvious errors + + + + Add Import/Export encoders to FiddlerApplication.oTranscoders + + Assembly to scan for transcoders + FALSE on obvious errors + + + + Loads any assembly in the specified path that ends with .dll and does not start with "_", checks that a compatible version requirement was specified, + and adds the importer and exporters within to the collection. + + The path to scan for extensions + + + + Ensures that Import/Export Transcoders have been loaded + + + + + Returns a TranscoderTuple willing to handle the specified format + + The Format + TranscoderTuple, or null + + + + Returns a TranscoderTuple willing to handle the specified format + + The Format + TranscoderTuple, or null + + + + Gets the format list of the specified type and adds that type to the collection. + + + + TRUE if any formats were found; FALSE otherwise + + + + Clear Importer and Exporter collections + + + + + True if one or more classes implementing ISessionImporter are available. + + + + + True if one or more classes implementing ISessionImporter are available. + + + + + The WebSocket class represents a "tunnel" through a WebSocket shuffles bytes between a client and the server. + The class' messages may be deserialized from a SAZ file. + + + + + Should this WebSocket Tunnel parse the WS traffic within into individual messages? + + + + + Writes all of the messages stored in this WebSocket to a stream. + + + + + + + Read headers from the stream. + + The Stream from which WebSocketSerializationHeaders should be read + The Array of headers, or String[0] + + + + Number of bytes received from the client + + + + + Number of bytes received from the server + + + + + Creates a "detached" WebSocket which contains messages loaded from the specified stream + + Session to which the WebSocket messages belong + The Stream containing messages, which will be closed upon completion + + + + This factory method creates a new WebSocket Tunnel and executes it on a background (non-pooled) thread. + + The Session containing the HTTP CONNECT request + + + + Creates a WebSocket tunnel. External callers instead use the CreateTunnel static method. + + The session for which this tunnel was initially created. + The client pipe + The server pipe + + + + This function keeps the Tunnel/Thread alive until it is signaled that the traffic is complete + + + + + Performs cleanup of the WebSocket instance. Call this after the WebSocket closes normally or after abort/exceptions. + + + + + Executes the WebSocket tunnel on a background thread + + + + + Interface Method + Close the WebSocket and signal the event to let its service thread die. Also called by oSession.Abort() + WARNING: This should not be allowed to throw any exceptions, because it will do so on threads that don't + catch them, and this will kill the application. + + + + + When we get a buffer from the client, we push it into the memory stream + + + + + When we get a buffer from the server, we push it into the memory stream + + + + + This method parses the data in strmClientBytes to extact one or more WebSocket messages. It then sends each message + through the pipeline. + + + + This method parses the data in strmServerBytes to extact one or more WebSocket messages. It then sends each message + through the pipeline to the client. + + + + Called when we have received data from the local client. + + The result of the asynchronous operation. + + + Called when we have received data from the remote host. Incoming data will immediately be forwarded to the local client. + The result of the asynchronous operation. + + + + Is this WebSocket open/connected? + + + + + Boolean that determines whether the WebSocket tunnel tracks messages. + + + + + Returns number of bytes sent from the Server to the Client on this WebSocket + + + + + Returns number of bytes sent from the Client to the Server on this WebSocket + + + + + A WebSocketMessage stores a single frame of a single WebSocket message + http://tools.ietf.org/html/rfc6455 + + + + + Unmasks the first array into the third, using the second as a masking key. + + + + + + + + Masks the first array's data using the key in the second + + The data to be masked + A 4-byte obfuscation key, or null. + + + + Replaces the WebSocketMessage's payload with the specified string, masking if needed. + + + + + + Copies the provided byte array over the WebSocketMessage's payload, masking if needed. + + + + + + Masks the provided array (if necessary) and assigns it to the WebSocketMessage's payload. + + New array of data + + + + Return the WebSocketMessage's payload as a string. + + + + + + Copy the WebSocketMessage's payload into a new Byte Array. + + A new byte array containing the (unmasked) payload. + + + + Is this a Request message? + + + + + Was this Message eaten? + + + + + Should this message be paused for tampering? + TODO: Not yet implemented + + + + + The WebSocketTimers collection tracks the timestamps for this message + + + + + The raw payload data, which may be masked + + + + + The four-byte payload masking key, if any + + + + + The type of the WebSocket Message's frame + + + + + Timers + + + + + When was this message read from the sender + + + + + When did transmission of this message to the recipient begin + + + + + When did transmission of this message to the recipient end + + + + + Return the timers formatted to be placed in pseudo-headers used in saving the WebSocketMessage to a stream (SAZ) + + + + + + Utilities for WebSocket interop. + + + + + Servers must indicate that they speak the WebSocket protocol by echo'ing back a SHA1-hash of the + client's [Sec-WebSocket-Key] header appended with the magic value [258EAFA5-E914-47DA-95CA-C5AB0DC85B11]. + This challenge-response is provided in the server's [Sec-WebSocket-Accept] response header. + + The value of the Sec-WebSocket-Key header + A value suitable for the server's Sec-WebSocket-Accept header + + + + The MockTunnel represents a CONNECT tunnel which was reloaded from a SAZ file. + + + + + The CONFIG object is Fiddler's legacy settings object, introduced before the advent of the Preferences system. + + + + + Backing field for the QuietMode property. Controls whether notifications are displayed in a MessageBox. + NB: KEEP THIS FIELD DECLARED AT THE TOP OF THE CLASS. We initialize some fields using methods that can check this field. + + + + + Cached layout info for columns. + + + + + True if this is a "Viewer" instance of Fiddler that will not persist its settings + + + + + TODO: Why is this defaulted to FALSE? Has been since 2009, probably due to some bug. Should keep better records. (Sigh). + + + + + Boolean controls whether Fiddler should map inbound connections to their original process using IPHLPAPI + + + + + Boolean controls whether Fiddler should attempt to decrypt HTTPS Traffic + + + + + Boolean controls whether Fiddler will attempt to use the Server Name Indicator TLS extension to generate the SubjectCN for certificates + + + + + Should Audio/Video types automatically stream by default? + + + + + Returns 127.0.0.1:{ListenPort} or fiddler.network.proxy.RegistrationHostName:{ListenPort} + + + + + Use 128bit AES Encryption when password-protecting .SAZ files. Note that, while this + encryption is much stronger than the default encryption algorithm, it is significantly + slower to save and load these files, and the Windows Explorer ZIP utility cannot open them. + + + + + SSL/TLS Protocols we allow the client to choose from (when we call AuthenticateAsServer) + We allow all protocols by default (Ssl2,Ssl3,Tls1) and also 'Bitwise OR' in the constants for TLS1.1 and TLS1.2 in case we happen to be running on .NET4.5. + + + + + SSL/TLS Protocols we request the server use (when we call AuthenticateAsClient). By default, SSL3 and TLS1 are accepted; we exclude SSL2 so that TLS Extensions may be sent. + We do NOT enable TLS1.1 or TLS1.2 by default because many servers will fail if you offer them and unlike browsers, .NET has no fallback code. + + + + + Version information for the Fiddler/FiddlerCore assembly + + + + + Will send traffic to an upstream proxy? + OBSOLETE -- DO NOT USE. see instead. + + + + + The encoding with which HTTP Headers should be parsed. Defaults to UTF8, but may be overridden by specifying a REG_SZ containing the encoding name in the registry key \Fiddler2\HeaderEncoding + + + + + Controls whether Fiddler will reuse server connections for multiple sessions + + + + + Controls whether Fiddler will reuse client connections for multiple sessions + + + + + Controls whether Fiddler should register as the HTTPS proxy + + + + + Controls whether Fiddler should register as the FTP proxy + + + + + Controls whether Fiddler will try to write exceptions to the System Event log. Note: Usually fails due to ACLs on the Event Log. + + + + + Controls whether Fiddler will attempt to log on to the upstream proxy server to download the proxy configuration script + + + + + Controls whether Fiddler will attempt to connect to IPv6 addresses + + + + + Name of connection to which Fiddler should autoattach if MonitorAllConnections is not set + + + + + The username to send to the upstream gateway if the Version Checking webservice request requires authentication + + + + + The password to send to the upstream gateway if the Version Checking webservice request requires authentication + + + + + Set this flag if this is a "temporary" port (E.g. specified on command line) and it shouldn't be overridden in the registry + + + + + Controls whether Certificate-Generation output will be spewed to the Fiddler Log + + + + + Alternative hostname which Fiddler should recognize as an alias for the local machine. The + default value of ? will never be usable, as it's the QueryString delimiter + + + + + (Lowercase) Machine Name + + + + + (Lowercase) Machine Domain Name + + + + + List of hostnames for which HTTPS decryption (if enabled) should be skipped + + + + + True if Fiddler should be maximized on restart + + + + + Return a Special URL. + + String constant describing the URL to return. CASE-SENSITIVE! + Returns target URL + + + + Get a registry path for a named constant + + The path to retrieve [Root, UI, Dynamic, Prefs] + The registry path + + + + Return an app path (ending in Path.DirectorySeparatorChar) or a filename + + CASE-SENSITIVE + The specified filesystem path + + + + Ensure that the per-user folders used by Fiddler are present. + + + + + Control which processes have HTTPS traffic decryption enabled + + + + + What mechanism, if any, should Fiddler use to find the upstream proxy/gateway? + + + + + Port to which Fiddler should forward inbound requests when configured to run as a Reverse Proxy + + + + + On attach, will configure WinINET to bypass Fiddler for these hosts. + + + + + Boolean indicating whether Fiddler will open the listening port exclusively + + + + + Controls whether server certificate errors are ignored when decrypting HTTPS traffic. + + + + + Controls whether notification dialogs and prompts should be shown. + + + + + The port upon which Fiddler is configured to listen. + + + + + Returns the path and filename of the editor used to edit the Rules script file. + + + + + Returns true if Fiddler should permit remote connections. Requires restart. + + + + + When may requests be resent on a new connection? + + + + + The request may always be retried. + + + + + The request may never be retried + + + + + The request may only be resent if the HTTP Method is idempotent. + This SHOULD be the default per HTTP spec, but this appears to break tons of servers. + + + + + Type of Upstream Gateway + + + + + Traffic should be sent directly to the server + + + + + Traffic should be sent to a manually-specified proxy + + + + + Traffic should be sent to the System-configured proxy + + + + + Proxy should be automatically detected + + + + + A simple Process Type enumeration used by various filtering features + + + + + Include all Processes + + + + + Processes which appear to be Web Browsers + + + + + Processes which appear to NOT be Web Browsers + + + + + Include only traffic where Process ID isn't known (e.g. remote clients) + + + + + EventArgs for preference-change events. See http://msdn.microsoft.com/en-us/library/ms229011.aspx. + + + + + The name of the preference being added, changed, or removed + + + + + The string value of the preference, or null if the preference is being removed + + + + + Returns TRUE if ValueString=="true", case-insensitively + + + + + The IFiddlerPreferences Interface is exposed by the FiddlerApplication.Prefs object, and enables + callers to Add, Update, and Remove preferences, as well as observe changes to the preferences. + + + + + Store a boolean value for a preference + + The named preference + The boolean value to store + + + + Store an Int32 value for a preference + + The named preference + The int32 value to store + + + + Store a string value for a preference + + The named preference + The string value to store + + + + Get a preference's value as a boolean + + The Preference Name + The default value for missing or invalid preferences + A Boolean + + + + Gets a preference's value as a string + + The Preference Name + The default value for missing preferences + A string + + + + Gets a preference's value as a 32-bit integer + + The Preference Name + The default value for missing or invalid preferences + An integer + + + + Removes a named preference from storage + + The name of the preference to remove + + + + Add a Watcher that will be notified when a value has changed within the specified prefix. + + The prefix of preferences for which changes are interesting + The Event handler to notify + Returns the Watcher object added to the notification list + + + + Removes a previously-created preference Watcher from the notification queue + + The Watcher to remove + + + + Indexer. Returns the value of the preference as a string + + The Preference Name + The Preference value as a string, or null + + + + The PreferenceBag is used to maintain a threadsafe Key/Value list of preferences, persisted in the registry, and with appropriate eventing when a value changes. + + + + + Load the existing preferences from the Registry into the Preferences bag. + Note: Does not fire any events. + + + + + Serialize the existing preferences to the Registry. + + + + + Get a string array of the preference names + + string[] of preference names + + + + Gets a preference's value as a string + + The Preference Name + The default value if the preference is missing + A string + + + + Return a bool preference. + + The Preference name + The default value to return if the specified preference does not exist + The boolean value of the Preference, or the default value + + + + Return an Int32 Preference. + + The Preference name + The default value to return if the specified preference does not exist + The Int32 value of the Preference, or the default value + + + + Update or create a string preference. + + The name of the Preference + The value to assign to the Preference + + + + Update or create a Int32 Preference + + The name of the Preference + The value to assign to the Preference + + + + Update or create a Boolean preference. + + The name of the Preference + The value to assign to the Preference + + + + Delete a Preference from the collection. + + The name of the Preference to be removed. + + + + Remove all Watchers + + + + + Remove all watchers and write the registry. + + + + + Return a description of the contents of the preference bag + + Multi-line string + + + + Return a string-based serialization of the Preferences settings. + + TRUE for a multi-line format with all preferences + String + + + + Returns a CRLF-delimited string containing all Preferences whose Name case-insensitively contains the specified filter string. + + Partial string to match + A string + + + + Add a watcher for changes to the specified preference or preference branch. + + Preference branch to monitor, or String.Empty to watch all + The EventHandler accepting PrefChangeEventArgs to notify + Returns the PrefWatcher object which has been added, store to pass to RemoveWatcher later. + + + + Remove a previously attached Watcher + + The previously-specified Watcher + + + + This function executes on a single background thread and notifies any registered + Watchers of changes in preferences they care about. + + A string containing the name of the Branch that changed + + + + Spawn a background thread to notify any interested Watchers of changes to the Target preference branch. + + The arguments to pass to the interested Watchers + + + + Returns a string naming the current profile + + + + + Indexer into the Preference collection. + + The name of the Preference to update/create or return. + The string value of the preference, or null. + + + + A simple struct which contains a Branch identifier and EventHandler + + + + + The HostList allows fast determination of whether a given host is in the list. It supports leading wildcards (e.g. *.foo.com), and the special tokens <local> and <loopback>. + Note: List is *not* threadsafe; instead of updating it, construct a new one. + + + + + Generate an empty HostList + + + + + Create a hostlist and assign it an initial set of sites + + List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. + + + + Clear the HostList + + + + + Clear the List and assign the new string as the contents of the list. + + List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. + TRUE if the list was constructed without errors + + + + Clear the list and assign the new string as the contents of the list. + + List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>. + Outparam string containing list of parsing errors + TRUE if the list was constructed without errors + + + + Return the current list of rules as a string + + String containing current rules, using "; " as a delimiter between entries + + + + Determine if a given Host is in the list + + A Host string, potentially including a port + TRUE if the Host's hostname matches a rule in the list + + + + Determine if a given Hostname is in the list + + A hostname, NOT including a port + TRUE if the hostname matches a rule in the list + + + + Determine if a given Host:Port pair matches an entry in the list + + A hostname, NOT including the port + The port + TRUE if the hostname matches a rule in the list + + + + This private tuple allows us to associate a Hostname and a Port + + + + + Port specified in the rule + + + + + Hostname specified in the rule + + + + + Create a new HostPortTuple + + + + + The policy which describes how this pipe may be reused by a later request. Ordered by least restrictive to most. + + + + + The ServerPipe may be freely reused by any subsequent request + + + + + The ServerPipe may be reused only by a subsequent request from the same client process + + + + + The ServerPipe may be reused only by a subsequent request from the same client pipe + + + + + The ServerPipe may not be reused for a subsequent request + + + + + A ServerPipe wraps a socket connection to a server. + + + + + User-approved list of Certificate Serial #s for which Fiddler should not raise a warning about certificate errors. + List contains entries of the form [ExpectedCN+ActualCertSerial#] + + + + + DateTime of the completion of the TCP/IP Connection + + + + + TickCount when this Pipe was last placed in a PipePool + + + + + Returns TRUE if this ServerPipe is connected to a Gateway + + + + + Returns TRUE if this ServerPipe is connected to a SOCKS gateway + + + + + The Pooling key used for reusing a previously pooled ServerPipe. See sPoolKey property. + + + + + This field, if set, tracks the process ID to which this Pipe is permanently bound; set by MarkAsAuthenticated. + NOTE: This isn't actually checked by anyone; instead the PID is added to the POOL Key + + + + + Backing field for the isAuthenticated property + + + + + String containing representation of the server's certificate + + + + + Wraps a socket in a Pipe + + The Socket + Pipe's human-readable name + True if the Pipe is attached to a gateway + The Pooling key used for socket reuse + + + + Marks this Pipe as having been authenticated. Depending on the preference "fiddler.network.auth.reusemode" this may impact the reuse policy for this pipe + + The client's process ID, if known. + + + + Sets the receiveTimeout based on whether this is a freshly opened server socket or a reused one. + + + + + Returns a semicolon-delimited string describing this ServerPipe + + A semicolon-delimited string + + + + Returns the Server's certificate Subject CN + + The CN field from the Subject of the certificate used to secure this HTTPS connection, or null if the connection is unsecure + + + + Return a string describing the HTTPS connection security, if this socket is secured + + A string describing the HTTPS connection's security. + + + + Returns a string describing how this connection is secured. + + + + + + Get the Transport Context for the underlying HTTPS connection so that Channel-Binding Tokens work correctly + + + + + + Get the user's default client cert for authentication; caching if if possible and permitted. + + + + + + This method is called by the HTTPS Connection establishment to optionally attach a client certificate to the request. + Test Page: https://tower.dartmouth.edu/doip/OracleDatabases.jspx or ClientCertificate.ms in Test folder should request on initial connection + In contrast, this one: https://roaming.officeapps.live.com/rs/roamingsoapservice.svc appears to try twice (renego) + + + + + + + + + + + This function secures an existing connection and authenticates as client. This is primarily useful when + the socket is connected to a Gateway/Proxy and we had to send a CONNECT and get a HTTP/200 Connected back before + we actually secure the socket. + http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx + + The CN to use in the certificate + Path to client certificate file + Reference-passed integer which returns the time spent securing the connection + TRUE if the connection can be secued + + + + Return a Certificate Collection containing certificate from the specified file. + + Path to the certificate. Relative Paths will be absolutified automatically + The Certificate collection, or null + + + + Policy for reuse of this pipe + + + + + Returns TRUE if there is an underlying, mutually-authenticated HTTPS stream. + + WARNING: Results are a bit of a lie. System.NET IsMutuallyAuthenticated == true if a client certificate is AVAILABLE even + if that certificate was never SENT to the server. + + + + + Returns TRUE if this PIPE is marked as having been authenticated using a Connection-Oriented Auth protocol: + NTLM, Kerberos, or HTTPS Client Certificate. + + + + + Indicates if this pipe is connected to an upstream (non-SOCKS) Proxy. + + + + + Indicates if this pipe is connected to a SOCKS gateway + + + + + Gets and sets the pooling key for this server pipe. + + + DIRECT->{http|https}/{serverhostname}:{serverport} + GW:{gatewayaddr:port}->* + GW:{gatewayaddr:port}->{http|https}/{serverhostname}:{serverport} + SOCKS:{gatewayaddr:port}->{http|https}/{serverhostname}:{serverport} + + + + + Returns the IPEndPoint to which this socket is connected, or null + + + + + CodeDescription attributes are used to enable the FiddlerScript Editor to describe available methods, properties, fields, and events. + + + + + CodeDescription attributes should be constructed by annotating a property, method, or field. + + The descriptive string which should be displayed for this this property, method, or field + + + + The descriptive string which should be displayed for this this property, method, or field + + + + + Flags that can be passed into the Startup method + + + + + No options. + + + + + Register with WinINET as the System Proxy + + + + + Decrypt HTTPS Traffic + + + + + Accept requests from remote computers or devices + + + + + Set this flag to forward requests to any upstream gateway + + + + + Set this flag to set all WinINET connections to use Fiddler, otherwise only the Local LAN is pointed to Fiddler + + + + + Start FiddlerCore with the default set of options (RegisterAsSystemProxy | DecryptSSL | AllowRemoteClients | ChainToUpstreamGateway | MonitorAllConnections | CaptureLocalhostTraffic) + + + + + A simple delegate for functions which accept no parameters. (MethodInvoker is the identical Framework version of this delegate) + + + + + An event handling delegate which is called during report calculation with the set of sessions being evaluated. + + The sessions in this report. + + + + An event handling delegate which is called as a part of the HTTP pipeline at various stages. + + The Web Session in the pipeline. + + + + This class acts as the central point for script/extensions to interact with Fiddler components. + + + + + TRUE if Fiddler is currently shutting down. Suspend all work that won't have side-effects. + + + + + The default certificate used for client authentication + + + + + Fiddler's "Janitor" clears up unneeded resources (e.g. server sockets, DNS entries) + + + + + Underlying Preferences container whose IFiddlerPreferences interface is exposed by the Prefs property + + + + + Gets Fiddler* version info + + A string indicating the build/flavor of the Fiddler* assembly + + + + Set the DisplayName for the application + + 1 to 64 character name to be displayed in error messages, etc + + + + Returns Help/About information. + + Display string describing the current Fiddler instance. + + + + Fiddler's core proxy object. + + + + + Fiddler Import/Export Transcoders + + + + + List of "leaked" temporary files to be deleted as Fiddler exits. + + + + + Checks if FiddlerCore is running. + + TRUE if FiddlerCore is started/listening; FALSE otherwise. + + + + Checks if FiddlerCore is running and registered as the System Proxy. + + TRUE if FiddlerCore IsStarted AND registered as the system proxy; FALSE otherwise. + + + + Recommended way to Start FiddlerCore listening on the specified port + + The port + The FiddlerCoreStartupFlags option you want to set; FiddlerCoreStartupFlags.Default is recommended + + + + Start the FiddlerCore engine; this overload is NOT RECOMMENDED + + + + + + + + Start the FiddlerCore engine; this overload is NOT RECOMMENDED + + Port to Listen on. + Boolean indicating if FiddlerCore should register as the system proxy. + Boolean indicating if FiddlerCore should decrypt secure traffic. If true, requires MakeCert.exe in the Application folder. + Boolean indicating if FiddlerCore should accept connections from remote computers. Note: You must ensure Firewall is configured to allow such connections to your program. + + + + Start a new proxy endpoint instance, listening on the specified port + + The port to listen on + TRUE if remote clients should be permitted to connect to this endpoint + A Hostname (e.g. EXAMPLE.com) if this endpoint should be treated as a HTTPS Server + A Proxy object, or null if unsuccessful + + + + Start a new proxy endpoint instance, listening on the specified port + + The port to listen on + TRUE if remote clients should be permitted to connect to this endpoint + A certificate to return when clients connect, or null + A Proxy object, or null if unsuccessful + + + + Shuts down the FiddlerCore proxy and disposes it. Note: If there's any traffic in progress while you're calling this method, + your background threads are likely to blow up with ObjectDisposedExceptions or NullReferenceExceptions. In many cases, you're + better off simply calling oProxy.Detach() and letting the garbage collector clean up when your program exits. + + + + + Notify a listener that a block of a response was read. + + The session for which the response is being read + byte buffer (not completely full) + bytes set. + FALSE if AbortReading was set + + + + Notify a listener that a block of a request was read. + + The session for which the response is being read + byte buffer (not completely full) + bytes set. + FALSE if AbortReading was set + + + + Export Sessions in the specified format + + Shortname of desired format + Sessions to export + Options to pass to the ISessionExport interface + Your callback event handler, or NULL to allow Fiddler to handle + TRUE if successful, FALSE if desired format doesn't exist or other error occurs + + + + Calls a Fiddler Session Importer and returns the list of loaded Sessions. + + String naming the Import format, e.g. HTTPArchive + Should sessions be added to WebSessions list? (Not meaningful for FiddlerCore) + Dictionary of Options to pass to the Transcoder + Your callback event handler, or NULL to allow Fiddler to handle + Loaded Session[], or null on Failure + + + + Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly. + + + + + Report an exception to the user. + + The Exception + The Title of the dialog + + + + Report an exception to the user. + + The Exception + The Title of the dialog + The intro text to show. If null or empty, the default "Fiddler has encountered an unexpected... " message is shown. + + + + Show the user a message when an HTTP Error was encountered + + Session with error + Set to true to prevent pooling/reuse of client connection + The SessionFlag which should be set to log this violation + Set to true to prevent pooling/reuse of server connection + Information about the problem + + + + Process ID of Fiddler + + + + + processname:PID of Fiddler + + + + + We really don't want this method to get inlined, because that would cause the Xceed DLLs to get loaded in the Main() function instead + of when _SetXceedLicenseKeys is called; that, in turn, would delay the SplashScreen. + + + + + Used to track errors with addons. + + + + + + + Record that a temporary file was created and handed to an external tool. We'll do our best to delete this file on exit. + + The filename of the file to be deleted + + + + Clean up any Temporary files that were created + + + + + Fiddler's logging system + + + + + Fiddler's Preferences collection. Learn more at http://fiddler.wikidot.com/prefs + + + + + This event fires each time FiddlerCore reads data from network for the server's response. Note that this data + is not formatted in any way, and must be parsed by the recipient. + + + + + This event fires each time FiddlerCore reads data from network for the client's request. Note that this data + is not formatted in any way, and must be parsed by the recipient. + + + + + This event fires when a client request is received by Fiddler + + + + + This event fires when a server response is received by Fiddler + + + + + This event fires when Request Headers are available + + + + + This event fires when Response Headers are available + + + + + This event fires when an error response is generated by Fiddler + + + + + This event fires when a session has been completed + + + + + Sync this event to be notified when FiddlerCore has attached as the system proxy.")] + + + + + Sync this event to be notified when FiddlerCore has detached as the system proxy. + + + + + Fired each time Fiddler successfully establishes a TCP/IP connection + + + + + Fired each time Fiddler successfully accepts a TCP/IP connection + + + + + The Socket which was just Connected or Accepted + + + + + The Session which owns the this new connection + + + + + EventArgs class for the OnNotification handler + + + + + The string message of the notification + + + + + Enumeration of possible responses specified by the ValidateServerCertificateEventArgs as modified by FiddlerApplication's OnValidateServerCertificate event + + + + + The certificate will be considered valid if CertificatePolicyErrors == SslPolicyErrors.None, otherwise the certificate will be invalid unless the user manually allows the certificate. + + + + + The certificate will be confirmed with the user even if CertificatePolicyErrors == SslPolicyErrors.None. + Note: FiddlerCore does not support user-prompting and will always treat this status as ForceInvalid. + + + + + Force the certificate to be considered Valid, regardless of the value of CertificatePolicyErrors. + + + + + Force the certificate to be considered Invalid, regardless of the value of CertificatePolicyErrors. + + + + + These EventArgs are passed to the FiddlerApplication.OnValidateServerCertificate event handler when a server-provided HTTPS certificate is evaluated + + + + + EventArgs for the ValidateServerCertificateEvent that allows host to override default certificate handling policy + + The session + The CN expected for this session + The certificate provided by the server + The certificate chain of that certificate + Errors from default validation + + + + The port to which this request was targeted + + + + + The SubjectCN (e.g. Hostname) that should be expected on this HTTPS connection, based on the request's Host property. + + + + + The Session for which a HTTPS certificate was received. + + + + + The server's certificate chain. + + + + + The SslPolicyErrors found during default certificate evaluation. + + + + + Set this property to override the certificate validity + + + + + The X509Certificate provided by the server to vouch for its authenticity + + + + + These EventArgs are constructed when FiddlerApplication.OnClearCache is called. + + + + + Constructs the Event Args + + Should Cache Files be cleared? + Should Cookies be cleared? + + + + True if the user wants cache files to be cleared + + + + + True if the user wants cookies to be cleared + + + + + When the FiddlerApplication.OnReadResponseBuffer event fires, the raw bytes are available via this object. + + + + + Set to TRUE to request that upload or download process be aborted as soon as convenient + + + + + Session for which this responseRead is occurring + + + + + Byte buffer returned from read. Note: Always of fixed size, check iCountOfBytes to see which bytes were set + + + + + Count of latest read from Socket. If less than 1, response was ended. + + + + + Cache of Hostname->Address mappings + + + + + Number of milliseconds that a DNS cache entry may be reused without validation. + + + + + Maximum number of A/AAAA records to cache for DNS entries. + Beware: Changing this number changes how many IP-failovers Fiddler will perform if fiddler.network.dns.fallback is set, + and increasing the number will consume more memory in the cache. + + + + + Clear the DNS Cache. Called by the NetworkChange event handler in the oProxy object + + + + + Remove all expired DNSCache entries; called by the Janitor + + + + + Show the contents of the DNS Resolver cache + + + + + + Gets first available IP Address from DNS. Throws if address not found! + + String containing the host + True to use Fiddler's DNS cache. + IPAddress of target, if found. + + + + Gets IP Addresses for host from DNS. Throws if address not found! + + String containing the host + True to use Fiddler's DNS cache. + The Timers object to which the DNS lookup time should be stored, or null + List of IPAddresses of target, if any found. + + + + Trim an address list, removing the duplicate entries, any IPv6-entries if IPv6 is disabled, + and entries beyond the COUNT_MAX_A_RECORDS limit. + + The list to filter + A filtered address list + + + + A DNSCacheEntry holds a cached resolution from the DNS + + + + + TickCount of this record's creation + + + + + IPAddresses for this hostname + + + + + Construct a new cache entry + + The address information to add to the cache + + + + This class is used to find and create certificates for use in HTTPS interception. + The default implementation (DefaultCertProvider object) uses the Windows Certificate store, + but if a plugin ICertificateProvider is provided, it is used instead. + + + + + Enables specification of a delegate certificate provider that generates certificates for HTTPS interception. + + + + + Lock on this object when TestExistenceOf/Create oCertProvider + + + + + Ensures that the Certificate Generator is ready; thread-safe + + + + + Load a delegate Certificate Provider + + The provider, or null + + + + Removes Fiddler-generated certificates from the Windows certificate store + + + + + Removes Fiddler-generated certificates from the Windows certificate store + + Indicates whether Root certificates should also be cleaned up + + + + Returns the Root certificate that Fiddler uses to generate per-site certificates used for HTTPS interception. + + Returns the root certificate, if present, or null if the root certificate does not exist. + + + + Find a certificate from the certificate store. + + A string of the form: "www.hostname.com" + A certificate or /null/ + + + + Store an override Certificate in the Certificate Maker to return later. + + The hostname for which this certificate should be returned. + The X509Certificate2 with attached Private Key + TRUE if the Certificate Provider succeeded. FALSE if Provider doesn't support overrides. THROWS if Certificate lacked Private Key. + + + + Store an override Certificate in the Certificate Maker to return later. + + The hostname for which this certificate should be returned. + The filename of the PFX file containing the certificate and private key + The password for the PFX file + + + + Determine if the self-signed root certificate exists + + True if the Root certificate returned from GetRootCertificate is non-null, False otherwise. + + + + Is Fiddler's root certificate in the Root store? + + TRUE if so + + + + Is Fiddler's root certificate in the Machine Root store? + + TRUE if so + + + + Create a self-signed certificate to use for HTTPS interception + + TRUE if successful + + + + Finds the Fiddler root certificate and prompts the user to add it to the TRUSTED store + + True if successful + + + + Dispose of the Certificate Provider, if any. + + + + + This class allows fast-lookup of a ProcessName from a ProcessID. + + + + + Static constructor which registers for cleanup + + + + + Prune the cache of expiring PIDs + + + + + Map a Process ID (PID) to a Process Name + + The PID + A Process Name (e.g. IEXPLORE.EXE) or String.Empty + + + + Structure mapping a Process ID (PID) to a ProcessName + + + + + The TickCount when this entry was created + + + + + The ProcessName (e.g. IEXPLORE.EXE) + + + + + Create a PID->ProcessName mapping + + The ProcessName (e.g. IEXPLORE.EXE) + + + + The WinHTTPAutoProxy class is used to handle upstream gateways when the client was configured to use WPAD or an Proxy AutoConfig (PAC) script. + + + + + Indication as to whether AutoProxy information is valid. 0=Unknown/Enabled; 1=Valid/Enabled; -1=Invalid/Disabled + + + + + Get the text of the file located at a specified file URI, or null if the URI is non-file or the file is not found. + + + + + Returns a string containing the currently selected autoproxy options + + + + + + Get WPAD-discovered URL for display purposes (e.g. Help> About); note that we don't actually use this when determining the gateway, + instead relying on the WinHTTPGetProxyForUrl function to do this work for us. + + A WPAD url, if found, or String.Empty + + + + Return gateway endpoint for requested Url. TODO: Add caching layer! TODO: Support multiple results? + + The URL for which the gateway should be determined + The Endpoint of the Gateway, or null + TRUE if WinHttpGetProxyForUrl succeeded + + + + Close the WinHTTP Session handle + + + + + Note: Be sure to use the same hSession to prevent redownload of the proxy script + + + + + Set to true to send Negotiate creds when challenged to download the script + + + + + The DisplayName for this Connection + + + + + Is this Connectoid expected to be pointed at Fiddler? + + + + + The proxy settings collected from this connection before Fiddler was attached. + + + + + The WinINET Connectoids class contains the RAS/WinINET "connectoids" seen inside IE's Tools > Internet Options > Connections. + This class exposes methods to retrieve and update the proxy information for each connectoid in the list. + + + TODO: The methods of the class are not thread-safe and probably should be. + TODO: Need to refactor visibility here. Right now, _oConnectoids is (internal) instead of (private) because the + Options dialog iterates the list. And about:connectoids wants access too. Eventually ought to wrap as a ReadOnlyCollection getter + + + + + Dictionary of all Connectoids, indexed by the Connectoid's Name + + + + + Expensive Call. Enumerates all Connectoids using the RAS APIs, then determines the proxy information + for each connectoid. + + + + + Return the configured default connectoid's proxy information. + + Either proxy information from "DefaultLAN" or the user-specified connectoid + + + + Called when direct Registry groveling determines that the Default LAN connection's proxy was changed but InternetQueryOption + hasn't yet noticed. + + + + + Enumerates all of the connectoids and determines if the bIsHooked field is incorrect. If so, correct the value + and return TRUE to indicate that work was done. + + The Proxy:Port string to look for (e.g. Config.FiddlerListenHostPort) + TRUE if any of the connectoids' Hook state was inaccurate. + + + + Updates all (or CONFIG.sHookConnectionNamed-specified) connectoids to point at the argument-provided proxy information. + + The proxy info to set into the Connectoid + TRUE if updating at least one connectoid was successful + + + + Restore original proxy settings for any connectoid we changed. + + FALSE if any connectoids failed to unhook + + + + This FTP Gateway class is used if Fiddler is configured as the FTP proxy and there's no upstream gateway configured. + Fiddler must act as a HTTP->FTP protocol converter, which it does by using the .NET FTP classes. + + + + + Make a FTP request using the .NET FTPWebRequest class. + WARNING: This method will throw. + + Session bearing an FTP request + Returns Response body stream + Returns generated Response headers + + + + Map a local port number to the originating process ID + + The local port number + The originating process ID + + + + Calls the GetExtendedTcpTable function to map a port to a process ID. + This function is (over) optimized for performance. + + Client port + AF_INET or AF_INET6 + PID, if found, or 0 + + + + Given a local port number, uses GetExtendedTcpTable to find the originating process ID. + First checks the IPv4 connections, then looks at IPv6 connections. + + Client applications' port + ProcessID, or 0 if not found + + + + Enumeration of possible queries that can be issued using GetExtendedTcpTable + http://msdn2.microsoft.com/en-us/library/aa366386.aspx + + + + + The ServerChatter object is responsible for transmitting the Request to the destination server and retrieving its Response. + + + This class maintains its own MemoryStream buffer that it fills from the created or reused ServerPipe. After it determines that + a complete response is present in the MemoryStream, it allows the caller to grab that array using the TakeEntity method. If + unsatisfied with the result (e.g. a network error), the caller can call Initialize() and ResendRequest() again. + + + + + Size of buffer passed to pipe.Receive when reading from the server + + + PERF: Currently, I use [32768]; but I'd assume bigger buffers are faster. Does ReceiveBufferSize/SO_RCVBUF figure in here? + Anecdotal data suggests that current reads rarely fill the full 32k buffer. + + + + + The pipeServer represents Fiddler's connection to the server. + + + + + The session to which this ServerChatter belongs + + + + + The inbound headers on this response + + + + + Indicates whether this request was sent to a (non-SOCKS) Gateway, which influences whether the protocol and host are + mentioned in the Request line + When True, the session should have SessionFlags.SentToGateway set. + + + + + Buffer holds this response's data as it is read from the pipe. + + + + + + Pointer to first byte of Entity body (or to the start of the next set of headers in the case where there's a HTTP/1xx intermediate header) + Note: This gets reset to 0 if we're streaming and dropping the response body. + + + + + Optimization: tracks how far we've looked into the Request when determining iEntityBodyOffset + + + + + True if final (non-1xx) HTTP Response headers have been returned to the client. + + + + + Indicates how much of _responseData buffer has already been streamed to the client + + + + + Position in responseData of the start of the latest parsed chunk size information + + + + + Peek at the current response body and return it as an array + + The response body as an array, or byte[0] + + + + Create a new ServerChatter object. + + + + + + Create a ServerChatter object and initialize its headers from the specified string + + + + + + + Clear the current object and start over; used on a retry + + If TRUE, allocates a buffer (m_responseData) to read from a pipe. If FALSE, nulls m_responseData. + + + + Get the response body byte array from the MemoryStream, then dispose the stream. + + WARNING: This eats all of the bytes in the Pipe, even if that includes bytes of a + future, as-yet-unrequested response. Fiddler does not pipeline requests, so that works okay for now. + For now, the caller should validate that the returned entity is of the expected size (e.g. based on Content-Length) + + + + + Scans responseData stream for the \r\n\r\n (or variants) sequence + which indicates that the header block is complete. + + SIDE EFFECTS: + iBodySeekProgress is updated and maintained across calls to this function + iEntityBodyOffset is updated if the end of headers is found + + True, if responseData contains a full set of headers + + + + Parse the HTTP Response into Headers and Body. + + + + + + Attempt to pull the final (non-1xx) Headers from the stream. If HTTP/100 messages are found, the method + will recurse into itself to find the next set of headers. + + + + + Deletes a single HTTP/1xx header block from the Response stream + and adjusts all header-reading state to start over from the top of the stream. + Note: If 'fiddler.network.leakhttp1xx' is TRUE, then the 1xx message will have been leaked before calling this method. + + + + + Adjusts PipeServer's ReusePolicy if response headers require closure. Then calls _detachServerPipe() + + + + + Queues or End()s the ServerPipe, depending on its ReusePolicy + + + + + Determines whether a given PIPE is suitable for a given Session, based on that Session's SID + + The Client Process ID, if any + + + TRUE if the connection should be used, FALSE otherwise + + + + Connect to the Server or Gateway + Note that HTTPS Tunnels use a different code path. + + Note that this function is crazy complicated due to the intricacies of socket reuse. We want to avoid + redundant DNS lookups etc, and we need to be sensitive to the fact that the Gateway can change from request to request. + + TODO: Move this into the Pipe code and into the new PipePool. probably should be a static that returns a pipe? + + TRUE, if pipeServer was assigned a connection to the target server + + + + Performs a SOCKSv4A handshake on the socket + + + + + Build the SOCKS4 outbound connection handshake as a byte array. + http://en.wikipedia.org/wiki/SOCKS#SOCKS4a + + + + + TODO: Almost all of this function needs to go away. What we really want to do is generate a new Session that is a CONNECT tunnel (with the matching UA/proxycreds + and pass it through the normal request processing pipeline. That allows us to automatically authenticate using the user's Windows + credentials. + + Sends a CONNECT to the specified socket acting as a gateway proxy and waits for a 200 OK response. This method is used when Fiddler needs + a HTTPS Connection through a proxy but the client didn't establish one (e.g. the Request Composer). Note: May THROW + + The Socket + The host to which the gateway should connect + The port to which the gateway should connect + The HTTPRequestHeaders from the original request + TRUE if a 200 OK was received, FALSE if something else was received, THROWS EXCEPTION on network errors + + + + Given an address list and port, attempts to create a socket to the first responding host in the list (retrying via DNS Failover if needed). + + IPEndpoints to attempt to reach + Session object to annotate with timings and errors + Connected Socket. Throws Exceptions on errors. + + + + Sends (or resends) the Request to the server or upstream proxy. If the request is a CONNECT and there's no + gateway, this method ~only~ establishes the connection to the target, but does NOT send a request. + + Note: This method will recursively retry if it fails to send on a reused connection. + + True if connection and send succeeded, False otherwise + + + + May request be resent on a different connection because the .Send() of the request did not complete? + + TRUE if the request may be resent + + + + Replaces body with an error message + + Error to send if client was remote + Error to send if cilent was local + + + + Loads a HTTP response from a file + + The name of the file from which a response should be loaded + False if the file wasn't found. Throws on other errors. + + + + Reads the response from the ServerPipe. + + TRUE if a response was read + + + + When the headers first arrive, update bBufferResponse based on their contents. + + + + + Detects whether this is an direct FTP request and if so executes it and returns true. + + FALSE if the request wasn't FTP or wasn't direct. + + + + Remove from memory the response data that we have already returned to the client. + + + + + Remove from memory the response data that we have already returned to the client, up to the last chunk + size indicator, which we need to keep around for chunk-integrity purposes. + + + + + Leak the current bytes of the response to client. We wait for the full header + set before starting to stream for a variety of impossible-to-change reasons. + + Returns TRUE if response bytes were leaked, false otherwise (e.g. write error). THROWS if "fiddler.network.streaming.abortifclientaborts" is TRUE + + + + Peek at number of bytes downloaded thus far. + + + + + Get the MIME type (sans Character set or other attributes) from the HTTP Content-Type response header, or String.Empty if missing. + + + + + DEPRECATED: You should use the Timers object on the Session object instead. + The number of milliseconds between the start of sending the request to the server to the first byte of the server's response + + + + + DEPRECATED: You should use the Timers object on the Session object instead. + The number of milliseconds between the start of sending the request to the server to the last byte of the server's response. + + + + + Was this request forwarded to a gateway? + + + + + Was this request serviced from a reused server connection? + + + + + The HTTP headers of the server's response + + + + + Simple indexer into the Response Headers object + + + + + HTTP Response headers object + + + + + Base class for RequestHeaders and ResponseHeaders + + + + + Get the Reader Lock if you plan to enumerate the Storage collection. + + + + + Get the Writer Lock if you plan to change the Storage collection. + NB: You only need this lock if you plan to change the collection itself; you can party on the items in the collection if you like without locking. + + + + + If you get the Writer lock, Free it ASAP or you're going to hang or deadlock the Session + + + + + Text encoding to be used when converting this header object to/from a byte array + + + + + HTTP version (e.g. HTTP/1.1) + + + + + Storage for individual HTTPHeaderItems in this header collection + NB: Using a list is important, as order can matter + + + + + Get byte count of this HTTP header instance. + + Byte Count + + + + Number of HTTP headers + + Number of HTTP headers + + + + Returns all instances of the named header + + Header name + List of instances of the named header + + + + Copies the Headers to a new array. + Prefer this method over the enumerator to avoid cross-thread problems. + + An array containing HTTPHeaderItems + + + + Returns all values of the named header in a single string, delimited by commas + + Header + Each, Header's, Value + + + + Returns the count of instances of the named header + + Header name + Count of instances of the named header + + + + Enumerator for HTTPHeader storage collection + + Enumerator + + + + Adds a new header containing the specified name and value. + + Name of the header to add. + Value of the header. + Returns the newly-created HTTPHeaderItem. + + + + Adds one or more headers + + + + + Returns the Value from a token in the header. Correctly handles double-quoted strings. Requires semicolon for delimiting tokens + Limitation: FAILS if semicolon is in token's value, even if quoted. + FAILS in the case of crazy headers, e.g. Header: Blah="SoughtToken=Blah" SoughtToken=MissedMe + + We really need a "proper" header parser + + Name of the header + Name of the token + Value of the token if present; otherwise, null + + + + Determines if the Headers collection contains a header of the specified name, with any value. + + The name of the header to check. (case insensitive) + True, if the header exists. + + + + Determines if the Headers collection contains one or more headers of the specified name, and + sHeaderValue is part of one of those Headers' value. + + The name of the header to check. (case insensitive) + The partial header value. (case insensitive) + True if the header is found and the value case-insensitively contains the parameter + + + + Determines if the Headers collection contains a header of the specified name, and sHeaderValue=Header's value. Similar + to a case-insensitive version of: headers[sHeaderName]==sHeaderValue, although it checks all instances of the named header. + + The name of the header to check. (case insensitive) + The full header value. (case insensitive) + True if the header is found and the value case-insensitively matches the parameter + + + + Removes all headers from the header collection which have the specified name. + + The name of the header to remove. (case insensitive) + + + + Removes all headers from the header collection which have the specified names. + + Array of names of headers to remove. (case insensitive) + + + + Removes a HTTPHeader item from the collection + + The HTTPHeader item to be removed + + + + Removes all HTTPHeader items from the collection + + + + + Renames all headers in the header collection which have the specified name. + + The name of the header to rename. (case insensitive) + The new name for the header. + True if one or more replacements were made. + + + + Gets or sets the value of a header. In the case of Gets, the value of the first header of that name is returned. + If the header does not exist, returns null. + In the case of Sets, the value of the first header of that name is updated. + If the header does not exist, it is added. + + + + + Indexer property. Returns HTTPHeaderItem by index. Throws Exception if index out of bounds + + + + + Protect your enumeration using GetReaderLock + + + + + Protect your enumeration using GetReaderLock + + + + + Clone this HTTPResponseHeaders object and return the result cast to an Object + + The new response headers object, cast to an object + + + + Status code from HTTP Response. If setting, also set HTTPResponseStatus too! + + + + + Code AND Description of Response Status (e.g. '200 OK'). + + + + + Update the response status code and text + + HTTP Status code (e.g. 401) + HTTP Status text (e.g. "Access Denied") + + + + Constructor for HTTP Response headers object + + + + + Constructor for HTTP Response headers object + + Text encoding to be used for this set of Headers when converting to a byte array + + + + Returns a byte array representing the HTTP headers. + + TRUE if the response status line should be included + TRUE if there should be a trailing \r\n byte sequence included + Byte[] containing the headers + + + + Returns a string containing http headers + + TRUE if the response status line should be included + TRUE if there should be a trailing CRLF included + String containing http headers + + + + Returns a string containing the http headers + + + Returns a string containing http headers with a status line but no trailing CRLF + + + + + Parses a string and assigns the headers parsed to this object + + The header string + TRUE if the operation succeeded, false otherwise + + + + Gets or sets the text associated with the response code (e.g. "OK", "Not Found", etc) + + + + + HTTP Request headers object + + + + + Warning: You should protect your enumeration using the GetReaderLock + + + + + Warning: You should protect your enumeration using the GetReaderLock + + + + + Clones the HTTP request headers + + The new HTTPRequestHeaders object, cast to an object + + + + The HTTP Method (e.g. GET, POST, etc) + + + + + Constructor for HTTP Request headers object + + + + + Constructor for HTTP Request headers object + + Text encoding to be used for this set of Headers when converting to a byte array + + + + Parses a string and assigns the headers parsed to this object + + The header string + TRUE if the operation succeeded, false otherwise + + + + Returns a byte array representing the HTTP headers. + + TRUE if the HTTP REQUEST line (method+path+httpversion) should be included + TRUE if there should be a trailing \r\n byte sequence included + TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE + The HTTP headers as a byte[] + + + + Returns a byte array representing the HTTP headers. + + TRUE if the HTTP REQUEST line (method+path+httpversion) should be included + TRUE if there should be a trailing \r\n byte sequence included + TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE + Only meaningful if prependVerbLine is TRUE, the host to use in the HTTP REQUEST LINE + The HTTP headers as a byte[] + + + + Returns a string representing the HTTP headers. + + TRUE if the HTTP REQUEST line (method+path+httpversion) should be included + TRUE if there should be a trailing CRLF sequence included + TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE (Automatically set to FALSE for CONNECT requests) + The HTTP headers as a string. + + + + Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP REQUEST line + + TRUE if the HTTP REQUEST line (method+path+httpversion) should be included + TRUE if there should be a trailing CRLF sequence included + The header string + + + + Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP request line, and no trailing CRLF + + The header string + + + + The (lowercased) URI scheme for this request (https, http, or ftp) + + + + + Username:Password info for FTP URLs. (either null or "user:pass@") + + + + + Get or set the request path as a string + + + + + Get or set the request path as a byte array + + + + + Represents a single HTTP header + + + + + Clones a single HTTP header and returns the clone cast to an object + + HTTPHeader Name: Value pair, cast to an object + + + + The name of the HTTP header + + + + + The value of the HTTP header + + + + + Creates a new HTTP Header item + + Header name + Header value + + + + Return a string of the form "NAME: VALUE" + + "NAME: VALUE" Header string + + + + A SessionTimers object holds timing information about a single Session. + + + + + The time at which the client's HTTP connection to Fiddler was established + + + + + The time at which the request's first Send() to Fiddler completes + + + + + The time at which the request headers were received + + + + + The time at which the request to Fiddler completes (aka RequestLastWrite) + + + + + The time at which the server connection has been established + + + + + The time at which Fiddler begins sending the HTTP request to the server (FiddlerRequestFirstSend) + + + + + The time at which Fiddler has completed sending the HTTP request to the server (FiddlerRequestLastSend). + BUG: Should be named "FiddlerEndRequest". + NOTE: Value here is often misleading due to buffering inside WinSock's send() call. + + + + + The time at which Fiddler receives the first byte of the server's response (ServerResponseFirstRead) + + + + + The time at which Fiddler received the server's headers + + + + + The time at which Fiddler has completed receipt of the server's response (ServerResponseLastRead) + + + + + The time at which Fiddler has begun sending the Response to the client (ClientResponseFirstSend) + + + + + The time at which Fiddler has completed sending the Response to the client (ClientResponseLastSend) + + + + + The number of milliseconds spent determining which gateway should be used to handle this request + (Should be mutually exclusive to DNSTime!=0) + + + + + The number of milliseconds spent waiting for DNS + + + + + The number of milliseconds spent waiting for the server TCP/IP connection establishment + + + + + The number of milliseconds elapsed while performing the HTTPS handshake with the server + + + + + Override of ToString shows timer info in a fancy format + + Timing information as a string + + + + Override of ToString shows timer info in a fancy format + + TRUE if the result can contain linebreaks; false if comma-delimited format preferred + Timing information as a string + + + + Enables High-Resolution timers, which are bad for battery-life but good for the accuracy of timestamps. + See http://technet.microsoft.com/en-us/sysinternals/bb897568 for the ClockRes utility that shows current clock resolution. + NB: Exiting Fiddler reverts this to the default value. + + + + + Watch a registry key for changes to its values. + + The Registry Hive in which the key lives + The key, e.g. \Software\Microsoft\Fiddler2\ + The Event Handler to invoke when a change occurs. + A new RegistryWatcher object. + + + + Start monitoring. + + + + + Stops the monitoring thread. + + + + + Fires when the specified registry key has changed. + + + + + The GenericTunnel class represents a "blind tunnel" to shuffle bytes between a client and the server. + + + + + Is streaming started in the downstream direction? + + + + + Number of bytes received from the client + + + + + Number of bytes received from the server + + + + + This "Factory" method creates a new HTTPS Tunnel and executes it on a background (non-pooled) thread. + + The Session containing the HTTP CONNECT request + + + + Creates a tunnel. External callers instead use the CreateTunnel static method. + + The session for which this tunnel was initially created. + Client Pipe + Server Pipe + + + + This function keeps the thread alive until it is signaled that the traffic is complete + + + + + Executes the HTTPS tunnel inside an All-it-can-eat exception handler. + Call from a background thread. + + + + + Executes the WebSocket tunnel on a background thread + + + + + Instructs the tunnel to take over the server pipe and begin streaming responses to the client + + + + + Close the HTTPS tunnel and signal the event to let the service thread die. + WARNING: This MUST not be allowed to throw any exceptions, because it will do so on threads that don't catch them, and this will kill the application. + + + + + Called when we have received data from the local client. + Incoming data will immediately be forwarded to the remote host. + + The result of the asynchronous operation. + + + Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.
+ The result of the asynchronous operation. +
+ + Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.
+ The result of the asynchronous operation. +
+ + Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.
+ The result of the asynchronous operation. +
+ + + Returns number of bytes sent from the Server to the Client + + + + + Returns number of bytes sent from the Client to the Server + + + + + Attribute used to specify the minimum version of Fiddler compatible with this extension assembly. + + + + + Attribute used to specify the minimum version of Fiddler compatible with this extension assembly. + + The minimal version string (e.g. "2.2.8.8") + + + + Getter for the required version string + + + + + Attribute allowing developer to specify that a class supports the specified Import/Export Format + + + + + Attribute allowing developer to specify that a class supports the specified Import/Export Format + + Shortname of the Format (e.g. WebText XML) + Description of the format + + + + Returns the Shortname for this format + + + + + Returns the Description of this format + + + + + This tuple maps a display string to a Import/Export type + + + + + Textual description of the Format + + + + + Class implementing the format + + + + + Create a new Transcoder Tuple + + Format description + Type implementing this format + + + + ISessionImport allows loading of Session data + + + + + Import Sessions from a data source + + Shortname of the format + Dictionary of options that the Importer class may use + Callback event on which progress is reported or the host may cancel + Array of Session objects imported from source + + + + ISessionExport allows saving of Session data + + + + + Export Sessions to a data store + + Shortname of the format + Array of Sessions being exported + Dictionary of options that the Exporter class may use + Callback event on which progress is reported or the host may cancel + TRUE if the export was successful + + + + EventArgs class for the ISessionImporter and ISessionExporter interface callbacks + + + + + Progress Callback + + Float indicating completion ratio, 0.0 to 1.0. Set to 0 if unknown. + Short string describing current operation, progress, etc + + + + Set to TRUE to request that Import/Export process be aborted as soon as convenient + + + + + The string message of the notification + + + + + The percentage completed + + + + + The core proxy object which accepts connections from clients and creates session objects from those connections + + + + + The RegistryWatcher is used to monitor changes in the WinINET Proxy registry keys + to detect premature detaches. + + + + + Hostname if this Proxy Endpoint is terminating HTTPS connections + + + + + Certificate if this Proxy Endpoint is terminating HTTPS connections + + + + + Per-connectoid information about each WinINET connectoid + + + + + The default WinINET proxy as determined upon Fiddler startup. + + + + + The WinHTTP AutoProxy object, created if we're using WPAD or a PAC Script as a gateway + + + + + Allow binding to a specific egress adapter: "fiddler.network.egress.ip" + + + + + Watcher for Notification of Preference changes + + + + + Server connections may be pooled for performance reasons. + + + + + The Socket Endpoint on which this proxy receives requests + + + + + Flag indicating that Fiddler is in the process of detaching... + + + + + List of hosts which should bypass the upstream gateway + + + + + Returns a string of information about this instance and the ServerPipe reuse pool + + A multiline string + + + + Change the outbound IP address used to send traffic + + + + + + Watch for relevent changes on the Preferences object + + + + + + + Called whenever Windows reports that the system's NetworkAddress has changed + + + + + + + Called by Windows whenever network availability goes up or down. + + + + + + + Directly inject a session into the Fiddler pipeline, returning a reference to it. + NOTE: This method will THROW any exceptions to its caller. + + String representing the HTTP request. If headers only, be sure to end with CRLFCRLF + StringDictionary of Session Flags (or null) + The new session + + + + [DEPRECATED] Directly inject a session into the Fiddler pipeline. + NOTE: This method will THROW any exceptions to its caller. + + + HTTP Request Headers + HTTP Request body (or null) + StringDictionary of Session Flags (or null) + + + + [DEPRECATED] Directly inject a session into the Fiddler pipeline. + NOTE: This method will THROW any exceptions to its caller. + + + String representing the HTTP request. If headers only, be sure to end with CRLFCRLF + StringDictionary of Session Flags (or null) + + + + [DEPRECATED]: This version does no validation of the request data, and doesn't set SessionFlags.RequestGeneratedByFiddler + Send a custom HTTP request to Fiddler's listening endpoint (127.0.0.1:8888 by default). + NOTE: This method will THROW any exceptions to its caller and blocks the current thread. + + + String representing the HTTP request. If headers only, be sure to end with CRLFCRLF + + + + This function, when given a scheme host[:port], returns the gateway information of the proxy to forward requests to. + + URIScheme: use http, https, or ftp + Host for which to return gateway information + IPEndPoint of gateway to use, or NULL + + + + Accept the connection and pass it off to a handler thread + + + + + + Register as the system proxy for WinINET and set the Dynamic registry key for other FiddlerHook + + True if the proxy registration was successful + + + + If we get a notice that the proxy registry key has changed, wait 50ms and then check to see + if the key is pointed at us. If not, raise the alarm. + + + + + + + If we are suppsoed to be "attached", we re-verify the registry keys, and if they are corrupt, notify + our host of the discrepency. + + + + + This method sets up the connectoid list and updates gateway information. Called by the Attach() method, or + called on startup if Fiddler isn't configured to attach automatically. + + + + + Given an address list, walks the list until it's able to successfully make a connection. + Used for finding an available Gateway when we have a list to choose from + + A string, e.g. PROXY1:80 + The IP:Port of the first alive endpoint for the specified host/port + + + + Set internal fields pointing at upstream proxies. + + + + + Sets a registry key which indicates that Fiddler is in "Connected" mode. Used by the FiddlerHook Add-on + + TRUE if fiddler is Connected + + + + Detach the proxy by setting the registry keys and sending a Windows Message + + True if the proxy settings were successfully detached + + + + Detach the proxy by setting the registry keys and sending a Windows Message + + True if the proxy settings were successfully detached + + + + Write a .PAC file that user can point their browser at. Some browsers are better-behaved when using a PAC file. + + TRUE if clients should send traffic to Fiddler. + + + + Stop the proxy by closing the socket. + + + + + Start the proxy by binding to the local port and accepting connections + + Port to listen on + TRUE to allow remote connections + + + + + Dispose Fiddler's listening socket + + + + + Clear the pool of Server Pipes. May be called by extensions. + + + + + Assign HTTPS Certificate for this endpoint + + Certificate to return to clients who connect + + + + Sets the upstream gateway to match the specified ProxyInfo + + + + + + Generate or find a certificate for this endpoint + + Subject FQDN + TRUE if the certificate could be found/generated, false otherwise + + + + Return a simple string indicating what upstream proxy/gateway is in use. + + + + + + Show a message box indicating what upstream gateway/proxy is in use + + + + + The port on which this instance is listening + + + + + Returns true if Fiddler believes it is currently registered as the Local System proxy + + + + + This event handler fires when Fiddler detects that it is (unexpectedly) no longer the system's registered proxy + + + + + Somewhat similar to the Framework's "BackgroundWorker" class, the periodic worker performs a similar function on a periodic schedule. + + The PeriodicWorker class is used by Fiddler to perform "cleanup" style tasks on a timer. Put work in the queue, + and it will see that it's done at least as often as the schedule specified until Fiddler begins to close at which + point all work stops. + + Note that the callback occurs on a background thread. + + The underlying timer's interval is 1 second. + + + + I think a significant part of the reason that this class exists is that I thought the System.Threading.Timer consumed one thread for each + timer. In reality, per "CLR via C# 4e" all of the instances share one underlying thread and thus my concern was misplaced. Ah well. + + + + + Assigns a "job" to the Periodic worker, on the schedule specified by iMS. + + The function to run on the timer specified. + Warning: the function is NOT called on the UI thread, so use .Invoke() if needed. + The # of milliseconds to wait between runs + A taskItem which can be used to revokeWork later + + + + Revokes a previously-assigned task from this worker. + + + + + + The ScheduledTasks class allows addition of jobs by name. It ensures that ONE instance of the named + job will occur at *some* point in the future, between 0 and a specified max delay. If you queue multiple + instances of the same-named Task, it's only done once. + + + + + Under the lock, we enumerate the schedule to find work to do and remove that work from the schedule. + After we release the lock, we then do the queued work. + + + + + + A jobItem represents a Function+Time tuple. The function will run after the given time. + + + + + TickCount at which this job must run. + + + + + Method to invoke to complete the job + + +
+
diff --git a/assemblies/FiddlerCore4.dll b/assemblies/FiddlerCore4.dll new file mode 100644 index 000000000..b5d7c2e41 Binary files /dev/null and b/assemblies/FiddlerCore4.dll differ diff --git a/assemblies/MetroRadiance.Chrome.dll b/assemblies/MetroRadiance.Chrome.dll deleted file mode 100644 index 080315a07..000000000 Binary files a/assemblies/MetroRadiance.Chrome.dll and /dev/null differ diff --git a/assemblies/MetroRadiance.Chrome.xml b/assemblies/MetroRadiance.Chrome.xml deleted file mode 100644 index 2242fb629..000000000 --- a/assemblies/MetroRadiance.Chrome.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - MetroRadiance.Chrome - - - - - ウィンドウの四辺にアタッチされる発光ウィンドウを表します。 - - - - - の各種座標を計算します。 - - - - - 派生クラスでオーバーライドされると、 - の左端座標を取得します。 - - アタッチ先ウィンドウの左端座標。 - アタッチ先ウィンドウの現在の横幅。 - - - - 派生クラスでオーバーライドされると、 - の上端座標を取得します。 - - アタッチ先ウィンドウの上端座標。 - アタッチ先ウィンドウの現在の縦幅。 - - - - 派生クラスでオーバーライドされると、 - の横幅を取得します。 - - アタッチ先ウィンドウの左端座標。 - アタッチ先ウィンドウの現在の横幅。 - - - - 派生クラスでオーバーライドされると、 - の縦幅を取得します。 - - アタッチ先ウィンドウの上端座標。 - アタッチ先ウィンドウの現在の縦幅。 - - - - 派生クラスでオーバーライドされると、 座標でのヒットテスト結果を返します。 - - ウィンドウ メッセージで受け取ったマウス座標。 - 発光ウィンドウの現在の幅。 - 発光ウィンドウの現在の高さ。 - ヒットテスト結果。 - - - - 派生クラスでオーバーライドされると、 座標でのカーソルを返します。 - - ウィンドウ メッセージで受け取ったマウス座標。 - 発光ウィンドウの現在の幅。 - 発光ウィンドウの現在の高さ。 - マウスカーソル。 - - - - ウィンドウの発光サイズを取得します。 - - - - - ウィンドウの発光効果のエッジサイズを取得します。 - - - - - 派生クラスでオーバーライドされると、 - に設定する プロパティの値を取得します。 - - - - - 派生クラスでオーバーライドされると、 - に設定する プロパティの値を取得します。 - - - - - ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 - - - - - このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 - - - - - 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 - 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 - - - - - GeneratedInternalTypeHelper - - - - - CreateInstance - - - - - GetPropertyValue - - - - - SetPropertyValue - - - - - CreateDelegate - - - - - AddEventHandler - - - - diff --git a/assemblies/MetroRadiance.Core.dll b/assemblies/MetroRadiance.Core.dll deleted file mode 100644 index 9e1457c5d..000000000 Binary files a/assemblies/MetroRadiance.Core.dll and /dev/null differ diff --git a/assemblies/MetroRadiance.Core.xml b/assemblies/MetroRadiance.Core.xml deleted file mode 100644 index 4b8b37cd1..000000000 --- a/assemblies/MetroRadiance.Core.xml +++ /dev/null @@ -1,1846 +0,0 @@ - - - - MetroRadiance.Core - - - - - モニターの DPI (dots per inch) を表します。 - - - - - 現在の から、WPF が認識しているシステム DPI を取得します。 - - - X 軸 および Y 軸それぞれの DPI 設定値を表す 構造体。 - - - - - Identifies dots per inch (dpi) type. - - - - - MDT_Effective_DPI - Effective DPI that incorporates accessibility overrides and matches what Desktop Window Manage (DWM) uses to scale desktop applications. - - - - - MDT_Angular_DPI - DPI that ensures rendering at a compliant angular resolution on the screen, without incorporating accessibility overrides. - - - - - MDT_Raw_DPI - Linear DPI of the screen as measures on the screen itself. - - - - - MDT_Default - - - - - プロパティの変更通知をサポートします。 - - - - - Windows 8.1 の Per-Monitor DPI 機能へアクセスします。 - - - - - 現在の が描画されているモニターの DPI 設定値を取得します。 - - DPI を取得する対象の Win32 ウィンドウを特定する オブジェクト。 - DPI の種類。規定値は ( と同値) です。 - が描画されているモニターの DPI 設定値。サポートされていないシステムの場合は - - - - Per-Monitor DPI 機能をサポートしているかどうかを示す値を取得します。 - - - 動作しているオペレーティング システムが Windows 8.1 (NT 6.3) の場合は true、それ以外の場合は false。 - - - - - Indicates that the value of the marked element could be null sometimes, - so the check for null is necessary before its usage - - - [CanBeNull] public object Test() { return null; } - public void UseTest() { - var p = Test(); - var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' - } - - - - - Indicates that the value of the marked element could never be null - - - [NotNull] public object Foo() { - return null; // Warning: Possible 'null' assignment - } - - - - - Indicates that the marked method builds string by format pattern and (optional) arguments. - Parameter, which contains format string, should be given in constructor. The format string - should be in -like form - - - [StringFormatMethod("message")] - public void ShowError(string message, params object[] args) { /* do something */ } - public void Foo() { - ShowError("Failed: {0}"); // Warning: Non-existing argument in format string - } - - - - - Specifies which parameter of an annotated method should be treated as format-string - - - - - Indicates that the function argument should be string literal and match one - of the parameters of the caller function. For example, ReSharper annotates - the parameter of - - - public void Foo(string param) { - if (param == null) - throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol - } - - - - - Indicates that the method is contained in a type that implements - interface - and this method is used to notify that some property value changed - - - The method should be non-static and conform to one of the supported signatures: - - NotifyChanged(string) - NotifyChanged(params string[]) - NotifyChanged{T}(Expression{Func{T}}) - NotifyChanged{T,U}(Expression{Func{T,U}}) - SetProperty{T}(ref T, T, string) - - - - public class Foo : INotifyPropertyChanged { - public event PropertyChangedEventHandler PropertyChanged; - [NotifyPropertyChangedInvocator] - protected virtual void NotifyChanged(string propertyName) { ... } - - private string _name; - public string Name { - get { return _name; } - set { _name = value; NotifyChanged("LastName"); /* Warning */ } - } - } - - Examples of generated notifications: - - NotifyChanged("Property") - NotifyChanged(() => Property) - NotifyChanged((VM x) => x.Property) - SetProperty(ref myField, value, "Property") - - - - - - Describes dependency between method input and output - - -

Function Definition Table syntax:

- - FDT ::= FDTRow [;FDTRow]* - FDTRow ::= Input => Output | Output <= Input - Input ::= ParameterName: Value [, Input]* - Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} - Value ::= true | false | null | notnull | canbenull - - If method has single input parameter, it's name could be omitted.
- Using halt (or void/nothing, which is the same) - for method output means that the methos doesn't return normally.
- canbenull annotation is only applicable for output parameters.
- You can use multiple [ContractAnnotation] for each FDT row, - or use single attribute with rows separated by semicolon.
-
- - - [ContractAnnotation("=> halt")] - public void TerminationMethod() - - - [ContractAnnotation("halt <= condition: false")] - public void Assert(bool condition, string text) // regular assertion method - - - [ContractAnnotation("s:null => true")] - public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() - - - // A method that returns null if the parameter is null, and not null if the parameter is not null - [ContractAnnotation("null => null; notnull => notnull")] - public object Transform(object data) - - - [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] - public bool TryParse(string s, out Person result) - - -
- - - Indicates that marked element should be localized or not - - - [LocalizationRequiredAttribute(true)] - public class Foo { - private string str = "my string"; // Warning: Localizable string - } - - - - - Indicates that the value of the marked type (or its derivatives) - cannot be compared using '==' or '!=' operators and Equals() - should be used instead. However, using '==' or '!=' for comparison - with null is always permitted. - - - [CannotApplyEqualityOperator] - class NoEquality { } - class UsesNoEquality { - public void Test() { - var ca1 = new NoEquality(); - var ca2 = new NoEquality(); - if (ca1 != null) { // OK - bool condition = ca1 == ca2; // Warning - } - } - } - - - - - When applied to a target attribute, specifies a requirement for any type marked - with the target attribute to implement or inherit specific type or types. - - - [BaseTypeRequired(typeof(IComponent)] // Specify requirement - public class ComponentAttribute : Attribute { } - [Component] // ComponentAttribute requires implementing IComponent interface - public class MyComponent : IComponent { } - - - - - Indicates that the marked symbol is used implicitly - (e.g. via reflection, in external library), so this symbol - will not be marked as unused (as well as by other usage inspections) - - - - - Should be used on attributes and causes ReSharper - to not mark symbols marked with such attributes as unused - (as well as by other usage inspections) - - - - Only entity marked with attribute considered used - - - Indicates implicit assignment to a member - - - - Indicates implicit instantiation of a type with fixed constructor signature. - That means any unused constructor parameters won't be reported as such. - - - - Indicates implicit instantiation of a type - - - - Specify what is considered used implicitly - when marked with - or - - - - Members of entity marked with attribute are considered used - - - Entity marked with attribute and all its members considered used - - - - This attribute is intended to mark publicly available API - which should not be removed and so is treated as used - - - - - Tells code analysis engine if the parameter is completely handled - when the invoked method is on stack. If the parameter is a delegate, - indicates that delegate is executed while the method is executed. - If the parameter is an enumerable, indicates that it is enumerated - while the method is executed - - - - - Indicates that a method does not make any observable state changes. - The same as System.Diagnostics.Contracts.PureAttribute - - - [Pure] private int Multiply(int x, int y) { return x * y; } - public void Foo() { - const int a = 2, b = 2; - Multiply(a, b); // Waring: Return value of pure method is not used - } - - - - - Indicates that a parameter is a path to a file or a folder - within a web project. Path can be relative or absolute, - starting from web root (~) - - - - - ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter - is an MVC action. If applied to a method, the MVC action name is calculated - implicitly from the context. Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String) - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC area. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String) - - - - - ASP.NET MVC attribute. If applied to a parameter, indicates that - the parameter is an MVC controller. If applied to a method, - the MVC controller name is calculated implicitly from the context. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String) - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Controller.View(String, String) - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Controller.View(String, Object) - - - - - ASP.NET MVC attribute. If applied to a parameter, indicates that - the parameter is an MVC partial view. If applied to a method, - the MVC partial view name is calculated implicitly from the context. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String) - - - - - ASP.NET MVC attribute. Allows disabling all inspections - for MVC views within a class or a method. - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String) - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. - Use this attribute for custom wrappers similar to - System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String) - - - - - ASP.NET MVC attribute. Indicates that a parameter is an MVC template. - Use this attribute for custom wrappers similar to - System.ComponentModel.DataAnnotations.UIHintAttribute(System.String) - - - - - ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter - is an MVC view. If applied to a method, the MVC view name is calculated implicitly - from the context. Use this attribute for custom wrappers similar to - System.Web.Mvc.Controller.View(Object) - - - - - ASP.NET MVC attribute. When applied to a parameter of an attribute, - indicates that this parameter is an MVC action name - - - [ActionName("Foo")] - public ActionResult Login(string returnUrl) { - ViewBag.ReturnUrl = Url.Action("Foo"); // OK - return RedirectToAction("Bar"); // Error: Cannot resolve action - } - - - - - Razor attribute. Indicates that a parameter or a method is a Razor section. - Use this attribute for custom wrappers similar to - System.Web.WebPages.WebPageBase.RenderSection(String) - - - - - ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 - - - - - このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 - - - - - 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 - 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 - - - - - ウィンドウを非表示にして、ほかのウィンドウをアクティブにします。 - - - - - ウィンドウをアクティブにし、表示します。ウィンドウが最小化、または最大化されていると、ウィンドウは元の位置とサイズで復元されます。 - - - - - ウィンドウをアクティブにし、アイコンとして表示します。 - - - - - ウィンドウをアクティブにし、最大化します。 - - - - - ウィンドウをアイコンとして表示します。 現在アクティブなウィンドウはアクティブなまま表示します。 - - - - - ウィンドウをアクティブにし、現在のサイズと位置で表示します。 - - - - - 指定されたウィンドウを最小化して、システム リストにあるトップレベル ウィンドウをアクティブにします。 - - - - - ウィンドウを直前のサイズと位置で表示します。 現在アクティブなウィンドウはアクティブなまま表示します。 - - - - - ウィンドウを現在の状態で表示します。 現在アクティブなウィンドウはアクティブなまま表示します。 - - - - - ウィンドウをアクティブにし、表示します。 ウィンドウが最小化、または最大化されていると、ウィンドウは元の位置とサイズに復元されます。 - - - - - アプリケーションを起動したプログラムが 関数に渡した 構造体で指定された SW_ フラグに従って表示状態を設定します。 - - - - - Windows Messages - Defined in winuser.h from Windows SDK v6.1 - Documentation pulled from MSDN. - - - - - The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore. - - - - - The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible. - - - - - The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen. - This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message, it can be assumed that all child windows still exist. - /// - - - - The WM_MOVE message is sent after a window has been moved. - - - - - The WM_SIZE message is sent to a window after its size has changed. - - - - - The WM_ACTIVATE message is sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately. - - - - - The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus. - - - - - The WM_KILLFOCUS message is sent to a window immediately before it loses the keyboard focus. - - - - - The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed. - - - - - An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn. - - - - - An application sends a WM_SETTEXT message to set the text of a window. - - - - - An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. - - - - - An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with a window. - - - - - The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage function. - - - - - The WM_CLOSE message is sent as a signal that a window or an application should terminate. - - - - - The WM_QUERYENDSESSION message is sent when the user chooses to end the session or when an application calls one of the system shutdown functions. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero. - After processing this message, the system sends the WM_ENDSESSION message with the wParam parameter set to the results of the WM_QUERYENDSESSION message. - - - - - The WM_QUERYOPEN message is sent to an icon when the user requests that the window be restored to its previous size and position. - - - - - The WM_ENDSESSION message is sent to an application after the system processes the results of the WM_QUERYENDSESSION message. The WM_ENDSESSION message informs the application whether the session is ending. - - - - - The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the PostQuitMessage function. It causes the GetMessage function to return zero. - - - - - The WM_ERASEBKGND message is sent when the window background must be erased (for example, when a window is resized). The message is sent to prepare an invalidated portion of a window for painting. - - - - - This message is sent to all top-level windows when a change is made to a system color setting. - - - - - The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown. - - - - - An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI. - Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message. - - - - - An application sends the WM_WININICHANGE message to all top-level windows after making a change to the WIN.INI file. The SystemParametersInfo function sends this message after an application uses the function to change a setting in WIN.INI. - Note The WM_WININICHANGE message is provided only for compatibility with earlier versions of the system. Applications should use the WM_SETTINGCHANGE message. - - - - - The WM_DEVMODECHANGE message is sent to all top-level windows whenever the user changes device-mode settings. - - - - - The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated. - - - - - An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of font resources. - - - - - A message that is sent whenever there is a change in the system time. - - - - - The WM_CANCELMODE message is sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example, the EnableWindow function sends this message when disabling the specified window. - - - - - The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured. - - - - - The WM_MOUSEACTIVATE message is sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message only if the child window passes it to the DefWindowProc function. - - - - - The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the window is activated, moved, or sized. - - - - - The WM_QUEUESYNC message is sent by a computer-based training (CBT) application to separate user-input messages from other messages sent through the WH_JOURNALPLAYBACK Hook procedure. - - - - - The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size. - - - - - Windows NT 3.51 and earlier: The WM_PAINTICON message is sent to a minimized window when the icon is to be painted. This message is not sent by newer versions of Microsoft Windows, except in unusual circumstances explained in the Remarks. - - - - - Windows NT 3.51 and earlier: The WM_ICONERASEBKGND message is sent to a minimized window when the background of the icon must be filled before painting the icon. A window receives this message only if a class icon is defined for the window; otherwise, WM_ERASEBKGND is sent. This message is not sent by newer versions of Windows. - - - - - The WM_NEXTDLGCTL message is sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box. - - - - - The WM_SPOOLERSTATUS message is sent from Print Manager whenever a job is added to or removed from the Print Manager queue. - - - - - The WM_DRAWITEM message is sent to the parent window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed. - - - - - The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item when the control or menu is created. - - - - - Sent to the owner of a list box or combo box when the list box or combo box is destroyed or when items are removed by the LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message. The system sends a WM_DELETEITEM message for each deleted item. The system sends the WM_DELETEITEM message for any deleted list box or combo box item with nonzero item data. - - - - - Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_KEYDOWN message. - - - - - Sent by a list box with the LBS_WANTKEYBOARDINPUT style to its owner in response to a WM_CHAR message. - - - - - An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text. - - - - - An application sends a WM_GETFONT message to a control to retrieve the font with which the control is currently drawing its text. - - - - - An application sends a WM_SETHOTKEY message to a window to associate a hot key with the window. When the user presses the hot key, the system activates the window. - - - - - An application sends a WM_GETHOTKEY message to determine the hot key associated with a window. - - - - - The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags the icon. - - - - - The system sends the WM_COMPAREITEM message to determine the relative position of a new item in the sorted list of an owner-drawn combo box or list box. Whenever the application adds a new item, the system sends this message to the owner of a combo box or list box created with the CBS_SORT or LBS_SORT style. - - - - - Active Accessibility sends the WM_GETOBJECT message to obtain information about an accessible object contained in a server application. - Applications never send this message directly. It is sent only by Active Accessibility in response to calls to AccessibleObjectFromPoint, AccessibleObjectFromEvent, or AccessibleObjectFromWindow. However, server applications handle this message. - - - - - The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low. - - - - - WM_COMMNOTIFY is Obsolete for Win32-Based Applications - - - - - The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function. - - - - - The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function. - - - - - Notifies applications that the system, typically a battery-powered personal computer, is about to enter a suspended mode. - Use: POWERBROADCAST - - - - - An application sends the WM_COPYDATA message to pass data to another application. - - - - - The WM_CANCELJOURNAL message is posted to an application when a user cancels the application's journaling activities. The message is posted with a NULL window handle. - - - - - Sent by a common control to its parent window when an event has occurred or the control requires some information. - - - - - The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately. - - - - - The WM_INPUTLANGCHANGE message is sent to the topmost affected window after an application's input language has been changed. You should make any application-specific settings and pass the message to the DefWindowProc function, which passes the message to all first-level child windows. These child windows can pass the message to DefWindowProc to have it pass the message to their child windows, and so on. - - - - - Sent to an application that has initiated a training card with Microsoft Windows Help. The message informs the application when the user clicks an authorable button. An application initiates a training card by specifying the HELP_TCARD command in a call to the WinHelp function. - - - - - Indicates that the user pressed the F1 key. If a menu is active when F1 is pressed, WM_HELP is sent to the window associated with the menu; otherwise, WM_HELP is sent to the window that has the keyboard focus. If no window has the keyboard focus, WM_HELP is sent to the currently active window. - - - - - The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings. - - - - - Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message. WM_NOTIFYFORMAT messages are sent from a common control to its parent window and from the parent window to the common control. - - - - - The WM_CONTEXTMENU message notifies a window that the user clicked the right mouse button (right-clicked) in the window. - - - - - The WM_STYLECHANGING message is sent to a window when the SetWindowLong function is about to change one or more of the window's styles. - - - - - The WM_STYLECHANGED message is sent to a window after the SetWindowLong function has changed one or more of the window's styles - - - - - The WM_DISPLAYCHANGE message is sent to all windows when the display resolution has changed. - - - - - The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption. - - - - - An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption. - - - - - The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created. - - - - - The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object associated with the window. - The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent before the child windows are destroyed. - - - - - The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes. - - - - - The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse. - - - - - The WM_NCPAINT message is sent to a window when its frame must be painted. - - - - - The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state. - - - - - The WM_GETDLGCODE message is sent to the window procedure associated with a control. By default, the system handles all keyboard input to the control; the system interprets certain types of keyboard input as dialog box navigation keys. To override this default behavior, the control can respond to the WM_GETDLGCODE message to indicate the types of input it wants to process itself. - - - - - The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads. - - - - - The WM_NCMOUSEMOVE message is posted to a window when the cursor is moved within the nonclient area of the window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCRBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCRBUTTONUP message is posted when the user releases the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCRBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCMBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCMBUTTONUP message is posted when the user releases the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCMBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCXBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCXBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_NCXBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. - - - - - The WM_INPUT_DEVICE_CHANGE message is sent to the window that registered to receive raw input. A window receives this message through its WindowProc function. - - - - - The WM_INPUT message is sent to the window that is getting raw input. - - - - - This message filters for keyboard messages. - - - - - The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed. - - - - - The WM_KEYUP message is posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key that is pressed when the ALT key is not pressed, or a keyboard key that is pressed when a window has the keyboard focus. - - - - - The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed. - - - - - The WM_DEADCHAR message is posted to the window with the keyboard focus when a WM_KEYUP message is translated by the TranslateMessage function. WM_DEADCHAR specifies a character code generated by a dead key. A dead key is a key that generates a character, such as the umlaut (double-dot), that is combined with another character to form a composite character. For example, the umlaut-O character (Ö) is generated by typing the dead key for the umlaut character, and then typing the O key. - - - - - The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key (which activates the menu bar) or holds down the ALT key and then presses another key. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYDOWN message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter. - - - - - The WM_SYSKEYUP message is posted to the window with the keyboard focus when the user releases a key that was pressed while the ALT key was held down. It also occurs when no window currently has the keyboard focus; in this case, the WM_SYSKEYUP message is sent to the active window. The window that receives the message can distinguish between these two contexts by checking the context code in the lParam parameter. - - - - - The WM_SYSCHAR message is posted to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. It specifies the character code of a system character key — that is, a character key that is pressed while the ALT key is down. - - - - - The WM_SYSDEADCHAR message is sent to the window with the keyboard focus when a WM_SYSKEYDOWN message is translated by the TranslateMessage function. WM_SYSDEADCHAR specifies the character code of a system dead key — that is, a dead key that is pressed while holding down the ALT key. - - - - - The WM_UNICHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_UNICHAR message contains the character code of the key that was pressed. - The WM_UNICHAR message is equivalent to WM_CHAR, but it uses Unicode Transformation Format (UTF)-32, whereas WM_CHAR uses UTF-16. It is designed to send or post Unicode characters to ANSI windows and it can can handle Unicode Supplementary Plane characters. - - - - - This message filters for keyboard messages. - - - - - Sent immediately before the IME generates the composition string as a result of a keystroke. A window receives this message through its WindowProc function. - - - - - Sent to an application when the IME ends composition. A window receives this message through its WindowProc function. - - - - - Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this message through its WindowProc function. - - - - - The WM_INITDIALOG message is sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures typically use this message to initialize controls and carry out any other initialization tasks that affect the appearance of the dialog box. - - - - - The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated. - - - - - A window receives this message when the user chooses a command from the Window menu, clicks the maximize button, minimize button, restore button, close button, or moves the form. You can stop the form from moving by filtering this out. - - - - - The WM_TIMER message is posted to the installing thread's message queue when a timer expires. The message is posted by the GetMessage or PeekMessage function. - - - - - The WM_HSCROLL message is sent to a window when a scroll event occurs in the window's standard horizontal scroll bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control. - - - - - The WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control. - - - - - The WM_INITMENU message is sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed. - - - - - The WM_INITMENUPOPUP message is sent when a drop-down menu or submenu is about to become active. This allows an application to modify the menu before it is displayed, without changing the entire menu. - - - - - The WM_MENUSELECT message is sent to a menu's owner window when the user selects a menu item. - - - - - The WM_MENUCHAR message is sent when a menu is active and the user presses a key that does not correspond to any mnemonic or accelerator key. This message is sent to the window that owns the menu. - - - - - The WM_ENTERIDLE message is sent to the owner window of a modal dialog box or menu that is entering an idle state. A modal dialog box or menu enters an idle state when no messages are waiting in its queue after it has processed one or more previous messages. - - - - - The WM_MENURBUTTONUP message is sent when the user releases the right mouse button while the cursor is on a menu item. - - - - - The WM_MENUDRAG message is sent to the owner of a drag-and-drop menu when the user drags a menu item. - - - - - The WM_MENUGETOBJECT message is sent to the owner of a drag-and-drop menu when the mouse cursor enters a menu item or moves from the center of the item to the top or bottom of the item. - - - - - The WM_UNINITMENUPOPUP message is sent when a drop-down menu or submenu has been destroyed. - - - - - The WM_MENUCOMMAND message is sent when the user makes a selection from a menu. - - - - - An application sends the WM_CHANGEUISTATE message to indicate that the user interface (UI) state should be changed. - - - - - An application sends the WM_UPDATEUISTATE message to change the user interface (UI) state for the specified window and all its child windows. - - - - - An application sends the WM_QUERYUISTATE message to retrieve the user interface (UI) state for a window. - - - - - The WM_CTLCOLORMSGBOX message is sent to the owner window of a message box before Windows draws the message box. By responding to this message, the owner window can set the text and background colors of the message box by using the given display device context handle. - - - - - An edit control that is not read-only or disabled sends the WM_CTLCOLOREDIT message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the edit control. - - - - - Sent to the parent window of a list box before the system draws the list box. By responding to this message, the parent window can set the text and background colors of the list box by using the specified display device context handle. - - - - - The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button. The parent window can change the button's text and background colors. However, only owner-drawn buttons respond to the parent window processing this message. - - - - - The WM_CTLCOLORDLG message is sent to a dialog box before the system draws the dialog box. By responding to this message, the dialog box can set its text and background colors using the specified display device context handle. - - - - - The WM_CTLCOLORSCROLLBAR message is sent to the parent window of a scroll bar control when the control is about to be drawn. By responding to this message, the parent window can use the display context handle to set the background color of the scroll bar control. - - - - - A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control. - - - - - Use WM_MOUSEFIRST to specify the first mouse message. Use the PeekMessage() Function. - - - - - The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_LBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_LBUTTONUP message is posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_RBUTTONDOWN message is posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_RBUTTONUP message is posted when the user releases the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_RBUTTONDBLCLK message is posted when the user double-clicks the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_MBUTTONDOWN message is posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_MBUTTONUP message is posted when the user releases the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_MBUTTONDBLCLK message is posted when the user double-clicks the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_MOUSEWHEEL message is sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it. - - - - - The WM_XBUTTONDOWN message is posted when the user presses the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_XBUTTONUP message is posted when the user releases the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_XBUTTONDBLCLK message is posted when the user double-clicks the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - - - - - The WM_MOUSEHWHEEL message is sent to the focus window when the mouse's horizontal scroll wheel is tilted or rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it. - - - - - Use WM_MOUSELAST to specify the last mouse message. Used with PeekMessage() Function. - - - - - The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place. - - - - - The WM_ENTERMENULOOP message informs an application's main window procedure that a menu modal loop has been entered. - - - - - The WM_EXITMENULOOP message informs an application's main window procedure that a menu modal loop has been exited. - - - - - The WM_NEXTMENU message is sent to an application when the right or left arrow key is used to switch between the menu bar and the system menu. - - - - - The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position. - - - - - The WM_CAPTURECHANGED message is sent to the window that is losing the mouse capture. - - - - - The WM_MOVING message is sent to a window that the user is moving. By processing this message, an application can monitor the position of the drag rectangle and, if needed, change its position. - - - - - Notifies applications that a power-management event has occurred. - - - - - Notifies an application of a change to the hardware configuration of a device or the computer. - - - - - An application sends the WM_MDICREATE message to a multiple-document interface (MDI) client window to create an MDI child window. - - - - - An application sends the WM_MDIDESTROY message to a multiple-document interface (MDI) client window to close an MDI child window. - - - - - An application sends the WM_MDIACTIVATE message to a multiple-document interface (MDI) client window to instruct the client window to activate a different MDI child window. - - - - - An application sends the WM_MDIRESTORE message to a multiple-document interface (MDI) client window to restore an MDI child window from maximized or minimized size. - - - - - An application sends the WM_MDINEXT message to a multiple-document interface (MDI) client window to activate the next or previous child window. - - - - - An application sends the WM_MDIMAXIMIZE message to a multiple-document interface (MDI) client window to maximize an MDI child window. The system resizes the child window to make its client area fill the client window. The system places the child window's window menu icon in the rightmost position of the frame window's menu bar, and places the child window's restore icon in the leftmost position. The system also appends the title bar text of the child window to that of the frame window. - - - - - An application sends the WM_MDITILE message to a multiple-document interface (MDI) client window to arrange all of its MDI child windows in a tile format. - - - - - An application sends the WM_MDICASCADE message to a multiple-document interface (MDI) client window to arrange all its child windows in a cascade format. - - - - - An application sends the WM_MDIICONARRANGE message to a multiple-document interface (MDI) client window to arrange all minimized MDI child windows. It does not affect child windows that are not minimized. - - - - - An application sends the WM_MDIGETACTIVE message to a multiple-document interface (MDI) client window to retrieve the handle to the active MDI child window. - - - - - An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the entire menu of an MDI frame window, to replace the window menu of the frame window, or both. - - - - - The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns. - The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled. - - - - - The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns. - - - - - Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files. - - - - - An application sends the WM_MDIREFRESHMENU message to a multiple-document interface (MDI) client window to refresh the window menu of the MDI frame window. - - - - - Sent to an application when a window is activated. A window receives this message through its WindowProc function. - - - - - Sent to an application to notify it of changes to the IME window. A window receives this message through its WindowProc function. - - - - - Sent by an application to direct the IME window to carry out the requested command. The application uses this message to control the IME window that it has created. To send this message, the application calls the SendMessage function with the following parameters. - - - - - Sent to an application when the IME window finds no space to extend the area for the composition window. A window receives this message through its WindowProc function. - - - - - Sent to an application when the operating system is about to change the current IME. A window receives this message through its WindowProc function. - - - - - Sent to an application when the IME gets a character of the conversion result. A window receives this message through its WindowProc function. - - - - - Sent to an application to provide commands and request information. A window receives this message through its WindowProc function. - - - - - Sent to an application by the IME to notify the application of a key press and to keep message order. A window receives this message through its WindowProc function. - - - - - Sent to an application by the IME to notify the application of a key release and to keep message order. A window receives this message through its WindowProc function. - - - - - The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call to TrackMouseEvent. - - - - - The WM_MOUSELEAVE message is posted to a window when the cursor leaves the client area of the window specified in a prior call to TrackMouseEvent. - - - - - The WM_NCMOUSEHOVER message is posted to a window when the cursor hovers over the nonclient area of the window for the period of time specified in a prior call to TrackMouseEvent. - - - - - The WM_NCMOUSELEAVE message is posted to a window when the cursor leaves the nonclient area of the window specified in a prior call to TrackMouseEvent. - - - - - The WM_WTSSESSION_CHANGE message notifies applications of changes in session state. - - - - - An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format. - - - - - An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format. - - - - - An application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format. - - - - - An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if any, from the edit control. - - - - - An application sends a WM_UNDO message to an edit control to undo the last operation. When this message is sent to an edit control, the previously deleted text is restored or the previously added text is deleted. - - - - - The WM_RENDERFORMAT message is sent to the clipboard owner if it has delayed rendering a specific clipboard format and if an application has requested data in that format. The clipboard owner must render data in the specified format and place it on the clipboard by calling the SetClipboardData function. - - - - - The WM_RENDERALLFORMATS message is sent to the clipboard owner before it is destroyed, if the clipboard owner has delayed rendering one or more clipboard formats. For the content of the clipboard to remain available to other applications, the clipboard owner must render data in all the formats it is capable of generating, and place the data on the clipboard by calling the SetClipboardData function. - - - - - The WM_DESTROYCLIPBOARD message is sent to the clipboard owner when a call to the EmptyClipboard function empties the clipboard. - - - - - The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard. - - - - - The WM_PAINTCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting. - - - - - The WM_VSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's vertical scroll bar. The owner should scroll the clipboard image and update the scroll bar values. - - - - - The WM_SIZECLIPBOARD message is sent to the clipboard owner by a clipboard viewer window when the clipboard contains data in the CF_OWNERDISPLAY format and the clipboard viewer's client area has changed size. - - - - - The WM_ASKCBFORMATNAME message is sent to the clipboard owner by a clipboard viewer window to request the name of a CF_OWNERDISPLAY clipboard format. - - - - - The WM_CHANGECBCHAIN message is sent to the first window in the clipboard viewer chain when a window is being removed from the chain. - - - - - The WM_HSCROLLCLIPBOARD message is sent to the clipboard owner by a clipboard viewer window. This occurs when the clipboard contains data in the CF_OWNERDISPLAY format and an event occurs in the clipboard viewer's horizontal scroll bar. The owner should scroll the clipboard image and update the scroll bar values. - - - - - This message informs a window that it is about to receive the keyboard focus, giving the window the opportunity to realize its logical palette when it receives the focus. - - - - - The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette. - - - - - This message is sent by the OS to all top-level and overlapped windows after the window with the keyboard focus realizes its logical palette. - This message enables windows that do not have the keyboard focus to realize their logical palettes and update their client areas. - - - - - The WM_HOTKEY message is posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of the message queue associated with the thread that registered the hot key. - - - - - The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context. - - - - - The WM_PRINTCLIENT message is sent to a window to request that it draw its client area in the specified device context, most commonly in a printer device context. - - - - - The WM_APPCOMMAND message notifies a window that the user generated an application command event, for example, by clicking an application command button using the mouse or typing an application command key on the keyboard. - - - - - The WM_THEMECHANGED message is broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another. - - - - - Sent when the contents of the clipboard have changed. - - - - - The system will send a window the WM_DWMCOMPOSITIONCHANGED message to indicate that the availability of desktop composition has changed. - - - - - WM_DWMNCRENDERINGCHANGED is called when the non-client area rendering status of a window has changed. Only windows that have set the flag DWM_BLURBEHIND.fTransitionOnMaximized to true will get this message. - - - - - Sent to all top-level windows when the colorization color has changed. - - - - - WM_DWMWINDOWMAXIMIZEDCHANGE will let you know when a DWM composed window is maximized. You also have to register for this message as well. You'd have other windowd go opaque when this message is sent. - - - - - Sent to request extended title bar information. A window receives this message through its WindowProc function. - - - - - The WM_APP constant is used by applications to help define private messages, usually of the form WM_APP+X, where X is an integer value. - - - - - The WM_USER constant is used by applications to help define private messages for use by private window classes, usually of the form WM_USER+X, where X is an integer value. - - - - - An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application be started. - - - - - The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has closed. The WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH message that started the application. - - - - - WM_SYSTIMER is a well-known yet still undocumented message. Windows uses WM_SYSTIMER for internal actions like scrolling. - - - - The window has a thin-line border. - - - The window has a title bar (includes the WS_BORDER style). - - - The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style. - - - Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window. - - - - Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. - If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window. - - - - The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use the EnableWindow function. - - - The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar. - - - - The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. - The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys. - You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function. - - - - The window has a horizontal scroll bar. - - - The window is initially maximized. - - - The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. - - - The window is initially minimized. - - - The window has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. - - - The window is an overlapped window. An overlapped window has a title bar and a border. - - - The window is an overlapped window. - - - The window is a pop-up window. This style cannot be used with the WS_CHILD style. - - - The window is a pop-up window. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible. - - - The window has a sizing border. - - - The window has a window menu on its title bar. The WS_CAPTION style must also be specified. - - - - The window is a control that can receive the keyboard focus when the user presses the TAB key. - Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style. - You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use the SetWindowLong function. - For user-created windows and modeless dialogs to work with tab stops, alter the message loop to call the IsDialogMessage function. - - - - The window is initially visible. This style can be turned on and off by using the ShowWindow or SetWindowPos function. - - - The window has a vertical scroll bar. - - - - Specifies that a window created with this style accepts drag-drop files. - - - - - Forces a top-level window onto the taskbar when the window is visible. - - - - - Specifies that a window has a border with a sunken edge. - - - - - Windows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering. For more information, see Remarks. This cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. - - - - - Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window. - WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. - - - - - The window itself contains child windows that should take part in dialog box navigation. If this style is specified, the dialog manager recurses into children of this window when performing navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic. - - - - - Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter. - - - - - Windows 2000/XP: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC. - - - - - Arabic and Hebrew versions of Windows 98/Me, Windows 2000/XP: Creates a window whose horizontal origin is on the right edge. Increasing horizontal values advance to the left. - - - - - Creates a window that has generic left-aligned properties. This is the default. - - - - - If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored. - - - - - The window text is displayed using left-to-right reading-order properties. This is the default. - - - - - Creates a multiple-document interface (MDI) child window. - - - - - Windows 2000/XP: A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window. - To activate the window, use the SetActiveWindow or SetForegroundWindow function. - The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style. - - - - - Windows 2000/XP: A window created with this style does not pass its window layout to its child windows. - - - - - Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed. - - - - - Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles. - - - - - Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles. - - - - - The window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading-order alignment; otherwise, the style is ignored. - Using the WS_EX_RIGHT style for static or edit controls has the same effect as using the SS_RIGHT or ES_RIGHT style, respectively. Using this style with button controls has the same effect as using BS_RIGHT and BS_RIGHTBUTTON styles. - - - - - Vertical scroll bar (if present) is to the right of the client area. This is the default. - - - - - If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored. - - - - - Creates a window with a three-dimensional border style intended to be used for items that do not accept user input. - - - - - Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE. - - - - - Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function. - - - - - Specifies that a window created with this style should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted. - To achieve transparency without these restrictions, use the SetWindowRgn function. - - - - - Specifies that a window has a border with a raised edge. - - -
-
diff --git a/assemblies/MetroRadiance.dll b/assemblies/MetroRadiance.dll deleted file mode 100644 index 738010c8b..000000000 Binary files a/assemblies/MetroRadiance.dll and /dev/null differ diff --git a/assemblies/MetroRadiance.xml b/assemblies/MetroRadiance.xml deleted file mode 100644 index 0ed714521..000000000 --- a/assemblies/MetroRadiance.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - MetroRadiance - - - - - ウィンドウのキャプション部分で使用するために最適化された コントロールを表します。 - - - - - ボタンに割り当てるウィンドウ操作を取得または設定します。 - - - - - Metro スタイル風のウィンドウを表します。 - - - - - WPF が認識しているシステムの DPI (プライマリ モニターの DPI)。 - - - - - このウィンドウが表示されているモニターの現在の DPI。 - - - - - DPI スケーリングを実現する を取得または設定します。 - - - - - ウインドウの非クライアント領域のカスタマイズ方法を指定した を取得または設定します。 - - - - - ウィンドウの枠を光らせるための を取得または設定します。 - - - - - ウィンドウの位置とサイズを復元できるようにするかどうかを示す値を取得または設定します。 - - - - - ウィンドウの位置とサイズを保存または復元する方法を指定するオブジェクトを取得または設定します。 - - - - - 未入力時にプロンプトを表示できる を表します。 - - - - - 未入力時にプロンプトを表示できる を表します。 - - - - - ウィンドウをリサイズするためのグリップ コントロールを表します。 - - - - - ウィンドウ操作を示す識別子を定義します。 - - - - - ウィンドウ操作は実行されません。 - - - - - ウィンドウをアクティブ化します。 - - - - - ウィンドウを閉じます。 - - - - - ウィンドウを通常状態にします。 - - - - - ウィンドウを最大化します。 - - - - - ウィンドウを最小化します。 - - - - - ウィンドウのシステム メニューを開きます。 - - - - - 値が - のときに - へ、 のときに - へ変換するコンバーターを定義します。 - - - - - 値から 値へ変換します。 - - 変換元の 値。 - この引数は使用されません。 - パラメーター。文字列 "Reverse" を指定すると、変換結果が逆になります。それ以外の値を指定しても使用されません。 - この引数は使用されません。 - 値から 値への変換結果。 - - - - この実装は常に をスローします。 - - この引数は使用されません。 - この引数は使用されません。 - この引数は使用されません。 - この引数は使用されません。 - 値は返されません。 - - - - ウィンドウ操作を実行します。 - - 実行するウィンドウ操作。 - 操作を実行しようとしている UI 要素。この要素をホストするウィンドウに対し、 操作が実行されます。 - - - - 現在の文字列と、指定した文字列を比較します。大文字と小文字は区別されません。 - - - - - ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 - - - - - このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 - - - - - 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 - 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 - - - - - GeneratedInternalTypeHelper - - - - - CreateInstance - - - - - GetPropertyValue - - - - - SetPropertyValue - - - - - CreateDelegate - - - - - AddEventHandler - - - - diff --git a/assemblies/Microsoft.Expression.Drawing.dll b/assemblies/Microsoft.Expression.Drawing.dll new file mode 100644 index 000000000..acddc5c96 Binary files /dev/null and b/assemblies/Microsoft.Expression.Drawing.dll differ diff --git a/assemblies/Microsoft.Expression.Drawing.xml b/assemblies/Microsoft.Expression.Drawing.xml new file mode 100644 index 000000000..28ab94638 --- /dev/null +++ b/assemblies/Microsoft.Expression.Drawing.xml @@ -0,0 +1,1808 @@ + + + + Microsoft.Expression.Drawing + + + + + Renders a callout shape supporting several shapes combined with a callout arrow. + + + + + Provides a base class of a composite shape that derives from and implements . + + + implements interface, + and supports rendering a geometry similar to , but the geometry can be rendered outside the layout boundary. + + A typical implementation has a customized default template in generic.xaml which template-binds most shape properties to a . + It should also extend the property to customize the appearance of the . + + This class also supports showing content together with the shape. + + + + + Provides an interface to describe the parameters of a Shape. + + + This interface is the data for communication between Shape and GeometrySource. + Typically, a concrete implementation of IShape will implement this interface and pass it into + GeometrySource.UpdateGeometry(), which will then consume the shape as a read-only data provider. + + + + + Provides the necessary interface to define a Shape. + Both primitive and composite shapes need to match this interface, although they might derive from different types of FrameworkElement. + + + + + Invalidates the geometry for a . After the invalidation, the will recompute the geometry, which will occur asynchronously. + + + + Gets or sets the that specifies how to paint the interior of the shape. + A that describes how the shape's interior is painted. The default is null. + + + Gets or sets the that specifies how the outline is painted. + A that specifies how the outline is painted. + + + Gets or sets the width of the stroke outline. + The width of the outline, in pixels. + + + Gets or sets a enumeration value that describes how the shape fills its allocated space. + One of the enumeration values. The default value at runtime depends on the type of . + + + + Gets the rendered geometry presented by the rendering engine. + + + + + Gets the margin between logical bounds and actual geometry bounds. + This can be either positive (as in ) or negative (as in ). + + + + + Occurs when RenderedGeometry is changed. + + + + + Extends how the shape is drawn with creating geometry source. + + + + + Invalidates the geometry for a . After the invalidation, the will recompute the geometry, which will occur asynchronously. + + + + Provides the behavior for the Arrange portion of a Silverlight layout pass. Classes can override this method to define their own Arrange pass behavior. + The actual size used once the element is arranged in layout. + The final area within the parent that this object should use to arrange itself and its children. + will recompute the Geometry when it's invalidated and update the RenderedGeometry and GeometryMargin. + + + + Transforms a string content into with center alignment and multiple line support. + + + Use template-binding to instead of to enable this method. + + + + + Gets or sets the that specifies how to paint the interior of the shape. + + A that describes how the shape's interior is painted. + + + Gets or sets the that specifies how the outline is painted. + A that specifies how the outline is painted. + + + Gets or sets the width of the stroke outline. + The width of the outline, in pixels. + + + Gets or sets a enumeration value that describes how the shape fills its allocated space. + One of the enumeration values. + + + Gets or sets a enumeration value that describes the at the start of a . + A value of the enumeration that specifies the shape at the start of a . + + + Gets or sets a enumeration value that describes the at the end of a line. + One of the enumeration values for . + + + Gets or sets a enumeration value that specifies the type of join that is used at the vertices of a . + A value of the enumeration that specifies the join appearance. + + + Gets or sets a limit on the ratio of the miter length to half the of a element. + The limit on the ratio of the miter length to the of a element. This value is always a positive number that is greater than or equal to 1. + + + Gets or sets a collection of values that indicate the pattern of dashes and gaps that is used to outline shapes. + A collection of values that specify the pattern of dashes and gaps. + + + Gets or sets a enumeration value that specifies how the ends of a dash are drawn. + One of the enumeration values for . The default is . + + + Gets or sets a that specifies the distance within the dash pattern where a dash begins. + A that represents the distance within the dash pattern where a dash begins. The default value is 0. + + + + Gets the rendered geometry presented by the rendering engine. + + + + + Gets the margin between the logical bounds and the actual geometry bounds. + This can be either positive (as in ) or negative (as in ). + + + + + Gets or sets the internal content that converts a string into a center-aligned, multiple-line TextBlock. + + + + + Occurs when RenderedGeometry is changed. + + + + + Gets or sets the position of the callout relative to the top and left corner. + + + + + Gets or sets the callout style. + + + + + Provides a base class of a composite shape that derives from and implements . + + + implements interface, + and supports rendering a geometry similar to , but the geometry can be rendered outside the layout boundary. + + A typical implementation has a customized default template in generic.xaml which template-binds most shape properties to a . + It should also extend the property to customize the appearance of the . + + + + + Extends how the shape is drawn with creating geometry source. + + + + + Invalidates the geometry for a . After the invalidation, the will recompute the geometry, which will occur asynchronously. + + + + Provides the behavior for the Arrange portion of a Silverlight layout pass. Classes can override this method to define their own Arrange pass behavior. + The actual size used once the element is arranged in layout. + The final area within the parent that this object should use to arrange itself and its children. + will recompute the Geometry when it's invalidated and update the RenderedGeometry and GeometryMargin. + + + + Gets or sets the that specifies how to paint the interior of the shape. + + A that describes how the shape's interior is painted. + + + Gets or sets the that specifies how the outline is painted. + A that specifies how the outline is painted. + + + Gets or sets the width of the stroke outline. + The width of the outline, in pixels. + + + Gets or sets a enumeration value that describes how the shape fills its allocated space. + One of the enumeration values. + + + Gets or sets a enumeration value that describes the at the start of a . + A value of the enumeration that specifies the shape at the start of a . + + + Gets or sets a enumeration value that describes the at the end of a line. + One of the enumeration values for . + + + Gets or sets a enumeration value that specifies the type of join that is used at the vertices of a . + A value of the enumeration that specifies the join appearance. + + + Gets or sets a limit on the ratio of the miter length to half the of a element. + The limit on the ratio of the miter length to the of a element. This value is always a positive number that is greater than or equal to 1. + + + Gets or sets a collection of values that indicate the pattern of dashes and gaps that is used to outline shapes. + A collection of values that specify the pattern of dashes and gaps. + + + Gets or sets a enumeration value that specifies how the ends of a dash are drawn. + One of the enumeration values for . The default is . + + + Gets or sets a that specifies the distance within the dash pattern where a dash begins. + A that represents the distance within the dash pattern where a dash begins. The default value is 0. + + + + Gets the rendered geometry presented by the rendering engine. + + + + + Gets the margin between the logical bounds and the actual geometry bounds. + This can be either positive (as in ) or negative (as in ). + + + + + Occurs when RenderedGeometry is changed. + + + + + Renders a bent line segment with optional arrow heads on both ends. + + + + Provides the behavior for the Measure pass of Silverlight layout. Classes can override this method to define their own Measure pass behavior. + The size that this object determines it requires during layout, based on its calculations of child object allotted sizes, or possibly on other considerations such as fixed container size. + The available size that this object can give to child objects. Infinity () can be specified as a value to indicate that the object will size to whatever content is available. + + A default can render at anysize. + The will stretch to the layout boundary and render to the outside if necessary. + + + + + Gets or sets the amount of bend for the arrow. + + The bend amount between 0 and 1. + + + + Gets or sets how the arrow head is rendered at the start of the line. + + + + + Gets or sets how the arrow head is rendered at the end of the line. + + + + + Gets or sets from which corner to start drawing the arrow. + + + + + Gets or sets the length of the arrow in pixels. + + + + + Provides an items control that displays one selected item, and allows panning between items using touch gestures. + + + + + The constructor for PanningItems. + + + + + Called when the PanningItems template is applied. + + + + + Gets or sets the orientation of items in the control. + + + + + Gets or sets the flick tolerance. This can be a value between 0 and 1. + It represents the percentage of the size of the PanningItems needed to be covered by the flick gesture to trigger an items change. + + + + + Gets or sets the item before the selected item. + + + + + Gets or sets the item after the selected item. + + + + + Gets or sets whether the contents of the items control will loop, so that the first item will follow the last item. + + + + + Gets or sets the value of the slider controlling the panning motion. + + + + + Helper class to work with PathGeometry. + + + + + Converts a string in the path mini-language into a PathGeometry. + + A string in the path mini-language. + + + + Convert the given geometry into a single PathGeometry. Always returns a new copy of path geometry. + + + + + Converts the given geometry into a single PathGeometry. + When input is already a path geometry, it won't copy it. + Otherwise, it will create a new copy of PathGeometry. + + + + + Updates the given geometry as PathGeometry with a polyline matching a given point list. + + + + + Parses abbreviated geometry sytax. + + + + + Helper class to convert an ArcSegment to BezierSegment(s). + + + Helper class to work with PathSegment and all variations. + + + Strategy classes to handle different types of PathSegment. + + + + + Converts an arc segment into Bezier format. + Returns BezierSegment, PolyBezierSegment, LineSegment, or null. + When returning null, the arc degenerates into the start point. + + + + + Avoid calling the three-parameter constructor, since it always sets a local value for IsStroked. + + + + + + + Updates the SegmentCollection with a given polyline matching a given point list. + Tries to keep changes minimum and returns false if nothing has been changed. + + + + + Updates the collection[index] segment with a poly-Bezier segment matching a given point list. + A given point list must contain 3*N points for N Bezier segments. + + + + + Tests if a given path segment is empty. + + + + + Gets the point count in a given path segment. + + + + + Gets the last point of a given path segment. + + + + + Gets the point of a given index in a given segment. + If input is (-1), returns the last point. + + + + + Flattens a given segment and adds resulting points into a given point list. + + The segment to be flatten. + The resulting points list. + The start point of the segment. + The error tolerance. Must be positive. Can be zero. Fallback to default tolerance. + + + + ArcToBezier, computes the Bezier approximation of an arc. + + + This utility computes the Bezier approximation for an elliptical arc as + it is defined in the SVG arc spec. The ellipse from which the arc is + carved is axis-aligned in its own coordinates, and defined there by its + x and y radii. The rotation angle defines how the ellipse's axes are + rotated relative to the x axis. The start and end points define one of 4 + possible arcs; the sweep and large-arc flags determine which one of + these arcs will be chosen. + + Returning cPieces = 0 indicates a line instead of an arc + cPieces = -1 indicates that the arc degenerates to a point + + + + + Gets the number of Bezier arcs, and sine/cosine of each. + + + This is a private utility used by ArcToBezier. Breaks the arc into + pieces so that no piece will span more than 90 degrees. The input + points are on the unit circle. + + + + + GetBezierDistance returns the distance as a fraction of the radius. + + + Get the distance from a circular arc's end points to the control points + of the Bezier arc that approximates it, as a fraction of the arc's + radius. + + Since the result is relative to the arc's radius, it depends strictly on + the arc's angle. The arc is assumed to be of 90 degrees or less, so the + angle is determined by the cosine of that angle, which is derived from + rDot = the dot product of two radius vectors. We need the Bezier curve + that agrees with the arc's points and tangents at the ends and midpoint. + Here we compute the distance from the curve's endpoints to its control + points. + + Since we are looking for the relative distance, we can work on the unit + circle. Place the center of the circle at the origin, and put the X axis + as the bisector between the 2 vectors. Let a be the angle between the + vectors. Then the X coordinates of the 1st and last points are cos(a/2). + Let x be the X coordinate of the 2nd and 3rd points. At t=1/2 we have a + point at (1,0). But the terms of the polynomial there are all equal: + + (1-t)^3 = t*(1-t)^2 = t^2*(1-t) = t^3 = 1/8, + + so from the Bezier formula there we have: + + 1 = (1/8) * (cos(a/2) + 3x + 3x + cos(a/2)), + + hence + + x = (4 - cos(a/2)) / 3 + + The X difference between that and the 1st point is: + + DX = x - cos(a/2) = 4(1 - cos(a/2)) / 3. + + But DX = distance / sin(a/2), hence the distance is + + dist = (4/3)*(1 - cos(a/2)) / sin(a/2). + + Rather than the angle a, we are given rDot = R^2 * cos(a), so we + multiply top and bottom by R: + + dist = (4/3)*(R - Rcos(a/2)) / Rsin(a/2) + + and use some trig: + ________________ + cos(a/2) = \/(1 + cos(a)) / 2 + ______________________ + R*cos(a/2) = \/(R^2 + R^2 cos(a)) / 2 + ________________ + = \/(R^2 + rDot) / 2 + + Let A = (R^2 + rDot)/2. + ____________________ + R*sin(a/2) = \/R^2 - R^2 cos^2(a/2) + _______ + = \/R^2 - A + + so: + _ + 4 R - \/A + dist = - * ------------ + 3 _______ + \/R^2 - A + + History: + 5/29/2001 MichKa + Created it. + + + + + Returns false if the radius is too small compared to the chord length (returns true on NaNs) + radius is modified to the value that is accepted. + + + + + A utility class to flatten Bezier curves. + + + + + Flattens a Bezier cubic curve and adds the resulting polyline to the third parameter. + + The four Bezier cubic control points. + The maximum distance between two corresponding points on the true curve + and on the flattened polyline. Must be strictly positive. + Where to add the flattened polyline. + True to skip the first control point when adding the flattened polyline. + Where to add the value of the Bezier curve parameter associated with + each of the polyline vertices. + If is empty, the first control point + and its associated parameter are always added. + + + + Flattens a Bezier quadratic curve and adds the resulting polyline to the third parameter. + Uses degree elevation for Bezier curves to reuse the code for the cubic case. + + The three Bezier quadratic control points. + The maximum distance between two corresponding points on the true curve + and on the flattened polyline. Must be strictly positive. + Where to add the flattened polyline. + Whether to skip the first control point when adding the flattened polyline. + Where to add the value of the Bezier curve parameter associated with + each of the polyline vertices. + If is empty, the first control point and + its associated parameter are always added. + + + + Extension methods that support non-geometry types. + + + + + Allows the application of an action delegate (often a very simple lambda) against an entire sequence. + + + + + Allows the application of an action delegate (often a very simple lambda) against an entire sequence. + + + + + Allows the application of an action delegate (often a very simple lambda) against an entire sequence with the index of each item. + + + + + Ensures the count of a list to a given count. Creates with a given factory or removes items when necessary. + If Input IList is a List, AddRange or RemoveRange is used when there's no factory. + + + + + Ensures the count of a list is at least the given count. Creates with a given factory. + + + + + Add a range of items to the end of a collection. + If a collection is a list, List.AddRange is used. + + + + + Gets the last item of a given list. + + + + + Removes the last item from the given list. + + + + + Makes a copy of obj and all it's public properties, including all collection properties. + + + + + Sets the value if different. Avoids setting a local value if possible. + Returns true when the value has been changed. + + + + + Clears the dependency property when it is locally set on the given dependency object. + Returns false if the dependeny property is not locally set. + + + + + Finds all visual descendants of a given type and condition using breadth-first search. + + + + + Gets all visual children in IEnumerable. + + + + + Unifies the interface of PropertyMetadata in WPF and Silverlight. + Provides the necessary notification about render, arrange, or measure. + + + + + This private Ctor should only be used by AttachCallback. + + + + + Chain InternalCallback() to attach the instance of DrawingPropertyMetadata on property callback. + In Silverlight, the property metadata is thrown away after setting. Use callback to remember it. + + + + + Before chaining the original callback, trigger DrawingPropertyChangedEvent. + + + + + Extension methods for geometry-related data structures (Point/Vector/Size/Rect). + + + + + Resizes the rectangle to a relative size while keeping the center invariant. + + + + + Gets the difference vector between two points. + + + + + Memberwise plus for Point. + + + + + Memberwise minus for Point. + + + + + Converts a string of mini-languages to a . + + See: Path Markup Syntax(http://msdn.microsoft.com/en-us/library/cc189041(VS.95).aspx) + The string of path mini-languages for describing geometric paths. + A converted from the the path mini-languages. + + + + Flattens a and adds result points to a given . + + The input . + The point list to which result points will append. + A positive number specifying the maximum allowed error from the result points to the input path figure. A Value of zero allows the algorithm to pick the tolerance automatically. + + + + Gets the normalized arc in a (0,0)(1,1) box. + Zero degrees is mapped to [0.5, 0] (up), and clockwise. + + + + + Gets the absolute arc point in a given bound with a given relative radius. + + + + + Gets the angle on an arc relative to a (0,0)(1,1) box. + Zero degrees is mapped to [0.5, 0] (up), and clockwise. + + + + + Gets the angle on an arc from a given absolute point relative to a bound. + + + + + Computes the transform that moves "Rect from" to "Rect to". + + + + + Computes the transform from the coordinate space of one UIElement to another. + + The source element. + The destination element. + The transform between the UIElements, or null if it cannot be computed. + + + + Maps a relative point to an absolute point using the mapping from a given bound to a (0,0)(1,1) box. + + + + + Maps an absolute point to a relative point using the mapping from a (0,0)(1,1) box to a given bound. + + + + + Computes the bound after stretching within a given logical bound. + If stretch to uniform, use given aspectRatio. + If aspectRatio is empty, it's equivalent to Fill. + If stretch is None, it's equivalent to Fill or Uniform. + + + + + Returns the mid point of two points. + + The first point. + The second point. + The mid point between and . + + + + Returns the dot product of two vectors. + + The first vector. + The second vector. + The dot product of and . + + + + Returns the dot product of two points. + + + + + Returns the distance between two points. + + The first point. + The second point. + The distance between and . + + + + Returns the square of the distance between two points. + + The first point. + The second point. + The square of the distance between and . + + + + Determinant of the cross product. Equivalent to directional area. + + + + + Computes the normal direction vector of given line segments. + + + + + Computes the perpendicular vector, 90-degrees, counter-clockwise. + Vector to the right perpendicular results in a vector to up. + + + + + Returns whether the two geometries are identical. + + + + + Ensures the value is an instance of result type (T). If not, replace with a new instance of type (T). + + + + + Ensures the value[index] is an instance of result type (T). If not, replace with a new instance of type (T). + + + + + Ensures the list[index] is an instance of result type (T). If not, replace with a new instance of type (T). + + + + + Helper class that provides static properties and methods related to floating point arithmetic. + + + + + The minimum distance to consider that two values are same. + Note: internal floating point in MIL/SL is float, not double. + + + + + The value of the angle of a full circle. + + + + + The inner radius for a pentagram polygon shape, at precision of three digits in percentage. + (1 - Sin36 * Sin72 / Sin54) / (Cos36) ^ 2, which is 0.47210998990512996761913067272407 + + + + + Determines whether a System.Double value is small enough to be considered + equivalent to zero. + + + True if value is smaller than DoubleTolerance; + otherwise, False. + + + + Returns the value that's within the given range. + A given min/max that is null equals no limit. + + + + + Computes the Euclidean norm of the vector (x, y). + + The first component. + The second component. + The Euclidean norm of the vector (x, y). + + + + Computes a real number from the mantissa and exponent. + + + + The value of x * 2^exp if successful. + + + + Tests a double. + + The double to test. + True if x is not a NaN and is not equal to plus or minus infinity; + otherwise, False. + + + + Helper class to work with PathFigure. + + + + + Apply the given transform to the path figure and modify it inplace. + + + + + Flattens the given figure and adds result points to the given point list. + + The error tolerance. Must be positive. Can be zero. Fallback to default tolerance. + + + + Iterates all segments inside a given figure, and returns the correct start point for each segment. + + + + + Synchronizes the figure to the given list of points as a single polyline segment. + Tries to keep the change to a minimum and returns false if nothing has been changed. + + + + + Synchronizes the given figure to be a closed ellipse with two arc segments. + + + + + A Tuple data structure for PathSegment and the corresponding StartPoint. + + + + + Represents a polyline with a list of connecting points. + A closed polygon is represented by repeating the first point at the end. + The differences, normals, angles, and lengths are computed on demand. + + + + + Constructs a polyline with two or more points. + + + + + The forward difference vector of polyline. + Points[i] + Differences[i] = Points[i+1] + + + + Compute the normal vector of given location (lerp(index, index+1, fraction). + If the location is within range of cornerRadius, interpolate the normal direction. + + The range of normal smoothless. If zero, no smoothness and return the exact normal on index. + + + + The polyline is closed when the first and last points are repeated. + + + + + The count of points in this polyline. + + + + + The total arc length of this polyline. + + + + + The point array of this polyline. + + + + + The length between line segments, Points[i] to Points[i+1]. + + + + + The list of normal vectors for each segment. + Normals[i] is the normal of segment p[i] to p[i + 1]. + Normals[N-1] == Normals[N-2]. + + + + + The list of Cos(angle) between two line segments on point p[i]. + Note: The value is cos(angle) = Dot(u, v). Not in degrees. + + + + + The list of accumulated length from points[i] to points[0]. + + + + + The data structure to communicate with the PathMarch algorithm. + + + + + Gets the interpolated position of this MarchLocation on a given point list. + + + + + Get the interpolated normal direction of this MarchLocation on a given normal vector list. + + + + + Gets the arc length of this MarchLocation to the start of the entire polyline. + + + + + The reason why this location is sampled. + + + + + The index of the point on a polyline point list. + + + + + Ratio: [0, 1], which is always before / (before + after). + + + + + Arc length before a stop point. Non-negative and less than Length[index]. + + + + + Arc length after the stop point. Non-negative and less than Length[index]. + + + + + Remaining length within a step to hit next stop. Positive to go forward. Negative to go backward. + + + + + Helper class to work with list of points + + + + + March the given polyline with a given interval and output each stop through callback. + + The polyline points to march on. + The arc length to march before stopping at the first point. + The max angle between edges to be considered a corner vertex. + Callback when marching algorithm stop at a point. The callback returns the arc length for next stop. + If the asked length is negative, march backwards. If callback returns NaN, finish marching. + + + + Reorders the given list of polylines so that the polyline with a given arc length in the list is the first. + Polylines that preceded this line are concatenated to the end of the list, with the first polyline at the very end. + + A list of polylines. + The arc length in the entire list of polylines at which to find the start line. + The arc length into that line is returned in this variable. + The reordered and wrapped list. + + + + A random generator that supports uniform and Gaussian distributions. + + + + + Generates a pair of independent, standard, normally distributed random numbers, + zero expectation, unit variance, using polar form of the Box-Muller transformation. + + + + + Private constructor. Force to use factory methods. + + + + + Creates a line segment + + + + + Creates a cubic bezier segment from quatratic curve (3 control points) + + + + + Creates a cubic bezier segment with 4 control points. + + + + + Control points of path segment. Length is variant. + Line segment has 2 points, Cubic bezier has 4 points. + + + + + Compares two transforms for an exact match. Transforms with the same value but different structure (e.g. Translate(0,0) and Rotate(0) are not considered equivalent). + + The first transform. + The second transform. + + + + + Specifies the unit of thickness. + + + + + Unit in pixels. + + + + + Unit in percentage relative to the bounding box. + + + + + Provides the base class of a source of geometry. + Generates and caches the geometry based on the input parameters and the layout bounds. + + + A typical implementation will extend the UpdateCachedGeometry() to update this.cachedGeometry. + This base class will then handle the invalidation, pipeline to the geometry effects, and then cache relative to the layout bounds. + An implementation should try to reuse the cached geometry as much as possible to avoid reconstruction in the rendering thread. + An implementation can extend the ComputeLogicalBounds to handle Stretch differently. + + The type of geometry source parameter on which the base class is working on. + + + + Provides an interface to describe the source of a geometry. + + + This interface is designed to expose the geometry source in a non-generic way. + Typical implementation should subclass GeometrySource instead of implementing this interface directly. + + + + + Notifies that the geometry has been invalidated because of external changes. + + + Geometry is typically invalidated when parameters are changed. + If any geometry has been invalidated externally, the geometry will be recomputed even if the layout bounds change. + + + + + Update the geometry using the given parameters and the layout bounds. + Returns false if nothing has been updated. + + + + + Gets or sets the resulting geometry after the latest UpdateGeometry(). + + + + + Gets the bounding box where the geometry should stretch to. + The actual geometry might be smaller or larger than this. + should already take stroke thickness and stretch into consideration. + + + + + Gets the actual bounds of FrameworkElement. + includes logical bounds, stretch, and stroke thickness. + + + + + Specifics the geometry from the previous geometry effect process. + + + + + Notifies that the geometry has been invalidated because of external changes. + + + The geometry is typically invalidated when parameters are changed. + If any geometry has been invalidated externally, the geometry will be recomputed regardless if the layout bounds change. + + + + + Update the geometry based on the given parameters and layoutBounds. + Returns false if the geometry hasn't been changed. + + + + + Extends the way to provide geometry by implementing this function. + Returns true when any of the geometry is changed. + + + + + Extends the way to handle stretch mode. + The default is to always use Stretch.Fill and center stroke. + + + + + Apply the geometry effect when dirty or forced and update this.Geometry. + Otherwise, keep this.Geometry as this.cachedGeometry. + + + + + Gets or sets the resulting geometry after the latest UpdateGeometry(). + + + + + Gets the bounding box that the geometry should stretch to. + The actual geometry might be smaller or larger than this. + should already take stroke thickness and stretch into consideration. + + + + + + Gets the actual bounds of FrameworkElement. + includes logical bounds, stretch and stroke thickness. + + + + + + Arc recognizes Stretch.None as the same as Stretch.Fill, assuming aspect ratio = 1:1. + + + + + Normalize thickness, both relative to the bounding box and the absolute pixel. + Relative thickness = 0 -> full circle radius or clamped. + Relative thickness = 1 -> shrank to a dot, or degenerated. + + + + + The arc is degenerated to a line pointing to center / normal inward. + + + + + Compute a list of angle pairs, defining the ranges in which arc sample should locate. + The return value have 2, 4, or 6 double values, each pair defines a range and they are in the order + to span the angles from given start to end angles. The ranges will break at the self-intersect angle. + If input start/end are within the invalid range between self intersect angle, it will be moved to neighboring self intersect. + + + + + Move angle to 0-90 range. + + + + + Compute all pieces of inner curves with each pair of input angles, and connect them with poly Bezier segments. + The new segments are output to given figure.Segments list from the given index. The start point is output seperately. + + + + + Compute one piece of inner curve with given angle range, and output one piece of smooth curve in format of poly Beizer semgents. + + + + + Compute the parameter (angle) of the self-intersect point for given ellipse with given thickness. + The result is always in first quadrant, and might be 0 or 90 indicating no self-intersect. + Basic algorithm is to binary search for the angle that sample point is not in first quadrant. + + + + + Specifies the direction the arrow points. + + + + + The arrow points to the left. + + + + + The arrow points to the right. + + + + + The arrow points up. + + + + + The arrow points down. + + + + + B + /| + / C--D + A | + \ C--D + \| + B + Algorithm only uses Width/Height assuming top-left at 0,0. + + + + + Specifies the rendering style of a callout shape. + + + + + A rectangular callout. + + + + + A rectangular callout with rounded corners. + + + + + A oval-shaped callout. + + + + + A cloud-shaped callout. + + + + + Updates the edge line, and then connects to the anchor point if necessary. + + + + + Updates the polyline segment, and then connects start, anchor, and end points with the callout style. + + + + + Updates the line segment to a given point. + + + + + Computes the corner points in a clockwise direction, with eight points for the four corners. + + + + + The corner arc is always smaller than a 90-degree arc. + + + + + Provides the base class for GeometryEffect that transforms a geometry into another geometry. + + + This class provides the basic implementation of processing the rendered geometry of a IShape before it's passed to rendering. + A typical implementation will extend the virtual function to transform the input geometry. + is typically attached to as an attached property and activated when geometry is updated. + The of a will replace the rendered geometry in . + + + + + Gets the geometry effect as an attached property on a given dependency object. + + + + + Sets the geometry effect as an attached property on a given dependency object. + + + + + Makes a deep copy of the using its current values. + + + + + Makes a deep copy of the geometry effect. Implements CloneCurrentValue in Silverlight. + + A clone of the current instance of the geometry effect. + + + + Tests if the given geometry effect is equivalent to the current instance. + + A geometry effect to compare with. + Returns true when two effects render with the same appearance. + + + + Specifics the geometry from the previous geometry effect process. + + + + + Invalidates the geometry effect without actually computing the geometry. + Notifies all parent shapes or effects to invalidate accordingly. + + + + + Processes the geometry effect on a given input geometry. + Stores the result in GeometryEffect.OutputGeometry. + + Returns false if nothing has been changed. + + + + Extends the way of updating cachedGeometry based on a given input geometry. + + + + + Notified when detached from a parent chain. + + + + + Notified when attached to a parent chain. + + + + + Invalidates the geometry on a given dependency object when + the object is a valid parent type (IShape or GeometryEffect). + + + + + Implement the Freezable in WPF. + + + + + The default geometry effect that only passes through the input geometry. + + + + + Gets the output geometry of this geometry effect. + + + + + Parent can be either IShape or GeometryEffectGroup. + + + + + Provides the conversion between string and geometry effects. + + + This class enables the brief syntax in XAML like GeometryEffect="Sketch". + Creates a clone of the instance of the geometry effect so it can be used as a resource. + + + + + Builds a preset list of supported geometry effects. + + + + + A GeometryEffect that can be converted from a string type. + + + + + A GeometryEffect that can be converted to a string type. + + + + + Converts a string to a geometry effect. The fallback value is null. + + + + + Converts a geometry effect into a string. The fallback value is null. + + + + + Specifies the reason of being called. + + + + + Geometry has been invalidated because a property has been changed. + + + + + Geometry has been invalidated because a property is being animated. + + + + + Geometry has been invalidated because a child has been invalidated. + + + + + Geometry has been invalidated because a parent has been invalidated. + + + + + Geometry has been invalidated because a new template has been applied. + + + + + Provides helper extension methods to work with IGeometrySource and parameters. + + + + + Specifies the arrow head type. + + + + + No arrow head. + + + + + A triangle arrow head. + + + + + A stealth triangle arrow head. + + + + + An open triangle arrow head. + + + + + An oval arrow head. + + + + + Specifies the corner location. + + + + + On the top left of the bounding box. + + + + + On the top right of the bounding box. + + + + + On the bottom right of the bounding box. + + + + + On the bottom left of the bounding box. + + + + + Polygon recognizes Stretch.None as the same as Stretch.Fill. + + + + + A geometry effect that transforms any geometry into a Sketch style as in SketchFlow. + + + + + Makes a deep copy of the geometry effect. + + A clone of the current instance of the geometry effect. + + + + Tests if the given geometry effect is equivalent to the current instance. + + A geometry effect to compare with. + Returns true when two effects render with the same appearance. + + + + Updating cachedGeometry based on the given input geometry. + + An input geometry. + Returns true when anything on cachedGeometry has been updated. + + + + Use the same random seed on creation to keep visual flickering to a minimum. + + + + + Iterates all simple segments in given path figure including the closing chord. + + + + + Renders an arc shape supporting Arc, Ring, and Pie mode controlled by ArcThickness. + + + + + Platform-neutral implementation of Shape deriving from WPF:Shape or SL:Path. + + + Provides the WPF implementation of Shape that derives from the platform Shape. + + + + + Extends how the shape is drawn with creating geometry source. + + + + + Invalidates the geometry for a . After the invalidation, the will recompute the geometry, which will occur asynchronously. + + + + Provides the behavior for the Measure portion of Silverlight layout pass. Classes can override this method to define their own Measure pass behavior. + The size that this object determines it requires during layout, based on its calculations of child object allotted sizes, or possibly on other considerations such as fixed container size. + The available size that this object can provide to child objects. Infinity () can be specified as a value to indicate that the object will size to whatever content is available. + + In WPF, measure override works from Shape.DefiningGeometry which is not always as expected + see bug 99497 for details where WPF is not having correct measure by default. + + In Silverlight, measure override on Path does not work the same as primitive shape works. + + We should return the smallest size this shape can correctly render without clipping. + By default a shape can render as small as a dot, therefore returning the strokethickness. + + + + Provides the behavior for the Arrange portion of Silverlight layout pass. Classes can override this method to define their own Arrange pass behavior. + The actual size used once the element is arranged in layout. + The final area within the parent that this object should use to arrange itself and its children. + will recompute the Geometry when it's invalidated and update the RenderedGeometry and GeometryMargin. + + + + Occurs when RenderedGeometry is changed. + + + + + Gets the margin between logical bounds and actual geometry bounds. + This can be either positive (as in ) or negative (as in ). + + + + + Gets or sets the start angle. + + The start angle in degrees. Zero degrees is pointing up. + + + + Gets or sets the end angle. + + The end angle in degrees. Zero degrees is pointing up. + + + + Gets or sets the arc thickness. + + The arc thickness in pixels or percentage depending on "ArcThicknessUnit". + + + + Gets or sets the arc thickness unit. + + The arc thickness unit in pixels or percentage. + + + + Renders a block arrow shape that supports resizable arrow head and body. + + + + + Gets or sets the orientation. + + The orientation where the arrow is pointing to. + + + + Gets or sets the arrow head angle. + + The arrow head angle in degrees. + + + + Gets or sets the size of the arrow body. + + The size of the arrow body in pixels. + + + + Renders a regular polygon shape or corresponding star shape with variable number of points. + + + + + Gets or sets the number of points of the . + + + + + Gets or sets the the distance between the center and the innermost point. + + The distance between the center and the innermost point. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Type "{0}" is not supported.. + + + + diff --git a/resources/Version.xml b/resources/Version.xml index fc2cef8b4..d9843df4d 100644 --- a/resources/Version.xml +++ b/resources/Version.xml @@ -1,33 +1,33 @@ - - - - App - 2.6.0.461 - https://github.com/Zharay/KanColleViewer/releases/tag/v2.6.0r461 - - - Equipment - 1.0.2 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Equipment.xml - - - Operations - 1.0.3 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Operations.xml - - - Quests - 1.0.1 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Quests.xml - - - Ships - 1.0.4 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Ships.xml - - - ShipTypes - 1.0.3 - https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/ShipTypes.xml - - + + + + App + 3.5.0.2 + https://github.com/Yuubari/KanColleViewer/releases/tag/v3.5.0r2 + + + Equipment + 1.0.14 + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/Equipment.xml + + + Operations + 1.0.4 + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/Operations.xml + + + Quests + 1.0.23 + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/Quests.xml + + + Ships + 1.0.21 + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/Ships.xml + + + ShipTypes + 1.0.6 + https://raw.githubusercontent.com/KCV-Localisation/KanColleViewer-Translations/master/ShipTypes.xml + + diff --git a/resources/translations b/resources/translations new file mode 160000 index 000000000..165d32aed --- /dev/null +++ b/resources/translations @@ -0,0 +1 @@ +Subproject commit 165d32aedda93eee7afba7bc52f037c4c2943ec8 diff --git a/resources/translations/Equipment.xml b/resources/translations/Equipment.xml deleted file mode 100644 index 70cfa931b..000000000 --- a/resources/translations/Equipment.xml +++ /dev/null @@ -1,339 +0,0 @@ - - - - 12cm単装砲 - 12cm Single Cannon - - - 12.7cm連装砲 - 12.7cm Twin Cannon - - - 10cm連装高角砲 - 10cm Twin High-Angle Cannon - - - 14cm単装砲 - 14cm Single Cannon - - - 15.5cm三連装砲 - 15.5cm Triple Cannon - - - 20.3cm連装砲 - 20.3cm Twin Cannon - - - 35.6cm連装砲 - 35.6cm Twin Cannon - - - 41cm連装砲 - 41cm Twin Cannon - - - 46cm三連装砲 - 46cm Triple Cannon - - - 12.7cm連装高角砲 - 12.7cm Twin High-Angle Cannon - - - 15.2cm単装砲 - 15.2cm Single Cannon - - - 15.5cm三連装副砲 - 15.5cm Triple Cannon - - - 61cm三連装魚雷 - 61cm Triple Torpedo - - - 61cm四連装魚雷 - 61cm Quad Torpedo - - - 61cm四連装(酸素)魚雷 - 61cm Quad (Oxygen) Torpedo - - - 九七式艦攻 - Type 97 Torpedo Bomber - - - 天山 - Tenzan - - - 流星 - Ryuusei - - - 九六式艦戦 - Type 96 Fighter - - - 零式艦戦21型 - Type 21 Zero Fighter - - - 零式艦戦52型 - Type 52 Zero Fighter - - - 烈風 - Reppu - - - 九九式艦爆 - Type 99 Bomber - - - 彗星 - Suisei - - - 零式水上偵察機 - Type 0 Recon Seaplane - - - 瑞雲 - Zuiun - - - 13号対空電探 - Type 13 Air RADAR - - - 22号対水上電探 - Type 22 Surface RADAR - - - 33号対水上電探 - Type 33 Surface RADAR - - - 21号対空電探 - Type 21 Air RADAR - - - 32号対水上電探 - Type 32 Surface RADAR - - - 14号対空電探 - Type 14 Air RADAR - - - 改良型艦本式タービン - Improved Steam Turbine - - - 強化型艦本式缶 - Enhanced Steam Turbine - - - 三式弾 - Type 3 Shell - - - 九一式徹甲弾 - Type 91 AP Shell - - - 7.7mm機銃 - 7.7mm Gun - - - 12.7mm単装機銃 - 12.7mm Gun - - - 25mm連装機銃 - 25mm Dual Gun - - - 25mm三連装機銃 - 25mm Triple Gun - - - 甲標的 - Type A Ko-hyoteki - - - 応急修理要員 - Repair Team - - - 応急修理女神 - Repair Goddess - - - 九四式爆雷投射機 - Type 94 Depth Charge - - - 三式爆雷投射機 - Type 3 Depth Charge - - - 九三式水中聴音機 - Type 93 SONAR - - - 三式水中探信儀 - Type 3 SONAR - - - 12.7cm単装高角砲 - 12.7 cm Single High-Angle Cannon - - - 25mm単装機銃 - 25mm Single Gun - - - 20.3cm(3号)連装砲 - 20.3cm(no.3) Dual Cannon - - - 12cm30連装噴進砲 - 12cm 30-tube Rocket Launcher - - - 流星改 - Ryuusei Kai - - - 烈風改 - Reppu Kai - - - 彩雲 - Saiun - - - 紫電改二 - Shiden Kai 2 - - - 震電改 - Shinden Kai - - - 彗星一二型甲 - Suisei Model 12A - - - 61cm五連装(酸素)魚雷 - 61cm Quintuple (Oxygen) Torpedo - - - 零式水上観測機 - Zero Observation Seaplane - - - 零式艦戦62型(爆戦) - Type 62 Zero Fighter-Bomber - - - 二式艦上偵察機 - Type 2 Recon Plane - - - 試製晴嵐 - Prototype Seiran - - - 12.7cm連装砲B型改二 - 12.7cm Twin Cannon Type B Kai2 - - - Ju87C改 - Ju 87C Kai - - - 15.2cm連装砲 - 15.2cm Twin Cannon - - - 8cm高角砲 - 8cm High-Angle Cannon - - - 53cm艦首(酸素)魚雷 - 53cm Hull-mount (Oxygen) Torpedo - - - 大発動艇 - Daihatsu-Class Landing Craft - - - カ号観測機 - Type Ka Liaison Aircraft - - - 三式指揮連絡機(対潜) - Type 3 Liaison Aircraft - - - 10cm連装高角砲(砲架) - 10cm High-angle Cannon (Improved) - - - 増設バルジ(中型艦) - Anti-Torpedo Bulge (M) - - - 増設バルジ(大型艦) - Anti-Torpedo Bulge (L) - - - 探照灯 - Searchlight - - - ドラム缶(輸送用) - Drum (Transport) - - - 瑞雲(六三四空) - Zuiun (634 Air Group) - - - 瑞雲12型 - Zuiun Model 12 - - - 九七艦攻(九三一空) - Type 97 Torpedo Bomber (931 Air Group) - - - 天山(九三一空) - Tenzan (931 Air Group) - - - 12.7cm単装砲 - 12.7cm Naval Gun - - - 15cm連装副砲 - 15cm Twin Gun Mount - - - 38cm連装砲 - 38cm Twin Gun Mount - - - 艦艇修理施設 - Ship Repair Facility - - - 新型高温高圧缶 - New High Pressure-Temperature Steam Boiler - - diff --git a/resources/translations/Operations.xml b/resources/translations/Operations.xml deleted file mode 100644 index 0a550aeea..000000000 --- a/resources/translations/Operations.xml +++ /dev/null @@ -1,431 +0,0 @@ - - - - 鎮守府正面海域 - World 1-1 - - - 南西諸島沖 - World 1-2 - - - 製油所地帯沿岸 - World 1-3 - - - 南西諸島防衛線 - World 1-4 - - - カムラン半島 - World 2-1 - - - バシー島沖 - World 2-2 - - - 東部オリョール海 - World 2-3 - - - 沖ノ島海域 - World 2-4 - - - モーレイ海哨戒 - World 3-1 - - - キス島沖 - World 3-2 - - - アルフォンシーノ方面 - World 3-3 - - - 北方海域全域 - World 3-4 - - - ジャム島攻略作戦 - World 4-1 - - - カレー洋制圧戦 - World 4-2 - - - リランカ島空襲 - World 4-3 - - - カスガダマ沖海戦 - World 4-4 - - - 南方海域前面 - World 5-1 - - - 珊瑚諸島沖 - World 5-2 - - - サブ島沖海域 - World 5-3 - - - サーモン海域 - World 5-4 - - - 鎮守府近海 - World 1-5 - - - 南西海域サメワニ沖 - E-1 - - - 南西海域ズンダ海峡 - E-2 - - - ポートワイン沖海域 - E-3 - - - 中部太平洋海域 - E-4 - - - 北太平洋海域 - E-5 - - - 渦潮 - Whirlpool - - - うずしお - Whirlpool - - - うずしお(弾薬) - Whirlpool (Ammo) - - - 鋼材 - Steel Node - - - 燃料 - Fuel Node - - - 弾薬 - Ammo Node - - - ボーキサイト - Bauxite Node - - - 敵偵察艦 - Reconnaissance Ship - - - 敵はぐれ艦隊 - Stray Fleet - - - 敵主力艦隊 - Main Fleet (Boss) - - - 敵前衛艦隊 - Vanguard Fleet - - - 敵主力部隊 - Main Force (Boss) - - - 敵支援艦隊 - Support Fleet - - - 敵偵察艦隊 - Reconnaissance Fleet - - - 敵機動部隊 - Task Force (Boss) - - - 敵護衛空母群 - Escort Carrier Group - - - 敵水雷戦隊 - Torpedo Squadron - - - 敵運送船団 - Transport Fleet - - - 敵通商破壊艦隊 - Trade Destruction Fleet (Boss) - - - 敵巡洋艦隊 - Cruiser Corps - - - 敵強襲揚陸艦隊 - Amphibious Assault Fleet - - - 敵主力打撃群 - Main Strike Group (Boss) - - - 敵水上打撃艦隊 - Aquatic Strike Fleet - - - 敵空母機動部隊 - Aircraft Carrier Task Force - - - 敵精鋭水雷戦隊 - Elite Torpedo Squadron - - - 敵侵攻中核艦隊 - Core Invasion Fleet (Boss) - - - 敵哨戒艦隊 - Patrol Fleet - - - 敵北方侵攻艦隊 - Northern Invasion Fleet (Boss) - - - 敵キス島包囲艦隊 - Kis Island Siege Fleet (Boss) - - - 深海棲艦泊地艦隊 - Alfonsiones Deep-Sea Fleet (Boss) - - - 深海棲艦泊地防衛艦隊 - Deep-Sea Fleet - - - 深海棲艦北方艦隊中枢 - Central Deep-Sea Northern Fleet (Boss) - - - 深海棲艦水上打撃艦隊 - Deep-Sea Aquatic Strike Fleet - - - 東方潜水艦隊 - Eastern Diving Fleet - - - 東方艦隊 - Eastern Fleet - - - 東方派遣艦隊 - Eastern Dispatch Fleet (Boss) - - - 敵潜水教導艦隊 - Kyoudou Submarine Fleet - - - 東方主力艦隊 - Eastern Main Fleet (Boss) - - - 敵補給船団 - Supply Convoy - - - 敵潜水艦隊 - Submarine Fleet - - - 敵東方艦隊残存部隊 - Remaining Eastern Fleet - - - 敵潜水艦哨戒線 - Submarine Patrol Fleet - - - 敵東方中枢艦隊 - East Central Fleet (Boss) - - - 敵前線哨戒艦隊 - Front Line Patrol Fleet - - - 敵水上打撃部隊 - Aquatic Strike Force - - - 敵前線司令艦隊 - Front Line Commander Fleet (Boss) - - - 敵任務部隊 - Task Force - - - 敵機動部隊本隊 - Main Task Force (Boss) - - - 敵補給部隊 - Supply Convoy - - - 敵潜水警戒艦隊 - Warning Submarine Fleet - - - 敵前衛警戒艦隊 - Warning Vanguard Fleet - - - 敵泊地護衛主力艦隊 - Main Fleet Anchorage Escort - - - 敵泊投錨中輸送船団 - Anchored Night Convoy - - - 敵サーモン方面主力艦隊 - Main Fleet Headquarters (Boss) - - - 敵偵察潜水艦 - Reconnaissance Submarine - - - 敵潜水艦隊A群 - Submarine Fleet Group A - - - 敵潜水艦隊B群 - Submarine Fleet Group B - - - 敵潜水艦隊C群 - Submarine Fleet Group C - - - 敵侵攻打撃艦隊A群 - Invasion Strike Fleet Group A - - - 敵侵攻打撃艦隊B群 - Invasion Strike Fleet Group B - - - 敵通商破壊主力艦隊 - Main Trade Attack Fleet (Boss) - - - 敵ピケット艦隊 - Picket Fleet - - - 敵遊撃部隊 - Guerilla Force - - - 敵遊撃部隊 - Guerilla Force - - - 敵任務艦隊 - Mission Fleet - - - 敵機動部隊主力 - Main Task Force - - - 敵新鋭戦艦部隊 - State-of-the-art Battleship Troops - - - 敵機動部隊支隊A群 - Detached Task Force Group A - - - 敵補給部隊本体 - Main Supply Convoy (Boss) - - - 敵前衛警戒部隊 - Detached Security Vanguard - - - 敵任務部隊前衛 - Vanguard Task Force - - - 敵対潜警戒部隊 - Security Detachment - - - 敵任務部隊本隊 - Main Task Force(Boss) - - - 敵緊急派遣艦隊 - Emergency Dispatch Fleet - - - ABDA主力艦隊 - ABDA Main Fleet (Boss) - - - 敵増援任務部隊B群 - Reinforcment Task Force Group B - - - ABDA残存艦隊 - ABDA Remaining Fleet - - - 深海棲艦ポートワイン泊地 - Port Wine Area Deep Sea Fleet (Boss) - - - 敵増援任務部隊 - Renforcement Task Force - - - 敵潜水主力艦隊 - Main Submarine Force - - - 敵潜水主力艦隊 - Main Submarine Force (Boss) - - \ No newline at end of file diff --git a/resources/translations/Quests.xml b/resources/translations/Quests.xml deleted file mode 100644 index 54d1e2bf3..000000000 --- a/resources/translations/Quests.xml +++ /dev/null @@ -1,815 +0,0 @@ - - - - A1 - はじめての「編成」! - First Formation! - 2隻以上の艦で編成される「艦隊」を編成せよ! - Have 2 ships in your main fleet. - - - A2 - 「駆逐隊」を編成せよ! - Form a Destroyer Squadron! - 駆逐艦4隻以上で編成される「駆逐隊」を編成せよ! - Have 4 DD in your main fleet. - - - A3 - 「水雷戦隊」を編成せよ! - Form a Torpedo Squadron! - 軽巡洋艦を旗艦とし、数隻の駆逐艦で構成される「水雷戦隊」を編成せよ! - Have a CL as a flagship and 5 DD in your main fleet. - - - A4 - 6隻編成の艦隊を編成せよ! - Form a Six Ship Fleet! - 全6隻で構成される主力艦隊を編成せよ! - Have 6 ships in your main fleet. - - - A5 - 軽巡2隻を擁する隊を編成せよ! - Form a Squadron with Two CL! - 軽巡洋艦2隻を擁する高速艦隊を編成せよ! - Have 2 CL in your main fleet. - - - A6 - 第2艦隊を編成せよ! - Form the Second Fleet! - 二つ目の艦隊、第2艦隊の旗艦を指定して、第2艦隊を編成せよ! - Have a flagship in your second fleet. - - - A7 - 「重巡戦隊」を編成せよ! - Form a Heavy Cruiser Squadron! - 重巡洋艦2隻を擁する重巡艦隊を編成せよ! - Have 2 CA in your main fleet. - - - A8 - 「天龍」型軽巡姉妹の全2艦を編成せよ! - Form the Tenryuu-class! - 天龍型軽巡洋艦「天龍」「龍田」を同一艦隊に配属せよ! - Have Tenryuu (天龍) and Tatsuta (龍田) in your main fleet. - - - A9 - 「水上機母艦」を配備せよ! - Ready a Seaplane Carrier! - 多数の水上偵察機を運用する「水上機母艦」を艦隊に配備せよ! - Have an AV in your main fleet. - - - A10 - 「第六駆逐隊」を編成せよ! - Form the Destroyer Division 6! - 「暁」「響」「雷」「電」4隻による第六駆逐隊を編成せよ! - Have ONLY Akasuki (暁), Hibiki (響), Inazuma (雷) and Ikazuchi (電) in your main fleet. - - - A11 - 第2艦隊で空母機動部隊を編成せよ! - Form a Carrier Task Force in the Second Fleet! - 第2艦隊に空母を配備して、空母機動部隊を編成せよ! - Have a CV/CVL and 3 DD in your second fleet. - - - A12 - 空母機動部隊を編成せよ! - Form a Carrier Task Force! - 空母1隻以上を旗艦とし、その護衛艦艇と共に、空母機動部隊を編成せよ! - Have a CV/CVL as a flagship and 3 DD in your main fleet. - - - A13 - 戦艦と重巡による主力艦隊を編成せよ! - Form the Main Fleet with BB and CA! - 戦艦1隻以上、重巡2隻以上を主力とした水上打撃艦隊を編成せよ! - Have a BB and 2 CA in your main fleet. - - - A14 - 「川内」型軽巡姉妹の全3艦を編成せよ! - Form the Sendai-class! - 川内型軽巡洋艦、「川内」「神通」「那珂」を同一艦隊に編成せよ! - Have Sendai (川内), Jintsuu (神通) and Naka (那珂) in your main fleet. - - - A15 - 「妙高」型重巡姉妹の全4隻を編成せよ! - Form the Myoukou-class! - 妙高型重巡洋艦「妙高」「那智」「足柄」「羽黒」を同一艦隊に配属せよ! - Have Myoukou (妙高), Nachi (那智), Ashigara (足柄) and Haguro (羽黒) in your main fleet. - - - A16 - 「金剛」型による高速戦艦部隊を編成せよ! - Form the Kongou-class! - 金剛型戦艦「金剛」「比叡」「榛名」「霧島」全4隻の高速戦艦を集中配備せよ! - Have Kongou (金剛), Hiei (比叡), Haruna (榛名) and Kirishima (霧島) in your main fleet. - - - A17 - 「扶桑」型戦艦姉妹の全2隻を編成せよ! - Form the Fusou-class! - 扶桑型戦艦「扶桑」「山城」を同一艦隊に配属せよ! - Have Fusou (扶桑) and Yamashiro (山城) in your main fleet. - - - A18 - 「伊勢」型戦艦姉妹の全2隻を編成せよ! - Form the Ise-class! - 伊勢型戦艦「伊勢」「日向」を同一艦隊に配属せよ! - Have Ise (伊勢) and Hyuuga (日向) in your main fleet. - - - A19 - 「南雲機動部隊」を編成せよ! - Form the Nagumo Task Force! - 一航戦「赤城」「加賀」二航戦「飛龍」「蒼龍」からなる第一機動部隊を編成せよ! - Have ONLY Akagi (赤城), Kaga (加賀), Hiryuu (飛龍) and Souryuu (蒼龍) in your main fleet. - - - A20 - 「三川艦隊」を編成せよ! - Form the Mikawa Fleet! - 「鳥海」「青葉」「加古」「古鷹」「天龍」を含む高速艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kako (加古), Furutaka (古鷹), Tenryuu (天龍) and a FAST speed ship in your main fleet. - - - A21 - 「第四戦隊」を編成せよ! - Form the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とした第四戦隊を編成せよ! - Have Atago (愛宕), Takao (高雄), Choukai (鳥海) and Maya (摩耶) in your main fleet. - - - A22 - 「西村艦隊」を編成せよ! - Form the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とした西村艦隊を編成せよ! - Have Fusou (扶桑), Yamashiro (山城), Mogami (最上) and Shigure (時雨) in your main fleet. - - - A23 - 「第五航空戦隊」を編成せよ! - Form the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とし、駆逐艦2隻を加えた第五航空戦隊を編成せよ! - Have Shoukaku (翔鶴), Zuikaku (瑞鶴) and 2 DD in your main fleet. - - - A24 - 新「三川艦隊」を編成せよ! - Form the New Mikawa Fleet! - 「鳥海」「青葉」「衣笠」「加古」「古鷹」「天龍」からなる三川艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kinugasa (衣笠), Kako (加古), Furutaka (古鷹) and Tenryuu (天龍) in your main fleet. - - - A25 - 潜水艦隊を編成せよ! - Form a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊を編成せよ! - Have 2 SS in your main fleet. - - - A26 - 航空水上打撃艦隊を編成せよ! - Form a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊を編成せよ! - Have 2 BBV and 2 CAV in your main fleet. - - - A27 - 中規模潜水艦隊を編成せよ! - Form a Medium-Sized Submarine Fleet! - 伊号潜水艦3隻以上からなる潜水艦隊を編成せよ! - Have 3 SS in your main fleet. - - - A28 - 「第六戦隊」を編成せよ! - Form the Cruiser Division 6! - 「古鷹」「加古」「青葉」「衣笠」を基幹とした第六戦隊を編成せよ! - Have Furutaka (古鷹), Kako(加古), Aoba (青葉) and Kinugasa (衣笠) in your main fleet. - - - A29 - 「第5艦隊」を編成せよ! - Form the 5th Fleet! - 「那智」「足柄」「多摩」「木曾」を中核とした「第五艦隊」を編成せよ! - Have Nachi (那智), Ashigara (足柄), Tama (多摩), and Kiso (木曾) in your fleet. - - - A30 - 「第1水雷戦隊」を編成せよ! - Form the Torpedo Squadron 1! - 「阿武隈」「曙」「潮」「霞」「不知火」を中核とした「第1水雷戦隊」を編成せよ! - Have Abukuma (阿武隈), Akebono (曙), Ushio (潮), Kasumi (霞) and Shiranui (不知火) in your fleet. - - - A31 - 「第八駆逐隊」を編成せよ! - Form the Destroyer Division 8! - 「朝潮」「満潮」「大潮」「荒潮」4隻による第八駆逐隊を編成せよ! - Have Asashio (朝潮), Michishio (満潮), Ooshio (大潮) and Arashio (荒潮) in your fleet. - - - A32 - 「第十八駆逐隊」を編成せよ! - Form the Destroyer Division 18! - 「霞」「霰」「陽炎」「不知火」4隻による第十八駆逐隊を編成せよ! - Have ONLY Kasumi (霞), Arare (霰), Kagerou (陽炎) and Shiranui (不知火) in your fleet. - - - A33 - 「第三十駆逐隊(第一次)」を編成せよ! - Form the Destroyer Division 30 (Gen-1)! - 「睦月」「如月」「弥生」「望月」4隻による第三十駆逐隊(第一次)を編成せよ! - Have ONLY Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生) and Mochizuki (望月) in your fleet. - - - B1 - はじめての「出撃」! - First Sortie! - 艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy your main fleet on a combat mission. - - - B2 - 鎮守府正面海域を護れ! - Protect the Seas of Chinju-Fu! - 鎮守府正面海域に艦隊を出撃させ、敵艦の跋梁を阻止せよ! - Deploy to World 1-1 and clear the stage. - - - B3 - 第2艦隊、出撃せよ! - Second Fleet Sortie! - 新たに編成した「第2艦隊」を出撃せよ! - Deploy your 2nd Fleet on a combat mission. - - - B4 - 南西諸島沖に出撃せよ! - Sortie to the Coast of Nansei Islands! - 南西諸島沖に艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy to World 1-2 and clear the stage. - - - B5 - 接近する「敵前衛艦隊」を迎撃せよ! - Intercept Approaching Enemy Vanguard Fleet! - 南西諸島沖に接近する「敵前衛艦隊」を捕捉、これを撃滅せよ! - Deploy to World 1-2 after defeating its boss and clear the stage. - - - B6 - 「水雷戦隊」で出撃せよ! - Sortie the Torpedo Squadron! - 軽巡洋艦1隻を旗艦とし、複数の駆逐艦からなる水雷戦隊で出撃せよ! - Deploy a fleet with a CL as flagship and 3 DD as escorts. - - - B7 - 「重巡洋艦」を出撃させよ! - Sortie a Heavy Cruiser! - 重巡洋艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a CA as its flagship. - - - B8 - 「戦艦」を出撃させよ! - Sortie a Battleship! - 海上の覇者、戦艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a BB as its flagship. BBV don't count. - - - B9 - 「空母機動部隊」出撃せよ! - Sortie a Carrier Task Force! - 空母1隻とその護衛艦艇で構成した空母機動部隊を出撃させよ! - Deply a fleet with CV(L) as flagship and 5 DD/CL/AV for the escorts. - - - B10 - 敵空母を撃沈せよ! - Sink Enemy Carrier! - 敵機動部隊を捕捉し、これを邀撃、敵空母を轟沈せよ! - Sink an enemy aircraft carrier. - - - B11 - 「三川艦隊」出撃せよ! - Sortie the Mikawa Fleet! - 新編成した「三川艦隊」で出撃せよ! - Deploy a fleet with Choukai, Aoba, Kako, Furutaka, Tenryuu and a FAST speed ship. - - - B12 - 「第六駆逐隊」出撃せよ! - Sortie the Destroyer Division 6! - 「暁」「響」「雷」「電」による第六駆逐隊、出撃せよ! - Deploy a fleet with ONLY Akatsuki, Hibiki, Inazuma, and Ikazuchi. - - - B13 - 「第四戦隊」出撃せよ! - Sortie the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とする第四戦隊で、バシー島沖の敵を撃滅せよ! - Deploy a fleet with Atago, Takao, Choukai, Maya and any 2 ships. Score a victory against World 2-2 Boss. - - - B14 - 「西村艦隊」出撃せよ! - Sortie the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とする西村艦隊で、オリョール海の敵を撃滅せよ! - Deploy a fleet with Fusou, Yamashiro, Mogami, Shigure and any 2 ships. Score a victory against World 2-3 Boss. - - - B15 - 「第五航空戦隊」出撃せよ! - Sortie the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とする第五航空戦隊で、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Shokaku, Zuikaku and any 4 ships. Score a victory against World 3-1 Boss. - - - B16 - 新「三川艦隊」出撃せよ! - Sortie the New Mikawa Fleet! - 完全編成した「三川艦隊」をもって、オリョール海の敵を撃滅せよ! - Deploy a fleet with Choukai, Aoba, Kinugasa, Kako, Furutaka and Tenryuu. Score a victory against World 2-3 Boss. - - - B17 - 「潜水艦隊」出撃せよ! - Sortie a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊でオリョール海の敵を撃滅せよ! - Deploy a fleet with 2 SS and 4 additional ships. Score a victory against World 2-3 Boss. - - - B18 - 「航空水上打撃艦隊」出撃せよ! - Sortie a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊でカレー洋の制海権を握れ! - Deploy a fleet with 2 BBV, 2 CAV and 2 additional ships. Score a victory against World 4-2 Boss. - - - B19 - 「第六戦隊」出撃せよ! - Sortie the Cruiser Division 6! - 編成した「第六戦隊」をもって出撃し、オリョール海の敵を撃滅「完全勝利」せよ! - Deploy a fleet with Furutaka, Kako, Kinugasa, Aoba and 2 additional ships. Score a S RATING victory or higher against World 2-3 Boss. - - - B20 - 「第八駆逐隊」出撃せよ! - Sortie the Destroyer Division 8! - 編成した「第八駆逐隊」を含む艦隊で出撃し、オリョール海の敵を撃滅せよ! - Deploy a fleet with Asashio, Michishio, Ooshio, Arashio and 2 additional ships. Score a victory against World 2-3 Boss. - - - B21 - 「第十八駆逐隊」出撃せよ! - Sortie the Destroyer Division 18! - 編成した「第十八駆逐隊」を含む艦隊で出撃し、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Kasumi, Arare, Kagerou, Shiranui and 2 additional ships. Score a victory against World 3-1 Boss. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Sortie the Destroyer Division 30 (Gen-1)! - 「第三十駆逐隊(第一次)」を含む艦隊で出撃し、キス島沖の主力艦隊と交戦せよ! - Deploy a fleet with Mutsuki, Kisaragi, Yayoi, Mochizuki and 2 DD. Score a victory against World 3-2 Boss. - - - Bd1 - 敵艦隊を撃破せよ! - Daily Sortie 1 - 艦隊を出撃させ、敵艦隊を捕捉、これを撃滅せよ! - Defeat an enemy fleet. - - - Bd2 - 敵艦隊主力を撃滅せよ! - Daily Sortie 2 - 艦隊を出撃させ、敵艦隊「主力」を捕捉!これを撃滅せよ! - Defeat the flagship of an enemy fleet. - - - Bd3 - 敵艦隊を10回邀撃せよ! - Daily Sortie 3 - 艦隊全力出撃!遊弋する敵艦隊を10回邀撃せよ! - Defeat 10 enemy fleets. - - - Bd4 - 敵空母を3隻撃沈せよ! - Daily Sortie 4 - 艦隊の脅威となる敵空母群。これを捕捉撃滅し、3隻轟沈せよ! - Sink 3 enemy aircraft carriers. - - - Bd5 - 敵補給艦を3隻撃沈せよ! - Daily Sortie 5 - 艦隊を出撃させ、敵補給艦を捕捉、これを撃滅せよ! - Sink 3 enemy transport ships. - - - Bd6 - 敵輸送船団を叩け! - Daily Sortie 6 - 敵の輸送船5隻以上を撃沈し、敵の補給路を寸断せよ! - Sink 5 enemy transport ships. - - - Bd7 - 南西諸島海域の制海権を握れ! - Daily Sortie 7 - 艦隊を南西諸島海域に全力出撃させ、多数の敵艦隊「主力」群を捕捉、撃滅せよ! - Defeat 5 bosses in World 2. - - - Bd8 - 敵潜水艦を制圧せよ! - Daily Sortie 8 - 対潜能力の充実した艦隊で出撃、敵潜水艦狩りを実施せよ! - Sink 6 enemy submarines. - - - Bw1 - あ号作戦 - Weekly Sortie 1 - 1週間の全力出撃を行い、可能な限り多くの敵艦隊を捕捉、これを迎撃せよ! - Deploy your fleet 36 times, encounter 24 bosses, defeat 12 bosses and get 6 Perfect S RATING victories. - - - Bw2 - い号作戦 - Weekly Sortie 2 - 有力な母艦航空隊で1週間の全力出撃を行い、可能な限り多くの敵空母を撃滅せよ! - Sink 20 aircraft carriers. - - - Bw3 - 海上通商破壊作戦 - Weekly Sortie 3 - 1週間で敵輸送船を20隻以上撃沈せよ! - Sink 20 transport ships. - - - Bw4 - ろ号作戦 - Weekly Sortie 4 - 1週間の全力出撃を行い、敵輸送船団を捕捉・撃滅、敵の補給路を寸断せよ! - Sink 50 transport ships. - - - Bw5 - 海上護衛戦 - Weekly Sortie 5 - 有力な対潜能力を持つ海上護衛隊によって、可能な限り多くの敵潜水艦を撃滅せよ! - Sink 15 submarines. - - - Bw6 - 敵東方艦隊を撃滅せよ! - Weekly Sortie 6 - 西方海域に出撃し、敵東方艦隊の主力を捕捉、これを撃滅せよ! - Defeat 12 bosses in World 4. - - - Bw7 - 敵北方艦隊主力を撃滅せよ! - Weekly Sortie 7 - 北方海域の深部に出撃し、敵北方艦隊の主力艦隊を捕捉、これを撃滅せよ! - Defeat 5 bosses in World 3-3 and 3-4. - - - Bw8 - 敵東方中枢艦隊を撃破せよ! - Weekly Sortie 8 - 西方海域カスガダマ島沖に出撃し、敵東方中枢艦隊を捕捉、これを撃破せよ! - Defeat a boss in World 4-4. - - - Bw9 - 南方海域珊瑚諸島沖の制空権を握れ! - Weekly Sortie 9 - 南方海域珊瑚諸島沖に出撃し、敵機動部隊本体を捕捉撃滅、これに完全勝利せよ! - Defeat 2 bosses in World 5-2 with S RATING victory or higher. - - - C1 - はじめての「演習」! - First Exercise! - 他の提督(プレイヤー)の艦隊と「演習」を行おう! - Challenge another fleet in practice mode. - - - C2 - 「演習」で練度向上! - Daily Exercises 1 - 本日中に他の司令官の艦隊に対して3回「演習」を挑もう! - Challenge 3 other fleets in practice mode within the same day. - - - C3 - 「演習」で他提督を圧倒せよ! - Daily Exercises 2 - 本日中に他の司令官の艦隊との「演習」で5回以上「勝利」をおさめよう! - Get 5 victories in practice mode within the same day. - - - C4 - 大規模演習 - Weekly Exercises - 今週中に「演習」で他の提督の艦隊に対して20回「勝利」しよう! - Get 20 victories in practice mode within the same week. - - - D1 - はじめての「遠征」! - First Expedition - 艦隊を「遠征」に出発させよう! - Perform an expedition. - - - D2 - 「遠征」を3回成功させよう! - Daily Expeditions 1 - 本日中に「遠征」3回成功させよう! - Perform 3 successful expeditions within the same day. - - - D3 - 「遠征」を10回成功させよう! - Daily Expeditions 2 - 本日中に「遠征」10回成功させよう! - Perform 10 successful expeditions within the same day. - - - D4 - 大規模遠征作戦、発令! - Weekly Expeditions - 今週中に「遠征」30回成功させよう! - Perform 30 successful expeditions within the same week. - - - D5 - 第一次潜水艦派遣作戦 - The First Submarine Operation - はじめての潜水艦派遣作戦を成功させよう! - Complete Expedition 30. - - - D6 - 第二次潜水艦派遣作戦 - The Second Submarine Operation - 第2次潜水艦派遣作戦を成功させよう! - Complete Expedition 30 one more time. - - - D7 - 潜水艦派遣作戦による技術入手の継続! - Continuation of Submarine Operations - 第3次及び第4次潜水艦派遣作戦を成功させ、他国製技術の導入に努めよ! - Complete Expedition 30 two more times. - - - E1 - はじめての「補給」! - First Supply - 補給は大事です!燃料・弾薬を艦に「補給」しよう! - Resupply a ship. - - - E2 - はじめての「入渠」! - First Docking - 戦闘で傷ついた艦を「入渠」させて修理して、次の出撃に備えよう! - Repair a ship. - - - E3 - 艦隊大整備! - Daily Repairs - 各艦隊から整備が必要な艦を5隻以上ドック入りさせ、大規模な整備をしよう! - Repair 5 ships. - - - E4 - 艦隊酒保祭り! - Daily Resupplies - 艦隊酒保祭り!各艦に延べ15回以上の補給を実施しよう! - Resupply your ships 15 times. - - - F1 - はじめての「建造」! - First Construction - 「工廠」で鋼材などの資材を使って新しい艦を「建造」しよう! - Craft a ship. - - - F2 - はじめての「開発」! - First Development - 「工廠」でボーキサイトなどの資材を使って新しい装備アイテムを「開発」しよう! - Craft a piece of equipment. - - - F3 - はじめての「解体」! - First Dismantlement - 「工廠」で不要な艦を「解体」してみよう! - Dismantle a ship. - - - F4 - はじめての「廃棄」! - First Disposal - 「工廠」で不要な装備アイテムを「廃棄」してみよう! - Scrap a piece of equipment. - - - F5 - 新装備「開発」指令 - Daily Equipment Development 1 - 「工廠」で装備アイテムを新たに「開発」しよう(失敗もOK)! - Craft a piece of equipment. (Failures are OK) - - - F6 - 新造艦「建造」指令 - Daily Ship Construction 1 - 「工廠」で艦娘を本日中に新たに「建造」しよう! - Craft a ship. - - - F7 - 装備「開発」集中強化! - Daily Development 2 - 「工廠」で装備アイテムを本日中に3回「開発」しよう(失敗もOK)! - Craft 3 pieces of equipment. (Failures are OK) - - - F8 - 艦娘「建造」艦隊強化! - Daily Construction 2 - 艦隊強化のため、「工廠」で艦娘を本日中に3隻「建造」しよう! - Craft 3 ships. - - - F9 - 軍縮条約対応! - Daily Dismantlement - 少し艦隊規模が大きくなりすぎました!「工廠」で不要な艦を2隻「解体」してください! - Scrap 2 ships. - - - F10 - 「大型艦建造」の準備!(その弐) - Preparation for LCS (Part 2) - 大型艦建造の準備をします!「工廠」で装備アイテムを4回「廃棄」してみてください! - Scrap equipment 4 times. - - - F11 - 輸送用ドラム缶の準備 - Preparation for Transport Drum Canisters - 「工廠」で装備アイテムを3回「廃棄」して、輸送用ドラム缶を準備します。 - Scrap equipment 3 times. - - - F12 - 資源の再利用 - Weekly Dismantlement - 「工廠」で余剰の装備アイテムをなるべく多く「廃棄」して、鋼材の再利用に努めよう! - Scrap equipment 24 times. - - - G1 - はじめての「近代化改修」! - First Modernization - 任意の艦を近代化改修(合成)して、強化せよ! - Perform a successful modernization. - - - G2 - 艦の「近代化改修」を実施せよ! - Daily Modernization - 近代化改修を実施して、2回以上これを成功させよ! - Perform 2 successful modernizations within the same day. - - - G3 - 「近代化改修」を進め、戦備を整えよ! - Weekly Modernization - 一週間の間に、近代化改修を15回成功させよ! - Perform 15 successful modernizations within the same week. - - - G4 - 「大型艦建造」の準備!(その壱) - Preparation for LSC (Part 1) - 大型艦/新型艦建造のための準備を行う。任意の艦で近代化改修を4回成功させよ! - Perform 4 successful modernizations. - - - WF01 - 式の準備!(その壱) - In Preparation of Love! (Part 1) - 式の準備をします!「工廠」で装備アイテムを2回「廃棄」して身の回りの整理を! - Scrap equipment 2 times to show your love!. - - - WC01 - 式の準備!(その弐) - In Preparation of Love! (Part 2) - 本日中に「演習」で2回以上「勝利」をおさめ、式への気持ちを整理しよう! - Show your love by getting 2 victories in practice mode! - - - WA01 - 式の準備!(その参) - In Preparation of Love! (Part 3) - 第一艦隊旗艦に練度の高い(Lv.90以上~99以下)艦娘を配備して気持ちを整理せよ! - Organize your feelings and deploy your fleet with a high level flagship (Lv.90~99)! - - - WB01 - 式の準備!(最終) - In Preparation of Love! (Final) - 練度の高い(Lv.90以上~99以下)第一艦隊旗艦で出撃し、オリョール海の暁に勝利を刻め! - Deploy a fleet with a high level (Lv.90~99) flagship to 2-3 obtain an S victory or higher against the boss. - - - WA02 - 新たなる旅立ち! - Journey Anew! - 第一艦隊旗艦に強い絆を結んだLv.100以上の艦娘を配備した6隻の艦隊を編成せよ! - Organize a fleet of 6 ships with your newly bonded ship of Lv.100 or more as flagship! - - - WB02 - 二人でする初めての任務! - Your First Mission Together! - 強い絆を結んだ艦娘を旗艦とした第一艦隊でリランカ島へ出撃、敵中枢を撃滅せよ! - Deploy a fleet to 4-3 with a bonded ship of Lv.100 or more as flagship and score an S vectory or higher against the boss. - - - 612 - 輸送用ドラム缶の準備 - Prepare the shipping barrel - 「工廠」で装備アイテムを3回「廃棄」して、輸送用のドラム缶を準備します。 - Scrap equipment 3 times to acquire a shipping barrel - - - 409 - 潜水艦派遣による海外艦との接触作戦 - Strategy Meeting with Overseas Submarine Dispatch! - 有力な潜水艦隊派遣による海外艦との接触作戦を成功させよ! - Complete expedition 31 and receive foreign destroyer Z1! - - - 410 - 南方への輸送作戦を成功させよ! - Weekly Expedition 2 - 激戦海域である南方海域への「東京急行」系遠征を敢行、これを成功させよ! - Complete expedition 37 or 38 - - - 411 - 南方への鼠輸送を継続実施せよ! - Weekly Expedition 3 - 今週中に「東京急行」系遠征を継続的に実施、同種作戦を7回成功せさよう! - Complete expedition 37 or 38 a total of 7 times in a week - - - D12 - (続)航空火力艦の運用を強化せよ! - Strengthen the Operation of the BBV (Cont.) - 「航空戦艦運用演習」を継続実施し、航空火力艦の運用の強化に引き続き努めよ! - Complete expedition 23 four more times. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Deploy the 13th Destroyer Fleet - 「第三十駆逐隊(第一次)」を含む艦隊で出撃しキス島沖の主力艦隊と交戦せよ! - Deploy a fleet that consists of Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生), Mochizuki (望月) and up to 2 additional DDs to world 3-2 and encounter the boss. - - - 247 - 「航空戦艦」抜錨せよ! - Sortie an aviation battleship fleet! - 航空戦艦2隻を基幹とする艦隊で、西方海域カスガダマ島の敵勢力を撃破せよ! - Have 2 BBV ships in your main fleet and score a victory against World 4-4 Boss. - - diff --git a/resources/translations/ShipTypes.xml b/resources/translations/ShipTypes.xml deleted file mode 100644 index 315c5ae57..000000000 --- a/resources/translations/ShipTypes.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - 1 - 海防艦 - DE - - - 2 - 駆逐艦 - DD - - - 3 - 軽巡洋艦 - CL - - - 4 - 重雷装巡洋艦 - CLT - - - 5 - 重巡洋艦 - CA - - - 6 - 航空巡洋艦 - CAV - - - 7 - 軽空母 - CVL - - - 9 - 戦艦 - BB - - - 8 - 戦艦 - Fast BB - - - 10 - 航空戦艦 - BBV - - - 11 - 正規空母 - CV - - - 12 - 超弩級戦艦 - B - - - 13 - 潜水艦 - SS - - - 14 - 潜水空母 - SSV - - - 15 - 補給艦 - AE - - - 16 - 水上機母艦 - AV - - - 17 - 揚陸艦 - LSD - - - 18 - 装甲空母 - CVB - - - 19 - 工作艦 - AR - - \ No newline at end of file diff --git a/resources/translations/Ships.xml b/resources/translations/Ships.xml deleted file mode 100644 index 7c87068e5..000000000 --- a/resources/translations/Ships.xml +++ /dev/null @@ -1,1183 +0,0 @@ - - - - 長門 - Nagato - - - 長門改 - Nagato Kai - - - 陸奥 - Mutsu - - - 陸奥改 - Mutsu Kai - - - 伊勢 - Ise - - - 伊勢改 - Ise Kai - - - 日向 - Hyuuga - - - 日向改 - Hyuuga Kai - - - 雪風 - Yukikaze - - - 雪風改 - Yukikaze Kai - - - 赤城 - Akagi - - - 赤城改 - Akagi Kai - - - 加賀 - Kaga - - - 加賀改 - Kaga Kai - - - 蒼龍 - Souryuu - - - 蒼龍改 - Souryuu Kai - - - 飛龍 - Hiryuu - - - 飛龍改 - Hiryuu Kai - - - 島風 - Shimakaze - - - 島風改 - Shimakaze Kai - - - 吹雪 - Fubuki - - - 吹雪改 - Fubuki Kai - - - 白雪 - Shirayuki - - - 白雪改 - Shirayuki Kai - - - 初雪 - Hatsuyuki - - - 初雪改 - Hatsuyuki Kai - - - 深雪 - Miyuki - - - 深雪改 - Miyuki Kai - - - 叢雲 - Murakumo - - - 叢雲改 - Murakumo Kai - - - 磯波 - Isonami - - - 磯波改 - Isonami Kai - - - 綾波 - Ayanami - - - 綾波改 - Ayanami Kai - - - 敷波 - Shikinami - - - 敷波改 - Shikinami Kai - - - 大井 - Ooi - - - 大井改 - Ooi Kai - - - 大井改二 - Ooi Kai2 - - - 北上 - Kitakami - - - 北上改 - Kitakami Kai - - - 北上改二 - Kitakami Kai2 - - - 金剛 - Kongou - - - 金剛改 - Kongou Kai - - - 金剛改二 - Kongou Kai2 - - - 比叡 - Hiei - - - 比叡改 - Hiei Kai - - - 比叡改二 - Hiei Kai2 - - - 榛名 - Haruna - - - 榛名改 - Haruna Kai - - - 霧島 - Kirishima - - - 霧島改 - Kirishima Kai - - - 霧島改二 - Kirishima Kai2 - - - 鳳翔 - Houshou - - - 鳳翔改 - Houshou Kai - - - 扶桑 - Fusou - - - 扶桑改 - Fusou Kai - - - 山城 - Yamashiro - - - 山城改 - Yamashiro Kai - - - 天龍 - Tenryuu - - - 天龍改 - Tenryuu Kai - - - 龍田 - Tatsuta - - - 龍田改 - Tatsuta Kai - - - 龍驤 - Ryuujou - - - 龍驤改 - Ryuujou Kai - - - 睦月 - Mutsuki - - - 睦月改 - Mutsuki Kai - - - 如月 - Kisaragi - - - 如月改 - Kisaragi Kai - - - 皐月 - Satsuki - - - 皐月改 - Satsuki Kai - - - 文月 - Fumizuki - - - 文月改 - Fumizuki Kai - - - 長月 - Nagatsuki - - - 長月改 - Nagatsuki Kai - - - 菊月 - Kikuzuki - - - 菊月改 - Kikuzuki Kai - - - 三日月 - Mikazuki - - - 三日月改 - Mikazuki Kai - - - 望月 - Mochizuki - - - 望月改 - Mochizuki Kai - - - 球磨 - Kuma - - - 球磨改 - Kuma Kai - - - 多摩 - Tama - - - 多摩改 - Tama Kai - - - 木曾 - Kiso - - - 木曾改 - Kiso Kai - - - 木曾改二 - Kiso Kai2 - - - 長良 - Nagara - - - 長良改 - Nagara Kai - - - 五十鈴 - Isuzu - - - 五十鈴改 - Isuzu Kai - - - 五十鈴改二 - Isuzu Kai2 - - - 名取 - Natori - - - 名取改 - Natori Kai - - - 由良 - Yura - - - 由良改 - Yura Kai - - - 川内 - Sendai - - - 川内改 - Sendai Kai - - - 神通 - Jintsuu - - - 神通改 - Jintsuu Kai - - - 神通改二 - Jintsuu Kai2 - - - 那珂 - Naka - - - 那珂改 - Naka Kai - - - 那珂改二 - Naka Kai2 - - - 千歳 - Chitose - - - 千歳改 - Chitose Kai - - - 千歳甲 - Chitose A - - - 千歳航 - Chitose CVL - - - 千歳航改 - Chitose CVL Kai - - - 千歳航改二 - Chitose CVL Kai2 - - - 千代田 - Chiyoda - - - 千代田改 - Chiyoda Kai - - - 千代田甲 - Chiyoda A - - - 千代田航 - Chiyoda CVL - - - 千代田航改 - Chiyoda CVL Kai - - - 千代田航改二 - Chiyoda CVL Kai2 - - - 最上 - Mogami - - - 最上改 - Mogami Kai - - - 古鷹 - Furutaka - - - 古鷹改 - Furutaka Kai - - - 加古 - Kako - - - 加古改 - Kako Kai - - - 青葉 - Aoba - - - 青葉改 - Aoba Kai - - - 妙高 - Myoukou - - - 妙高改 - Myoukou Kai - - - 那智 - Nachi - - - 那智改 - Nachi Kai - - - 足柄 - Ashigara - - - 足柄改 - Ashigara Kai - - - 羽黒 - Haguro - - - 羽黒改 - Haguro Kai - - - 高雄 - Takao - - - 高雄改 - Takao Kai - - - 愛宕 - Atago - - - 愛宕改 - Atago Kai - - - 摩耶 - Maya - - - 摩耶改 - Maya Kai - - - 鳥海 - Choukai - - - 鳥海改 - Choukai Kai - - - 利根 - Tone - - - 利根改 - Tone Kai - - - 利根改二 - Tone Kai2 - - - 筑摩 - Chikuma - - - 筑摩改 - Chikuma Kai - - - 筑摩改二 - Chikuma Kai2 - - - 飛鷹 - Hiyou - - - 飛鷹改 - Hiyou Kai - - - 隼鷹 - Junyou - - - 隼鷹改 - Junyou Kai - - - - Oboro - - - 朧改 - Oboro Kai - - - - Akebono - - - 曙改 - Akebono Kai - - - - Sazanami - - - 漣改 - Sazanami Kai - - - - Ushio - - - 潮改 - Ushio Kai - - - - Akatsuki - - - 暁改 - Akatsuki Kai - - - - Hibiki - - - 響改 - Hibiki Kai - - - Верный - Vérnyj - - - - Ikazuchi - - - 雷改 - Ikazuchi Kai - - - - Inazuma - - - 電改 - Inazuma Kai - - - 初春 - Hatsuharu - - - 初春改 - Hatsuharu Kai - - - 子日 - Nenohi - - - 子日改 - Nenohi Kai - - - 若葉 - Wakaba - - - 若葉改 - Wakaba Kai - - - 初霜 - Hatsushimo - - - 初霜改 - Hatsushimo Kai - - - 白露 - Shiratsuyu - - - 白露改 - Shiratsuyu Kai - - - 時雨 - Shigure - - - 時雨改 - Shigure Kai - - - 時雨改二 - Shigure Kai2 - - - 村雨 - Murasame - - - 村雨改 - Murasame Kai - - - 夕立 - Yuudachi - - - 夕立改 - Yuudachi Kai - - - 夕立改二 - Yuudachi Kai2 - - - 五月雨 - Samidare - - - 五月雨改 - Samidare Kai - - - 涼風 - Suzukaze - - - 涼風改 - Suzukaze Kai - - - 朝潮 - Asashio - - - 朝潮改 - Asashio Kai - - - 大潮 - Ooshio - - - 大潮改 - Ooshio Kai - - - 満潮 - Michishio - - - 満潮改 - Michishio Kai - - - 荒潮 - Arashio - - - 荒潮改 - Arashio Kai - - - - Arare - - - 霰改 - Arare Kai - - - - Kasumi - - - 霞改 - Kasumi Kai - - - 陽炎 - Kagerou - - - 陽炎改 - Kagerou Kai - - - 不知火 - Shiranui - - - 不知火改 - Shiranui Kai - - - 黒潮 - Kuroshio - - - 黒潮改 - Kuroshio Kai - - - 祥鳳 - Shouhou - - - 祥鳳改 - Shouhou Kai - - - 翔鶴 - Shoukaku - - - 翔鶴改 - Shoukaku Kai - - - 瑞鶴 - Zuikaku - - - 瑞鶴改 - Zuikaku Kai - - - 鬼怒 - Kinu - - - 鬼怒改 - Kinu Kai - - - 阿武隈 - Abukuma - - - 阿武隈改 - Abukuma Kai - - - 夕張 - Yuubari - - - 夕張改 - Yuubari Kai - - - 瑞鳳 - Zuihou - - - 瑞鳳改 - Zuihou Kai - - - 三隈 - Mikuma - - - 三隈改 - Mikuma Kai - - - 初風 - Hatsukaze - - - 初風改 - Hatsukaze Kai - - - 舞風 - Maikaze - - - 舞風改 - Maikaze Kai - - - 衣笠 - Kinugasa - - - 衣笠改 - Kinugasa Kai - - - 衣笠改二 - Kinugasa Kai2 - - - 伊19 - I-19 - - - 伊19改 - I-19 Kai - - - 鈴谷 - Suzuya - - - 鈴谷改 - Suzuya Kai - - - 熊野 - Kumano - - - 熊野改 - Kumano Kai - - - 伊168 - I-168 - - - 伊168改 - I-168 Kai - - - 伊58 - I-58 - - - 伊58改 - I-58 Kai - - - 伊8 - I-8 - - - 伊8改 - I-8 Kai - - - 大和 - Yamato - - - 大和改 - Yamato Kai - - - 秋雲 - Akigumo - - - 秋雲改 - Akigumo Kai - - - 夕雲 - Yuugumo - - - 夕雲改 - Yuugumo Kai - - - 巻雲 - Makigumo - - - 巻雲改 - Makigumo Kai - - - 長波 - Naganami - - - 長波改 - Naganami Kai - - - 阿賀野 - Agano - - - 阿賀野改 - Agano Kai - - - 能代 - Noshiro - - - 能代改 - Noshiro Kai - - - 矢矧 - Yahagi - - - 矢矧改 - Yahagi Kai - - - 武蔵 - Musashi - - - 武蔵改 - Musashi Kai - - - 大鳳 - Taihou - - - 大鳳改 - Taihou Kai - - - 伊401 - I-401 - - - 伊401改 - I-401 Kai - - - あきつ丸 - Akitsu Maru - - - あきつ丸改 - Akitsu Maru Kai - - - まるゆ - Maruyu - - - まるゆ改 - Maruyu Kai - - - 弥生 - Yayoi - - - 弥生改 - Yayoi Kai - - - 卯月 - Uzuki - - - 卯月改 - Uzuki Kai - - - イオナ - IONA - - - タカオ - TAKAO - - - ハルナ - HARUNA - - - Bismarck - Bismarck - - - Bismarck改 - Bismarck Kai - - - Bismarck zwei - Bismarck zwei - - - Z1 - Z1 - - - Z1改 - Z1 Kai - - - Z1 zwei - Z1 Zwei - - - Z3 - Z3 - - - Z3改 - Z3 Kai - - - Z3 zwei - Z3 Zwei - - - 浜風 - Hamakaze - - - 浜風改 - Hamakaze Kai - - - 天津風 - Amatsukaze - - - 天津風改 - Amatsukaze Kai - - - 谷風 - Tanikaze - - - 谷風改 - Tanikaze Kai - - - 明石 - Akashi - - - 明石改 - Akashi Kai - - - 酒匂 - Sakawa - - - 酒匂改 - Sakawa Kai - - diff --git a/resources/translations/ko-KR/Equipment.xml b/resources/translations/ko-KR/Equipment.xml deleted file mode 100644 index 45ace2f79..000000000 --- a/resources/translations/ko-KR/Equipment.xml +++ /dev/null @@ -1,335 +0,0 @@ - - - - 12cm単装砲 - 12cm Single Cannon - - - 12.7cm連装砲 - 12.7cm Twin Cannon - - - 10cm連装高角砲 - 10cm Twin High-Angle Cannon - - - 14cm単装砲 - 14cm Single Cannon - - - 15.5cm三連装砲 - 15.5cm Triple Cannon - - - 20.3cm連装砲 - 20.3cm Twin Cannon - - - 35.6cm連装砲 - 35.6cm Twin Cannon - - - 41cm連装砲 - 41cm Twin Cannon - - - 46cm三連装砲 - 46cm Triple Cannon - - - 12.7cm連装高角砲 - 12.7cm Twin High-Angle Cannon - - - 15.2cm単装砲 - 15.2cm Single Cannon - - - 15.5cm三連装副砲 - 15.5cm Triple Cannon - - - 61cm三連装魚雷 - 61cm Triple Torpedo - - - 61cm四連装魚雷 - 61cm Quad Torpedo - - - 61cm四連装(酸素)魚雷 - 61cm Quad (Oxygen) Torpedo - - - 九七式艦攻 - Type 97 Torpedo Bomber - - - 天山 - Tenzan - - - 流星 - Ryuusei - - - 九六式艦戦 - Type 96 Fighter - - - 零式艦戦21型 - Type 21 Zero Fighter - - - 零式艦戦52型 - Type 52 Zero Fighter - - - 烈風 - Reppu - - - 九九式艦爆 - Type 99 Bomber - - - 彗星 - Suisei - - - 零式水上偵察機 - Type 0 Recon Seaplane - - - 瑞雲 - Zuiun - - - 13号対空電探 - Type 13 Air RADAR - - - 22号対水上電探 - Type 22 Surface RADAR - - - 33号対水上電探 - Type 33 Surface RADAR - - - 21号対空電探 - Type 21 Air RADAR - - - 32号対水上電探 - Type 32 Surface RADAR - - - 14号対空電探 - Type 14 Air RADAR - - - 改良型艦本式タービン - Improved Steam Turbine - - - 強化型艦本式缶 - Enhanced Steam Turbine - - - 三式弾 - Type 3 Shell - - - 九一式徹甲弾 - Type 91 AP Shell - - - 7.7mm機銃 - 7.7mm Gun - - - 12.7mm単装機銃 - 12.7mm Gun - - - 25mm連装機銃 - 25mm Dual Gun - - - 25mm三連装機銃 - 25mm Triple Gun - - - 甲標的 - Type A Ko-hyoteki - - - 応急修理要員 - Repair Team - - - 応急修理女神 - Repair Goddess - - - 九四式爆雷投射機 - Type 94 Depth Charge - - - 三式爆雷投射機 - Type 3 Depth Charge - - - 九三式水中聴音機 - Type 93 SONAR - - - 三式水中探信儀 - Type 3 SONAR - - - 12.7cm単装高角砲 - 12.7 cm Single High-Angle Cannon - - - 25mm単装機銃 - 25mm Single Gun - - - 20.3cm(3号)連装砲 - 20.3cm(no.3) Dual Cannon - - - 12cm30連装噴進砲 - 12cm 30-tube Rocket Launcher - - - 流星改 - Ryuusei Kai - - - 烈風改 - Reppu Kai - - - 彩雲 - Saiun - - - 紫電改二 - Shiden Kai 2 - - - 震電改 - Shinden Kai - - - 彗星一二型甲 - Suisei Model 12A - - - 61cm五連装(酸素)魚雷 - 61cm Quintuple (Oxygen) Torpedo - - - 零式水上観測機 - Zero Observation Seaplane - - - 零式艦戦62型(爆戦) - Type 62 Zero Fighter-Bomber - - - 二式艦上偵察機 - Type 2 Recon Plane - - - 試製晴嵐 - Prototype Seiran - - - 12.7cm連装砲B型改二 - 12.7cm Twin Cannon Type B Kai2 - - - Ju87C改 - Ju 87C Kai - - - 15.2cm連装砲 - 15.2cm Twin Cannon - - - 8cm高角砲 - 8cm High-Angle Cannon - - - 53cm艦首(酸素)魚雷 - 53cm Hull-mount (Oxygen) Torpedo - - - 大発動艇 - Daihatsu-Class Landing Craft - - - カ号観測機 - Type Ka Liaison Aircraft - - - 三式指揮連絡機(対潜) - Type 3 Liaison Aircraft - - - 10cm連装高角砲(砲架) - 10cm High-angle Cannon (Improved) - - - 増設バルジ(中型艦) - Anti-Torpedo Bulge (M) - - - 増設バルジ(大型艦) - Anti-Torpedo Bulge (L) - - - 探照灯 - Searchlight - - - ドラム缶(輸送用) - Drum (Transport) - - - 瑞雲(六三四空) - Zuiun (634 Air Group) - - - 瑞雲12型 - Zuiun Model 12 - - - 九七艦攻(九三一空) - Type 97 Torpedo Bomber (931 Air Group) - - - 天山(九三一空) - Tenzan (931 Air Group) - - - 12.7cm単装砲 - 12.7cm Naval Gun - - - 15cm連装副砲 - 15cm Twin Gun Mount - - - 38cm連装砲 - 38cm Twin Gun Mount - - - 艦艇修理施設 - Ship Repair Facility - - diff --git a/resources/translations/ko-KR/Operations.xml b/resources/translations/ko-KR/Operations.xml deleted file mode 100644 index 0c63effca..000000000 --- a/resources/translations/ko-KR/Operations.xml +++ /dev/null @@ -1,423 +0,0 @@ - - - - 鎮守府正面海域 - World 1-1 - - - 南西諸島沖 - World 1-2 - - - 製油所地帯沿岸 - World 1-3 - - - 南西諸島防衛線 - World 1-4 - - - カムラン半島 - World 2-1 - - - バシー島沖 - World 2-2 - - - 東部オリョール海 - World 2-3 - - - 沖ノ島海域 - World 2-4 - - - モーレイ海哨戒 - World 3-1 - - - キス島沖 - World 3-2 - - - アルフォンシーノ方面 - World 3-3 - - - 北方海域全域 - World 3-4 - - - ジャム島攻略作戦 - World 4-1 - - - カレー洋制圧戦 - World 4-2 - - - リランカ島空襲 - World 4-3 - - - カスガダマ沖海戦 - World 4-4 - - - 南方海域前面 - World 5-1 - - - 珊瑚諸島沖 - World 5-2 - - - サブ島沖海域 - World 5-3 - - - サーモン海域 - World 5-4 - - - 鎮守府近海 - World 1-5 - - - 南西海域サメワニ沖 - E-1 - - - 南西海域ズンダ海峡 - E-2 - - - ポートワイン沖海域 - E-3 - - - 【第2段階作戦】 中部太平洋海域 - E-4 - - - 【第2段階作戦】 北太平洋海域 - E-5 - - - 渦潮 - Whirlpool - - - うずしお - Whirlpool - - - うずしお(弾薬) - Whirlpool (Ammo) - - - 鋼材 - Steel Node - - - 燃料 - Fuel Node - - - 弾薬 - Ammo Node - - - ボーキサイト - Bauxite Node - - - 敵偵察艦 - Reconnaissance Ship - - - 敵はぐれ艦隊 - Stray Fleet - - - 敵主力艦隊 - Main Fleet (Boss) - - - 敵前衛艦隊 - Vanguard Fleet - - - 敵主力部隊 - Main Force (Boss) - - - 敵支援艦隊 - Support Fleet - - - 敵偵察艦隊 - Reconnaissance Fleet - - - 敵機動部隊 - Task Force (Boss) - - - 敵護衛空母群 - Escort Carrier Group - - - 敵水雷戦隊 - Torpedo Squadron - - - 敵運送船団 - Transport Fleet - - - 敵通商破壊艦隊 - Trade Destruction Fleet (Boss) - - - 敵巡洋艦隊 - Cruiser Corps - - - 敵強襲揚陸艦隊 - Amphibious Assault Fleet - - - 敵主力打撃群 - Main Strike Group (Boss) - - - 敵水上打撃艦隊 - Aquatic Strike Fleet - - - 敵空母機動部隊 - Aircraft Carrier Task Force - - - 敵精鋭水雷戦隊 - Elite Torpedo Squadron - - - 敵侵攻中核艦隊 - Core Invasion Fleet (Boss) - - - 敵哨戒艦隊 - Patrol Fleet - - - 敵北方侵攻艦隊 - Northern Invasion Fleet (Boss) - - - 敵キス島包囲艦隊 - Kis Island Siege Fleet (Boss) - - - 深海棲艦泊地艦隊 - Alfonsiones Deep-Sea Fleet (Boss) - - - 深海棲艦泊地防衛艦隊 - Deep-Sea Fleet - - - 深海棲艦北方艦隊中枢 - Central Deep-Sea Northern Fleet (Boss) - - - 深海棲艦水上打撃艦隊 - Deep-Sea Aquatic Strike Fleet - - - 東方潜水艦隊 - Eastern Diving Fleet - - - 東方艦隊 - Eastern Fleet - - - 東方派遣艦隊 - Eastern Dispatch Fleet (Boss) - - - 敵潜水教導艦隊 - Kyoudou Submarine Fleet - - - 東方主力艦隊 - Eastern Main Fleet (Boss) - - - 敵補給船団 - Supply Convoy - - - 敵潜水艦隊 - Submarine Fleet - - - 敵東方艦隊残存部隊 - Remaining Eastern Fleet - - - 敵潜水艦哨戒線 - Submarine Patrol Fleet - - - 敵東方中枢艦隊 - East Central Fleet (Boss) - - - 敵前線哨戒艦隊 - Front Line Patrol Fleet - - - 敵水上打撃部隊 - Aquatic Strike Force - - - 敵前線司令艦隊 - Front Line Commander Fleet (Boss) - - - 敵任務部隊 - Task Force - - - 敵機動部隊本隊 - Main Task Force (Boss) - - - 敵補給部隊 - Supply Convoy - - - 敵潜水警戒艦隊 - Warning Submarine Fleet - - - 敵前衛警戒艦隊 - Warning Vanguard Fleet - - - 敵泊地護衛主力艦隊 - Main Fleet Anchorage Escort - - - 敵泊投錨中輸送船団 - Anchored Night Convoy - - - 敵サーモン方面主力艦隊 - Main Fleet Headquarters (Boss) - - - 敵偵察潜水艦 - Reconnaissance Submarine - - - 敵潜水艦隊A群 - Submarine Fleet Group A - - - 敵潜水艦隊B群 - Submarine Fleet Group B - - - 敵潜水艦隊C群 - Submarine Fleet Group C - - - 敵侵攻打撃艦隊A群 - Invasion Strike Fleet Group A - - - 敵侵攻打撃艦隊B群 - Invasion Strike Fleet Group B - - - 敵通商破壊主力艦隊 - Main Trade Attack Fleet (Boss) - - - 敵ピケット艦隊 - Picket Fleet - - - 敵遊撃部隊 - Guerilla Force - - - 敵遊撃部隊 - Guerilla Force - - - 敵任務艦隊 - Mission Fleet - - - 敵機動部隊主力 - Main Task Force - - - 敵新鋭戦艦部隊 - State-of-the-art Battleship Troops - - - 敵機動部隊支隊A群 - Detached Task Force Group A - - - 敵補給部隊本体 - Main Supply Convoy (Boss) - - - 敵前衛警戒部隊 - Detached Security Vanguard - - - 敵任務部隊前衛 - Vanguard Task Force - - - 敵対潜警戒部隊 - Security Detachment - - - 敵任務部隊本隊 - Main Task Force(Boss) - - - 敵緊急派遣艦隊 - Emergency Dispatch Fleet - - - ABDA主力艦隊 - ABDA Main Fleet (Boss) - - - 敵増援任務部隊B群 - Reinforcment Task Force Group B - - - ABDA残存艦隊 - ABDA Remaining Fleet - - - 深海棲艦ポートワイン泊地 - Port Wine Area Deep Sea Fleet (Boss) - - - 敵増援任務部隊 - Renforcement Task Force - - \ No newline at end of file diff --git a/resources/translations/ko-KR/Quests.xml b/resources/translations/ko-KR/Quests.xml deleted file mode 100644 index 54d1e2bf3..000000000 --- a/resources/translations/ko-KR/Quests.xml +++ /dev/null @@ -1,815 +0,0 @@ - - - - A1 - はじめての「編成」! - First Formation! - 2隻以上の艦で編成される「艦隊」を編成せよ! - Have 2 ships in your main fleet. - - - A2 - 「駆逐隊」を編成せよ! - Form a Destroyer Squadron! - 駆逐艦4隻以上で編成される「駆逐隊」を編成せよ! - Have 4 DD in your main fleet. - - - A3 - 「水雷戦隊」を編成せよ! - Form a Torpedo Squadron! - 軽巡洋艦を旗艦とし、数隻の駆逐艦で構成される「水雷戦隊」を編成せよ! - Have a CL as a flagship and 5 DD in your main fleet. - - - A4 - 6隻編成の艦隊を編成せよ! - Form a Six Ship Fleet! - 全6隻で構成される主力艦隊を編成せよ! - Have 6 ships in your main fleet. - - - A5 - 軽巡2隻を擁する隊を編成せよ! - Form a Squadron with Two CL! - 軽巡洋艦2隻を擁する高速艦隊を編成せよ! - Have 2 CL in your main fleet. - - - A6 - 第2艦隊を編成せよ! - Form the Second Fleet! - 二つ目の艦隊、第2艦隊の旗艦を指定して、第2艦隊を編成せよ! - Have a flagship in your second fleet. - - - A7 - 「重巡戦隊」を編成せよ! - Form a Heavy Cruiser Squadron! - 重巡洋艦2隻を擁する重巡艦隊を編成せよ! - Have 2 CA in your main fleet. - - - A8 - 「天龍」型軽巡姉妹の全2艦を編成せよ! - Form the Tenryuu-class! - 天龍型軽巡洋艦「天龍」「龍田」を同一艦隊に配属せよ! - Have Tenryuu (天龍) and Tatsuta (龍田) in your main fleet. - - - A9 - 「水上機母艦」を配備せよ! - Ready a Seaplane Carrier! - 多数の水上偵察機を運用する「水上機母艦」を艦隊に配備せよ! - Have an AV in your main fleet. - - - A10 - 「第六駆逐隊」を編成せよ! - Form the Destroyer Division 6! - 「暁」「響」「雷」「電」4隻による第六駆逐隊を編成せよ! - Have ONLY Akasuki (暁), Hibiki (響), Inazuma (雷) and Ikazuchi (電) in your main fleet. - - - A11 - 第2艦隊で空母機動部隊を編成せよ! - Form a Carrier Task Force in the Second Fleet! - 第2艦隊に空母を配備して、空母機動部隊を編成せよ! - Have a CV/CVL and 3 DD in your second fleet. - - - A12 - 空母機動部隊を編成せよ! - Form a Carrier Task Force! - 空母1隻以上を旗艦とし、その護衛艦艇と共に、空母機動部隊を編成せよ! - Have a CV/CVL as a flagship and 3 DD in your main fleet. - - - A13 - 戦艦と重巡による主力艦隊を編成せよ! - Form the Main Fleet with BB and CA! - 戦艦1隻以上、重巡2隻以上を主力とした水上打撃艦隊を編成せよ! - Have a BB and 2 CA in your main fleet. - - - A14 - 「川内」型軽巡姉妹の全3艦を編成せよ! - Form the Sendai-class! - 川内型軽巡洋艦、「川内」「神通」「那珂」を同一艦隊に編成せよ! - Have Sendai (川内), Jintsuu (神通) and Naka (那珂) in your main fleet. - - - A15 - 「妙高」型重巡姉妹の全4隻を編成せよ! - Form the Myoukou-class! - 妙高型重巡洋艦「妙高」「那智」「足柄」「羽黒」を同一艦隊に配属せよ! - Have Myoukou (妙高), Nachi (那智), Ashigara (足柄) and Haguro (羽黒) in your main fleet. - - - A16 - 「金剛」型による高速戦艦部隊を編成せよ! - Form the Kongou-class! - 金剛型戦艦「金剛」「比叡」「榛名」「霧島」全4隻の高速戦艦を集中配備せよ! - Have Kongou (金剛), Hiei (比叡), Haruna (榛名) and Kirishima (霧島) in your main fleet. - - - A17 - 「扶桑」型戦艦姉妹の全2隻を編成せよ! - Form the Fusou-class! - 扶桑型戦艦「扶桑」「山城」を同一艦隊に配属せよ! - Have Fusou (扶桑) and Yamashiro (山城) in your main fleet. - - - A18 - 「伊勢」型戦艦姉妹の全2隻を編成せよ! - Form the Ise-class! - 伊勢型戦艦「伊勢」「日向」を同一艦隊に配属せよ! - Have Ise (伊勢) and Hyuuga (日向) in your main fleet. - - - A19 - 「南雲機動部隊」を編成せよ! - Form the Nagumo Task Force! - 一航戦「赤城」「加賀」二航戦「飛龍」「蒼龍」からなる第一機動部隊を編成せよ! - Have ONLY Akagi (赤城), Kaga (加賀), Hiryuu (飛龍) and Souryuu (蒼龍) in your main fleet. - - - A20 - 「三川艦隊」を編成せよ! - Form the Mikawa Fleet! - 「鳥海」「青葉」「加古」「古鷹」「天龍」を含む高速艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kako (加古), Furutaka (古鷹), Tenryuu (天龍) and a FAST speed ship in your main fleet. - - - A21 - 「第四戦隊」を編成せよ! - Form the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とした第四戦隊を編成せよ! - Have Atago (愛宕), Takao (高雄), Choukai (鳥海) and Maya (摩耶) in your main fleet. - - - A22 - 「西村艦隊」を編成せよ! - Form the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とした西村艦隊を編成せよ! - Have Fusou (扶桑), Yamashiro (山城), Mogami (最上) and Shigure (時雨) in your main fleet. - - - A23 - 「第五航空戦隊」を編成せよ! - Form the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とし、駆逐艦2隻を加えた第五航空戦隊を編成せよ! - Have Shoukaku (翔鶴), Zuikaku (瑞鶴) and 2 DD in your main fleet. - - - A24 - 新「三川艦隊」を編成せよ! - Form the New Mikawa Fleet! - 「鳥海」「青葉」「衣笠」「加古」「古鷹」「天龍」からなる三川艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kinugasa (衣笠), Kako (加古), Furutaka (古鷹) and Tenryuu (天龍) in your main fleet. - - - A25 - 潜水艦隊を編成せよ! - Form a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊を編成せよ! - Have 2 SS in your main fleet. - - - A26 - 航空水上打撃艦隊を編成せよ! - Form a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊を編成せよ! - Have 2 BBV and 2 CAV in your main fleet. - - - A27 - 中規模潜水艦隊を編成せよ! - Form a Medium-Sized Submarine Fleet! - 伊号潜水艦3隻以上からなる潜水艦隊を編成せよ! - Have 3 SS in your main fleet. - - - A28 - 「第六戦隊」を編成せよ! - Form the Cruiser Division 6! - 「古鷹」「加古」「青葉」「衣笠」を基幹とした第六戦隊を編成せよ! - Have Furutaka (古鷹), Kako(加古), Aoba (青葉) and Kinugasa (衣笠) in your main fleet. - - - A29 - 「第5艦隊」を編成せよ! - Form the 5th Fleet! - 「那智」「足柄」「多摩」「木曾」を中核とした「第五艦隊」を編成せよ! - Have Nachi (那智), Ashigara (足柄), Tama (多摩), and Kiso (木曾) in your fleet. - - - A30 - 「第1水雷戦隊」を編成せよ! - Form the Torpedo Squadron 1! - 「阿武隈」「曙」「潮」「霞」「不知火」を中核とした「第1水雷戦隊」を編成せよ! - Have Abukuma (阿武隈), Akebono (曙), Ushio (潮), Kasumi (霞) and Shiranui (不知火) in your fleet. - - - A31 - 「第八駆逐隊」を編成せよ! - Form the Destroyer Division 8! - 「朝潮」「満潮」「大潮」「荒潮」4隻による第八駆逐隊を編成せよ! - Have Asashio (朝潮), Michishio (満潮), Ooshio (大潮) and Arashio (荒潮) in your fleet. - - - A32 - 「第十八駆逐隊」を編成せよ! - Form the Destroyer Division 18! - 「霞」「霰」「陽炎」「不知火」4隻による第十八駆逐隊を編成せよ! - Have ONLY Kasumi (霞), Arare (霰), Kagerou (陽炎) and Shiranui (不知火) in your fleet. - - - A33 - 「第三十駆逐隊(第一次)」を編成せよ! - Form the Destroyer Division 30 (Gen-1)! - 「睦月」「如月」「弥生」「望月」4隻による第三十駆逐隊(第一次)を編成せよ! - Have ONLY Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生) and Mochizuki (望月) in your fleet. - - - B1 - はじめての「出撃」! - First Sortie! - 艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy your main fleet on a combat mission. - - - B2 - 鎮守府正面海域を護れ! - Protect the Seas of Chinju-Fu! - 鎮守府正面海域に艦隊を出撃させ、敵艦の跋梁を阻止せよ! - Deploy to World 1-1 and clear the stage. - - - B3 - 第2艦隊、出撃せよ! - Second Fleet Sortie! - 新たに編成した「第2艦隊」を出撃せよ! - Deploy your 2nd Fleet on a combat mission. - - - B4 - 南西諸島沖に出撃せよ! - Sortie to the Coast of Nansei Islands! - 南西諸島沖に艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy to World 1-2 and clear the stage. - - - B5 - 接近する「敵前衛艦隊」を迎撃せよ! - Intercept Approaching Enemy Vanguard Fleet! - 南西諸島沖に接近する「敵前衛艦隊」を捕捉、これを撃滅せよ! - Deploy to World 1-2 after defeating its boss and clear the stage. - - - B6 - 「水雷戦隊」で出撃せよ! - Sortie the Torpedo Squadron! - 軽巡洋艦1隻を旗艦とし、複数の駆逐艦からなる水雷戦隊で出撃せよ! - Deploy a fleet with a CL as flagship and 3 DD as escorts. - - - B7 - 「重巡洋艦」を出撃させよ! - Sortie a Heavy Cruiser! - 重巡洋艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a CA as its flagship. - - - B8 - 「戦艦」を出撃させよ! - Sortie a Battleship! - 海上の覇者、戦艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a BB as its flagship. BBV don't count. - - - B9 - 「空母機動部隊」出撃せよ! - Sortie a Carrier Task Force! - 空母1隻とその護衛艦艇で構成した空母機動部隊を出撃させよ! - Deply a fleet with CV(L) as flagship and 5 DD/CL/AV for the escorts. - - - B10 - 敵空母を撃沈せよ! - Sink Enemy Carrier! - 敵機動部隊を捕捉し、これを邀撃、敵空母を轟沈せよ! - Sink an enemy aircraft carrier. - - - B11 - 「三川艦隊」出撃せよ! - Sortie the Mikawa Fleet! - 新編成した「三川艦隊」で出撃せよ! - Deploy a fleet with Choukai, Aoba, Kako, Furutaka, Tenryuu and a FAST speed ship. - - - B12 - 「第六駆逐隊」出撃せよ! - Sortie the Destroyer Division 6! - 「暁」「響」「雷」「電」による第六駆逐隊、出撃せよ! - Deploy a fleet with ONLY Akatsuki, Hibiki, Inazuma, and Ikazuchi. - - - B13 - 「第四戦隊」出撃せよ! - Sortie the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とする第四戦隊で、バシー島沖の敵を撃滅せよ! - Deploy a fleet with Atago, Takao, Choukai, Maya and any 2 ships. Score a victory against World 2-2 Boss. - - - B14 - 「西村艦隊」出撃せよ! - Sortie the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とする西村艦隊で、オリョール海の敵を撃滅せよ! - Deploy a fleet with Fusou, Yamashiro, Mogami, Shigure and any 2 ships. Score a victory against World 2-3 Boss. - - - B15 - 「第五航空戦隊」出撃せよ! - Sortie the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とする第五航空戦隊で、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Shokaku, Zuikaku and any 4 ships. Score a victory against World 3-1 Boss. - - - B16 - 新「三川艦隊」出撃せよ! - Sortie the New Mikawa Fleet! - 完全編成した「三川艦隊」をもって、オリョール海の敵を撃滅せよ! - Deploy a fleet with Choukai, Aoba, Kinugasa, Kako, Furutaka and Tenryuu. Score a victory against World 2-3 Boss. - - - B17 - 「潜水艦隊」出撃せよ! - Sortie a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊でオリョール海の敵を撃滅せよ! - Deploy a fleet with 2 SS and 4 additional ships. Score a victory against World 2-3 Boss. - - - B18 - 「航空水上打撃艦隊」出撃せよ! - Sortie a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊でカレー洋の制海権を握れ! - Deploy a fleet with 2 BBV, 2 CAV and 2 additional ships. Score a victory against World 4-2 Boss. - - - B19 - 「第六戦隊」出撃せよ! - Sortie the Cruiser Division 6! - 編成した「第六戦隊」をもって出撃し、オリョール海の敵を撃滅「完全勝利」せよ! - Deploy a fleet with Furutaka, Kako, Kinugasa, Aoba and 2 additional ships. Score a S RATING victory or higher against World 2-3 Boss. - - - B20 - 「第八駆逐隊」出撃せよ! - Sortie the Destroyer Division 8! - 編成した「第八駆逐隊」を含む艦隊で出撃し、オリョール海の敵を撃滅せよ! - Deploy a fleet with Asashio, Michishio, Ooshio, Arashio and 2 additional ships. Score a victory against World 2-3 Boss. - - - B21 - 「第十八駆逐隊」出撃せよ! - Sortie the Destroyer Division 18! - 編成した「第十八駆逐隊」を含む艦隊で出撃し、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Kasumi, Arare, Kagerou, Shiranui and 2 additional ships. Score a victory against World 3-1 Boss. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Sortie the Destroyer Division 30 (Gen-1)! - 「第三十駆逐隊(第一次)」を含む艦隊で出撃し、キス島沖の主力艦隊と交戦せよ! - Deploy a fleet with Mutsuki, Kisaragi, Yayoi, Mochizuki and 2 DD. Score a victory against World 3-2 Boss. - - - Bd1 - 敵艦隊を撃破せよ! - Daily Sortie 1 - 艦隊を出撃させ、敵艦隊を捕捉、これを撃滅せよ! - Defeat an enemy fleet. - - - Bd2 - 敵艦隊主力を撃滅せよ! - Daily Sortie 2 - 艦隊を出撃させ、敵艦隊「主力」を捕捉!これを撃滅せよ! - Defeat the flagship of an enemy fleet. - - - Bd3 - 敵艦隊を10回邀撃せよ! - Daily Sortie 3 - 艦隊全力出撃!遊弋する敵艦隊を10回邀撃せよ! - Defeat 10 enemy fleets. - - - Bd4 - 敵空母を3隻撃沈せよ! - Daily Sortie 4 - 艦隊の脅威となる敵空母群。これを捕捉撃滅し、3隻轟沈せよ! - Sink 3 enemy aircraft carriers. - - - Bd5 - 敵補給艦を3隻撃沈せよ! - Daily Sortie 5 - 艦隊を出撃させ、敵補給艦を捕捉、これを撃滅せよ! - Sink 3 enemy transport ships. - - - Bd6 - 敵輸送船団を叩け! - Daily Sortie 6 - 敵の輸送船5隻以上を撃沈し、敵の補給路を寸断せよ! - Sink 5 enemy transport ships. - - - Bd7 - 南西諸島海域の制海権を握れ! - Daily Sortie 7 - 艦隊を南西諸島海域に全力出撃させ、多数の敵艦隊「主力」群を捕捉、撃滅せよ! - Defeat 5 bosses in World 2. - - - Bd8 - 敵潜水艦を制圧せよ! - Daily Sortie 8 - 対潜能力の充実した艦隊で出撃、敵潜水艦狩りを実施せよ! - Sink 6 enemy submarines. - - - Bw1 - あ号作戦 - Weekly Sortie 1 - 1週間の全力出撃を行い、可能な限り多くの敵艦隊を捕捉、これを迎撃せよ! - Deploy your fleet 36 times, encounter 24 bosses, defeat 12 bosses and get 6 Perfect S RATING victories. - - - Bw2 - い号作戦 - Weekly Sortie 2 - 有力な母艦航空隊で1週間の全力出撃を行い、可能な限り多くの敵空母を撃滅せよ! - Sink 20 aircraft carriers. - - - Bw3 - 海上通商破壊作戦 - Weekly Sortie 3 - 1週間で敵輸送船を20隻以上撃沈せよ! - Sink 20 transport ships. - - - Bw4 - ろ号作戦 - Weekly Sortie 4 - 1週間の全力出撃を行い、敵輸送船団を捕捉・撃滅、敵の補給路を寸断せよ! - Sink 50 transport ships. - - - Bw5 - 海上護衛戦 - Weekly Sortie 5 - 有力な対潜能力を持つ海上護衛隊によって、可能な限り多くの敵潜水艦を撃滅せよ! - Sink 15 submarines. - - - Bw6 - 敵東方艦隊を撃滅せよ! - Weekly Sortie 6 - 西方海域に出撃し、敵東方艦隊の主力を捕捉、これを撃滅せよ! - Defeat 12 bosses in World 4. - - - Bw7 - 敵北方艦隊主力を撃滅せよ! - Weekly Sortie 7 - 北方海域の深部に出撃し、敵北方艦隊の主力艦隊を捕捉、これを撃滅せよ! - Defeat 5 bosses in World 3-3 and 3-4. - - - Bw8 - 敵東方中枢艦隊を撃破せよ! - Weekly Sortie 8 - 西方海域カスガダマ島沖に出撃し、敵東方中枢艦隊を捕捉、これを撃破せよ! - Defeat a boss in World 4-4. - - - Bw9 - 南方海域珊瑚諸島沖の制空権を握れ! - Weekly Sortie 9 - 南方海域珊瑚諸島沖に出撃し、敵機動部隊本体を捕捉撃滅、これに完全勝利せよ! - Defeat 2 bosses in World 5-2 with S RATING victory or higher. - - - C1 - はじめての「演習」! - First Exercise! - 他の提督(プレイヤー)の艦隊と「演習」を行おう! - Challenge another fleet in practice mode. - - - C2 - 「演習」で練度向上! - Daily Exercises 1 - 本日中に他の司令官の艦隊に対して3回「演習」を挑もう! - Challenge 3 other fleets in practice mode within the same day. - - - C3 - 「演習」で他提督を圧倒せよ! - Daily Exercises 2 - 本日中に他の司令官の艦隊との「演習」で5回以上「勝利」をおさめよう! - Get 5 victories in practice mode within the same day. - - - C4 - 大規模演習 - Weekly Exercises - 今週中に「演習」で他の提督の艦隊に対して20回「勝利」しよう! - Get 20 victories in practice mode within the same week. - - - D1 - はじめての「遠征」! - First Expedition - 艦隊を「遠征」に出発させよう! - Perform an expedition. - - - D2 - 「遠征」を3回成功させよう! - Daily Expeditions 1 - 本日中に「遠征」3回成功させよう! - Perform 3 successful expeditions within the same day. - - - D3 - 「遠征」を10回成功させよう! - Daily Expeditions 2 - 本日中に「遠征」10回成功させよう! - Perform 10 successful expeditions within the same day. - - - D4 - 大規模遠征作戦、発令! - Weekly Expeditions - 今週中に「遠征」30回成功させよう! - Perform 30 successful expeditions within the same week. - - - D5 - 第一次潜水艦派遣作戦 - The First Submarine Operation - はじめての潜水艦派遣作戦を成功させよう! - Complete Expedition 30. - - - D6 - 第二次潜水艦派遣作戦 - The Second Submarine Operation - 第2次潜水艦派遣作戦を成功させよう! - Complete Expedition 30 one more time. - - - D7 - 潜水艦派遣作戦による技術入手の継続! - Continuation of Submarine Operations - 第3次及び第4次潜水艦派遣作戦を成功させ、他国製技術の導入に努めよ! - Complete Expedition 30 two more times. - - - E1 - はじめての「補給」! - First Supply - 補給は大事です!燃料・弾薬を艦に「補給」しよう! - Resupply a ship. - - - E2 - はじめての「入渠」! - First Docking - 戦闘で傷ついた艦を「入渠」させて修理して、次の出撃に備えよう! - Repair a ship. - - - E3 - 艦隊大整備! - Daily Repairs - 各艦隊から整備が必要な艦を5隻以上ドック入りさせ、大規模な整備をしよう! - Repair 5 ships. - - - E4 - 艦隊酒保祭り! - Daily Resupplies - 艦隊酒保祭り!各艦に延べ15回以上の補給を実施しよう! - Resupply your ships 15 times. - - - F1 - はじめての「建造」! - First Construction - 「工廠」で鋼材などの資材を使って新しい艦を「建造」しよう! - Craft a ship. - - - F2 - はじめての「開発」! - First Development - 「工廠」でボーキサイトなどの資材を使って新しい装備アイテムを「開発」しよう! - Craft a piece of equipment. - - - F3 - はじめての「解体」! - First Dismantlement - 「工廠」で不要な艦を「解体」してみよう! - Dismantle a ship. - - - F4 - はじめての「廃棄」! - First Disposal - 「工廠」で不要な装備アイテムを「廃棄」してみよう! - Scrap a piece of equipment. - - - F5 - 新装備「開発」指令 - Daily Equipment Development 1 - 「工廠」で装備アイテムを新たに「開発」しよう(失敗もOK)! - Craft a piece of equipment. (Failures are OK) - - - F6 - 新造艦「建造」指令 - Daily Ship Construction 1 - 「工廠」で艦娘を本日中に新たに「建造」しよう! - Craft a ship. - - - F7 - 装備「開発」集中強化! - Daily Development 2 - 「工廠」で装備アイテムを本日中に3回「開発」しよう(失敗もOK)! - Craft 3 pieces of equipment. (Failures are OK) - - - F8 - 艦娘「建造」艦隊強化! - Daily Construction 2 - 艦隊強化のため、「工廠」で艦娘を本日中に3隻「建造」しよう! - Craft 3 ships. - - - F9 - 軍縮条約対応! - Daily Dismantlement - 少し艦隊規模が大きくなりすぎました!「工廠」で不要な艦を2隻「解体」してください! - Scrap 2 ships. - - - F10 - 「大型艦建造」の準備!(その弐) - Preparation for LCS (Part 2) - 大型艦建造の準備をします!「工廠」で装備アイテムを4回「廃棄」してみてください! - Scrap equipment 4 times. - - - F11 - 輸送用ドラム缶の準備 - Preparation for Transport Drum Canisters - 「工廠」で装備アイテムを3回「廃棄」して、輸送用ドラム缶を準備します。 - Scrap equipment 3 times. - - - F12 - 資源の再利用 - Weekly Dismantlement - 「工廠」で余剰の装備アイテムをなるべく多く「廃棄」して、鋼材の再利用に努めよう! - Scrap equipment 24 times. - - - G1 - はじめての「近代化改修」! - First Modernization - 任意の艦を近代化改修(合成)して、強化せよ! - Perform a successful modernization. - - - G2 - 艦の「近代化改修」を実施せよ! - Daily Modernization - 近代化改修を実施して、2回以上これを成功させよ! - Perform 2 successful modernizations within the same day. - - - G3 - 「近代化改修」を進め、戦備を整えよ! - Weekly Modernization - 一週間の間に、近代化改修を15回成功させよ! - Perform 15 successful modernizations within the same week. - - - G4 - 「大型艦建造」の準備!(その壱) - Preparation for LSC (Part 1) - 大型艦/新型艦建造のための準備を行う。任意の艦で近代化改修を4回成功させよ! - Perform 4 successful modernizations. - - - WF01 - 式の準備!(その壱) - In Preparation of Love! (Part 1) - 式の準備をします!「工廠」で装備アイテムを2回「廃棄」して身の回りの整理を! - Scrap equipment 2 times to show your love!. - - - WC01 - 式の準備!(その弐) - In Preparation of Love! (Part 2) - 本日中に「演習」で2回以上「勝利」をおさめ、式への気持ちを整理しよう! - Show your love by getting 2 victories in practice mode! - - - WA01 - 式の準備!(その参) - In Preparation of Love! (Part 3) - 第一艦隊旗艦に練度の高い(Lv.90以上~99以下)艦娘を配備して気持ちを整理せよ! - Organize your feelings and deploy your fleet with a high level flagship (Lv.90~99)! - - - WB01 - 式の準備!(最終) - In Preparation of Love! (Final) - 練度の高い(Lv.90以上~99以下)第一艦隊旗艦で出撃し、オリョール海の暁に勝利を刻め! - Deploy a fleet with a high level (Lv.90~99) flagship to 2-3 obtain an S victory or higher against the boss. - - - WA02 - 新たなる旅立ち! - Journey Anew! - 第一艦隊旗艦に強い絆を結んだLv.100以上の艦娘を配備した6隻の艦隊を編成せよ! - Organize a fleet of 6 ships with your newly bonded ship of Lv.100 or more as flagship! - - - WB02 - 二人でする初めての任務! - Your First Mission Together! - 強い絆を結んだ艦娘を旗艦とした第一艦隊でリランカ島へ出撃、敵中枢を撃滅せよ! - Deploy a fleet to 4-3 with a bonded ship of Lv.100 or more as flagship and score an S vectory or higher against the boss. - - - 612 - 輸送用ドラム缶の準備 - Prepare the shipping barrel - 「工廠」で装備アイテムを3回「廃棄」して、輸送用のドラム缶を準備します。 - Scrap equipment 3 times to acquire a shipping barrel - - - 409 - 潜水艦派遣による海外艦との接触作戦 - Strategy Meeting with Overseas Submarine Dispatch! - 有力な潜水艦隊派遣による海外艦との接触作戦を成功させよ! - Complete expedition 31 and receive foreign destroyer Z1! - - - 410 - 南方への輸送作戦を成功させよ! - Weekly Expedition 2 - 激戦海域である南方海域への「東京急行」系遠征を敢行、これを成功させよ! - Complete expedition 37 or 38 - - - 411 - 南方への鼠輸送を継続実施せよ! - Weekly Expedition 3 - 今週中に「東京急行」系遠征を継続的に実施、同種作戦を7回成功せさよう! - Complete expedition 37 or 38 a total of 7 times in a week - - - D12 - (続)航空火力艦の運用を強化せよ! - Strengthen the Operation of the BBV (Cont.) - 「航空戦艦運用演習」を継続実施し、航空火力艦の運用の強化に引き続き努めよ! - Complete expedition 23 four more times. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Deploy the 13th Destroyer Fleet - 「第三十駆逐隊(第一次)」を含む艦隊で出撃しキス島沖の主力艦隊と交戦せよ! - Deploy a fleet that consists of Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生), Mochizuki (望月) and up to 2 additional DDs to world 3-2 and encounter the boss. - - - 247 - 「航空戦艦」抜錨せよ! - Sortie an aviation battleship fleet! - 航空戦艦2隻を基幹とする艦隊で、西方海域カスガダマ島の敵勢力を撃破せよ! - Have 2 BBV ships in your main fleet and score a victory against World 4-4 Boss. - - diff --git a/resources/translations/ko-KR/ShipTypes.xml b/resources/translations/ko-KR/ShipTypes.xml deleted file mode 100644 index 315c5ae57..000000000 --- a/resources/translations/ko-KR/ShipTypes.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - 1 - 海防艦 - DE - - - 2 - 駆逐艦 - DD - - - 3 - 軽巡洋艦 - CL - - - 4 - 重雷装巡洋艦 - CLT - - - 5 - 重巡洋艦 - CA - - - 6 - 航空巡洋艦 - CAV - - - 7 - 軽空母 - CVL - - - 9 - 戦艦 - BB - - - 8 - 戦艦 - Fast BB - - - 10 - 航空戦艦 - BBV - - - 11 - 正規空母 - CV - - - 12 - 超弩級戦艦 - B - - - 13 - 潜水艦 - SS - - - 14 - 潜水空母 - SSV - - - 15 - 補給艦 - AE - - - 16 - 水上機母艦 - AV - - - 17 - 揚陸艦 - LSD - - - 18 - 装甲空母 - CVB - - - 19 - 工作艦 - AR - - \ No newline at end of file diff --git a/resources/translations/ko-KR/Ships.xml b/resources/translations/ko-KR/Ships.xml deleted file mode 100644 index 7c87068e5..000000000 --- a/resources/translations/ko-KR/Ships.xml +++ /dev/null @@ -1,1183 +0,0 @@ - - - - 長門 - Nagato - - - 長門改 - Nagato Kai - - - 陸奥 - Mutsu - - - 陸奥改 - Mutsu Kai - - - 伊勢 - Ise - - - 伊勢改 - Ise Kai - - - 日向 - Hyuuga - - - 日向改 - Hyuuga Kai - - - 雪風 - Yukikaze - - - 雪風改 - Yukikaze Kai - - - 赤城 - Akagi - - - 赤城改 - Akagi Kai - - - 加賀 - Kaga - - - 加賀改 - Kaga Kai - - - 蒼龍 - Souryuu - - - 蒼龍改 - Souryuu Kai - - - 飛龍 - Hiryuu - - - 飛龍改 - Hiryuu Kai - - - 島風 - Shimakaze - - - 島風改 - Shimakaze Kai - - - 吹雪 - Fubuki - - - 吹雪改 - Fubuki Kai - - - 白雪 - Shirayuki - - - 白雪改 - Shirayuki Kai - - - 初雪 - Hatsuyuki - - - 初雪改 - Hatsuyuki Kai - - - 深雪 - Miyuki - - - 深雪改 - Miyuki Kai - - - 叢雲 - Murakumo - - - 叢雲改 - Murakumo Kai - - - 磯波 - Isonami - - - 磯波改 - Isonami Kai - - - 綾波 - Ayanami - - - 綾波改 - Ayanami Kai - - - 敷波 - Shikinami - - - 敷波改 - Shikinami Kai - - - 大井 - Ooi - - - 大井改 - Ooi Kai - - - 大井改二 - Ooi Kai2 - - - 北上 - Kitakami - - - 北上改 - Kitakami Kai - - - 北上改二 - Kitakami Kai2 - - - 金剛 - Kongou - - - 金剛改 - Kongou Kai - - - 金剛改二 - Kongou Kai2 - - - 比叡 - Hiei - - - 比叡改 - Hiei Kai - - - 比叡改二 - Hiei Kai2 - - - 榛名 - Haruna - - - 榛名改 - Haruna Kai - - - 霧島 - Kirishima - - - 霧島改 - Kirishima Kai - - - 霧島改二 - Kirishima Kai2 - - - 鳳翔 - Houshou - - - 鳳翔改 - Houshou Kai - - - 扶桑 - Fusou - - - 扶桑改 - Fusou Kai - - - 山城 - Yamashiro - - - 山城改 - Yamashiro Kai - - - 天龍 - Tenryuu - - - 天龍改 - Tenryuu Kai - - - 龍田 - Tatsuta - - - 龍田改 - Tatsuta Kai - - - 龍驤 - Ryuujou - - - 龍驤改 - Ryuujou Kai - - - 睦月 - Mutsuki - - - 睦月改 - Mutsuki Kai - - - 如月 - Kisaragi - - - 如月改 - Kisaragi Kai - - - 皐月 - Satsuki - - - 皐月改 - Satsuki Kai - - - 文月 - Fumizuki - - - 文月改 - Fumizuki Kai - - - 長月 - Nagatsuki - - - 長月改 - Nagatsuki Kai - - - 菊月 - Kikuzuki - - - 菊月改 - Kikuzuki Kai - - - 三日月 - Mikazuki - - - 三日月改 - Mikazuki Kai - - - 望月 - Mochizuki - - - 望月改 - Mochizuki Kai - - - 球磨 - Kuma - - - 球磨改 - Kuma Kai - - - 多摩 - Tama - - - 多摩改 - Tama Kai - - - 木曾 - Kiso - - - 木曾改 - Kiso Kai - - - 木曾改二 - Kiso Kai2 - - - 長良 - Nagara - - - 長良改 - Nagara Kai - - - 五十鈴 - Isuzu - - - 五十鈴改 - Isuzu Kai - - - 五十鈴改二 - Isuzu Kai2 - - - 名取 - Natori - - - 名取改 - Natori Kai - - - 由良 - Yura - - - 由良改 - Yura Kai - - - 川内 - Sendai - - - 川内改 - Sendai Kai - - - 神通 - Jintsuu - - - 神通改 - Jintsuu Kai - - - 神通改二 - Jintsuu Kai2 - - - 那珂 - Naka - - - 那珂改 - Naka Kai - - - 那珂改二 - Naka Kai2 - - - 千歳 - Chitose - - - 千歳改 - Chitose Kai - - - 千歳甲 - Chitose A - - - 千歳航 - Chitose CVL - - - 千歳航改 - Chitose CVL Kai - - - 千歳航改二 - Chitose CVL Kai2 - - - 千代田 - Chiyoda - - - 千代田改 - Chiyoda Kai - - - 千代田甲 - Chiyoda A - - - 千代田航 - Chiyoda CVL - - - 千代田航改 - Chiyoda CVL Kai - - - 千代田航改二 - Chiyoda CVL Kai2 - - - 最上 - Mogami - - - 最上改 - Mogami Kai - - - 古鷹 - Furutaka - - - 古鷹改 - Furutaka Kai - - - 加古 - Kako - - - 加古改 - Kako Kai - - - 青葉 - Aoba - - - 青葉改 - Aoba Kai - - - 妙高 - Myoukou - - - 妙高改 - Myoukou Kai - - - 那智 - Nachi - - - 那智改 - Nachi Kai - - - 足柄 - Ashigara - - - 足柄改 - Ashigara Kai - - - 羽黒 - Haguro - - - 羽黒改 - Haguro Kai - - - 高雄 - Takao - - - 高雄改 - Takao Kai - - - 愛宕 - Atago - - - 愛宕改 - Atago Kai - - - 摩耶 - Maya - - - 摩耶改 - Maya Kai - - - 鳥海 - Choukai - - - 鳥海改 - Choukai Kai - - - 利根 - Tone - - - 利根改 - Tone Kai - - - 利根改二 - Tone Kai2 - - - 筑摩 - Chikuma - - - 筑摩改 - Chikuma Kai - - - 筑摩改二 - Chikuma Kai2 - - - 飛鷹 - Hiyou - - - 飛鷹改 - Hiyou Kai - - - 隼鷹 - Junyou - - - 隼鷹改 - Junyou Kai - - - - Oboro - - - 朧改 - Oboro Kai - - - - Akebono - - - 曙改 - Akebono Kai - - - - Sazanami - - - 漣改 - Sazanami Kai - - - - Ushio - - - 潮改 - Ushio Kai - - - - Akatsuki - - - 暁改 - Akatsuki Kai - - - - Hibiki - - - 響改 - Hibiki Kai - - - Верный - Vérnyj - - - - Ikazuchi - - - 雷改 - Ikazuchi Kai - - - - Inazuma - - - 電改 - Inazuma Kai - - - 初春 - Hatsuharu - - - 初春改 - Hatsuharu Kai - - - 子日 - Nenohi - - - 子日改 - Nenohi Kai - - - 若葉 - Wakaba - - - 若葉改 - Wakaba Kai - - - 初霜 - Hatsushimo - - - 初霜改 - Hatsushimo Kai - - - 白露 - Shiratsuyu - - - 白露改 - Shiratsuyu Kai - - - 時雨 - Shigure - - - 時雨改 - Shigure Kai - - - 時雨改二 - Shigure Kai2 - - - 村雨 - Murasame - - - 村雨改 - Murasame Kai - - - 夕立 - Yuudachi - - - 夕立改 - Yuudachi Kai - - - 夕立改二 - Yuudachi Kai2 - - - 五月雨 - Samidare - - - 五月雨改 - Samidare Kai - - - 涼風 - Suzukaze - - - 涼風改 - Suzukaze Kai - - - 朝潮 - Asashio - - - 朝潮改 - Asashio Kai - - - 大潮 - Ooshio - - - 大潮改 - Ooshio Kai - - - 満潮 - Michishio - - - 満潮改 - Michishio Kai - - - 荒潮 - Arashio - - - 荒潮改 - Arashio Kai - - - - Arare - - - 霰改 - Arare Kai - - - - Kasumi - - - 霞改 - Kasumi Kai - - - 陽炎 - Kagerou - - - 陽炎改 - Kagerou Kai - - - 不知火 - Shiranui - - - 不知火改 - Shiranui Kai - - - 黒潮 - Kuroshio - - - 黒潮改 - Kuroshio Kai - - - 祥鳳 - Shouhou - - - 祥鳳改 - Shouhou Kai - - - 翔鶴 - Shoukaku - - - 翔鶴改 - Shoukaku Kai - - - 瑞鶴 - Zuikaku - - - 瑞鶴改 - Zuikaku Kai - - - 鬼怒 - Kinu - - - 鬼怒改 - Kinu Kai - - - 阿武隈 - Abukuma - - - 阿武隈改 - Abukuma Kai - - - 夕張 - Yuubari - - - 夕張改 - Yuubari Kai - - - 瑞鳳 - Zuihou - - - 瑞鳳改 - Zuihou Kai - - - 三隈 - Mikuma - - - 三隈改 - Mikuma Kai - - - 初風 - Hatsukaze - - - 初風改 - Hatsukaze Kai - - - 舞風 - Maikaze - - - 舞風改 - Maikaze Kai - - - 衣笠 - Kinugasa - - - 衣笠改 - Kinugasa Kai - - - 衣笠改二 - Kinugasa Kai2 - - - 伊19 - I-19 - - - 伊19改 - I-19 Kai - - - 鈴谷 - Suzuya - - - 鈴谷改 - Suzuya Kai - - - 熊野 - Kumano - - - 熊野改 - Kumano Kai - - - 伊168 - I-168 - - - 伊168改 - I-168 Kai - - - 伊58 - I-58 - - - 伊58改 - I-58 Kai - - - 伊8 - I-8 - - - 伊8改 - I-8 Kai - - - 大和 - Yamato - - - 大和改 - Yamato Kai - - - 秋雲 - Akigumo - - - 秋雲改 - Akigumo Kai - - - 夕雲 - Yuugumo - - - 夕雲改 - Yuugumo Kai - - - 巻雲 - Makigumo - - - 巻雲改 - Makigumo Kai - - - 長波 - Naganami - - - 長波改 - Naganami Kai - - - 阿賀野 - Agano - - - 阿賀野改 - Agano Kai - - - 能代 - Noshiro - - - 能代改 - Noshiro Kai - - - 矢矧 - Yahagi - - - 矢矧改 - Yahagi Kai - - - 武蔵 - Musashi - - - 武蔵改 - Musashi Kai - - - 大鳳 - Taihou - - - 大鳳改 - Taihou Kai - - - 伊401 - I-401 - - - 伊401改 - I-401 Kai - - - あきつ丸 - Akitsu Maru - - - あきつ丸改 - Akitsu Maru Kai - - - まるゆ - Maruyu - - - まるゆ改 - Maruyu Kai - - - 弥生 - Yayoi - - - 弥生改 - Yayoi Kai - - - 卯月 - Uzuki - - - 卯月改 - Uzuki Kai - - - イオナ - IONA - - - タカオ - TAKAO - - - ハルナ - HARUNA - - - Bismarck - Bismarck - - - Bismarck改 - Bismarck Kai - - - Bismarck zwei - Bismarck zwei - - - Z1 - Z1 - - - Z1改 - Z1 Kai - - - Z1 zwei - Z1 Zwei - - - Z3 - Z3 - - - Z3改 - Z3 Kai - - - Z3 zwei - Z3 Zwei - - - 浜風 - Hamakaze - - - 浜風改 - Hamakaze Kai - - - 天津風 - Amatsukaze - - - 天津風改 - Amatsukaze Kai - - - 谷風 - Tanikaze - - - 谷風改 - Tanikaze Kai - - - 明石 - Akashi - - - 明石改 - Akashi Kai - - - 酒匂 - Sakawa - - - 酒匂改 - Sakawa Kai - - diff --git a/resources/translations/zh-CN/Equipment.xml b/resources/translations/zh-CN/Equipment.xml deleted file mode 100644 index 45ace2f79..000000000 --- a/resources/translations/zh-CN/Equipment.xml +++ /dev/null @@ -1,335 +0,0 @@ - - - - 12cm単装砲 - 12cm Single Cannon - - - 12.7cm連装砲 - 12.7cm Twin Cannon - - - 10cm連装高角砲 - 10cm Twin High-Angle Cannon - - - 14cm単装砲 - 14cm Single Cannon - - - 15.5cm三連装砲 - 15.5cm Triple Cannon - - - 20.3cm連装砲 - 20.3cm Twin Cannon - - - 35.6cm連装砲 - 35.6cm Twin Cannon - - - 41cm連装砲 - 41cm Twin Cannon - - - 46cm三連装砲 - 46cm Triple Cannon - - - 12.7cm連装高角砲 - 12.7cm Twin High-Angle Cannon - - - 15.2cm単装砲 - 15.2cm Single Cannon - - - 15.5cm三連装副砲 - 15.5cm Triple Cannon - - - 61cm三連装魚雷 - 61cm Triple Torpedo - - - 61cm四連装魚雷 - 61cm Quad Torpedo - - - 61cm四連装(酸素)魚雷 - 61cm Quad (Oxygen) Torpedo - - - 九七式艦攻 - Type 97 Torpedo Bomber - - - 天山 - Tenzan - - - 流星 - Ryuusei - - - 九六式艦戦 - Type 96 Fighter - - - 零式艦戦21型 - Type 21 Zero Fighter - - - 零式艦戦52型 - Type 52 Zero Fighter - - - 烈風 - Reppu - - - 九九式艦爆 - Type 99 Bomber - - - 彗星 - Suisei - - - 零式水上偵察機 - Type 0 Recon Seaplane - - - 瑞雲 - Zuiun - - - 13号対空電探 - Type 13 Air RADAR - - - 22号対水上電探 - Type 22 Surface RADAR - - - 33号対水上電探 - Type 33 Surface RADAR - - - 21号対空電探 - Type 21 Air RADAR - - - 32号対水上電探 - Type 32 Surface RADAR - - - 14号対空電探 - Type 14 Air RADAR - - - 改良型艦本式タービン - Improved Steam Turbine - - - 強化型艦本式缶 - Enhanced Steam Turbine - - - 三式弾 - Type 3 Shell - - - 九一式徹甲弾 - Type 91 AP Shell - - - 7.7mm機銃 - 7.7mm Gun - - - 12.7mm単装機銃 - 12.7mm Gun - - - 25mm連装機銃 - 25mm Dual Gun - - - 25mm三連装機銃 - 25mm Triple Gun - - - 甲標的 - Type A Ko-hyoteki - - - 応急修理要員 - Repair Team - - - 応急修理女神 - Repair Goddess - - - 九四式爆雷投射機 - Type 94 Depth Charge - - - 三式爆雷投射機 - Type 3 Depth Charge - - - 九三式水中聴音機 - Type 93 SONAR - - - 三式水中探信儀 - Type 3 SONAR - - - 12.7cm単装高角砲 - 12.7 cm Single High-Angle Cannon - - - 25mm単装機銃 - 25mm Single Gun - - - 20.3cm(3号)連装砲 - 20.3cm(no.3) Dual Cannon - - - 12cm30連装噴進砲 - 12cm 30-tube Rocket Launcher - - - 流星改 - Ryuusei Kai - - - 烈風改 - Reppu Kai - - - 彩雲 - Saiun - - - 紫電改二 - Shiden Kai 2 - - - 震電改 - Shinden Kai - - - 彗星一二型甲 - Suisei Model 12A - - - 61cm五連装(酸素)魚雷 - 61cm Quintuple (Oxygen) Torpedo - - - 零式水上観測機 - Zero Observation Seaplane - - - 零式艦戦62型(爆戦) - Type 62 Zero Fighter-Bomber - - - 二式艦上偵察機 - Type 2 Recon Plane - - - 試製晴嵐 - Prototype Seiran - - - 12.7cm連装砲B型改二 - 12.7cm Twin Cannon Type B Kai2 - - - Ju87C改 - Ju 87C Kai - - - 15.2cm連装砲 - 15.2cm Twin Cannon - - - 8cm高角砲 - 8cm High-Angle Cannon - - - 53cm艦首(酸素)魚雷 - 53cm Hull-mount (Oxygen) Torpedo - - - 大発動艇 - Daihatsu-Class Landing Craft - - - カ号観測機 - Type Ka Liaison Aircraft - - - 三式指揮連絡機(対潜) - Type 3 Liaison Aircraft - - - 10cm連装高角砲(砲架) - 10cm High-angle Cannon (Improved) - - - 増設バルジ(中型艦) - Anti-Torpedo Bulge (M) - - - 増設バルジ(大型艦) - Anti-Torpedo Bulge (L) - - - 探照灯 - Searchlight - - - ドラム缶(輸送用) - Drum (Transport) - - - 瑞雲(六三四空) - Zuiun (634 Air Group) - - - 瑞雲12型 - Zuiun Model 12 - - - 九七艦攻(九三一空) - Type 97 Torpedo Bomber (931 Air Group) - - - 天山(九三一空) - Tenzan (931 Air Group) - - - 12.7cm単装砲 - 12.7cm Naval Gun - - - 15cm連装副砲 - 15cm Twin Gun Mount - - - 38cm連装砲 - 38cm Twin Gun Mount - - - 艦艇修理施設 - Ship Repair Facility - - diff --git a/resources/translations/zh-CN/Operations.xml b/resources/translations/zh-CN/Operations.xml deleted file mode 100644 index 0c63effca..000000000 --- a/resources/translations/zh-CN/Operations.xml +++ /dev/null @@ -1,423 +0,0 @@ - - - - 鎮守府正面海域 - World 1-1 - - - 南西諸島沖 - World 1-2 - - - 製油所地帯沿岸 - World 1-3 - - - 南西諸島防衛線 - World 1-4 - - - カムラン半島 - World 2-1 - - - バシー島沖 - World 2-2 - - - 東部オリョール海 - World 2-3 - - - 沖ノ島海域 - World 2-4 - - - モーレイ海哨戒 - World 3-1 - - - キス島沖 - World 3-2 - - - アルフォンシーノ方面 - World 3-3 - - - 北方海域全域 - World 3-4 - - - ジャム島攻略作戦 - World 4-1 - - - カレー洋制圧戦 - World 4-2 - - - リランカ島空襲 - World 4-3 - - - カスガダマ沖海戦 - World 4-4 - - - 南方海域前面 - World 5-1 - - - 珊瑚諸島沖 - World 5-2 - - - サブ島沖海域 - World 5-3 - - - サーモン海域 - World 5-4 - - - 鎮守府近海 - World 1-5 - - - 南西海域サメワニ沖 - E-1 - - - 南西海域ズンダ海峡 - E-2 - - - ポートワイン沖海域 - E-3 - - - 【第2段階作戦】 中部太平洋海域 - E-4 - - - 【第2段階作戦】 北太平洋海域 - E-5 - - - 渦潮 - Whirlpool - - - うずしお - Whirlpool - - - うずしお(弾薬) - Whirlpool (Ammo) - - - 鋼材 - Steel Node - - - 燃料 - Fuel Node - - - 弾薬 - Ammo Node - - - ボーキサイト - Bauxite Node - - - 敵偵察艦 - Reconnaissance Ship - - - 敵はぐれ艦隊 - Stray Fleet - - - 敵主力艦隊 - Main Fleet (Boss) - - - 敵前衛艦隊 - Vanguard Fleet - - - 敵主力部隊 - Main Force (Boss) - - - 敵支援艦隊 - Support Fleet - - - 敵偵察艦隊 - Reconnaissance Fleet - - - 敵機動部隊 - Task Force (Boss) - - - 敵護衛空母群 - Escort Carrier Group - - - 敵水雷戦隊 - Torpedo Squadron - - - 敵運送船団 - Transport Fleet - - - 敵通商破壊艦隊 - Trade Destruction Fleet (Boss) - - - 敵巡洋艦隊 - Cruiser Corps - - - 敵強襲揚陸艦隊 - Amphibious Assault Fleet - - - 敵主力打撃群 - Main Strike Group (Boss) - - - 敵水上打撃艦隊 - Aquatic Strike Fleet - - - 敵空母機動部隊 - Aircraft Carrier Task Force - - - 敵精鋭水雷戦隊 - Elite Torpedo Squadron - - - 敵侵攻中核艦隊 - Core Invasion Fleet (Boss) - - - 敵哨戒艦隊 - Patrol Fleet - - - 敵北方侵攻艦隊 - Northern Invasion Fleet (Boss) - - - 敵キス島包囲艦隊 - Kis Island Siege Fleet (Boss) - - - 深海棲艦泊地艦隊 - Alfonsiones Deep-Sea Fleet (Boss) - - - 深海棲艦泊地防衛艦隊 - Deep-Sea Fleet - - - 深海棲艦北方艦隊中枢 - Central Deep-Sea Northern Fleet (Boss) - - - 深海棲艦水上打撃艦隊 - Deep-Sea Aquatic Strike Fleet - - - 東方潜水艦隊 - Eastern Diving Fleet - - - 東方艦隊 - Eastern Fleet - - - 東方派遣艦隊 - Eastern Dispatch Fleet (Boss) - - - 敵潜水教導艦隊 - Kyoudou Submarine Fleet - - - 東方主力艦隊 - Eastern Main Fleet (Boss) - - - 敵補給船団 - Supply Convoy - - - 敵潜水艦隊 - Submarine Fleet - - - 敵東方艦隊残存部隊 - Remaining Eastern Fleet - - - 敵潜水艦哨戒線 - Submarine Patrol Fleet - - - 敵東方中枢艦隊 - East Central Fleet (Boss) - - - 敵前線哨戒艦隊 - Front Line Patrol Fleet - - - 敵水上打撃部隊 - Aquatic Strike Force - - - 敵前線司令艦隊 - Front Line Commander Fleet (Boss) - - - 敵任務部隊 - Task Force - - - 敵機動部隊本隊 - Main Task Force (Boss) - - - 敵補給部隊 - Supply Convoy - - - 敵潜水警戒艦隊 - Warning Submarine Fleet - - - 敵前衛警戒艦隊 - Warning Vanguard Fleet - - - 敵泊地護衛主力艦隊 - Main Fleet Anchorage Escort - - - 敵泊投錨中輸送船団 - Anchored Night Convoy - - - 敵サーモン方面主力艦隊 - Main Fleet Headquarters (Boss) - - - 敵偵察潜水艦 - Reconnaissance Submarine - - - 敵潜水艦隊A群 - Submarine Fleet Group A - - - 敵潜水艦隊B群 - Submarine Fleet Group B - - - 敵潜水艦隊C群 - Submarine Fleet Group C - - - 敵侵攻打撃艦隊A群 - Invasion Strike Fleet Group A - - - 敵侵攻打撃艦隊B群 - Invasion Strike Fleet Group B - - - 敵通商破壊主力艦隊 - Main Trade Attack Fleet (Boss) - - - 敵ピケット艦隊 - Picket Fleet - - - 敵遊撃部隊 - Guerilla Force - - - 敵遊撃部隊 - Guerilla Force - - - 敵任務艦隊 - Mission Fleet - - - 敵機動部隊主力 - Main Task Force - - - 敵新鋭戦艦部隊 - State-of-the-art Battleship Troops - - - 敵機動部隊支隊A群 - Detached Task Force Group A - - - 敵補給部隊本体 - Main Supply Convoy (Boss) - - - 敵前衛警戒部隊 - Detached Security Vanguard - - - 敵任務部隊前衛 - Vanguard Task Force - - - 敵対潜警戒部隊 - Security Detachment - - - 敵任務部隊本隊 - Main Task Force(Boss) - - - 敵緊急派遣艦隊 - Emergency Dispatch Fleet - - - ABDA主力艦隊 - ABDA Main Fleet (Boss) - - - 敵増援任務部隊B群 - Reinforcment Task Force Group B - - - ABDA残存艦隊 - ABDA Remaining Fleet - - - 深海棲艦ポートワイン泊地 - Port Wine Area Deep Sea Fleet (Boss) - - - 敵増援任務部隊 - Renforcement Task Force - - \ No newline at end of file diff --git a/resources/translations/zh-CN/Quests.xml b/resources/translations/zh-CN/Quests.xml deleted file mode 100644 index 54d1e2bf3..000000000 --- a/resources/translations/zh-CN/Quests.xml +++ /dev/null @@ -1,815 +0,0 @@ - - - - A1 - はじめての「編成」! - First Formation! - 2隻以上の艦で編成される「艦隊」を編成せよ! - Have 2 ships in your main fleet. - - - A2 - 「駆逐隊」を編成せよ! - Form a Destroyer Squadron! - 駆逐艦4隻以上で編成される「駆逐隊」を編成せよ! - Have 4 DD in your main fleet. - - - A3 - 「水雷戦隊」を編成せよ! - Form a Torpedo Squadron! - 軽巡洋艦を旗艦とし、数隻の駆逐艦で構成される「水雷戦隊」を編成せよ! - Have a CL as a flagship and 5 DD in your main fleet. - - - A4 - 6隻編成の艦隊を編成せよ! - Form a Six Ship Fleet! - 全6隻で構成される主力艦隊を編成せよ! - Have 6 ships in your main fleet. - - - A5 - 軽巡2隻を擁する隊を編成せよ! - Form a Squadron with Two CL! - 軽巡洋艦2隻を擁する高速艦隊を編成せよ! - Have 2 CL in your main fleet. - - - A6 - 第2艦隊を編成せよ! - Form the Second Fleet! - 二つ目の艦隊、第2艦隊の旗艦を指定して、第2艦隊を編成せよ! - Have a flagship in your second fleet. - - - A7 - 「重巡戦隊」を編成せよ! - Form a Heavy Cruiser Squadron! - 重巡洋艦2隻を擁する重巡艦隊を編成せよ! - Have 2 CA in your main fleet. - - - A8 - 「天龍」型軽巡姉妹の全2艦を編成せよ! - Form the Tenryuu-class! - 天龍型軽巡洋艦「天龍」「龍田」を同一艦隊に配属せよ! - Have Tenryuu (天龍) and Tatsuta (龍田) in your main fleet. - - - A9 - 「水上機母艦」を配備せよ! - Ready a Seaplane Carrier! - 多数の水上偵察機を運用する「水上機母艦」を艦隊に配備せよ! - Have an AV in your main fleet. - - - A10 - 「第六駆逐隊」を編成せよ! - Form the Destroyer Division 6! - 「暁」「響」「雷」「電」4隻による第六駆逐隊を編成せよ! - Have ONLY Akasuki (暁), Hibiki (響), Inazuma (雷) and Ikazuchi (電) in your main fleet. - - - A11 - 第2艦隊で空母機動部隊を編成せよ! - Form a Carrier Task Force in the Second Fleet! - 第2艦隊に空母を配備して、空母機動部隊を編成せよ! - Have a CV/CVL and 3 DD in your second fleet. - - - A12 - 空母機動部隊を編成せよ! - Form a Carrier Task Force! - 空母1隻以上を旗艦とし、その護衛艦艇と共に、空母機動部隊を編成せよ! - Have a CV/CVL as a flagship and 3 DD in your main fleet. - - - A13 - 戦艦と重巡による主力艦隊を編成せよ! - Form the Main Fleet with BB and CA! - 戦艦1隻以上、重巡2隻以上を主力とした水上打撃艦隊を編成せよ! - Have a BB and 2 CA in your main fleet. - - - A14 - 「川内」型軽巡姉妹の全3艦を編成せよ! - Form the Sendai-class! - 川内型軽巡洋艦、「川内」「神通」「那珂」を同一艦隊に編成せよ! - Have Sendai (川内), Jintsuu (神通) and Naka (那珂) in your main fleet. - - - A15 - 「妙高」型重巡姉妹の全4隻を編成せよ! - Form the Myoukou-class! - 妙高型重巡洋艦「妙高」「那智」「足柄」「羽黒」を同一艦隊に配属せよ! - Have Myoukou (妙高), Nachi (那智), Ashigara (足柄) and Haguro (羽黒) in your main fleet. - - - A16 - 「金剛」型による高速戦艦部隊を編成せよ! - Form the Kongou-class! - 金剛型戦艦「金剛」「比叡」「榛名」「霧島」全4隻の高速戦艦を集中配備せよ! - Have Kongou (金剛), Hiei (比叡), Haruna (榛名) and Kirishima (霧島) in your main fleet. - - - A17 - 「扶桑」型戦艦姉妹の全2隻を編成せよ! - Form the Fusou-class! - 扶桑型戦艦「扶桑」「山城」を同一艦隊に配属せよ! - Have Fusou (扶桑) and Yamashiro (山城) in your main fleet. - - - A18 - 「伊勢」型戦艦姉妹の全2隻を編成せよ! - Form the Ise-class! - 伊勢型戦艦「伊勢」「日向」を同一艦隊に配属せよ! - Have Ise (伊勢) and Hyuuga (日向) in your main fleet. - - - A19 - 「南雲機動部隊」を編成せよ! - Form the Nagumo Task Force! - 一航戦「赤城」「加賀」二航戦「飛龍」「蒼龍」からなる第一機動部隊を編成せよ! - Have ONLY Akagi (赤城), Kaga (加賀), Hiryuu (飛龍) and Souryuu (蒼龍) in your main fleet. - - - A20 - 「三川艦隊」を編成せよ! - Form the Mikawa Fleet! - 「鳥海」「青葉」「加古」「古鷹」「天龍」を含む高速艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kako (加古), Furutaka (古鷹), Tenryuu (天龍) and a FAST speed ship in your main fleet. - - - A21 - 「第四戦隊」を編成せよ! - Form the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とした第四戦隊を編成せよ! - Have Atago (愛宕), Takao (高雄), Choukai (鳥海) and Maya (摩耶) in your main fleet. - - - A22 - 「西村艦隊」を編成せよ! - Form the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とした西村艦隊を編成せよ! - Have Fusou (扶桑), Yamashiro (山城), Mogami (最上) and Shigure (時雨) in your main fleet. - - - A23 - 「第五航空戦隊」を編成せよ! - Form the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とし、駆逐艦2隻を加えた第五航空戦隊を編成せよ! - Have Shoukaku (翔鶴), Zuikaku (瑞鶴) and 2 DD in your main fleet. - - - A24 - 新「三川艦隊」を編成せよ! - Form the New Mikawa Fleet! - 「鳥海」「青葉」「衣笠」「加古」「古鷹」「天龍」からなる三川艦隊を編成せよ! - Have Choukai (鳥海), Aoba (青葉), Kinugasa (衣笠), Kako (加古), Furutaka (古鷹) and Tenryuu (天龍) in your main fleet. - - - A25 - 潜水艦隊を編成せよ! - Form a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊を編成せよ! - Have 2 SS in your main fleet. - - - A26 - 航空水上打撃艦隊を編成せよ! - Form a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊を編成せよ! - Have 2 BBV and 2 CAV in your main fleet. - - - A27 - 中規模潜水艦隊を編成せよ! - Form a Medium-Sized Submarine Fleet! - 伊号潜水艦3隻以上からなる潜水艦隊を編成せよ! - Have 3 SS in your main fleet. - - - A28 - 「第六戦隊」を編成せよ! - Form the Cruiser Division 6! - 「古鷹」「加古」「青葉」「衣笠」を基幹とした第六戦隊を編成せよ! - Have Furutaka (古鷹), Kako(加古), Aoba (青葉) and Kinugasa (衣笠) in your main fleet. - - - A29 - 「第5艦隊」を編成せよ! - Form the 5th Fleet! - 「那智」「足柄」「多摩」「木曾」を中核とした「第五艦隊」を編成せよ! - Have Nachi (那智), Ashigara (足柄), Tama (多摩), and Kiso (木曾) in your fleet. - - - A30 - 「第1水雷戦隊」を編成せよ! - Form the Torpedo Squadron 1! - 「阿武隈」「曙」「潮」「霞」「不知火」を中核とした「第1水雷戦隊」を編成せよ! - Have Abukuma (阿武隈), Akebono (曙), Ushio (潮), Kasumi (霞) and Shiranui (不知火) in your fleet. - - - A31 - 「第八駆逐隊」を編成せよ! - Form the Destroyer Division 8! - 「朝潮」「満潮」「大潮」「荒潮」4隻による第八駆逐隊を編成せよ! - Have Asashio (朝潮), Michishio (満潮), Ooshio (大潮) and Arashio (荒潮) in your fleet. - - - A32 - 「第十八駆逐隊」を編成せよ! - Form the Destroyer Division 18! - 「霞」「霰」「陽炎」「不知火」4隻による第十八駆逐隊を編成せよ! - Have ONLY Kasumi (霞), Arare (霰), Kagerou (陽炎) and Shiranui (不知火) in your fleet. - - - A33 - 「第三十駆逐隊(第一次)」を編成せよ! - Form the Destroyer Division 30 (Gen-1)! - 「睦月」「如月」「弥生」「望月」4隻による第三十駆逐隊(第一次)を編成せよ! - Have ONLY Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生) and Mochizuki (望月) in your fleet. - - - B1 - はじめての「出撃」! - First Sortie! - 艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy your main fleet on a combat mission. - - - B2 - 鎮守府正面海域を護れ! - Protect the Seas of Chinju-Fu! - 鎮守府正面海域に艦隊を出撃させ、敵艦の跋梁を阻止せよ! - Deploy to World 1-1 and clear the stage. - - - B3 - 第2艦隊、出撃せよ! - Second Fleet Sortie! - 新たに編成した「第2艦隊」を出撃せよ! - Deploy your 2nd Fleet on a combat mission. - - - B4 - 南西諸島沖に出撃せよ! - Sortie to the Coast of Nansei Islands! - 南西諸島沖に艦隊を出撃させ、敵艦隊と交戦せよ! - Deploy to World 1-2 and clear the stage. - - - B5 - 接近する「敵前衛艦隊」を迎撃せよ! - Intercept Approaching Enemy Vanguard Fleet! - 南西諸島沖に接近する「敵前衛艦隊」を捕捉、これを撃滅せよ! - Deploy to World 1-2 after defeating its boss and clear the stage. - - - B6 - 「水雷戦隊」で出撃せよ! - Sortie the Torpedo Squadron! - 軽巡洋艦1隻を旗艦とし、複数の駆逐艦からなる水雷戦隊で出撃せよ! - Deploy a fleet with a CL as flagship and 3 DD as escorts. - - - B7 - 「重巡洋艦」を出撃させよ! - Sortie a Heavy Cruiser! - 重巡洋艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a CA as its flagship. - - - B8 - 「戦艦」を出撃させよ! - Sortie a Battleship! - 海上の覇者、戦艦を旗艦とした艦隊を編成、これを出撃させよ! - Deploy a fleet with a BB as its flagship. BBV don't count. - - - B9 - 「空母機動部隊」出撃せよ! - Sortie a Carrier Task Force! - 空母1隻とその護衛艦艇で構成した空母機動部隊を出撃させよ! - Deply a fleet with CV(L) as flagship and 5 DD/CL/AV for the escorts. - - - B10 - 敵空母を撃沈せよ! - Sink Enemy Carrier! - 敵機動部隊を捕捉し、これを邀撃、敵空母を轟沈せよ! - Sink an enemy aircraft carrier. - - - B11 - 「三川艦隊」出撃せよ! - Sortie the Mikawa Fleet! - 新編成した「三川艦隊」で出撃せよ! - Deploy a fleet with Choukai, Aoba, Kako, Furutaka, Tenryuu and a FAST speed ship. - - - B12 - 「第六駆逐隊」出撃せよ! - Sortie the Destroyer Division 6! - 「暁」「響」「雷」「電」による第六駆逐隊、出撃せよ! - Deploy a fleet with ONLY Akatsuki, Hibiki, Inazuma, and Ikazuchi. - - - B13 - 「第四戦隊」出撃せよ! - Sortie the Cruiser Division 4! - 「愛宕」「高雄」「鳥海」「摩耶」を基幹とする第四戦隊で、バシー島沖の敵を撃滅せよ! - Deploy a fleet with Atago, Takao, Choukai, Maya and any 2 ships. Score a victory against World 2-2 Boss. - - - B14 - 「西村艦隊」出撃せよ! - Sortie the Nishimura Fleet! - 「扶桑」「山城」「最上」「時雨」を基幹とする西村艦隊で、オリョール海の敵を撃滅せよ! - Deploy a fleet with Fusou, Yamashiro, Mogami, Shigure and any 2 ships. Score a victory against World 2-3 Boss. - - - B15 - 「第五航空戦隊」出撃せよ! - Sortie the Carrier Division 5! - 「翔鶴」「瑞鶴」を基幹とする第五航空戦隊で、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Shokaku, Zuikaku and any 4 ships. Score a victory against World 3-1 Boss. - - - B16 - 新「三川艦隊」出撃せよ! - Sortie the New Mikawa Fleet! - 完全編成した「三川艦隊」をもって、オリョール海の敵を撃滅せよ! - Deploy a fleet with Choukai, Aoba, Kinugasa, Kako, Furutaka and Tenryuu. Score a victory against World 2-3 Boss. - - - B17 - 「潜水艦隊」出撃せよ! - Sortie a Submarine Fleet! - 伊号潜水艦2隻からなる潜水艦隊でオリョール海の敵を撃滅せよ! - Deploy a fleet with 2 SS and 4 additional ships. Score a victory against World 2-3 Boss. - - - B18 - 「航空水上打撃艦隊」出撃せよ! - Sortie a Naval Aviation Strike Fleet! - 航空戦艦2隻と航空巡洋艦2隻を基幹とする艦隊でカレー洋の制海権を握れ! - Deploy a fleet with 2 BBV, 2 CAV and 2 additional ships. Score a victory against World 4-2 Boss. - - - B19 - 「第六戦隊」出撃せよ! - Sortie the Cruiser Division 6! - 編成した「第六戦隊」をもって出撃し、オリョール海の敵を撃滅「完全勝利」せよ! - Deploy a fleet with Furutaka, Kako, Kinugasa, Aoba and 2 additional ships. Score a S RATING victory or higher against World 2-3 Boss. - - - B20 - 「第八駆逐隊」出撃せよ! - Sortie the Destroyer Division 8! - 編成した「第八駆逐隊」を含む艦隊で出撃し、オリョール海の敵を撃滅せよ! - Deploy a fleet with Asashio, Michishio, Ooshio, Arashio and 2 additional ships. Score a victory against World 2-3 Boss. - - - B21 - 「第十八駆逐隊」出撃せよ! - Sortie the Destroyer Division 18! - 編成した「第十八駆逐隊」を含む艦隊で出撃し、北方海域モーレイ海の敵を撃滅せよ! - Deploy a fleet with Kasumi, Arare, Kagerou, Shiranui and 2 additional ships. Score a victory against World 3-1 Boss. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Sortie the Destroyer Division 30 (Gen-1)! - 「第三十駆逐隊(第一次)」を含む艦隊で出撃し、キス島沖の主力艦隊と交戦せよ! - Deploy a fleet with Mutsuki, Kisaragi, Yayoi, Mochizuki and 2 DD. Score a victory against World 3-2 Boss. - - - Bd1 - 敵艦隊を撃破せよ! - Daily Sortie 1 - 艦隊を出撃させ、敵艦隊を捕捉、これを撃滅せよ! - Defeat an enemy fleet. - - - Bd2 - 敵艦隊主力を撃滅せよ! - Daily Sortie 2 - 艦隊を出撃させ、敵艦隊「主力」を捕捉!これを撃滅せよ! - Defeat the flagship of an enemy fleet. - - - Bd3 - 敵艦隊を10回邀撃せよ! - Daily Sortie 3 - 艦隊全力出撃!遊弋する敵艦隊を10回邀撃せよ! - Defeat 10 enemy fleets. - - - Bd4 - 敵空母を3隻撃沈せよ! - Daily Sortie 4 - 艦隊の脅威となる敵空母群。これを捕捉撃滅し、3隻轟沈せよ! - Sink 3 enemy aircraft carriers. - - - Bd5 - 敵補給艦を3隻撃沈せよ! - Daily Sortie 5 - 艦隊を出撃させ、敵補給艦を捕捉、これを撃滅せよ! - Sink 3 enemy transport ships. - - - Bd6 - 敵輸送船団を叩け! - Daily Sortie 6 - 敵の輸送船5隻以上を撃沈し、敵の補給路を寸断せよ! - Sink 5 enemy transport ships. - - - Bd7 - 南西諸島海域の制海権を握れ! - Daily Sortie 7 - 艦隊を南西諸島海域に全力出撃させ、多数の敵艦隊「主力」群を捕捉、撃滅せよ! - Defeat 5 bosses in World 2. - - - Bd8 - 敵潜水艦を制圧せよ! - Daily Sortie 8 - 対潜能力の充実した艦隊で出撃、敵潜水艦狩りを実施せよ! - Sink 6 enemy submarines. - - - Bw1 - あ号作戦 - Weekly Sortie 1 - 1週間の全力出撃を行い、可能な限り多くの敵艦隊を捕捉、これを迎撃せよ! - Deploy your fleet 36 times, encounter 24 bosses, defeat 12 bosses and get 6 Perfect S RATING victories. - - - Bw2 - い号作戦 - Weekly Sortie 2 - 有力な母艦航空隊で1週間の全力出撃を行い、可能な限り多くの敵空母を撃滅せよ! - Sink 20 aircraft carriers. - - - Bw3 - 海上通商破壊作戦 - Weekly Sortie 3 - 1週間で敵輸送船を20隻以上撃沈せよ! - Sink 20 transport ships. - - - Bw4 - ろ号作戦 - Weekly Sortie 4 - 1週間の全力出撃を行い、敵輸送船団を捕捉・撃滅、敵の補給路を寸断せよ! - Sink 50 transport ships. - - - Bw5 - 海上護衛戦 - Weekly Sortie 5 - 有力な対潜能力を持つ海上護衛隊によって、可能な限り多くの敵潜水艦を撃滅せよ! - Sink 15 submarines. - - - Bw6 - 敵東方艦隊を撃滅せよ! - Weekly Sortie 6 - 西方海域に出撃し、敵東方艦隊の主力を捕捉、これを撃滅せよ! - Defeat 12 bosses in World 4. - - - Bw7 - 敵北方艦隊主力を撃滅せよ! - Weekly Sortie 7 - 北方海域の深部に出撃し、敵北方艦隊の主力艦隊を捕捉、これを撃滅せよ! - Defeat 5 bosses in World 3-3 and 3-4. - - - Bw8 - 敵東方中枢艦隊を撃破せよ! - Weekly Sortie 8 - 西方海域カスガダマ島沖に出撃し、敵東方中枢艦隊を捕捉、これを撃破せよ! - Defeat a boss in World 4-4. - - - Bw9 - 南方海域珊瑚諸島沖の制空権を握れ! - Weekly Sortie 9 - 南方海域珊瑚諸島沖に出撃し、敵機動部隊本体を捕捉撃滅、これに完全勝利せよ! - Defeat 2 bosses in World 5-2 with S RATING victory or higher. - - - C1 - はじめての「演習」! - First Exercise! - 他の提督(プレイヤー)の艦隊と「演習」を行おう! - Challenge another fleet in practice mode. - - - C2 - 「演習」で練度向上! - Daily Exercises 1 - 本日中に他の司令官の艦隊に対して3回「演習」を挑もう! - Challenge 3 other fleets in practice mode within the same day. - - - C3 - 「演習」で他提督を圧倒せよ! - Daily Exercises 2 - 本日中に他の司令官の艦隊との「演習」で5回以上「勝利」をおさめよう! - Get 5 victories in practice mode within the same day. - - - C4 - 大規模演習 - Weekly Exercises - 今週中に「演習」で他の提督の艦隊に対して20回「勝利」しよう! - Get 20 victories in practice mode within the same week. - - - D1 - はじめての「遠征」! - First Expedition - 艦隊を「遠征」に出発させよう! - Perform an expedition. - - - D2 - 「遠征」を3回成功させよう! - Daily Expeditions 1 - 本日中に「遠征」3回成功させよう! - Perform 3 successful expeditions within the same day. - - - D3 - 「遠征」を10回成功させよう! - Daily Expeditions 2 - 本日中に「遠征」10回成功させよう! - Perform 10 successful expeditions within the same day. - - - D4 - 大規模遠征作戦、発令! - Weekly Expeditions - 今週中に「遠征」30回成功させよう! - Perform 30 successful expeditions within the same week. - - - D5 - 第一次潜水艦派遣作戦 - The First Submarine Operation - はじめての潜水艦派遣作戦を成功させよう! - Complete Expedition 30. - - - D6 - 第二次潜水艦派遣作戦 - The Second Submarine Operation - 第2次潜水艦派遣作戦を成功させよう! - Complete Expedition 30 one more time. - - - D7 - 潜水艦派遣作戦による技術入手の継続! - Continuation of Submarine Operations - 第3次及び第4次潜水艦派遣作戦を成功させ、他国製技術の導入に努めよ! - Complete Expedition 30 two more times. - - - E1 - はじめての「補給」! - First Supply - 補給は大事です!燃料・弾薬を艦に「補給」しよう! - Resupply a ship. - - - E2 - はじめての「入渠」! - First Docking - 戦闘で傷ついた艦を「入渠」させて修理して、次の出撃に備えよう! - Repair a ship. - - - E3 - 艦隊大整備! - Daily Repairs - 各艦隊から整備が必要な艦を5隻以上ドック入りさせ、大規模な整備をしよう! - Repair 5 ships. - - - E4 - 艦隊酒保祭り! - Daily Resupplies - 艦隊酒保祭り!各艦に延べ15回以上の補給を実施しよう! - Resupply your ships 15 times. - - - F1 - はじめての「建造」! - First Construction - 「工廠」で鋼材などの資材を使って新しい艦を「建造」しよう! - Craft a ship. - - - F2 - はじめての「開発」! - First Development - 「工廠」でボーキサイトなどの資材を使って新しい装備アイテムを「開発」しよう! - Craft a piece of equipment. - - - F3 - はじめての「解体」! - First Dismantlement - 「工廠」で不要な艦を「解体」してみよう! - Dismantle a ship. - - - F4 - はじめての「廃棄」! - First Disposal - 「工廠」で不要な装備アイテムを「廃棄」してみよう! - Scrap a piece of equipment. - - - F5 - 新装備「開発」指令 - Daily Equipment Development 1 - 「工廠」で装備アイテムを新たに「開発」しよう(失敗もOK)! - Craft a piece of equipment. (Failures are OK) - - - F6 - 新造艦「建造」指令 - Daily Ship Construction 1 - 「工廠」で艦娘を本日中に新たに「建造」しよう! - Craft a ship. - - - F7 - 装備「開発」集中強化! - Daily Development 2 - 「工廠」で装備アイテムを本日中に3回「開発」しよう(失敗もOK)! - Craft 3 pieces of equipment. (Failures are OK) - - - F8 - 艦娘「建造」艦隊強化! - Daily Construction 2 - 艦隊強化のため、「工廠」で艦娘を本日中に3隻「建造」しよう! - Craft 3 ships. - - - F9 - 軍縮条約対応! - Daily Dismantlement - 少し艦隊規模が大きくなりすぎました!「工廠」で不要な艦を2隻「解体」してください! - Scrap 2 ships. - - - F10 - 「大型艦建造」の準備!(その弐) - Preparation for LCS (Part 2) - 大型艦建造の準備をします!「工廠」で装備アイテムを4回「廃棄」してみてください! - Scrap equipment 4 times. - - - F11 - 輸送用ドラム缶の準備 - Preparation for Transport Drum Canisters - 「工廠」で装備アイテムを3回「廃棄」して、輸送用ドラム缶を準備します。 - Scrap equipment 3 times. - - - F12 - 資源の再利用 - Weekly Dismantlement - 「工廠」で余剰の装備アイテムをなるべく多く「廃棄」して、鋼材の再利用に努めよう! - Scrap equipment 24 times. - - - G1 - はじめての「近代化改修」! - First Modernization - 任意の艦を近代化改修(合成)して、強化せよ! - Perform a successful modernization. - - - G2 - 艦の「近代化改修」を実施せよ! - Daily Modernization - 近代化改修を実施して、2回以上これを成功させよ! - Perform 2 successful modernizations within the same day. - - - G3 - 「近代化改修」を進め、戦備を整えよ! - Weekly Modernization - 一週間の間に、近代化改修を15回成功させよ! - Perform 15 successful modernizations within the same week. - - - G4 - 「大型艦建造」の準備!(その壱) - Preparation for LSC (Part 1) - 大型艦/新型艦建造のための準備を行う。任意の艦で近代化改修を4回成功させよ! - Perform 4 successful modernizations. - - - WF01 - 式の準備!(その壱) - In Preparation of Love! (Part 1) - 式の準備をします!「工廠」で装備アイテムを2回「廃棄」して身の回りの整理を! - Scrap equipment 2 times to show your love!. - - - WC01 - 式の準備!(その弐) - In Preparation of Love! (Part 2) - 本日中に「演習」で2回以上「勝利」をおさめ、式への気持ちを整理しよう! - Show your love by getting 2 victories in practice mode! - - - WA01 - 式の準備!(その参) - In Preparation of Love! (Part 3) - 第一艦隊旗艦に練度の高い(Lv.90以上~99以下)艦娘を配備して気持ちを整理せよ! - Organize your feelings and deploy your fleet with a high level flagship (Lv.90~99)! - - - WB01 - 式の準備!(最終) - In Preparation of Love! (Final) - 練度の高い(Lv.90以上~99以下)第一艦隊旗艦で出撃し、オリョール海の暁に勝利を刻め! - Deploy a fleet with a high level (Lv.90~99) flagship to 2-3 obtain an S victory or higher against the boss. - - - WA02 - 新たなる旅立ち! - Journey Anew! - 第一艦隊旗艦に強い絆を結んだLv.100以上の艦娘を配備した6隻の艦隊を編成せよ! - Organize a fleet of 6 ships with your newly bonded ship of Lv.100 or more as flagship! - - - WB02 - 二人でする初めての任務! - Your First Mission Together! - 強い絆を結んだ艦娘を旗艦とした第一艦隊でリランカ島へ出撃、敵中枢を撃滅せよ! - Deploy a fleet to 4-3 with a bonded ship of Lv.100 or more as flagship and score an S vectory or higher against the boss. - - - 612 - 輸送用ドラム缶の準備 - Prepare the shipping barrel - 「工廠」で装備アイテムを3回「廃棄」して、輸送用のドラム缶を準備します。 - Scrap equipment 3 times to acquire a shipping barrel - - - 409 - 潜水艦派遣による海外艦との接触作戦 - Strategy Meeting with Overseas Submarine Dispatch! - 有力な潜水艦隊派遣による海外艦との接触作戦を成功させよ! - Complete expedition 31 and receive foreign destroyer Z1! - - - 410 - 南方への輸送作戦を成功させよ! - Weekly Expedition 2 - 激戦海域である南方海域への「東京急行」系遠征を敢行、これを成功させよ! - Complete expedition 37 or 38 - - - 411 - 南方への鼠輸送を継続実施せよ! - Weekly Expedition 3 - 今週中に「東京急行」系遠征を継続的に実施、同種作戦を7回成功せさよう! - Complete expedition 37 or 38 a total of 7 times in a week - - - D12 - (続)航空火力艦の運用を強化せよ! - Strengthen the Operation of the BBV (Cont.) - 「航空戦艦運用演習」を継続実施し、航空火力艦の運用の強化に引き続き努めよ! - Complete expedition 23 four more times. - - - B22 - 「第三十駆逐隊(第一次)」出撃せよ! - Deploy the 13th Destroyer Fleet - 「第三十駆逐隊(第一次)」を含む艦隊で出撃しキス島沖の主力艦隊と交戦せよ! - Deploy a fleet that consists of Mutsuki (睦月), Kisaragi (如月), Yayoi (弥生), Mochizuki (望月) and up to 2 additional DDs to world 3-2 and encounter the boss. - - - 247 - 「航空戦艦」抜錨せよ! - Sortie an aviation battleship fleet! - 航空戦艦2隻を基幹とする艦隊で、西方海域カスガダマ島の敵勢力を撃破せよ! - Have 2 BBV ships in your main fleet and score a victory against World 4-4 Boss. - - diff --git a/resources/translations/zh-CN/ShipTypes.xml b/resources/translations/zh-CN/ShipTypes.xml deleted file mode 100644 index 315c5ae57..000000000 --- a/resources/translations/zh-CN/ShipTypes.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - 1 - 海防艦 - DE - - - 2 - 駆逐艦 - DD - - - 3 - 軽巡洋艦 - CL - - - 4 - 重雷装巡洋艦 - CLT - - - 5 - 重巡洋艦 - CA - - - 6 - 航空巡洋艦 - CAV - - - 7 - 軽空母 - CVL - - - 9 - 戦艦 - BB - - - 8 - 戦艦 - Fast BB - - - 10 - 航空戦艦 - BBV - - - 11 - 正規空母 - CV - - - 12 - 超弩級戦艦 - B - - - 13 - 潜水艦 - SS - - - 14 - 潜水空母 - SSV - - - 15 - 補給艦 - AE - - - 16 - 水上機母艦 - AV - - - 17 - 揚陸艦 - LSD - - - 18 - 装甲空母 - CVB - - - 19 - 工作艦 - AR - - \ No newline at end of file diff --git a/resources/translations/zh-CN/Ships.xml b/resources/translations/zh-CN/Ships.xml deleted file mode 100644 index 7c87068e5..000000000 --- a/resources/translations/zh-CN/Ships.xml +++ /dev/null @@ -1,1183 +0,0 @@ - - - - 長門 - Nagato - - - 長門改 - Nagato Kai - - - 陸奥 - Mutsu - - - 陸奥改 - Mutsu Kai - - - 伊勢 - Ise - - - 伊勢改 - Ise Kai - - - 日向 - Hyuuga - - - 日向改 - Hyuuga Kai - - - 雪風 - Yukikaze - - - 雪風改 - Yukikaze Kai - - - 赤城 - Akagi - - - 赤城改 - Akagi Kai - - - 加賀 - Kaga - - - 加賀改 - Kaga Kai - - - 蒼龍 - Souryuu - - - 蒼龍改 - Souryuu Kai - - - 飛龍 - Hiryuu - - - 飛龍改 - Hiryuu Kai - - - 島風 - Shimakaze - - - 島風改 - Shimakaze Kai - - - 吹雪 - Fubuki - - - 吹雪改 - Fubuki Kai - - - 白雪 - Shirayuki - - - 白雪改 - Shirayuki Kai - - - 初雪 - Hatsuyuki - - - 初雪改 - Hatsuyuki Kai - - - 深雪 - Miyuki - - - 深雪改 - Miyuki Kai - - - 叢雲 - Murakumo - - - 叢雲改 - Murakumo Kai - - - 磯波 - Isonami - - - 磯波改 - Isonami Kai - - - 綾波 - Ayanami - - - 綾波改 - Ayanami Kai - - - 敷波 - Shikinami - - - 敷波改 - Shikinami Kai - - - 大井 - Ooi - - - 大井改 - Ooi Kai - - - 大井改二 - Ooi Kai2 - - - 北上 - Kitakami - - - 北上改 - Kitakami Kai - - - 北上改二 - Kitakami Kai2 - - - 金剛 - Kongou - - - 金剛改 - Kongou Kai - - - 金剛改二 - Kongou Kai2 - - - 比叡 - Hiei - - - 比叡改 - Hiei Kai - - - 比叡改二 - Hiei Kai2 - - - 榛名 - Haruna - - - 榛名改 - Haruna Kai - - - 霧島 - Kirishima - - - 霧島改 - Kirishima Kai - - - 霧島改二 - Kirishima Kai2 - - - 鳳翔 - Houshou - - - 鳳翔改 - Houshou Kai - - - 扶桑 - Fusou - - - 扶桑改 - Fusou Kai - - - 山城 - Yamashiro - - - 山城改 - Yamashiro Kai - - - 天龍 - Tenryuu - - - 天龍改 - Tenryuu Kai - - - 龍田 - Tatsuta - - - 龍田改 - Tatsuta Kai - - - 龍驤 - Ryuujou - - - 龍驤改 - Ryuujou Kai - - - 睦月 - Mutsuki - - - 睦月改 - Mutsuki Kai - - - 如月 - Kisaragi - - - 如月改 - Kisaragi Kai - - - 皐月 - Satsuki - - - 皐月改 - Satsuki Kai - - - 文月 - Fumizuki - - - 文月改 - Fumizuki Kai - - - 長月 - Nagatsuki - - - 長月改 - Nagatsuki Kai - - - 菊月 - Kikuzuki - - - 菊月改 - Kikuzuki Kai - - - 三日月 - Mikazuki - - - 三日月改 - Mikazuki Kai - - - 望月 - Mochizuki - - - 望月改 - Mochizuki Kai - - - 球磨 - Kuma - - - 球磨改 - Kuma Kai - - - 多摩 - Tama - - - 多摩改 - Tama Kai - - - 木曾 - Kiso - - - 木曾改 - Kiso Kai - - - 木曾改二 - Kiso Kai2 - - - 長良 - Nagara - - - 長良改 - Nagara Kai - - - 五十鈴 - Isuzu - - - 五十鈴改 - Isuzu Kai - - - 五十鈴改二 - Isuzu Kai2 - - - 名取 - Natori - - - 名取改 - Natori Kai - - - 由良 - Yura - - - 由良改 - Yura Kai - - - 川内 - Sendai - - - 川内改 - Sendai Kai - - - 神通 - Jintsuu - - - 神通改 - Jintsuu Kai - - - 神通改二 - Jintsuu Kai2 - - - 那珂 - Naka - - - 那珂改 - Naka Kai - - - 那珂改二 - Naka Kai2 - - - 千歳 - Chitose - - - 千歳改 - Chitose Kai - - - 千歳甲 - Chitose A - - - 千歳航 - Chitose CVL - - - 千歳航改 - Chitose CVL Kai - - - 千歳航改二 - Chitose CVL Kai2 - - - 千代田 - Chiyoda - - - 千代田改 - Chiyoda Kai - - - 千代田甲 - Chiyoda A - - - 千代田航 - Chiyoda CVL - - - 千代田航改 - Chiyoda CVL Kai - - - 千代田航改二 - Chiyoda CVL Kai2 - - - 最上 - Mogami - - - 最上改 - Mogami Kai - - - 古鷹 - Furutaka - - - 古鷹改 - Furutaka Kai - - - 加古 - Kako - - - 加古改 - Kako Kai - - - 青葉 - Aoba - - - 青葉改 - Aoba Kai - - - 妙高 - Myoukou - - - 妙高改 - Myoukou Kai - - - 那智 - Nachi - - - 那智改 - Nachi Kai - - - 足柄 - Ashigara - - - 足柄改 - Ashigara Kai - - - 羽黒 - Haguro - - - 羽黒改 - Haguro Kai - - - 高雄 - Takao - - - 高雄改 - Takao Kai - - - 愛宕 - Atago - - - 愛宕改 - Atago Kai - - - 摩耶 - Maya - - - 摩耶改 - Maya Kai - - - 鳥海 - Choukai - - - 鳥海改 - Choukai Kai - - - 利根 - Tone - - - 利根改 - Tone Kai - - - 利根改二 - Tone Kai2 - - - 筑摩 - Chikuma - - - 筑摩改 - Chikuma Kai - - - 筑摩改二 - Chikuma Kai2 - - - 飛鷹 - Hiyou - - - 飛鷹改 - Hiyou Kai - - - 隼鷹 - Junyou - - - 隼鷹改 - Junyou Kai - - - - Oboro - - - 朧改 - Oboro Kai - - - - Akebono - - - 曙改 - Akebono Kai - - - - Sazanami - - - 漣改 - Sazanami Kai - - - - Ushio - - - 潮改 - Ushio Kai - - - - Akatsuki - - - 暁改 - Akatsuki Kai - - - - Hibiki - - - 響改 - Hibiki Kai - - - Верный - Vérnyj - - - - Ikazuchi - - - 雷改 - Ikazuchi Kai - - - - Inazuma - - - 電改 - Inazuma Kai - - - 初春 - Hatsuharu - - - 初春改 - Hatsuharu Kai - - - 子日 - Nenohi - - - 子日改 - Nenohi Kai - - - 若葉 - Wakaba - - - 若葉改 - Wakaba Kai - - - 初霜 - Hatsushimo - - - 初霜改 - Hatsushimo Kai - - - 白露 - Shiratsuyu - - - 白露改 - Shiratsuyu Kai - - - 時雨 - Shigure - - - 時雨改 - Shigure Kai - - - 時雨改二 - Shigure Kai2 - - - 村雨 - Murasame - - - 村雨改 - Murasame Kai - - - 夕立 - Yuudachi - - - 夕立改 - Yuudachi Kai - - - 夕立改二 - Yuudachi Kai2 - - - 五月雨 - Samidare - - - 五月雨改 - Samidare Kai - - - 涼風 - Suzukaze - - - 涼風改 - Suzukaze Kai - - - 朝潮 - Asashio - - - 朝潮改 - Asashio Kai - - - 大潮 - Ooshio - - - 大潮改 - Ooshio Kai - - - 満潮 - Michishio - - - 満潮改 - Michishio Kai - - - 荒潮 - Arashio - - - 荒潮改 - Arashio Kai - - - - Arare - - - 霰改 - Arare Kai - - - - Kasumi - - - 霞改 - Kasumi Kai - - - 陽炎 - Kagerou - - - 陽炎改 - Kagerou Kai - - - 不知火 - Shiranui - - - 不知火改 - Shiranui Kai - - - 黒潮 - Kuroshio - - - 黒潮改 - Kuroshio Kai - - - 祥鳳 - Shouhou - - - 祥鳳改 - Shouhou Kai - - - 翔鶴 - Shoukaku - - - 翔鶴改 - Shoukaku Kai - - - 瑞鶴 - Zuikaku - - - 瑞鶴改 - Zuikaku Kai - - - 鬼怒 - Kinu - - - 鬼怒改 - Kinu Kai - - - 阿武隈 - Abukuma - - - 阿武隈改 - Abukuma Kai - - - 夕張 - Yuubari - - - 夕張改 - Yuubari Kai - - - 瑞鳳 - Zuihou - - - 瑞鳳改 - Zuihou Kai - - - 三隈 - Mikuma - - - 三隈改 - Mikuma Kai - - - 初風 - Hatsukaze - - - 初風改 - Hatsukaze Kai - - - 舞風 - Maikaze - - - 舞風改 - Maikaze Kai - - - 衣笠 - Kinugasa - - - 衣笠改 - Kinugasa Kai - - - 衣笠改二 - Kinugasa Kai2 - - - 伊19 - I-19 - - - 伊19改 - I-19 Kai - - - 鈴谷 - Suzuya - - - 鈴谷改 - Suzuya Kai - - - 熊野 - Kumano - - - 熊野改 - Kumano Kai - - - 伊168 - I-168 - - - 伊168改 - I-168 Kai - - - 伊58 - I-58 - - - 伊58改 - I-58 Kai - - - 伊8 - I-8 - - - 伊8改 - I-8 Kai - - - 大和 - Yamato - - - 大和改 - Yamato Kai - - - 秋雲 - Akigumo - - - 秋雲改 - Akigumo Kai - - - 夕雲 - Yuugumo - - - 夕雲改 - Yuugumo Kai - - - 巻雲 - Makigumo - - - 巻雲改 - Makigumo Kai - - - 長波 - Naganami - - - 長波改 - Naganami Kai - - - 阿賀野 - Agano - - - 阿賀野改 - Agano Kai - - - 能代 - Noshiro - - - 能代改 - Noshiro Kai - - - 矢矧 - Yahagi - - - 矢矧改 - Yahagi Kai - - - 武蔵 - Musashi - - - 武蔵改 - Musashi Kai - - - 大鳳 - Taihou - - - 大鳳改 - Taihou Kai - - - 伊401 - I-401 - - - 伊401改 - I-401 Kai - - - あきつ丸 - Akitsu Maru - - - あきつ丸改 - Akitsu Maru Kai - - - まるゆ - Maruyu - - - まるゆ改 - Maruyu Kai - - - 弥生 - Yayoi - - - 弥生改 - Yayoi Kai - - - 卯月 - Uzuki - - - 卯月改 - Uzuki Kai - - - イオナ - IONA - - - タカオ - TAKAO - - - ハルナ - HARUNA - - - Bismarck - Bismarck - - - Bismarck改 - Bismarck Kai - - - Bismarck zwei - Bismarck zwei - - - Z1 - Z1 - - - Z1改 - Z1 Kai - - - Z1 zwei - Z1 Zwei - - - Z3 - Z3 - - - Z3改 - Z3 Kai - - - Z3 zwei - Z3 Zwei - - - 浜風 - Hamakaze - - - 浜風改 - Hamakaze Kai - - - 天津風 - Amatsukaze - - - 天津風改 - Amatsukaze Kai - - - 谷風 - Tanikaze - - - 谷風改 - Tanikaze Kai - - - 明石 - Akashi - - - 明石改 - Akashi Kai - - - 酒匂 - Sakawa - - - 酒匂改 - Sakawa Kai - - diff --git a/tools-release/.gitignore b/tools-release/.gitignore new file mode 100644 index 000000000..f80a44b5e --- /dev/null +++ b/tools-release/.gitignore @@ -0,0 +1,3 @@ +/* +!/.gitignore +!/*.ps1 diff --git a/tools-release/package.ps1 b/tools-release/package.ps1 new file mode 100644 index 000000000..19ccfab11 --- /dev/null +++ b/tools-release/package.ps1 @@ -0,0 +1,318 @@ +function Main +{ + begin + { + $ErrorActionPreference = 'stop' + + $target = 'Release' + $result = 'KanColleViewer' + $bin = '..\Grabacr07.KanColleViewer\bin\' + + $targetKeywords = '*.exe','*.dll','*.exe.config','*.txt','*.VisualElementsManifest.xml' + $ignoreKeywords = '*.vshost.*','Microsoft.*.resources.dll','ExPlugin.*.dll' + + $exeSource = 'KanColleViewer.exe' + + if (-not(Test-Path $bin)) + { + throw 'Script detected as locate in invalid path exception!! Make sure exist in \tools-release\' + } + } + + end + { + try + { + # clean up current + Get-ChildItem -Directory | Remove-item -Recurse + Get-ChildItem | where { $_.Extension -eq ".zip" } | Remove-Item + + Copy-StrictedFilterFileWithDirectoryStructure -Path $(Join-Path $bin $target) -Destination '.\' -Targets $targetKeywords -Exclude $ignoreKeywords + + # valid path check + $versionSource = Join-Path $target $exeSource -Resolve + + if ((Test-Path $versionSource) -and (Test-Path $target)) + { + $version = (Get-ChildItem $versionSource).VersionInfo + $result = $result + ' ver.{0}.{1}' -f $version.ProductMajorPart, $version.ProductMinorPart + + Rename-Item -NewName $result -Path $target + New-ZipCompression -source $(Join-Path $(Get-Location) $result) -destination $(Join-Path $(Get-Location).Path ('./' + $result + '.zip')) + } + } + catch + { + throw $_ + } + } +} + + +# https://gist.github.com/guitarrapc/e78bbd4ddc07389e17d6 +function Copy-StrictedFilterFileWithDirectoryStructure +{ + [CmdletBinding()] + param + ( + [parameter( + mandatory = 1, + position = 0, + ValueFromPipeline = 1, + ValueFromPipelineByPropertyName = 1)] + [string] + $Path, + + [parameter( + mandatory = 1, + position = 1, + ValueFromPipelineByPropertyName = 1)] + [string] + $Destination, + + [parameter( + mandatory = 1, + position = 2, + ValueFromPipelineByPropertyName = 1)] + [string[]] + $Targets, + + [parameter( + mandatory = 0, + position = 3, + ValueFromPipelineByPropertyName = 1)] + [string[]] + $Excludes + ) + + begin + { + $list = New-Object 'System.Collections.Generic.List[String]' + } + + process + { + Foreach ($target in $Targets) + { + # Copy "All Directory Structure" and "File" which Extension type is $ex + Copy-Item -Path $Path -Destination $Destination -Force -Recurse -Filter $target + } + } + + end + { + # Remove -Exclude Item + Foreach ($exclude in $Excludes) + { + Get-ChildItem -Path $Destination -Recurse -File | where Name -like $exclude | Remove-Item + } + + # search Folder which include file + $allFolder = Get-ChildItem $Destination -Recurse -Directory + $containsFile = $allFolder | where {$_.GetFiles()} + $containsFile.FullName ` + | %{ + $fileContains = $_ + $result = $allFolder.FullName ` + | where {$_ -notin $list} ` + | where { + $shortPath = $_ + $fileContains -like "$shortPath*" + } + $result | %{$list.Add($_)} + } + $folderToKeep = $list | sort -Unique + + # Remove All Empty (none file exist) folders + Get-ChildItem -Path $Destination -Recurse -Directory | where fullName -notin $folderToKeep | Remove-Item -Recurse + } +} + +# http://tech.guitarrapc.com/entry/2013/10/08/040325 +function New-ZipCompression +{ + [CmdletBinding()] + param + ( + [parameter( + mandatory, + position = 0, + valuefrompipeline, + valuefrompipelinebypropertyname)] + [string] + $source, + + [parameter( + mandatory = 0, + position = 1, + valuefrompipeline, + valuefrompipelinebypropertyname)] + [string] + $destination, + + [parameter( + mandatory = 0, + position = 2)] + [switch] + $quiet, + + [parameter( + mandatory = 0, + position = 3)] + [switch] + $force + ) + + try + { + Add-Type -AssemblyName 'System.IO.Compression.FileSystem' + } + catch + { + } + + # check file is directory + $file = Get-Item -Path $source + + # set zip extension + $zipExtension = '.zip' + + # set desktop as destination path if it null + if ([string]::IsNullOrWhiteSpace($destination)) + { + if ($file.Mode -like 'd*') + { + $destination = (Join-Path ([System.Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop)) [System.IO.Path]::GetFileNameWithoutExtension($source + $zipExtension)) + } + else + { + $destination = (Join-Path ([System.Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop)) [System.IO.Path]::GetFileNameWithoutExtension(($file | select -First 1 -ExpandProperty fullname))) + $zipExtension + } + + } + + # check destination is input as .zip + if (-not($destination.EndsWith($zipExtension))) + { + throw ('destination parameter value [{0}] not end with extension {1}' -f $destination, $zipExtension) + } + + # check destination is already exist or not + if (Test-Path $destination) + { + Remove-Item -Path $destination -Confirm + } + + + # compressionLevel + $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal + + # check file mode for source + Write-Verbose ('file.mode = {0}' -f $file.Mode) + + if ($file.Mode -like 'd*') # Directory should be d--- + { + try # create zip from directory + { + # force output zip file to new destination path, avoiding destination zip name conflict. + if ($force) + { + # check destination is already exist, CreateFromDirectory will fail with same name of destination file. + if (Test-Path $destination) + { + # show warning for same destination exist. + Write-Verbose ('Detected destination name {0} is already exist. Force trying output to new destination zip name.' -f $destination) + + # get current destination information + $destinationRoot = [System.IO.Path]::GetDirectoryName($destination) + $destinationfile = [System.IO.Path]::GetFileNameWithoutExtension($destination) + $destinationExtension = [System.IO.Path]::GetExtension($destination) + + # renew destination name with (2)...(x) until no more same name catch. + $count = 2 + $destination = Join-Path $destinationRoot ($destinationfile + '(' + $count + ')' + $destinationExtension) + while (Test-Path $destination) + { + ++$count + $destination = Join-Path $destinationRoot ($destinationfile + '(' + $count + ')' + $destinationExtension) + } + + # show warning as destination name had been changed due to escape error. + Write-Verbose ('Deistination name change to new name {0}' -f $destination) + } + } + + # include BaseDirectory + $includeBaseDirectory = $true + + Write-Verbose ('destination = {0}' -f $destination) + + Write-Verbose ('file.fullname = {0}' -f $file.FullName) + Write-Verbose ('compressionLevel = {0}' -f $compressionLevel) + Write-Verbose ('includeBaseDirectory = {0}' -f $includeBaseDirectory) + + if ($quiet) + { + Write-Verbose ('zipping up folder {0} to {1}' -f $file.FullName,$destination) + [System.IO.Compression.ZipFile]::CreateFromDirectory($file.fullname,$destination,$compressionLevel,$includeBaseDirectory) > $null + $? + } + else + { + Write-Verbose ('zipping up folder {0} to {1}' -f $file.FullName,$destination) + [System.IO.Compression.ZipFile]::CreateFromDirectory($file.fullname,$destination,$compressionLevel,$includeBaseDirectory) + Get-Item $destination + } + } + catch + { + Write-Error $_ + $? + } + } + else + { + try # create zip from files + { + # create zip to add + $destzip = [System.IO.Compression.Zipfile]::Open($destination,'Update') + + # get items + $files = Get-ChildItem -Path $source + + foreach ($file in $files) + { + $file2 = $file.name + + Write-Verbose ('destzip = {0}' -f $destzip) + Write-Verbose ('file.fullname = {0}' -f $file.FullName) + Write-Verbose ('file2 = {0}' -f $file2) + Write-Verbose ('compressionLevel = {0}' -f $compressionLevel) + + if ($quiet) + { + Write-Verbose ('zipping up files {0} to {1}' -f $file.FullName,$destzip) + [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($destzip,$file.fullname,$file2,$compressionLevel) > $null + $? + } + else + { + Write-Verbose ('zipping up files {0} to {1}' -f $file.FullName,$destzip) + [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($destzip,$file.fullname,$file2,$compressionLevel) + } + } + } + catch + { + Write-Error $_ + $? + } + finally + { + # dispose opened zip + $destzip.Dispose() + } + } +} + +Main \ No newline at end of file diff --git a/tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj b/tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj index 6c30fdfa9..68d13730c 100644 --- a/tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj +++ b/tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj @@ -38,18 +38,18 @@ 4 - - ..\..\assemblies\MetroRadiance.dll + + ..\packages\LivetCask.1.1.0.0\lib\net45\Livet.dll - - ..\..\assemblies\MetroRadiance.Chrome.dll - - - ..\..\assemblies\MetroRadiance.Core.dll + + ..\packages\LivetCask.1.1.0.0\lib\net45\Microsoft.Expression.Interactions.dll + + ..\packages\LivetCask.1.1.0.0\lib\net45\System.Windows.Interactivity.dll + @@ -91,6 +91,20 @@ + + + {21b4ad15-d9fa-4873-bfad-1eeefbc6c264} + MetroRadiance.Chrome + + + {a6b0a741-5be0-479d-b813-e65672350057} + MetroRadiance.Core + + + {0af0b9ff-d981-4d0f-a41f-c3ab6fe2f16d} + MetroRadiance + +