├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .nuget ├── NuGet.Config ├── NuGet.exe └── NuGet.targets ├── Changelog.txt ├── Grabacr07.Desktop.Metro ├── Controls │ ├── CallMethodButton.cs │ ├── HyperlinkEx.cs │ ├── SortButton.cs │ ├── SortDirection.cs │ └── TabHeader.cs ├── Converters │ ├── EnumToBooleanConverter.cs │ ├── StringToVisiblityConverter.cs │ └── UniversalBooleanToVisibilityConverter.cs ├── Desktop.Metro.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Styles │ ├── Controls.FlatSlider.xaml │ ├── Controls.MetroDialog.xaml │ └── Controls.xaml ├── Themes │ ├── Generic.CallMethodButton.xaml │ ├── Generic.SortButton.xaml │ ├── Generic.TabHeader.xaml │ ├── Generic.TabView.xaml │ └── Generic.xaml └── packages.config ├── Grabacr07.KanColleViewer ├── App.config ├── App.xaml ├── App.xaml.cs ├── Assets │ └── app.ico ├── Composition │ ├── AggregateNotifier.cs │ ├── INotifier.cs │ ├── IPlugin.cs │ ├── IPluginMetadata.cs │ ├── IToolPlugin.cs │ ├── NotifyType.cs │ └── PluginHost.cs ├── KanColleViewer.VisualElementsManifest.xml ├── KanColleViewer.csproj ├── Models │ ├── BrowserZoomFactor.cs │ ├── Data │ │ └── Xml │ │ │ ├── XmlFileReader.cs │ │ │ ├── XmlFileWriter.cs │ │ │ └── XmlSerializableDictionary.cs │ ├── Helper.cs │ ├── INavigator.cs │ ├── IOrientationMode.cs │ ├── IZoomFactor.cs │ ├── Mode.cs │ ├── NotifierHost.cs │ ├── OrientationType.cs │ ├── ProductInfo.cs │ ├── ProxySettings.cs │ ├── RelayCommand.cs │ ├── ResourceService.cs │ ├── Settings.cs │ ├── StatusService.cs │ ├── SupportedImageFormat.cs │ ├── Volume.cs │ └── WindowOrientaionMode.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.en.resx │ ├── Resources.resx │ ├── Resources.zh-CN.resx │ ├── Resources.zh-TW.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── SampleData │ ├── FleetViewModelSampleData.xaml │ ├── FleetsViewModelSampleData.xaml │ ├── ShipCatalogSortWorkerSampleData.xaml │ ├── ShipViewModelSampleData.xaml │ └── ShipyardViewModelSampleData.xaml ├── Styles │ ├── Colors.xaml │ ├── Controls.HorizontalFlatListBox.xaml │ ├── Controls.ListView.xaml │ ├── Controls.PinButton.xaml │ ├── Controls.TabControl.xaml │ ├── Controls.Text.xaml │ └── Controls.xaml ├── Themes │ ├── Accents │ │ └── Red.xaml │ ├── Converters.xaml │ ├── Generic.AppIcon.xaml │ ├── Generic.BuildingDock.xaml │ ├── Generic.ColorIndicator.xaml │ ├── Generic.ConditionIcon.xaml │ ├── Generic.KanColleHost.xaml │ ├── Generic.Modernizable.xaml │ ├── Generic.Quest.xaml │ ├── Generic.SlotItemIcon.xaml │ ├── Generic.xaml │ ├── Orientation.xaml │ └── TabViewHorizontal.xaml ├── ViewModels │ ├── BindableTextViewModel.cs │ ├── Catalogs │ │ ├── ShipCatalogFilter.cs │ │ ├── ShipCatalogSortTarget.cs │ │ ├── ShipCatalogSortWorker.cs │ │ ├── ShipCatalogWindowViewModel.cs │ │ ├── ShipTypeViewModel.cs │ │ ├── ShipViewModel.cs │ │ ├── SlotItemCatalogViewModel.cs │ │ ├── SlotItemCounter.cs │ │ └── SortableColumnViewModel.cs │ ├── Composition │ │ ├── NotifierViewModel.cs │ │ ├── PluginViewModel.cs │ │ ├── PluginViewModelBase.cs │ │ └── ToolViewModel.cs │ ├── Contents │ │ ├── AdmiralViewModel.cs │ │ ├── BuildingDockViewModel.cs │ │ ├── CreatedSlotItemViewModel.cs │ │ ├── DroppedShipViewModel.cs │ │ ├── ExpeditionsViewModel.cs │ │ ├── Fleets │ │ │ ├── CombinedFleetViewModel.cs │ │ │ ├── ConditionViewModel.cs │ │ │ ├── ExpeditionViewModel.cs │ │ │ ├── FleetStateViewModel.cs │ │ │ ├── FleetViewModel.cs │ │ │ ├── FleetsViewModel.cs │ │ │ ├── HomeportViewModel.cs │ │ │ ├── QuickStateViewViewModel.cs │ │ │ ├── RepairingViewModel.cs │ │ │ └── SortieViewModel.cs │ │ ├── MaterialsViewModel.cs │ │ ├── NewItemViewModel.cs │ │ ├── OverviewViewModel.cs │ │ ├── QuestViewModel.cs │ │ ├── QuestsViewModel.cs │ │ ├── RepairingDockViewModel.cs │ │ ├── ShipViewModel.cs │ │ ├── ShipsViewModel.cs │ │ ├── ShipyardViewModel.cs │ │ ├── SlotItemsViewModel.cs │ │ └── ToolsViewModel.cs │ ├── CultureViewModel.cs │ ├── Dev │ │ └── DebugTabViewModel.cs │ ├── FleetWindowViewModel.cs │ ├── ItemViewModel.cs │ ├── MainContentViewModel.cs │ ├── MainWindowViewModel.cs │ ├── Messages │ │ ├── Response.cs │ │ ├── ScreenshotMessage.cs │ │ ├── SetWindowLocationMessage.cs │ │ └── ZoomMessage.cs │ ├── NavigatorViewModel.cs │ ├── NullViewModel.cs │ ├── SettingsViewModel.cs │ ├── StartContentViewModel.cs │ ├── StatusBarViewModel.cs │ ├── TabItemViewModel.cs │ ├── VolumeViewModel.cs │ └── WindowViewModel.cs ├── Views │ ├── Behaviors │ │ ├── CountdownBehavior.cs │ │ ├── FlickFleetsAction.cs │ │ ├── FlickTrigger.cs │ │ ├── GridViewBehaviors.cs │ │ ├── NavigatorBehavior.cs │ │ ├── ScreenshotAction.cs │ │ ├── SetStyleSheetBehavior.cs │ │ ├── SetWindowLocationAction.cs │ │ ├── TimerBehavior.cs │ │ └── ZoomAction.cs │ ├── BrowserNavigator.xaml │ ├── BrowserNavigator.xaml.cs │ ├── Catalogs │ │ ├── Modernizable.cs │ │ ├── ShipCatalogWindow.xaml │ │ ├── ShipCatalogWindow.xaml.cs │ │ ├── SlotItemCatalogWindow.xaml │ │ └── SlotItemCatalogWindow.xaml.cs │ ├── Contents │ │ ├── Expeditions.xaml │ │ ├── Expeditions.xaml.cs │ │ ├── Fleets.xaml │ │ ├── Fleets.xaml.cs │ │ ├── Homeport.xaml │ │ ├── Homeport.xaml.cs │ │ ├── Overview.xaml │ │ ├── Overview.xaml.cs │ │ ├── Overviews │ │ │ ├── Repairyard.xaml │ │ │ └── Repairyard.xaml.cs │ │ ├── QuestViewSource.cs │ │ ├── Quests.xaml │ │ ├── Quests.xaml.cs │ │ ├── Shipyard.xaml │ │ ├── Shipyard.xaml.cs │ │ ├── StateDetailIndicator.xaml │ │ ├── StateDetailIndicator.xaml.cs │ │ ├── StateIconIndicator.xaml │ │ ├── StateIconIndicator.xaml.cs │ │ ├── Tools.xaml │ │ └── Tools.xaml.cs │ ├── Controls │ │ ├── AppIcon.cs │ │ ├── BuildingDock.cs │ │ ├── ColorIndicator.cs │ │ ├── ConditionIcon.cs │ │ ├── CrossFrameIE.cs │ │ ├── KanColleHost.cs │ │ ├── OrientationModeSelector.xaml │ │ ├── OrientationModeSelector.xaml.cs │ │ ├── Quest.cs │ │ ├── SlotItemIcon.cs │ │ ├── WebBrowserHelper.cs │ │ ├── ZoomFactorSelector.xaml │ │ └── ZoomFactorSelector.xaml.cs │ ├── Converters │ │ ├── AdjustConverter.cs │ │ ├── BooleanToVisibilityConverter.cs │ │ ├── HasFlagConverter.cs │ │ ├── MaxConverter.cs │ │ ├── PreviewSizeConverter.cs │ │ ├── QuestCategoryToColorConverter.cs │ │ └── RankIDToRankNameConverter.cs │ ├── Dev │ │ ├── DebugTab.xaml │ │ └── DebugTab.xaml.cs │ ├── ExitDialog.xaml │ ├── ExitDialog.xaml.cs │ ├── FleetWindow.xaml │ ├── FleetWindow.xaml.cs │ ├── Info.xaml │ ├── Info.xaml.cs │ ├── MainContent.xaml │ ├── MainContent.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Settings │ │ ├── Browser.xaml │ │ ├── Browser.xaml.cs │ │ ├── Browser.xaml.cs.BACKUP.20064.cs │ │ ├── Browser.xaml.cs.BASE.20064.cs │ │ ├── Browser.xaml.cs.LOCAL.20064.cs │ │ ├── Browser.xaml.cs.REMOTE.20064.cs │ │ ├── Common.xaml │ │ ├── Language.xaml │ │ ├── Language.xaml.cs │ │ ├── Network.xaml │ │ ├── Network.xaml.cs │ │ ├── Notification.xaml │ │ ├── Notification.xaml.cs │ │ ├── Operation.xaml │ │ ├── Operation.xaml.cs │ │ ├── Others.xaml │ │ ├── Others.xaml.cs │ │ ├── PluginInfo.xaml │ │ ├── PluginInfo.xaml.cs │ │ ├── Settings.xaml │ │ ├── Settings.xaml.cs │ │ ├── Updates.xaml │ │ ├── Updates.xaml.cs │ │ ├── VersionInfo.xaml │ │ ├── VersionInfo.xaml.cs │ │ ├── Window.xaml │ │ └── Window.xaml.cs │ ├── StartContent.xaml │ ├── StartContent.xaml.cs │ ├── StatusBar.xaml │ └── StatusBar.xaml.cs ├── Win32 │ ├── DVTARGETDEVICE.cs │ ├── INTERNET_CACHE_ENTRY_INFOA.cs │ ├── IServiceProvider.cs │ ├── IViewObject.cs │ ├── NativeMethods.cs │ ├── RECT.cs │ └── WinInet.cs ├── license.txt ├── packages.config ├── readme.txt └── tasks.txt ├── Grabacr07.KanColleWrapper ├── Calculator.cs ├── Counter.cs ├── DisposableNotifier.cs ├── Dockyard.cs ├── DynamicJson.cs ├── Extensions.cs ├── Globalization │ ├── ResourceService.cs │ ├── Resources.Designer.cs │ ├── Resources.en.resx │ ├── Resources.resx │ ├── Resources.zh-CN.resx │ └── Resources.zh-TW.resx ├── Homeport.cs ├── IProxySettings.cs ├── Internal │ ├── Definitions.cs │ ├── Extensions.cs │ └── RetryObservableExtensions.cs ├── Itemyard.cs ├── KanColleClient.cs ├── KanColleClientSettings.cs ├── KanColleError.cs ├── KanColleProxy.Endpoints.cs ├── KanColleProxy.Endpoints.tt ├── KanColleProxy.cs ├── KanColleProxyExtensions.cs ├── KanColleWrapper.csproj ├── Logger.cs ├── Master.cs ├── MasterTable.cs ├── Materials.cs ├── MemberTable.cs ├── Models │ ├── Admiral.cs │ ├── BUildingDockState.cs │ ├── BattleState.cs │ ├── BuildingCompletedEventArgs.cs │ ├── BuildingDock.cs │ ├── CombinedFleet.cs │ ├── ConditionRejuvenatedEventArgs.cs │ ├── ConditionType.cs │ ├── CreatedSlotItem.cs │ ├── DroppedShip.cs │ ├── Expedition.cs │ ├── ExpeditionReturnedEventArgs.cs │ ├── Experience.cs │ ├── Fleet.cs │ ├── FleetCondition.cs │ ├── FleetDock.cs │ ├── FleetSituation.cs │ ├── FleetSpeed.cs │ ├── FleetState.cs │ ├── HeavilyDamagedEventArgs.cs │ ├── IIdentifiable.cs │ ├── LimitedValue.cs │ ├── MapArea.cs │ ├── MapInfo.cs │ ├── Mission.cs │ ├── ModernizableStatus.cs │ ├── Quest.cs │ ├── QuestCategory.cs │ ├── QuestProgress.cs │ ├── QuestState.cs │ ├── QuestType.cs │ ├── Rank.cs │ ├── Ranking.cs │ ├── Raw │ │ ├── kcsapi_basic.cs │ │ ├── kcsapi_battle.cs │ │ ├── kcsapi_battleresult.cs │ │ ├── kcsapi_change.cs │ │ ├── kcsapi_charge.cs │ │ ├── kcsapi_combined_battle.cs │ │ ├── kcsapi_combined_battle_airbattle.cs │ │ ├── kcsapi_combined_battle_battleresult.cs │ │ ├── kcsapi_createitem.cs │ │ ├── kcsapi_createship.cs │ │ ├── kcsapi_deck.cs │ │ ├── kcsapi_destroyitem2.cs │ │ ├── kcsapi_destroyship.cs │ │ ├── kcsapi_getship.cs │ │ ├── kcsapi_hensei_combined.cs │ │ ├── kcsapi_kdock.cs │ │ ├── kcsapi_kdock_getship.cs │ │ ├── kcsapi_map_start.cs │ │ ├── kcsapi_material.cs │ │ ├── kcsapi_midnight_battle.cs │ │ ├── kcsapi_mission.cs │ │ ├── kcsapi_mission_result.cs │ │ ├── kcsapi_mst_maparea.cs │ │ ├── kcsapi_mst_mapinfo.cs │ │ ├── kcsapi_mst_ship.cs │ │ ├── kcsapi_mst_slotitem.cs │ │ ├── kcsapi_mst_slotitem_equiptype.cs │ │ ├── kcsapi_mst_stype.cs │ │ ├── kcsapi_mst_useitem.cs │ │ ├── kcsapi_ndock.cs │ │ ├── kcsapi_port.cs │ │ ├── kcsapi_powerup.cs │ │ ├── kcsapi_quest.cs │ │ ├── kcsapi_questlist.cs │ │ ├── kcsapi_ranking.cs │ │ ├── kcsapi_ranking_getlist.cs │ │ ├── kcsapi_remodel_slot.cs │ │ ├── kcsapi_remodel_slotlist.cs │ │ ├── kcsapi_remodel_slotlist_detail.cs │ │ ├── kcsapi_ship.cs │ │ ├── kcsapi_ship2.cs │ │ ├── kcsapi_ship3.cs │ │ ├── kcsapi_ship_deck.cs │ │ ├── kcsapi_slot_data.cs │ │ ├── kcsapi_slotitem.cs │ │ ├── kcsapi_start2.cs │ │ ├── kcsapi_useitem.cs │ │ └── svdata.cs │ ├── RawDataWrapper.cs │ ├── RepairingCompletedEventArgs.cs │ ├── RepairingDock.cs │ ├── RepairingDockState.cs │ ├── SallyArea.cs │ ├── Ship.cs │ ├── ShipCriticalConditionEventArgs.cs │ ├── ShipInfo.cs │ ├── ShipSituation.cs │ ├── ShipSlot.cs │ ├── ShipSpeed.cs │ ├── ShipType.cs │ ├── ShipTypeId.cs │ ├── SlotItem.cs │ ├── SlotItemIconType.cs │ ├── SlotItemInfo.cs │ ├── SlotItemType.cs │ ├── SvData.cs │ ├── TranslationType.cs │ ├── UseItem.cs │ ├── UseItemInfo.cs │ └── ViewRange.cs ├── Organization.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.en.resx │ ├── Resources.resx │ ├── Resources.zh_CN.resx │ └── Resources.zh_TW.resx ├── Quests.cs ├── Rankings.cs ├── Repairyard.cs ├── TimerNotifier.cs ├── Translations.cs ├── Updater.cs ├── Win32 │ ├── INTERNET_PROXY_INFO.cs │ └── NativeMethods.cs ├── app.config └── packages.config ├── KanColleViewer.sln ├── KanColleViewer.sln.DotSettings ├── LICENSE.txt ├── Plugins ├── Calculator │ ├── Calculator.csproj │ ├── KancolleCalculator.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── ViewModels │ │ └── CalculatorViewModel.cs │ ├── Views │ │ ├── Calculator.xaml │ │ └── Calculator.xaml.cs │ ├── app.config │ └── packages.config ├── Counter │ ├── Counter.csproj │ ├── CounterView.xaml │ ├── CounterView.xaml.cs │ ├── CounterViewModel.cs │ ├── Counters.cs │ ├── KanColleCounter.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── app.config │ └── packages.config ├── LogViewer │ ├── App.config │ ├── Behaviors │ │ ├── IgnoreMouseWheelBehavior.cs │ │ └── ListViewColumnResizeBehaviour.cs │ ├── Controls │ │ └── LogListView.cs │ ├── LogViewer.cs │ ├── LogViewer.csproj │ ├── ViewModels │ │ ├── LogItemCollection.cs │ │ └── PortalViewModel.cs │ ├── Views │ │ ├── Portal.xaml │ │ └── Portal.xaml.cs │ └── packages.config ├── MasterDataViewer │ ├── MasterDataViewer.cs │ ├── MasterDataViewer.csproj │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── ViewModels │ │ └── PortalViewModel.cs │ ├── Views │ │ ├── Portal.xaml │ │ └── Portal.xaml.cs │ └── packages.config └── WindowsNotifier │ ├── CustomSound.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── ShellHelpers.cs │ ├── Toast.cs │ ├── Windows7Notifier.cs │ ├── Windows8Notifier.cs │ ├── WindowsNotifier.cs │ ├── WindowsNotifier.csproj │ ├── app.config │ └── packages.config ├── README.md ├── assemblies ├── CoreAudioApi.dll ├── FiddlerCore4.XML ├── FiddlerCore4.dll ├── Microsoft.Expression.Drawing.dll ├── Microsoft.Expression.Drawing.xml ├── Portable.dll └── Portable.xml ├── resources ├── Sounds │ ├── Construction │ │ └── readme.txt │ ├── Critical Ship Warning │ │ └── readme.txt │ ├── Expedition │ │ └── readme.txt │ ├── Fatigue Recovery Completed │ │ └── readme.txt │ ├── Repairyard │ │ └── readme.txt │ └── Updater │ │ └── readme.txt ├── Version.xml ├── icons │ └── application │ │ ├── 128.png │ │ ├── 16.png │ │ ├── 20.png │ │ ├── 24.png │ │ ├── 256.png │ │ ├── 32.png │ │ ├── 40.png │ │ ├── 48.png │ │ ├── 64.png │ │ ├── app.ico │ │ └── data │ │ ├── icon-app.ai │ │ ├── icon-app.psd │ │ └── icon-app.svg └── translations │ ├── Equipment.xml │ ├── Expeditions.xml │ ├── Operations.xml │ ├── Quests.xml │ ├── ShipTypes.xml │ └── Ships.xml ├── tools-release ├── .gitignore ├── package.ps1 └── version.ps1 └── tools ├── .nuget ├── NuGet.Config ├── NuGet.exe └── NuGet.targets ├── Grabacr07.Tools.JsonViewer ├── App.config ├── App.xaml ├── App.xaml.cs ├── DynamicJson.cs ├── JsonViewer.csproj ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config └── KanColleViewerTools.sln /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{cs,xaml}] 4 | indent_style = tab 5 | indent_size = 4 6 | end_of_line = crlf 7 | insert_final_newline = true 8 | charset = utf-8-bom 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | # * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "MetroRadiance"] 2 | path = MetroRadiance 3 | url=https://github.com/Grabacr07/MetroRadiance -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/.nuget/NuGet.exe -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Controls/HyperlinkEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Documents; 9 | 10 | namespace Grabacr07.Desktop.Metro.Controls 11 | { 12 | public class HyperlinkEx : Hyperlink 13 | { 14 | #region Uri 依存関係プロパティ 15 | 16 | public Uri Uri 17 | { 18 | get { return (Uri)this.GetValue(UriProperty); } 19 | set { this.SetValue(UriProperty, value); } 20 | } 21 | public static readonly DependencyProperty UriProperty = 22 | DependencyProperty.Register("Uri", typeof(Uri), typeof(HyperlinkEx), new UIPropertyMetadata(null)); 23 | 24 | #endregion 25 | 26 | protected override void OnClick() 27 | { 28 | base.OnClick(); 29 | 30 | if (this.Uri != null) 31 | { 32 | try 33 | { 34 | Process.Start(this.Uri.ToString()); 35 | } 36 | catch (Exception ex) 37 | { 38 | Debug.WriteLine(ex); 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Controls/SortButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | 7 | namespace Grabacr07.Desktop.Metro.Controls 8 | { 9 | public class SortButton : CallMethodButton 10 | { 11 | static SortButton() 12 | { 13 | DefaultStyleKeyProperty.OverrideMetadata(typeof(SortButton), new FrameworkPropertyMetadata(typeof(SortButton))); 14 | } 15 | 16 | #region Direction 依存関係プロパティ 17 | 18 | public SortDirection Direction 19 | { 20 | get { return (SortDirection)this.GetValue(DirectionProperty); } 21 | set { this.SetValue(DirectionProperty, value); } 22 | } 23 | public static readonly DependencyProperty DirectionProperty = 24 | DependencyProperty.Register("Direction", typeof(SortDirection), typeof(SortButton), new UIPropertyMetadata(SortDirection.None)); 25 | 26 | #endregion 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Controls/SortDirection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.Desktop.Metro.Controls 8 | { 9 | public enum SortDirection 10 | { 11 | /// 12 | /// ソート対象ではありません。 13 | /// 14 | None, 15 | 16 | Ascending, 17 | Descending, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Controls/TabHeader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | 8 | namespace Grabacr07.Desktop.Metro.Controls 9 | { 10 | public class TabHeader : ListBox 11 | { 12 | static TabHeader() 13 | { 14 | DefaultStyleKeyProperty.OverrideMetadata(typeof(TabHeader), new FrameworkPropertyMetadata(typeof(TabHeader))); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Converters/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using System.Windows.Data; 7 | 8 | namespace Grabacr07.Desktop.Metro.Converters 9 | { 10 | public class EnumToBooleanConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | return value.ToString() == parameter.ToString(); 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | return (bool)value ? Enum.Parse(targetType, parameter.ToString(), true) : null; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Converters/StringToVisiblityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Data; 8 | 9 | namespace Grabacr07.Desktop.Metro.Converters 10 | { 11 | /// 12 | /// 文字列が null または空文字のときに Collapsed、それ以外のときに Visible を返すコンバーターを定義します。 13 | /// 14 | public class StringToVisiblityConverter : IValueConverter 15 | { 16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | return (value is string) && !string.IsNullOrEmpty((string)value) 19 | ? Visibility.Visible 20 | : Visibility.Collapsed; 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // このコードはツールによって生成されました。 4 | // ランタイム バージョン:4.0.30319.18051 5 | // 6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 7 | // コードが再生成されるときに損失したりします。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Grabacr07.Desktop.Metro.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Styles/Controls.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Grabacr07.Desktop.Metro/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Assets/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/Grabacr07.KanColleViewer/Assets/app.ico -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/AggregateNotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Composition 7 | { 8 | /// 9 | /// 複数の を集約した通知機能を提供します。 10 | /// 11 | public class AggregateNotifier : INotifier 12 | { 13 | private readonly INotifier[] notifiers; 14 | 15 | public AggregateNotifier(IEnumerable notifiers) 16 | { 17 | this.notifiers = notifiers.ToArray(); 18 | } 19 | 20 | public void Dispose() 21 | { 22 | this.notifiers.ForEach(x => x.Dispose()); 23 | } 24 | 25 | public void Initialize() 26 | { 27 | this.notifiers.ForEach(x => x.Initialize()); 28 | } 29 | 30 | public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) 31 | { 32 | this.notifiers.ForEach(x => x.Show(type, header, body, activated, failed)); 33 | } 34 | 35 | public object GetSettingsView() 36 | { 37 | return null; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/INotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Composition 7 | { 8 | /// 9 | /// 通知機能を公開します。 10 | /// 11 | public interface INotifier : IPlugin, IDisposable 12 | { 13 | void Initialize(); 14 | 15 | void Show(NotifyType type, string header, string body, Action activated, Action failed = null); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/IPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Composition 8 | { 9 | /// 10 | /// KanColleViewer プラグインの機能を公開します。 11 | /// 12 | public interface IPlugin 13 | { 14 | /// 15 | /// プラグインの設定画面を取得します。 16 | /// 17 | /// プラグインの設定画面に表示する UI 要素。 18 | object GetSettingsView(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/IPluginMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Composition 7 | { 8 | /// 9 | /// KanColleViewer プラグインのメタデータを公開します。 10 | /// 11 | public interface IPluginMetadata 12 | { 13 | /// 14 | /// プラグインのタイトルを取得します。 15 | /// 16 | string Title { get; } 17 | 18 | /// 19 | /// プラグインが提供する機能を簡潔に説明するテキストを取得します。 20 | /// 21 | string Description { get; } 22 | 23 | /// 24 | /// プラグインのバージョンを取得します。 25 | /// 26 | string Version { get; } 27 | 28 | /// 29 | /// プラグインの開発者を取得します。 30 | /// 31 | string Author { get; } 32 | } 33 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/IToolPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Composition 7 | { 8 | /// 9 | /// プラグインの主機能を [ツール] タブに表示させるためのメンバーを公開します。 10 | /// 11 | public interface IToolPlugin : IPlugin 12 | { 13 | string ToolName { get; } 14 | 15 | object GetToolView(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Composition/NotifyType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Composition 7 | { 8 | /// 9 | /// 通知の種類を表します。 10 | /// 11 | public enum NotifyType 12 | { 13 | /// 14 | /// その他。 15 | /// 16 | Other = 0, 17 | /// 18 | /// 遠征からの帰投。 19 | /// 20 | Expedition, 21 | /// 22 | /// 整備の完了。 23 | /// 24 | Repair, 25 | /// 26 | /// 建造の完了。 27 | /// 28 | Build, 29 | /// 30 | /// 疲労回復の完了。 31 | /// 32 | Rejuvenated, 33 | 34 | Wounded, 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/KanColleViewer.VisualElementsManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/Data/Xml/XmlFileWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Xml.Serialization; 6 | 7 | namespace Grabacr07.KanColleViewer.Models.Data.Xml 8 | { 9 | /// 10 | /// XML ファイルへの書き込みを行う静的メソッドを公開します。 11 | /// 12 | public static class XmlFileWriter 13 | { 14 | /// 15 | /// 指定した型のデータを XML ファイルに書き込みます。 16 | /// 17 | /// 書き込むデータの型。 18 | /// 書き込むデータ。 19 | /// 保存先のパス。 20 | public static void WriteXml(this T saveData, string savePath) where T : new() 21 | { 22 | // 書き込み先のディレクトリ作成 23 | var dir = Path.GetDirectoryName(Path.GetFullPath(savePath)) ?? ""; 24 | Directory.CreateDirectory(dir); 25 | 26 | FileStream stream = null; // 書き込み用ファイルストリーム 27 | var serializer = new XmlSerializer(typeof(T)); // シリアル化用のオブジェクトを生成 28 | 29 | try 30 | { 31 | stream = new FileStream(savePath, FileMode.Create); // ファイルストリーム生成 32 | serializer.Serialize(stream, saveData); // シリアル化して書き込み 33 | } 34 | finally 35 | { 36 | if (stream != null) 37 | { 38 | stream.Close(); // ストリームを閉じる 39 | stream.Dispose(); // ストリームを解放 40 | } 41 | } 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/INavigator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Models 7 | { 8 | public interface INavigator 9 | { 10 | Uri Source { get; set; } 11 | bool IsNavigating { get; set; } 12 | bool CanGoBack { get; set; } 13 | bool CanGoForward { get; set; } 14 | 15 | event EventHandler GoBackRequested; 16 | event EventHandler GoForwardRequested; 17 | event EventHandler RefreshRequested; 18 | event EventHandler UriRequested; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/IOrientationMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | 8 | namespace Grabacr07.KanColleViewer.Models 9 | { 10 | public interface IOrientationMode 11 | { 12 | Orientation Mode { get; } 13 | 14 | OrientationType[] SupportedModes { get; } 15 | 16 | OrientationType CurrentMode { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/IZoomFactor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Models 8 | { 9 | public interface IZoomFactor 10 | { 11 | double Current { get; set; } 12 | double[] SupportedValues { get; } 13 | 14 | int CurrentParcentage { get; } 15 | 16 | bool CanZoomUp { get; } 17 | bool CanZoomDown { get; } 18 | 19 | void ZoomUp(); 20 | void ZoomDown(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/Mode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Models 8 | { 9 | public enum Mode 10 | { 11 | /// 12 | /// 艦これが起動されていません。 13 | /// 14 | NotStarted, 15 | 16 | /// 17 | /// 艦これが起動されています。 18 | /// 19 | Started, 20 | 21 | /// 22 | /// 艦これが起動されており、艦隊が出撃中です。 23 | /// 24 | InSortie, 25 | 26 | /// 27 | /// When any ship in the fleet is in critical condition. 28 | /// 29 | CriticalCondition, 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/OrientationType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Models 8 | { 9 | [Flags] 10 | public enum OrientationType 11 | { 12 | Vertical, 13 | Horizontal, 14 | Auto, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | using System.Diagnostics; 8 | 9 | namespace Grabacr07.KanColleViewer.Models 10 | { 11 | public class RelayCommand :ICommand 12 | { 13 | 14 | readonly Action _execute; 15 | readonly Func _canExecute; 16 | 17 | public RelayCommand(Action execute) 18 | : this(execute, null) 19 | { 20 | } 21 | 22 | public RelayCommand(Action execute, Func canExecute) 23 | { 24 | if (execute == null) 25 | throw new ArgumentNullException("execute"); 26 | 27 | _execute = execute; 28 | _canExecute = canExecute; 29 | } 30 | 31 | [DebuggerStepThrough] 32 | public bool CanExecute(object parameter) 33 | { 34 | return _canExecute == null || _canExecute(); 35 | } 36 | 37 | public event EventHandler CanExecuteChanged 38 | { 39 | add 40 | { 41 | if (_canExecute != null) 42 | CommandManager.RequerySuggested += value; 43 | } 44 | remove 45 | { 46 | if (_canExecute != null) 47 | CommandManager.RequerySuggested -= value; 48 | } 49 | } 50 | 51 | 52 | public void Execute(object parameter) 53 | { 54 | _execute(); 55 | } 56 | 57 | public Action CurrentAction { get { return _execute; } } 58 | } 59 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Models/SupportedImageFormat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Models 8 | { 9 | /// 10 | /// サポートされているイメージのファイル形式。 11 | /// 12 | public enum SupportedImageFormat 13 | { 14 | /// 15 | /// 未指定です。 16 | /// 17 | None, 18 | 19 | /// 20 | /// W3C PNG (Portable Network Graphics) イメージ形式。 21 | /// 22 | Png, 23 | 24 | /// 25 | /// JPEG (Joint Photographic Experts Group) イメージ形式。 26 | /// 27 | Jpeg, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Styles/Colors.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Styles/Controls.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Themes/Accents/Red.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | #FFFF0040 5 | 7 | 8 | #FFFF6464 9 | 11 | 12 | #FFB43C3C 13 | 15 | 16 | White 17 | 19 | 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Themes/Converters.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Themes/Generic.ColorIndicator.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 23 | 24 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Themes/Generic.KanColleHost.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 16 | 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/BindableTextViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels 9 | { 10 | public class BindableTextViewModel : ViewModel 11 | { 12 | #region Text 変更通知プロパティ 13 | 14 | private string _Text; 15 | 16 | public string Text 17 | { 18 | get { return this._Text; } 19 | set 20 | { 21 | if (this._Text != value) 22 | { 23 | this._Text = value; 24 | this.RaisePropertyChanged(); 25 | } 26 | } 27 | } 28 | 29 | #endregion 30 | } 31 | 32 | public class HyperlinkViewModel : BindableTextViewModel 33 | { 34 | #region Uri 変更通知プロパティ 35 | 36 | private Uri _Uri; 37 | 38 | public Uri Uri 39 | { 40 | get { return this._Uri; } 41 | set 42 | { 43 | if (this._Uri != value) 44 | { 45 | this._Uri = value; 46 | this.RaisePropertyChanged(); 47 | } 48 | } 49 | } 50 | 51 | #endregion 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.ViewModels.Catalogs 7 | { 8 | public enum ShipCatalogSortTarget 9 | { 10 | None, 11 | Id, 12 | Type, 13 | Name, 14 | Level, 15 | Cond, 16 | Firepower, 17 | Torpedo, 18 | AntiAir, 19 | Armor, 20 | Luck, 21 | ViewRange, 22 | Evasion, 23 | AntiSub, 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Composition/NotifierViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Composition 9 | { 10 | public class NotifierViewModel : PluginViewModelBase 11 | { 12 | #region ErrorMessage 変更通知プロパティ 13 | 14 | private string _ErrorMessage; 15 | 16 | public string ErrorMessage 17 | { 18 | get { return this._ErrorMessage; } 19 | set 20 | { 21 | if (this._ErrorMessage != value) 22 | { 23 | this._ErrorMessage = value; 24 | this.RaisePropertyChanged(); 25 | } 26 | } 27 | } 28 | 29 | #endregion 30 | 31 | public NotifierViewModel(Lazy plugin) : base(plugin) 32 | { 33 | this.ErrorMessage = null; 34 | } 35 | 36 | public void Test() 37 | { 38 | this.Plugin.Show(NotifyType.Other, "Test", "This is test notification", App.ViewModelRoot.Activate, ex => this.ErrorMessage = ex.Message); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Composition 9 | { 10 | public class PluginViewModel : PluginViewModelBase 11 | { 12 | public PluginViewModel(Lazy plugin) : base(plugin) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Composition/PluginViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | using Livet; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Composition 10 | { 11 | public abstract class PluginViewModelBase : ViewModel where TPlugin : IPlugin 12 | { 13 | protected TPlugin Plugin { get; private set; } 14 | 15 | private IPluginMetadata Metadata { get; set; } 16 | 17 | 18 | public string Title 19 | { 20 | get { return this.Metadata.Title; } 21 | } 22 | 23 | public string Description 24 | { 25 | get { return this.Metadata.Description; } 26 | } 27 | 28 | public string Author 29 | { 30 | get { return this.Metadata.Author; } 31 | } 32 | 33 | public string Version 34 | { 35 | get { return this.Metadata.Version; } 36 | } 37 | 38 | 39 | protected PluginViewModelBase(Lazy plugin) 40 | { 41 | this.Plugin = plugin.Value; 42 | this.Metadata = plugin.Metadata; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Composition/ToolViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Composition 9 | { 10 | public class ToolViewModel : PluginViewModelBase 11 | { 12 | public ToolViewModel(Lazy plugin) : base(plugin) { } 13 | 14 | public string ToolName 15 | { 16 | get { return this.Plugin.ToolName; } 17 | } 18 | 19 | public object View 20 | { 21 | get { return this.Plugin.GetToolView(); } 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return this.Title; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/AdmiralViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper; 6 | using Grabacr07.KanColleWrapper.Models; 7 | using Livet; 8 | using Livet.EventListeners; 9 | 10 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 11 | { 12 | public class AdmiralViewModel : ViewModel 13 | { 14 | #region Model 変更通知プロパティ 15 | 16 | public Admiral Model 17 | { 18 | get { return KanColleClient.Current.Homeport.Admiral; } 19 | } 20 | 21 | #endregion 22 | 23 | public AdmiralViewModel() 24 | { 25 | this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport) 26 | { 27 | { "Admiral", (sender, args) => this.Update() }, 28 | }); 29 | } 30 | 31 | private void Update() 32 | { 33 | this.RaisePropertyChanged("Model"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/BuildingDockViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 10 | { 11 | public class BuildingDockViewModel : ViewModel 12 | { 13 | private readonly BuildingDock source; 14 | 15 | public int Id 16 | { 17 | get { return this.source.Id; } 18 | } 19 | 20 | public string Ship 21 | { 22 | get { return this.source.Ship == null ? "----" : this.source.Ship.Name; } 23 | } 24 | 25 | public string CompleteTime 26 | { 27 | get { return this.source.CompleteTime.HasValue ? this.source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } 28 | } 29 | 30 | public string Remaining 31 | { 32 | get { return this.source.Remaining.HasValue ? this.source.Remaining.Value.ToString(@"hh\:mm\:ss") : "--:--:--"; } 33 | } 34 | 35 | public BuildingDockState State 36 | { 37 | get { return this.source.State; } 38 | } 39 | 40 | public BuildingDockViewModel(BuildingDock source) 41 | { 42 | this.source = source; 43 | this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/CreatedSlotItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 9 | { 10 | public class CreatedSlotItemViewModel : NewItemViewModel 11 | { 12 | #region Succeed 変更通知プロパティ 13 | 14 | private bool? _Succeed; 15 | 16 | public bool? Succeed 17 | { 18 | get { return this._Succeed; } 19 | set 20 | { 21 | if (this._Succeed != value) 22 | { 23 | this._Succeed = value; 24 | this.RaisePropertyChanged(); 25 | } 26 | } 27 | } 28 | 29 | #endregion 30 | 31 | public CreatedSlotItemViewModel() 32 | { 33 | this.Succeed = null; 34 | this.Name = "-----"; 35 | } 36 | 37 | public void Update(CreatedSlotItem item) 38 | { 39 | this.Succeed = item.Succeed; 40 | this.Name = item.SlotItemInfo.Name; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/DroppedShipViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 9 | { 10 | public class DroppedShipViewModel : NewItemViewModel 11 | { 12 | public DroppedShipViewModel() 13 | { 14 | this.Name = "-----"; 15 | } 16 | 17 | public void Update(DroppedShip item) 18 | { 19 | this.Name = item.ShipInfo.Name; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/ExpeditionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.ViewModels.Contents.Fleets; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 9 | { 10 | public class ExpeditionsViewModel : TabItemViewModel 11 | { 12 | public override string Name 13 | { 14 | get { return Properties.Resources.Expedition; } 15 | protected set { throw new NotImplementedException(); } 16 | } 17 | 18 | public FleetsViewModel Fleets { get; private set; } 19 | 20 | public ExpeditionsViewModel(FleetsViewModel fleets) 21 | { 22 | this.Fleets = fleets; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/CombinedFleetViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets 10 | { 11 | public class CombinedFleetViewModel : ItemViewModel 12 | { 13 | public CombinedFleet Source { get; private set; } 14 | 15 | public string Name 16 | { 17 | get { return this.Source.Name; } 18 | } 19 | 20 | public FleetStateViewModel State { get; private set; } 21 | 22 | public ViewModel QuickStateView 23 | { 24 | get 25 | { 26 | return this.Source.State.Situation.HasFlag(FleetSituation.Sortie) 27 | ? this.State.Sortie 28 | : this.State.Homeport as QuickStateViewViewModel; 29 | } 30 | } 31 | 32 | public CombinedFleetViewModel(CombinedFleet fleet) 33 | { 34 | this.Source = fleet; 35 | 36 | this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet) 37 | { 38 | { "Name", (sender, args) => this.RaisePropertyChanged("Name") }, 39 | }); 40 | this.CompositeDisposable.Add(new PropertyChangedEventListener(fleet.State) 41 | { 42 | { "Situation", (sender, args) => this.RaisePropertyChanged("QuickStateView") }, 43 | }); 44 | 45 | this.State = new FleetStateViewModel(fleet.State); 46 | this.CompositeDisposable.Add(this.State); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/ConditionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets 10 | { 11 | public class ConditionViewModel : ViewModel 12 | { 13 | private readonly FleetCondition source; 14 | 15 | public string RejuvenateTime 16 | { 17 | get 18 | { 19 | return this.source.RejuvenateTime.HasValue 20 | ? this.source.RejuvenateTime.Value.LocalDateTime.ToString("MM/dd HH:mm") 21 | : "--/-- --:--"; 22 | } 23 | } 24 | 25 | public string Remaining 26 | { 27 | get 28 | { 29 | return this.source.Remaining.HasValue 30 | ? string.Format("{0:D2}:{1}", 31 | (int)this.source.Remaining.Value.TotalHours, 32 | this.source.Remaining.Value.ToString(@"mm\:ss")) 33 | : "--:--:--"; 34 | } 35 | } 36 | 37 | public bool IsRejuvenating 38 | { 39 | get { return this.source.IsRejuvenating; } 40 | } 41 | 42 | 43 | public ConditionViewModel(FleetCondition condition) 44 | { 45 | this.source = condition; 46 | this.CompositeDisposable.Add(new PropertyChangedEventListener(condition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/HomeportViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | 7 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets 8 | { 9 | /// 10 | /// 母港で待機中の艦隊のステータスを表します。 11 | /// 12 | public class HomeportViewModel : QuickStateViewViewModel 13 | { 14 | // QuickStateView は ContentControl に対し型ごとの DataTemplate を適用する形で実現するので 15 | // 状況に応じた型がそれぞれ必要。これはその 1 つ。 16 | 17 | public ConditionViewModel Condition { get; private set; } 18 | 19 | public RepairingViewModel Repairing { get; private set; } 20 | 21 | public HomeportViewModel(FleetState state) 22 | : base(state) 23 | { 24 | this.Condition = new ConditionViewModel(state.Condition); 25 | this.Repairing = new RepairingViewModel(state.Dock); 26 | this.CompositeDisposable.Add(this.Condition); 27 | this.CompositeDisposable.Add(this.Repairing); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/QuickStateViewViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets 9 | { 10 | public abstract class QuickStateViewViewModel : ViewModel 11 | { 12 | public FleetState State { get; private set; } 13 | 14 | protected QuickStateViewViewModel(FleetState state) 15 | { 16 | this.State = state; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/SortieViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | 7 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets 8 | { 9 | public class SortieViewModel : QuickStateViewViewModel 10 | { 11 | // QuickStateView は ContentControl に対し型ごとの DataTemplate を適用する形で実現するので 12 | // 状況に応じた型がそれぞれ必要。これはその 1 つ。 13 | 14 | public SortieViewModel(FleetState state) : base(state) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/MaterialsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 9 | { 10 | public class MaterialsViewModel : ViewModel 11 | { 12 | public Materials Model { get; private set; } 13 | 14 | public MaterialsViewModel() 15 | { 16 | this.Model = KanColleClient.Current.Homeport.Materials; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/NewItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 9 | { 10 | public class NewItemViewModel : ViewModel 11 | { 12 | #region Name 変更通知プロパティ 13 | 14 | private string _Name; 15 | 16 | public string Name 17 | { 18 | get { return this._Name; } 19 | set 20 | { 21 | if (this._Name != value) 22 | { 23 | this._Name = value; 24 | this.RaisePropertyChanged(); 25 | } 26 | } 27 | } 28 | 29 | #endregion 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/RepairingDockViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 10 | { 11 | public class RepairingDockViewModel : ViewModel 12 | { 13 | private readonly RepairingDock source; 14 | 15 | public int Id 16 | { 17 | get { return this.source.Id; } 18 | } 19 | 20 | public string Ship 21 | { 22 | get { return this.source.Ship == null ? "----" : this.source.Ship.Info.Name; } 23 | } 24 | 25 | public string CompleteTime 26 | { 27 | get { return this.source.CompleteTime.HasValue ? this.source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } 28 | } 29 | 30 | public string Remaining 31 | { 32 | get 33 | { 34 | return this.source.Remaining.HasValue 35 | ? string.Format("{0:D2}:{1}", 36 | (int)this.source.Remaining.Value.TotalHours, 37 | this.source.Remaining.Value.ToString(@"mm\:ss")) 38 | : "--:--:--"; 39 | } 40 | } 41 | 42 | public RepairingDockState State 43 | { 44 | get { return this.source.State; } 45 | } 46 | 47 | public RepairingDockViewModel(RepairingDock source) 48 | { 49 | this.source = source; 50 | this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); 51 | } 52 | 53 | public RepairingDockViewModel() { } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/ShipViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleViewer.Models; 6 | using Grabacr07.KanColleWrapper; 7 | using Grabacr07.KanColleWrapper.Models; 8 | using Grabacr07.KanColleViewer.Properties; 9 | using Livet; 10 | using Livet.EventListeners; 11 | 12 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 13 | { 14 | public class ShipViewModel : ViewModel 15 | { 16 | public Ship Ship { get; private set; } 17 | 18 | public ShipViewModel(Ship ship) 19 | { 20 | this.Ship = ship; 21 | 22 | this.CompositeDisposable.Add(new PropertyChangedEventListener(ResourceService.Current) 23 | { 24 | (sender, args) => 25 | { 26 | this.RaisePropertyChanged("Ship"); 27 | }, 28 | }); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/ShipsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 10 | { 11 | public class ShipsViewModel : ViewModel 12 | { 13 | #region Count 変更通知プロパティ 14 | 15 | private int _Count; 16 | 17 | public int Count 18 | { 19 | get { return this._Count; } 20 | set 21 | { 22 | if (this._Count != value) 23 | { 24 | this._Count = value; 25 | this.RaisePropertyChanged(); 26 | } 27 | } 28 | } 29 | 30 | #endregion 31 | 32 | public ShipsViewModel() 33 | { 34 | this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Organization) 35 | { 36 | { "Ships", (sender, args) => this.Update() }, 37 | }); 38 | this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Organization.DroppedShips) 39 | { 40 | { "Count", (sender, args) => this.Update() }, 41 | }); 42 | this.Update(); 43 | } 44 | 45 | private void Update() 46 | { 47 | this.Count = KanColleClient.Current.Homeport.Organization.Ships.Count + KanColleClient.Current.Homeport.Organization.DroppedShips.Count; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Contents/SlotItemsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper; 6 | using Livet; 7 | using Livet.EventListeners; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents 10 | { 11 | public class SlotItemsViewModel : ViewModel 12 | { 13 | #region Count 変更通知プロパティ 14 | 15 | private int _Count; 16 | 17 | public int Count 18 | { 19 | get { return this._Count; } 20 | set 21 | { 22 | if (this._Count != value) 23 | { 24 | this._Count = value; 25 | this.RaisePropertyChanged(); 26 | } 27 | } 28 | } 29 | 30 | #endregion 31 | 32 | public SlotItemsViewModel() 33 | { 34 | this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Itemyard) 35 | { 36 | { "SlotItemsCount", (sender, args) => this.Update() } 37 | }); 38 | this.Update(); 39 | } 40 | 41 | private void Update() 42 | { 43 | this.Count = KanColleClient.Current.Homeport.Itemyard.SlotItemsCount; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/CultureViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.ViewModels 8 | { 9 | public class CultureViewModel 10 | { 11 | public string DisplayName { get; set; } 12 | public string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Dev/DebugTabViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleViewer.Composition; 6 | 7 | namespace Grabacr07.KanColleViewer.ViewModels.Dev 8 | { 9 | public class DebugTabViewModel : TabItemViewModel 10 | { 11 | public override string Name 12 | { 13 | get { return Properties.Resources.Debug; } 14 | protected set { throw new NotImplementedException(); } 15 | } 16 | 17 | public void Notify() 18 | { 19 | PluginHost.Instance.GetNotifier() 20 | .Show(NotifyType.Other, Properties.Resources.Debug_NotificationMessage_Title, Properties.Resources.Debug_NotificationMessage, () => App.ViewModelRoot.Activate()); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/ItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Livet; 6 | 7 | namespace Grabacr07.KanColleViewer.ViewModels 8 | { 9 | public class ItemViewModel : ViewModel 10 | { 11 | #region IsSelected 変更通知プロパティ 12 | 13 | private bool _IsSelected; 14 | 15 | public virtual bool IsSelected 16 | { 17 | get { return this._IsSelected; } 18 | set 19 | { 20 | if (this._IsSelected != value) 21 | { 22 | this._IsSelected = value; 23 | this.RaisePropertyChanged(); 24 | } 25 | } 26 | } 27 | 28 | #endregion 29 | } 30 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Messages/Response.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.ViewModels.Messages 7 | { 8 | public class Processing 9 | { 10 | public bool IsSuccess { get; private set; } 11 | public Exception Exception { get; private set; } 12 | 13 | public Processing() 14 | { 15 | this.IsSuccess = true; 16 | } 17 | 18 | public Processing(Exception ex) 19 | { 20 | this.IsSuccess = false; 21 | this.Exception = ex; 22 | } 23 | } 24 | 25 | public class Processing : Processing 26 | { 27 | public T Result { get; private set; } 28 | 29 | public Processing(Exception ex) : base(ex) { } 30 | 31 | public Processing(T data) 32 | { 33 | this.Result = data; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Messages/ScreenshotMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using Livet.Messaging; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Messages 10 | { 11 | internal class ScreenshotMessage : ResponsiveInteractionMessage 12 | { 13 | public ScreenshotMessage() { } 14 | public ScreenshotMessage(string messageKey) : base(messageKey) { } 15 | 16 | public string Path { get; set; } 17 | 18 | protected override Freezable CreateInstanceCore() 19 | { 20 | return new ScreenshotMessage() 21 | { 22 | MessageKey = this.MessageKey, 23 | Path = this.Path, 24 | Response = this.Response, 25 | }; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Messages/SetWindowLocationMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using Livet.Messaging; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Messages 10 | { 11 | public class SetWindowLocationMessage : InteractionMessage 12 | { 13 | #region Top 依存関係プロパティ 14 | 15 | public double? Top 16 | { 17 | get { return (double?)this.GetValue(TopProperty); } 18 | set { this.SetValue(TopProperty, value); } 19 | } 20 | public static readonly DependencyProperty TopProperty = 21 | DependencyProperty.Register("Top", typeof(double?), typeof(SetWindowLocationMessage), new UIPropertyMetadata(null)); 22 | 23 | #endregion 24 | 25 | #region Left 依存関係プロパティ 26 | 27 | public double? Left 28 | { 29 | get { return (double?)this.GetValue(LeftProperty); } 30 | set { this.SetValue(LeftProperty, value); } 31 | } 32 | public static readonly DependencyProperty LeftProperty = 33 | DependencyProperty.Register("Left", typeof(double?), typeof(SetWindowLocationMessage), new UIPropertyMetadata(null)); 34 | 35 | #endregion 36 | 37 | protected override Freezable CreateInstanceCore() 38 | { 39 | return new SetWindowLocationMessage 40 | { 41 | MessageKey = this.MessageKey, 42 | Top = this.Top, 43 | Left = this.Left, 44 | }; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/Messages/ZoomMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using Livet.Messaging; 8 | 9 | namespace Grabacr07.KanColleViewer.ViewModels.Messages 10 | { 11 | public class ZoomMessage : InteractionMessage 12 | { 13 | #region ZoomFactor 依存関係プロパティ 14 | 15 | public int ZoomFactor 16 | { 17 | get { return (int)this.GetValue(ZoomFactorProperty); } 18 | set { this.SetValue(ZoomFactorProperty, value); } 19 | } 20 | public static readonly DependencyProperty ZoomFactorProperty = 21 | DependencyProperty.Register("ZoomFactor", typeof(int), typeof(ZoomMessage), new UIPropertyMetadata(100)); 22 | 23 | #endregion 24 | 25 | protected override Freezable CreateInstanceCore() 26 | { 27 | return new ZoomMessage 28 | { 29 | MessageKey = this.MessageKey, 30 | ZoomFactor = this.ZoomFactor, 31 | }; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/NullViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels 9 | { 10 | public sealed class NullViewModel : ViewModel 11 | { 12 | public static NullViewModel Instance { get; private set; } 13 | 14 | static NullViewModel() 15 | { 16 | Instance = new NullViewModel(); 17 | } 18 | 19 | private NullViewModel() { } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/ViewModels/StatusBarViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.ViewModels 9 | { 10 | public class StatusBarViewModel : ViewModel 11 | { 12 | #region NotificationMessage 変更通知プロパティ 13 | 14 | private string _NotificationMessage; 15 | 16 | public string NotificationMessage 17 | { 18 | get { return this._NotificationMessage; } 19 | set 20 | { 21 | if (this._NotificationMessage != value) 22 | { 23 | this._NotificationMessage = value; 24 | this.RaisePropertyChanged(); 25 | } 26 | } 27 | } 28 | 29 | #endregion 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Behaviors/SetWindowLocationAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using Grabacr07.KanColleViewer.ViewModels.Messages; 8 | using Livet.Behaviors.Messaging; 9 | using Livet.Messaging; 10 | 11 | namespace Grabacr07.KanColleViewer.Views.Behaviors 12 | { 13 | public class SetWindowLocationAction : InteractionMessageAction 14 | { 15 | protected override void InvokeAction(InteractionMessage message) 16 | { 17 | var setWindowLocMessage = message as SetWindowLocationMessage; 18 | if (setWindowLocMessage == null) return; 19 | 20 | if (setWindowLocMessage.Left.HasValue) this.AssociatedObject.Left = setWindowLocMessage.Left.Value; 21 | if (setWindowLocMessage.Top.HasValue) this.AssociatedObject.Top = setWindowLocMessage.Top.Value; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Behaviors/ZoomAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Models; 7 | using Grabacr07.KanColleViewer.Properties; 8 | using Grabacr07.KanColleViewer.ViewModels.Messages; 9 | using Grabacr07.KanColleViewer.Views.Controls; 10 | using Livet.Behaviors.Messaging; 11 | using Livet.Messaging; 12 | 13 | namespace Grabacr07.KanColleViewer.Views.Behaviors 14 | { 15 | public class ZoomAction : InteractionMessageAction 16 | { 17 | protected override void InvokeAction(InteractionMessage message) 18 | { 19 | this.AssociatedObject.Update(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/BrowserNavigator.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views 17 | { 18 | /// 19 | /// BrowserNavigator.xaml の相互作用ロジック 20 | /// 21 | public partial class BrowserNavigator : UserControl 22 | { 23 | public BrowserNavigator() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using AppSettings = Grabacr07.KanColleViewer.Models.Settings; 6 | 7 | namespace Grabacr07.KanColleViewer.Views.Catalogs 8 | { 9 | /// 10 | /// 艦娘一覧ウィンドウを表します。 11 | /// 12 | partial class ShipCatalogWindow 13 | { 14 | public ShipCatalogWindow() 15 | { 16 | this.InitializeComponent(); 17 | 18 | MainWindow.Current.Closed += (sender, args) => this.Close(); 19 | } 20 | 21 | protected override void OnClosed(EventArgs e) 22 | { 23 | base.OnClosed(e); 24 | 25 | AppSettings.Current.Save(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Catalogs/SlotItemCatalogWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleViewer.Views.Catalogs 7 | { 8 | /// 9 | /// 装備一覧ウィンドウを表します。 10 | /// 11 | partial class SlotItemCatalogWindow 12 | { 13 | public SlotItemCatalogWindow() 14 | { 15 | this.InitializeComponent(); 16 | 17 | MainWindow.Current.Closed += (sender, args) => this.Close(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Expeditions.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Controls; 6 | 7 | namespace Grabacr07.KanColleViewer.Views.Contents 8 | { 9 | /// 10 | /// Expeditions.xaml の相互作用ロジック 11 | /// 12 | public partial class Expeditions : UserControl 13 | { 14 | public Expeditions() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Fleets.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | 8 | namespace Grabacr07.KanColleViewer.Views.Contents 9 | { 10 | /// 11 | /// Fleets.xaml の相互作用ロジック 12 | /// 13 | public partial class Fleets : UserControl 14 | { 15 | public Fleets() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void Button_Click(object sender, RoutedEventArgs e) 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Homeport.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | public partial class Homeport 19 | { 20 | public Homeport() 21 | { 22 | InitializeComponent(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Overview.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | /// 19 | /// Overview.xaml の相互作用ロジック 20 | /// 21 | public partial class Overview 22 | { 23 | public Overview() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Overviews/Repairyard.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents.Overviews 17 | { 18 | /// 19 | /// Overview.xaml の相互作用ロジック 20 | /// 21 | public partial class Repairyard 22 | { 23 | public Repairyard() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/QuestViewSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Data; 8 | using Grabacr07.KanColleViewer.ViewModels.Contents; 9 | using Grabacr07.KanColleWrapper.Models; 10 | 11 | namespace Grabacr07.KanColleViewer.Views.Contents 12 | { 13 | public class QuestViewSource : CollectionViewSource 14 | { 15 | #region Type 依存関係プロパティ 16 | 17 | public QuestType Type 18 | { 19 | get { return (QuestType)this.GetValue(TypeProperty); } 20 | set { this.SetValue(TypeProperty, value); } 21 | } 22 | public static readonly DependencyProperty TypeProperty = 23 | DependencyProperty.Register("Type", typeof(QuestType), typeof(QuestViewSource), new UIPropertyMetadata(QuestType.OneTime)); 24 | 25 | #endregion 26 | 27 | public QuestViewSource() 28 | { 29 | this.Filter += (sender, args) => 30 | { 31 | var quest = args.Item as QuestViewModel; 32 | args.Accepted = quest != null && (quest.Type2 == this.Type); 33 | }; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Quests.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | /// 19 | /// Missions.xaml の相互作用ロジック 20 | /// 21 | public partial class Quests : UserControl 22 | { 23 | public Quests() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Shipyard.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Controls; 6 | 7 | namespace Grabacr07.KanColleViewer.Views.Contents 8 | { 9 | /// 10 | /// Shipyard.xaml の相互作用ロジック 11 | /// 12 | public partial class Shipyard : UserControl 13 | { 14 | public Shipyard() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | /// 19 | /// StateDetailIndicator.xaml の相互作用ロジック 20 | /// 21 | public partial class StateDetailIndicator : UserControl 22 | { 23 | public StateDetailIndicator() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/StateIconIndicator.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | /// 19 | /// StateIconIndicator.xaml の相互作用ロジック 20 | /// 21 | public partial class StateIconIndicator : UserControl 22 | { 23 | public StateIconIndicator() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Contents/Tools.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Contents 17 | { 18 | /// 19 | /// Tools.xaml の相互作用ロジック 20 | /// 21 | public partial class Tools : UserControl 22 | { 23 | public Tools() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Controls/SlotItemIcon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using Grabacr07.KanColleWrapper.Models; 16 | 17 | namespace Grabacr07.KanColleViewer.Views.Controls 18 | { 19 | /// 20 | /// 装備スロットの種類に基づいたアイコンを表示します。 21 | /// 22 | public class SlotItemIcon : Control 23 | { 24 | static SlotItemIcon() 25 | { 26 | DefaultStyleKeyProperty.OverrideMetadata(typeof(SlotItemIcon), new FrameworkPropertyMetadata(typeof(SlotItemIcon))); 27 | } 28 | 29 | #region Type 依存関係プロパティ 30 | 31 | public SlotItemIconType Type 32 | { 33 | get { return (SlotItemIconType)this.GetValue(TypeProperty); } 34 | set { this.SetValue(TypeProperty, value); } 35 | } 36 | public static readonly DependencyProperty TypeProperty = 37 | DependencyProperty.Register("Type", typeof(SlotItemIconType), typeof(SlotItemIcon), new UIPropertyMetadata(SlotItemIconType.Unknown)); 38 | 39 | #endregion 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Converters/AdjustConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | using System.Windows.Media; 9 | using Grabacr07.KanColleWrapper.Models; 10 | 11 | namespace Grabacr07.KanColleViewer.Views.Converters 12 | { 13 | public class AdjustConverter : IValueConverter 14 | { 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | var number = Double.Parse(value.ToString()); 18 | var plus = Double.Parse(parameter.ToString()); 19 | return number + plus; 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | var number = Double.Parse(value.ToString()); 25 | var plus = Double.Parse(parameter.ToString()); 26 | return number - plus; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Converters/BooleanToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Data; 8 | using System.Globalization; 9 | 10 | namespace Grabacr07.KanColleViewer.Views.Converters 11 | { 12 | public class BooleanToVisibilityConverter : IValueConverter 13 | { 14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | bool param = bool.Parse(value.ToString()); 17 | if (param == true) 18 | return Visibility.Visible; 19 | else 20 | return Visibility.Collapsed; 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Converters/HasFlagConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace Grabacr07.KanColleViewer.Views.Converters 10 | { 11 | public class HasFlagConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | try 16 | { 17 | var enumValue = value as Enum; 18 | if (enumValue != null) 19 | { 20 | var p = parameter as string; 21 | if (p != null) 22 | { 23 | return p.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) 24 | .Select(x => x.Trim()) 25 | .Select(x => Enum.Parse(enumValue.GetType(), x) as Enum) 26 | .All(x => enumValue.HasFlag(x)); 27 | } 28 | } 29 | } 30 | catch (Exception ex) 31 | { 32 | System.Diagnostics.Debug.Write(ex); 33 | } 34 | 35 | return false; 36 | } 37 | 38 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 39 | { 40 | throw new NotImplementedException(); 41 | } 42 | 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Converters/MaxConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | using System.Windows.Media; 9 | using Grabacr07.KanColleWrapper.Models; 10 | 11 | namespace Grabacr07.KanColleViewer.Views.Converters 12 | { 13 | public class MaxConverter : IMultiValueConverter 14 | { 15 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return values.Select(x => (double)x).Max(); 18 | } 19 | 20 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Converters/RankIDToRankNameConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | using Grabacr07.KanColleViewer.Properties; 9 | 10 | 11 | namespace Grabacr07.KanColleViewer.Views.Converters 12 | { 13 | public class RankIDToRankNameConverter : IValueConverter 14 | { 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | if (value is int) 18 | { 19 | var ID = (int)value; 20 | switch (ID) 21 | { 22 | case 1: 23 | return Resources.Rank_Marshal_Admiral; 24 | case 2: 25 | return Resources.Rank_Admiral; 26 | case 3: 27 | return Resources.Rank_Vice_Admiral; 28 | case 4: 29 | return Resources.Rank_Rear_Admiral; 30 | case 5: 31 | return Resources.Rank_Captain; 32 | case 6: 33 | return Resources.Rank_Commander; 34 | case 7: 35 | return Resources.Rank_Novice_Commander; 36 | case 8: 37 | return Resources.Rank_Lieutenant_Commander; 38 | case 9: 39 | return Resources.Rank_Lieutenant; 40 | case 10: 41 | default: 42 | return Resources.Rank_Novice_Lieutenant; 43 | } 44 | 45 | } 46 | return "N/A"; 47 | } 48 | 49 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 50 | { 51 | throw new NotImplementedException(); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Dev/DebugTab.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Dev/DebugTab.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Dev 17 | { 18 | /// 19 | /// DebugTab.xaml の相互作用ロジック 20 | /// 21 | public partial class DebugTab : UserControl 22 | { 23 | public DebugTab() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/ExitDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace Grabacr07.KanColleViewer.Views 16 | { 17 | /// 18 | /// ExitDialog.xaml の相互作用ロジック 19 | /// 20 | partial class ExitDialog 21 | { 22 | public ExitDialog() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/FleetWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace Grabacr07.KanColleViewer.Views 16 | { 17 | /// 18 | /// FleetWindow.xaml の相互作用ロジック 19 | /// 20 | partial class FleetWindow 21 | { 22 | public FleetWindow() 23 | { 24 | this.InitializeComponent(); 25 | 26 | MainWindow.Current.Closed += (sender, args) => this.Close(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Info.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views 17 | { 18 | /// 19 | /// Interaction logic for Info.xaml 20 | /// 21 | public partial class Info : UserControl 22 | { 23 | public Info() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/MainContent.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views 17 | { 18 | public partial class MainContent 19 | { 20 | public MainContent() 21 | { 22 | InitializeComponent(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Browser.xaml の相互作用ロジック 20 | /// 21 | public partial class Browser : UserControl 22 | { 23 | public Browser() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs.BASE.20064.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs.BASE.20064.cs -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs.LOCAL.20064.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Browser.xaml の相互作用ロジック 20 | /// 21 | public partial class Browser : UserControl 22 | { 23 | public Browser() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Browser.xaml.cs.REMOTE.20064.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Browser.xaml の相互作用ロジック 20 | /// 21 | public partial class Browser : UserControl 22 | { 23 | public Browser() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Common.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 9 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Language.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Others.xaml の相互作用ロジック 20 | /// 21 | public partial class Language : UserControl 22 | { 23 | public Language() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Network.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Network.xaml の相互作用ロジック 20 | /// 21 | public partial class Network : UserControl 22 | { 23 | public Network() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Notification.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Notification.xaml の相互作用ロジック 20 | /// 21 | public partial class Notification : UserControl 22 | { 23 | public Notification() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Operation.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Operation.xaml の相互作用ロジック 20 | /// 21 | public partial class Operation : UserControl 22 | { 23 | public Operation() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Others.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Others.xaml の相互作用ロジック 20 | /// 21 | public partial class Others : UserControl 22 | { 23 | public Others() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/PluginInfo.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// PluginInfo.xaml の相互作用ロジック 20 | /// 21 | public partial class PluginInfo : UserControl 22 | { 23 | public PluginInfo() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Settings.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Controls; 6 | 7 | namespace Grabacr07.KanColleViewer.Views.Settings 8 | { 9 | /// 10 | /// Settings.xaml の相互作用ロジック 11 | /// 12 | public partial class Settings : UserControl 13 | { 14 | public Settings() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Updates.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Interaction logic for Updates.xaml 20 | /// 21 | public partial class Updates : UserControl 22 | { 23 | public Updates() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// VersionInfo.xaml の相互作用ロジック 20 | /// 21 | public partial class VersionInfo : UserControl 22 | { 23 | public VersionInfo() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/Settings/Window.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views.Settings 17 | { 18 | /// 19 | /// Window.xaml の相互作用ロジック 20 | /// 21 | public partial class Window : UserControl 22 | { 23 | public Window() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/StartContent.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views 17 | { 18 | /// 19 | /// NotStarted.xaml の相互作用ロジック 20 | /// 21 | public partial class StartContent 22 | { 23 | public StartContent() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | private void FlowDocumentScrollViewerOnLoaded(object sender, RoutedEventArgs e) 29 | { 30 | //var viewer = sender as FlowDocumentScrollViewer; 31 | //if (viewer == null) return; 32 | 33 | //viewer.MaxWidth = viewer.ActualWidth; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Views/StatusBar.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Views 17 | { 18 | /// 19 | /// StatusBar.xaml の相互作用ロジック 20 | /// 21 | public partial class StatusBar : UserControl 22 | { 23 | public StatusBar() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Win32/DVTARGETDEVICE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace Grabacr07.KanColleViewer.Win32 7 | { 8 | [StructLayout(LayoutKind.Sequential)] 9 | // ReSharper disable once InconsistentNaming 10 | internal class DVTARGETDEVICE 11 | { 12 | public ushort tdSize; 13 | public uint tdDeviceNameOffset; 14 | public ushort tdDriverNameOffset; 15 | public ushort tdExtDevmodeOffset; 16 | public ushort tdPortNameOffset; 17 | public byte tdData; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Win32/IServiceProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace Grabacr07.KanColleViewer.Win32 7 | { 8 | [ComImport, Guid("6d5140c1-7436-11ce-8034-00aa006009fa"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComVisible(false)] 9 | internal interface IServiceProvider 10 | { 11 | [return: MarshalAs(UnmanagedType.I4)] 12 | [PreserveSig] 13 | int QueryService(ref Guid guidService, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObject); 14 | } 15 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Win32/IViewObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace Grabacr07.KanColleViewer.Win32 7 | { 8 | [ComImport(), Guid("0000010d-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 9 | internal interface IViewObject 10 | { 11 | [PreserveSig] 12 | int Draw( 13 | [In, MarshalAs(UnmanagedType.U4)] int dwDrawAspect, 14 | int lindex, 15 | IntPtr pvAspect, 16 | [In] DVTARGETDEVICE ptd, 17 | IntPtr hdcTargetDev, 18 | IntPtr hdcDraw, 19 | [In] RECT lprcBounds, 20 | [In] RECT lprcWBounds, 21 | IntPtr pfnContinue, 22 | [In] IntPtr dwContinue); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Win32/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Win32 8 | { 9 | internal static class NativeMethods 10 | { 11 | [DllImport("Avrt.dll")] 12 | public static extern IntPtr AvSetMmThreadCharacteristics(string taskName, ref uint taskIndex); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/Win32/RECT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace Grabacr07.KanColleViewer.Win32 7 | { 8 | [StructLayout(LayoutKind.Sequential)] 9 | internal class RECT 10 | { 11 | public int left; 12 | public int top; 13 | public int width; 14 | public int height; 15 | } 16 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Grabacr07 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/Grabacr07.KanColleViewer/readme.txt -------------------------------------------------------------------------------- /Grabacr07.KanColleViewer/tasks.txt: -------------------------------------------------------------------------------- 1 | ✔退避なのにインジケーターが大破扱いのままになってる 2 | ✔縦表示の各艦隊名の背景を BorderBrushKey に 3 | ✔補給時に詳細エリアのステータス (制空戦力) が更新されない 4 | ・入渠した瞬間に詳細エリアのステータスが更新されない 5 | ・総合タブと艦隊タブに HasFlagConverter 適用 6 | ✔退避した艦を索敵と制空の計算から省く 7 | ✔母港帰還直後に退避設定がまだ生きているっぽい 8 | ✔艦名とレベルが離れすぎ感 9 | ✔Condigion と HP が離れすぎ感 10 | ・連合艦隊、横に広げるモードほしい 11 | 12 | ・UI のご提案 13 | ┌────┐┌─────────────┐ 14 | ├─艦隊─┤├──────┬──────┤ 15 | ├─選択─┤├─ インジケータ -┼──────┤ 16 | └────┘└──────┴──────┘ 17 | ┌───────────────────┐ 18 | └──────── ステータス -───────┘ 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/DisposableNotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Livet; 6 | 7 | namespace Grabacr07.KanColleWrapper 8 | { 9 | public class DisposableNotifier : NotificationObject, IDisposable 10 | { 11 | protected LivetCompositeDisposable CompositeDisposable { get; private set; } 12 | 13 | public DisposableNotifier() 14 | { 15 | this.CompositeDisposable = new LivetCompositeDisposable(); 16 | } 17 | 18 | public void Dispose() 19 | { 20 | this.Dispose(true); 21 | this.CompositeDisposable.Dispose(); 22 | 23 | GC.SuppressFinalize(this); 24 | } 25 | 26 | protected virtual void Dispose(bool disposing) { } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reactive.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper 8 | { 9 | public static class Extensions 10 | { 11 | /// 12 | /// コレクションを展開し、メンバーの文字列表現を指定した区切り文字で連結した文字列を返します。 13 | /// 14 | /// コレクションに含まれる任意の型。 15 | /// 対象のコレクション。 16 | /// セパレーターとして使用する文字列。 17 | /// コレクションの文字列表現を展開し、指定したセパレーターで連結した文字列。 18 | public static string ToString(this IEnumerable source, string separator) 19 | { 20 | return string.Join(separator, source); 21 | } 22 | 23 | /// 24 | /// シーケンスが null でなく、1 つ以上の要素を含んでいるかどうかを確認します。 25 | /// 26 | public static bool HasItems(this IEnumerable source) 27 | { 28 | return source != null && source.Any(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/IProxySettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper 7 | { 8 | public interface IProxySettings 9 | { 10 | bool IsEnabled { get; set; } 11 | 12 | bool IsEnabledOnSSL { get; set; } 13 | 14 | string Host { get; set; } 15 | 16 | ushort Port { get; set; } 17 | 18 | bool IsAuthRequired { get; set; } 19 | 20 | string Username { get; set; } 21 | 22 | string Password { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Internal/Definitions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Internal 8 | { 9 | internal static class Definitions 10 | { 11 | public static readonly DateTimeOffset UnixEpoch = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Internal/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reactive.Linq; 5 | using System.Threading.Tasks; 6 | using Fiddler; 7 | 8 | namespace Grabacr07.KanColleWrapper.Internal 9 | { 10 | internal static class Extensions 11 | { 12 | public static string GetResponseAsJson(this Session session) 13 | { 14 | return session.GetResponseBodyAsString().Replace("svdata=", ""); 15 | } 16 | 17 | public static void SafeDispose(this IDisposable resource) 18 | { 19 | if (resource != null) resource.Dispose(); 20 | } 21 | 22 | 23 | /// 24 | /// 型の配列に安全にアクセスします。 25 | /// 26 | public static int? Get(this int[] array, int index) 27 | { 28 | return array.Length > index ? (int?)array[index] : null; 29 | } 30 | 31 | public static string Join(this IEnumerable values, string separator) 32 | { 33 | return string.Join(separator, values); 34 | } 35 | 36 | public static Task WhenAll(this IEnumerable tasks) 37 | { 38 | return Task.WhenAll(tasks); 39 | } 40 | 41 | public static Task WhenAll(this IEnumerable> tasks) 42 | { 43 | return Task.WhenAll(tasks); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/KanColleError.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper 8 | { 9 | public class KanColleError 10 | { 11 | public Exception Exception { get; private set; } 12 | 13 | public KanColleError(Exception ex) 14 | { 15 | this.Exception = ex; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/KanColleProxyExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reactive.Linq; 5 | using System.Threading.Tasks; 6 | using Fiddler; 7 | using Grabacr07.KanColleWrapper.Models; 8 | 9 | namespace Grabacr07.KanColleWrapper 10 | { 11 | public static class KanColleProxyExtensions 12 | { 13 | /// 14 | /// FiddlerCore でフックした オブジェクトの データを 15 | /// 型にパースします。 16 | /// 17 | public static IObservable> TryParse(this IObservable source) 18 | { 19 | Func> converter = session => 20 | { 21 | SvData result; 22 | return SvData.TryParse(session, out result) ? result : null; 23 | }; 24 | 25 | return source.Select(converter).Where(x => x != null && x.IsSuccess); 26 | } 27 | 28 | /// 29 | /// FiddlerCore でフックした オブジェクトの データを 30 | /// 型にパースします。 31 | /// 32 | public static IObservable TryParse(this IObservable source) 33 | { 34 | Func converter = session => 35 | { 36 | SvData result; 37 | return SvData.TryParse(session, out result) ? result : null; 38 | }; 39 | 40 | return source.Select(converter).Where(x => x != null && x.IsSuccess); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/BUildingDockState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | /// 9 | /// 工廠の状態を示す識別子を定義します。 10 | /// 11 | public enum BuildingDockState 12 | { 13 | /// 14 | /// ドックは未開放です。 15 | /// 16 | Locked = -1, 17 | 18 | /// 19 | /// ドックを使用可能です。 20 | /// 21 | Unlocked = 0, 22 | 23 | /// 24 | /// 新しい艦娘の建造中です。 25 | /// 26 | Building = 2, 27 | 28 | /// 29 | /// 新しい艦娘の建造が完了しています。 30 | /// 31 | Completed = 3, 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/BattleState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public enum BattleState 10 | { 11 | Start, 12 | NightBattle, 13 | BattleResult, 14 | End 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/BuildingCompletedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public class BuildingCompletedEventArgs 10 | { 11 | /// 12 | /// 建造が完了したドックを一意に識別する ID を取得します。 13 | /// 14 | public int DockId { get; private set; } 15 | 16 | /// 17 | /// 建造された艦娘の種類を取得します。 18 | /// 19 | public ShipInfo Ship { get; private set; } 20 | 21 | public BuildingCompletedEventArgs(int id, ShipInfo ship) 22 | { 23 | this.DockId = id; 24 | this.Ship = ship; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ConditionRejuvenatedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | public class ConditionRejuvenatedEventArgs : EventArgs 9 | { 10 | public string FleetName { get; private set; } 11 | 12 | public int MinCondition { get; private set; } 13 | 14 | public ConditionRejuvenatedEventArgs(string fleetName, int minCondtion) 15 | { 16 | this.FleetName = fleetName; 17 | this.MinCondition = minCondtion; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ConditionType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// コンディションの種別を示す識別子を定義します。 11 | /// 12 | public enum ConditionType 13 | { 14 | /// 15 | /// キラキラ状態 (コンディション値 50 ~ 100)。 16 | /// 17 | Brilliant, 18 | // 神宝「ブリリアントドラゴンバレッタ」 19 | 20 | /// 21 | /// 通常状態 (コンディション値 40 ~ 49)。 22 | /// 23 | Normal, 24 | 25 | /// 26 | /// 疲労状態 (間宮点灯, コンディション値 30 ~ 39)。 27 | /// 28 | Tired, 29 | 30 | /// 31 | /// 疲労状態 (橙アイコン, コンディション値 20 ~ 29)。 32 | /// 33 | OrangeTired, 34 | 35 | /// 36 | /// 疲労状態 (赤アイコン, コンディション値 0 ~ 20)。 37 | /// 38 | RedTired, 39 | } 40 | 41 | public static class ConditionTypeHelper 42 | { 43 | /// 44 | /// コンディション値を示す整数値から、 値へ変換します。 45 | /// 46 | public static ConditionType ToConditionType(int condition) 47 | { 48 | if (condition >= 50) return ConditionType.Brilliant; 49 | if (condition >= 40) return ConditionType.Normal; 50 | if (condition >= 30) return ConditionType.Tired; 51 | if (condition >= 20) return ConditionType.OrangeTired; 52 | return ConditionType.RedTired; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/CreatedSlotItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models.Raw; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 工廠で開発された装備アイテムを表します。 11 | /// 12 | public class CreatedSlotItem : RawDataWrapper 13 | { 14 | public bool Succeed 15 | { 16 | get { return this.RawData.api_create_flag == 1; } 17 | } 18 | 19 | public SlotItemInfo SlotItemInfo { get; private set; } 20 | 21 | public CreatedSlotItem(kcsapi_createitem rawData) 22 | : base(rawData) 23 | { 24 | try 25 | { 26 | this.SlotItemInfo = this.Succeed 27 | ? KanColleClient.Current.Master.SlotItems[rawData.api_slot_item.api_slotitem_id] 28 | : KanColleClient.Current.Master.SlotItems[int.Parse(rawData.api_fdata.Split(',')[1])]; 29 | 30 | System.Diagnostics.Debug.WriteLine("createitem: {0} - {1}", this.Succeed, this.SlotItemInfo.Name); 31 | } 32 | catch (Exception ex) 33 | { 34 | System.Diagnostics.Debug.WriteLine(ex); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/DroppedShip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models.Raw; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 工廠で開発された装備アイテムを表します。 11 | /// 12 | public class DroppedShip : RawDataWrapper 13 | { 14 | public ShipInfo ShipInfo { get; private set; } 15 | 16 | public DroppedShip(kcsapi_battleresult_getship rawData) 17 | : base(rawData) 18 | { 19 | try 20 | { 21 | this.ShipInfo = KanColleClient.Current.Master.Ships[rawData.api_ship_id]; 22 | } 23 | catch (Exception ex) 24 | { 25 | System.Diagnostics.Debug.WriteLine(ex); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ExpeditionReturnedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public class ExpeditionReturnedEventArgs 10 | { 11 | public string FleetName { get; private set; } 12 | 13 | internal ExpeditionReturnedEventArgs(string fleetName) 14 | { 15 | this.FleetName = fleetName; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/FleetSituation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | [Flags] 9 | public enum FleetSituation 10 | { 11 | /// 12 | /// 艦隊に艦娘が編成されていません。 13 | /// 14 | Empty = 0, 15 | 16 | /// 17 | /// 艦隊は母港で待機中です。 18 | /// 19 | Homeport = 1, 20 | 21 | /// 22 | /// この艦隊は連合艦隊です。 23 | /// 24 | Combined = 1 << 1, 25 | 26 | /// 27 | /// 艦隊は出撃中です。 28 | /// 29 | Sortie = 1 << 2, 30 | 31 | /// 32 | /// 艦隊は遠征中です。 33 | /// 34 | Expedition = 1 << 3, 35 | 36 | /// 37 | /// 艦隊に大破した艦娘がいます。 38 | /// 39 | HeavilyDamaged = 1 << 4, 40 | 41 | /// 42 | /// 艦隊に完全に補給されていない艦娘がいます。 43 | /// 44 | InShortSupply = 1 << 5, 45 | 46 | /// 47 | /// 艦隊に入渠中の艦娘がいます。 48 | /// 49 | Repairing = 1 << 6, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/FleetSpeed.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | public enum FleetSpeed 9 | { 10 | Fast, 11 | Low, 12 | Hybrid, 13 | } 14 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/HeavilyDamagedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | public class HeavilyDamagedEventArgs : EventArgs 9 | { 10 | public string FleetName { get; private set; } 11 | 12 | public HeavilyDamagedEventArgs(string fleetName) 13 | { 14 | this.FleetName = fleetName; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/IIdentifiable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 要素を一意に識別できるようにします。 11 | /// 12 | public interface IIdentifiable 13 | { 14 | int Id { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/MapArea.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Grabacr07.KanColleWrapper.Models.Raw; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public class MapArea : RawDataWrapper, IIdentifiable 10 | { 11 | public int Id { get; private set; } 12 | 13 | public string Name { get; private set; } 14 | 15 | public MapArea(kcsapi_mst_maparea maparea) 16 | : base(maparea) 17 | { 18 | this.Id = maparea.api_id; 19 | this.Name = maparea.api_name; 20 | } 21 | 22 | #region static members 23 | 24 | private static MapArea dummy = new MapArea(new kcsapi_mst_maparea() 25 | { 26 | api_id = 0, 27 | api_name = "???", 28 | }); 29 | 30 | public static MapArea Dummy 31 | { 32 | get { return dummy; } 33 | } 34 | 35 | #endregion 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Mission.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleWrapper.Models.Raw; 7 | 8 | namespace Grabacr07.KanColleWrapper.Models 9 | { 10 | [DebuggerDisplay("[{Id}] {Title} - {Detail}")] 11 | public class Mission : RawDataWrapper, IIdentifiable 12 | { 13 | public int Id { get; private set; } 14 | 15 | public string Title { get; private set; } 16 | 17 | public string Detail { get; private set; } 18 | 19 | public Mission(kcsapi_mission mission) 20 | : base(mission) 21 | { 22 | this.Id = mission.api_id; 23 | this.Title = KanColleClient.Current.Translations.GetTranslation(mission.api_name, TranslationType.ExpeditionTitle, mission, mission.api_id); 24 | this.Detail = KanColleClient.Current.Translations.GetTranslation(mission.api_details, TranslationType.ExpeditionDetail, mission, mission.api_id); 25 | } 26 | 27 | public void Update() 28 | { 29 | var mission = this.RawData as kcsapi_mission; 30 | this.Title = KanColleClient.Current.Translations.GetTranslation(mission.api_name, TranslationType.ExpeditionTitle, mission, mission.api_id); 31 | this.Detail = KanColleClient.Current.Translations.GetTranslation(mission.api_details, TranslationType.ExpeditionDetail, mission, mission.api_id); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/QuestCategory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 任務のカテゴリを示す識別子を定義します。 11 | /// 12 | public enum QuestCategory 13 | { 14 | /// 15 | /// 編成任務。 16 | /// 17 | Composition = 1, 18 | 19 | /// 20 | /// 出撃任務。 21 | /// 22 | Sortie = 2, 23 | 24 | /// 25 | /// 演習任務。 26 | /// 27 | Practice = 3, 28 | 29 | /// 30 | /// 遠征任務。 31 | /// 32 | Expeditions = 4, 33 | 34 | /// 35 | /// 補給/入渠任務。 36 | /// 37 | Supply = 5, 38 | 39 | /// 40 | /// 工廠任務。 41 | /// 42 | Building = 6, 43 | 44 | /// 45 | /// 改装任務。 46 | /// 47 | Remodelling = 7, 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/QuestProgress.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public enum QuestProgress 10 | { 11 | /// 12 | /// 進捗ダメです。 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// 50 % 以上達成。 18 | /// 19 | Progress50 = 1, 20 | 21 | /// 22 | /// 80 % 以上達成。 23 | /// 24 | Progress80 = 2, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/QuestState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public enum QuestState 10 | { 11 | /// 12 | /// 任務を遂行していません。 13 | /// 14 | None = 1, 15 | 16 | /// 17 | /// 任務を遂行中です。 18 | /// 19 | TakeOn = 2, 20 | 21 | /// 22 | /// 任務が完了しました。 23 | /// 24 | Accomplished = 3, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/QuestType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 任務の種類を示す識別子を定義します。 11 | /// 12 | public enum QuestType 13 | { 14 | /// 15 | /// 1 回のみの任務。 16 | /// 17 | OneTime = 1, 18 | 19 | /// 20 | /// デイリー任務。 21 | /// 22 | Daily = 2, 23 | 24 | /// 25 | /// ウィークリー任務。 26 | /// 27 | Weekly = 3, 28 | 29 | /// 30 | /// 特別な任務。 31 | /// 32 | Special1 = 4, 33 | 34 | /// 35 | /// 特別な任務。 36 | /// 37 | Special2 = 5, 38 | 39 | /// 40 | /// マンスリー任務。 41 | /// 42 | Monthly = 6, 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Rank.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public static class Rank 10 | { 11 | public static string GetName(int rank) 12 | { 13 | switch (rank) 14 | { 15 | case 1: 16 | return "Marshal Admiral"; 17 | case 2: 18 | return "Admiral"; 19 | case 3: 20 | return "Vice-Admiral"; 21 | case 4: 22 | return "Rear-Admiral"; 23 | case 5: 24 | return "Captain"; 25 | case 6: 26 | return "Commander"; 27 | case 7: 28 | return "Novice Commander"; 29 | case 8: 30 | return "Lt. Commander"; 31 | case 9: 32 | return "Lieutenant"; 33 | case 10: 34 | default: 35 | return "Novice Lieutenant"; 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Ranking.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleWrapper.Models.Raw; 7 | 8 | namespace Grabacr07.KanColleWrapper.Models 9 | { 10 | public class Ranking : RawDataWrapper, IIdentifiable 11 | { 12 | public int Id 13 | { 14 | get { return this.RawData.api_no; } 15 | } 16 | 17 | public int Rate 18 | { 19 | get { return this.RawData.api_rate; } 20 | } 21 | 22 | public string NickName 23 | { 24 | get { return this.RawData.api_nickname; } 25 | } 26 | 27 | public string Comment 28 | { 29 | get { return this.RawData.api_comment; } 30 | } 31 | 32 | public int Rank 33 | { 34 | get { return this.RawData.api_rank; } 35 | } 36 | 37 | public int Level 38 | { 39 | get { return this.RawData.api_level; } 40 | } 41 | 42 | public int Experience 43 | { 44 | get { return this.RawData.api_experience; } 45 | } 46 | 47 | public int Flag 48 | { 49 | get { return this.RawData.api_flag; } 50 | } 51 | 52 | public Ranking(kcsapi_ranking rawData) : base(rawData) { } 53 | 54 | public override string ToString() 55 | { 56 | return string.Format("NickName = {0}", this.NickName); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_change.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_change { } 11 | // ReSharper restore InconsistentNaming 12 | } 13 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_charge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_charge 11 | { 12 | public kcsapi_charge_ship[] api_ship { get; set; } 13 | public int[] api_material { get; set; } 14 | public int api_use_bou { get; set; } 15 | } 16 | public class kcsapi_charge_ship 17 | { 18 | public int api_id { get; set; } 19 | public int api_fuel { get; set; } 20 | public int api_bull { get; set; } 21 | public int[] api_onslot { get; set; } 22 | } 23 | // ReSharper restore InconsistentNaming 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createitem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_createitem 11 | { 12 | public int api_id { get; set; } 13 | public int api_slotitem_id { get; set; } 14 | public int api_create_flag { get; set; } 15 | public int api_shizai_flag { get; set; } 16 | public kcsapi_slotitem api_slot_item { get; set; } 17 | public int[] api_material { get; set; } 18 | public int api_type3 { get; set; } 19 | public int[] api_unsetslot { get; set; } 20 | public string api_fdata { get; set; } 21 | } 22 | // ReSharper restore InconsistentNaming 23 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_createship.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_createship { } 11 | 12 | public class kcsapi_createship_speedchange { } 13 | // ReSharper restore InconsistentNaming 14 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_deck.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_deck 11 | { 12 | public int api_member_id { get; set; } 13 | public int api_id { get; set; } 14 | public string api_name { get; set; } 15 | public string api_name_id { get; set; } 16 | public long[] api_mission { get; set; } 17 | public string api_flagship { get; set; } 18 | public int[] api_ship { get; set; } 19 | } 20 | // ReSharper restore InconsistentNaming 21 | } 22 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyitem2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | // ReSharper disable InconsistentNaming 9 | public class kcsapi_destroyitem2 10 | { 11 | public int[] api_get_material { get; set; } 12 | } 13 | // ReSharper restore InconsistentNaming 14 | } 15 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_destroyship.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_destroyship 11 | { 12 | public int[] api_material { get; set; } 13 | } 14 | // ReSharper restore InconsistentNaming 15 | } 16 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_getship.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_getship 11 | { 12 | public int api_id { get; set; } 13 | public kcsapi_kdock[] api_kdock { get; set; } 14 | public kcsapi_ship2 api_ship { get; set; } 15 | public kcsapi_slotitem api_slotitem { get; set; } 16 | } 17 | // ReSharper restore InconsistentNaming 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_hensei_combined.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_hensei_combined 11 | { 12 | public int api_combined { get; set; } 13 | } 14 | // ReSharper restore InconsistentNaming 15 | } 16 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_kdock 11 | { 12 | public int api_member_id { get; set; } 13 | public int api_id { get; set; } 14 | public int api_state { get; set; } 15 | public int api_created_ship_id { get; set; } 16 | public long api_complete_time { get; set; } 17 | public string api_complete_time_str { get; set; } 18 | public int api_item1 { get; set; } 19 | public int api_item2 { get; set; } 20 | public int api_item3 { get; set; } 21 | public int api_item4 { get; set; } 22 | public int api_item5 { get; set; } 23 | } 24 | // ReSharper restore InconsistentNaming 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_kdock_getship.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | // ReSharper disable InconsistentNaming 9 | public class kcsapi_kdock_getship 10 | { 11 | public int api_id { get; set; } 12 | public int api_ship_id { get; set; } 13 | public kcsapi_kdock[] api_kdock { get; set; } 14 | public kcsapi_ship2 api_ship { get; set; } 15 | public kcsapi_slotitem[] api_slotitem { get; set; } 16 | } 17 | // ReSharper restore InconsistentNaming 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_map_start.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_map_start 11 | { 12 | public int api_rashin_flg { get; set; } 13 | public int api_rashin_id { get; set; } 14 | public int api_maparea_id { get; set; } 15 | public int api_mapinfo_no { get; set; } 16 | public int api_no { get; set; } 17 | public int api_color_no { get; set; } 18 | public int api_event_id { get; set; } 19 | public int api_event_kind { get; set; } 20 | public int api_next { get; set; } 21 | public int api_bosscell_no { get; set; } 22 | public int api_bosscomp { get; set; } 23 | } 24 | // ReSharper restore InconsistentNaming 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_material.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | // ReSharper disable InconsistentNaming 9 | public class kcsapi_material 10 | { 11 | public int api_member_id { get; set; } 12 | public int api_id { get; set; } 13 | public int api_value { get; set; } 14 | } 15 | // ReSharper restore InconsistentNaming 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_midnight_battle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | 10 | // ReSharper disable InconsistentNaming 11 | public class kcsapi_midnight_battle 12 | { 13 | public string api_deck_id { get; set; } 14 | } 15 | 16 | //public class kcsapi_midnight_battle 17 | //{ 18 | // public string api_deck_id { get; set; } 19 | // public int[] api_nowhps { get; set; } 20 | // public int[] api_ship_ke { get; set; } 21 | // public int[] api_ship_lv { get; set; } 22 | // public int[] api_maxhps { get; set; } 23 | // public int[][] api_eSlot { get; set; } 24 | // public int[][] api_eKyouka { get; set; } 25 | // public int[][] api_fParam { get; set; } 26 | // public int[][] api_eParam { get; set; } 27 | // public int[] api_touch_plane { get; set; } 28 | // public int[] api_flare_pos { get; set; } 29 | // public Api_Hougeki api_hougeki { get; set; } 30 | //} 31 | 32 | //public class Api_Hougeki 33 | //{ 34 | // public int[] api_at_list { get; set; } 35 | // public object[] api_df_list { get; set; } 36 | // public object[] api_si_list { get; set; } 37 | // public object[] api_cl_list { get; set; } 38 | // public int[] api_sp_list { get; set; } 39 | // public object[] api_damage { get; set; } 40 | //} 41 | // ReSharper restore InconsistentNaming 42 | } 43 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | // ReSharper disable InconsistentNaming 9 | public class kcsapi_mission 10 | { 11 | public int api_id { get; set; } 12 | public int api_maparea_id { get; set; } 13 | public string api_name { get; set; } 14 | public string api_details { get; set; } 15 | public int api_time { get; set; } 16 | public int api_difficulty { get; set; } 17 | public float api_use_fuel { get; set; } 18 | public float api_use_bull { get; set; } 19 | public int[] api_win_item1 { get; set; } 20 | public int[] api_win_item2 { get; set; } 21 | } 22 | // ReSharper restore InconsistentNaming 23 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mission_result.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_mission_result 11 | { 12 | public int[] api_ship_id { get; set; } 13 | public int api_clear_result { get; set; } 14 | public int api_get_exp { get; set; } 15 | public int api_member_lv { get; set; } 16 | public int api_member_exp { get; set; } 17 | public int[] api_get_ship_exp { get; set; } 18 | public int[][] api_get_exp_lvup { get; set; } 19 | public string api_maparea_name { get; set; } 20 | public string api_detail { get; set; } 21 | public string api_quest_name { get; set; } 22 | public int api_quest_level { get; set; } 23 | public int[] api_get_material { get; set; } 24 | public int[] api_useitem_flag { get; set; } 25 | public kcsapi_mission_result_item api_get_item1 { get; set; } 26 | } 27 | 28 | 29 | public class kcsapi_mission_result_item 30 | { 31 | public int api_useitem_id { get; set; } 32 | public object api_useitem_name { get; set; } 33 | public int api_useitem_count { get; set; } 34 | } 35 | // ReSharper restore InconsistentNaming 36 | } 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_maparea.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | public class kcsapi_mst_maparea 9 | { 10 | public int api_id { get; set; } 11 | public string api_name { get; set; } 12 | public int api_type { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_mapinfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | public class kcsapi_mst_mapinfo 9 | { 10 | public int api_id { get; set; } 11 | public int api_maparea_id { get; set; } 12 | public int api_no { get; set; } 13 | public string api_name { get; set; } 14 | public int api_level { get; set; } 15 | public string api_opetext { get; set; } 16 | public string api_infotext { get; set; } 17 | public int[] api_item { get; set; } 18 | public int? api_max_maphp { get; set; } 19 | public int? api_required_defeat_count { get; set; } 20 | public int[] api_sally_flag { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_slotitem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_mst_slotitem 11 | { 12 | public int api_id { get; set; } 13 | public int api_sortno { get; set; } 14 | public string api_name { get; set; } 15 | public int[] api_type { get; set; } 16 | public int api_taik { get; set; } 17 | public int api_souk { get; set; } 18 | public int api_houg { get; set; } 19 | public int api_raig { get; set; } 20 | public int api_soku { get; set; } 21 | public int api_baku { get; set; } 22 | public int api_tyku { get; set; } 23 | public int api_tais { get; set; } 24 | public int api_atap { get; set; } 25 | public int api_houm { get; set; } 26 | public int api_raim { get; set; } 27 | public int api_houk { get; set; } 28 | public int api_raik { get; set; } 29 | public int api_bakk { get; set; } 30 | public int api_saku { get; set; } 31 | public int api_sakb { get; set; } 32 | public int api_luck { get; set; } 33 | public int api_leng { get; set; } 34 | public int api_rare { get; set; } 35 | public int[] api_broken { get; set; } 36 | public string api_info { get; set; } 37 | public string api_usebull { get; set; } 38 | } 39 | // ReSharper restore InconsistentNaming 40 | } 41 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_slotitem_equiptype.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models.Raw 7 | { 8 | // ReSharper disable InconsistentNaming 9 | public class kcsapi_mst_slotitem_equiptype 10 | { 11 | public int api_id { get; set; } 12 | public string api_name { get; set; } 13 | public int api_show_flg { get; set; } 14 | } 15 | // ReSharper restore InconsistentNaming 16 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_stype.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_mst_stype 11 | { 12 | public int api_id { get; set; } 13 | public int api_sortno { get; set; } 14 | public string api_name { get; set; } 15 | public int api_scnt { get; set; } 16 | public int api_kcnt { get; set; } 17 | } 18 | // ReSharper restore InconsistentNaming 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_useitem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_mst_useitem 11 | { 12 | public int api_id { get; set; } 13 | public int api_usetype { get; set; } 14 | public int api_category { get; set; } 15 | public string api_name { get; set; } 16 | public string[] api_description { get; set; } 17 | public int api_price { get; set; } 18 | } 19 | // ReSharper restore InconsistentNaming 20 | } 21 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ndock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_ndock 11 | { 12 | public int api_member_id { get; set; } 13 | public int api_id { get; set; } 14 | public int api_state { get; set; } 15 | public int api_ship_id { get; set; } 16 | public long api_complete_time { get; set; } 17 | public string api_complete_time_str { get; set; } 18 | public int api_item1 { get; set; } 19 | public int api_item2 { get; set; } 20 | public int api_item3 { get; set; } 21 | public int api_item4 { get; set; } 22 | } 23 | // ReSharper restore InconsistentNaming 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_powerup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_powerup 11 | { 12 | public int api_powerup_flag { get; set; } 13 | 14 | public kcsapi_ship2 api_ship { get; set; } 15 | 16 | public kcsapi_deck[] api_deck { get; set; } 17 | } 18 | // ReSharper restore InconsistentNaming 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_quest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_quest 11 | { 12 | public int api_no { get; set; } 13 | public int api_category { get; set; } 14 | public int api_type { get; set; } 15 | public int api_state { get; set; } 16 | public string api_title { get; set; } 17 | public string api_detail { get; set; } 18 | public int[] api_get_material { get; set; } 19 | public int api_bonus_flag { get; set; } 20 | public int api_progress_flag { get; set; } 21 | } 22 | // ReSharper restore InconsistentNaming 23 | } 24 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_questlist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_questlist 11 | { 12 | public int api_count { get; set; } 13 | public int api_page_count { get; set; } 14 | public int api_disp_page { get; set; } 15 | public kcsapi_quest[] api_list { get; set; } 16 | public int api_exec_count { get; set; } 17 | } 18 | // ReSharper restore InconsistentNaming 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ranking.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_ranking 11 | { 12 | public int api_no { get; set; } 13 | public int api_member_id { get; set; } 14 | public int api_level { get; set; } 15 | public int api_rank { get; set; } 16 | public string api_nickname { get; set; } 17 | public int api_experience { get; set; } 18 | public string api_comment { get; set; } 19 | public int api_rate { get; set; } 20 | public int api_flag { get; set; } 21 | public string api_nickname_id { get; set; } 22 | public string api_comment_id { get; set; } 23 | } 24 | // ReSharper restore InconsistentNaming 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ranking_getlist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_ranking_getlist 11 | { 12 | public int api_count { get; set; } 13 | public int api_page_count { get; set; } 14 | public int api_disp_page { get; set; } 15 | public kcsapi_ranking[] api_list { get; set; } 16 | } 17 | // ReSharper restore InconsistentNaming 18 | } 19 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | // ReSharper disable InconsistentNaming 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | public class kcsapi_remodel_slot 10 | { 11 | public int api_remodel_flag { get; set; } 12 | public int[] api_remodel_id { get; set; } 13 | public int[] api_after_material { get; set; } 14 | public string api_voice_id { get; set; } 15 | public kcsapi_remodel_after_slot api_after_slot { get; set; } 16 | public int[] api_use_slot_id { get; set; } 17 | } 18 | public class kcsapi_remodel_after_slot 19 | { 20 | public int api_id { get; set; } 21 | public int api_slotitem_id { get; set; } 22 | public int api_locked { get; set; } 23 | public int api_level { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | // ReSharper disable InconsistentNaming 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | public class kcsapi_remodel_slotlist 10 | { 11 | public int api_id { get; set; } 12 | public int api_slot_id { get; set; } 13 | public int api_req_fuel { get; set; } 14 | public int api_req_bull { get; set; } 15 | public int api_req_steel { get; set; } 16 | public int api_req_bauxite { get; set; } 17 | public int api_req_buildkit { get; set; } 18 | public int api_req_remodelkit { get; set; } 19 | public int api_req_slot_id { get; set; } 20 | public int api_req_slot_num { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_remodel_slotlist_detail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | // ReSharper disable InconsistentNaming 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | public class kcsapi_remodel_slotlist_detail 10 | { 11 | public int api_req_buildkit { get; set; } 12 | public int api_req_remodelkit { get; set; } 13 | public int api_certain_buildkit { get; set; } 14 | public int api_certain_remodelkit { get; set; } 15 | public int api_req_slot_id { get; set; } 16 | public int api_req_slot_num { get; set; } 17 | public int api_change_flag { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship3.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_ship3 11 | { 12 | public kcsapi_ship2[] api_ship_data { get; set; } 13 | public kcsapi_deck[] api_deck_data { get; set; } 14 | 15 | // 今のところ必要ないので 16 | //public kcsapi_slot_data api_slot_data { get; set; } 17 | } 18 | // ReSharper restore InconsistentNaming 19 | } 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship_deck.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Grabacr07.KanColleWrapper.Models.Raw 5 | { 6 | // ReSharper disable InconsistentNaming 7 | 8 | public class kcsapi_ship_deck 9 | { 10 | public kcsapi_ship2[] api_ship_data { get; set; } 11 | public kcsapi_deck[] api_deck_data { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slot_data.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_slot_data 11 | { 12 | public int[] api_slottype1 { get; set; } 13 | public int[] api_slottype2 { get; set; } 14 | public int[] api_slottype3 { get; set; } 15 | public int[] api_slottype4 { get; set; } 16 | public int[] api_slottype5 { get; set; } 17 | public int[] api_slottype6 { get; set; } 18 | public int[] api_slottype7 { get; set; } 19 | public int[] api_slottype8 { get; set; } 20 | public int[] api_slottype9 { get; set; } 21 | public int[] api_slottype10 { get; set; } 22 | public int[] api_slottype11 { get; set; } 23 | public int[] api_slottype12 { get; set; } 24 | public int[] api_slottype13 { get; set; } 25 | public int[] api_slottype14 { get; set; } 26 | public int[] api_slottype15 { get; set; } 27 | public int[] api_slottype16 { get; set; } 28 | public int[] api_slottype17 { get; set; } 29 | public int[] api_slottype18 { get; set; } 30 | public int[] api_slottype19 { get; set; } 31 | public int[] api_slottype20 { get; set; } 32 | public int[] api_slottype21 { get; set; } 33 | public int[] api_slottype22 { get; set; } 34 | public int[] api_slottype23 { get; set; } 35 | } 36 | // ReSharper restore InconsistentNaming 37 | } 38 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_slotitem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | // ReSharper disable InconsistentNaming 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | public class kcsapi_slotitem 10 | { 11 | public int api_id { get; set; } 12 | public int api_slotitem_id { get; set; } 13 | public int api_level { get; set; } 14 | public int api_locked { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/kcsapi_useitem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models.Raw 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public class kcsapi_useitem 11 | { 12 | public int api_member_id { get; set; } 13 | public int api_id { get; set; } 14 | public int api_value { get; set; } 15 | public int api_usetype { get; set; } 16 | public int api_category { get; set; } 17 | public string api_name { get; set; } 18 | public string[] api_description { get; set; } 19 | public int api_price { get; set; } 20 | public int api_count { get; set; } 21 | } 22 | // ReSharper restore InconsistentNaming 23 | } 24 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/Raw/svdata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Grabacr07.KanColleWrapper.Models.Raw 6 | { 7 | // ReSharper disable InconsistentNaming 8 | public class svdata 9 | { 10 | public int api_result { get; set; } 11 | public string api_result_msg { get; set; } 12 | } 13 | 14 | public class svdata : svdata 15 | { 16 | public T api_data { get; set; } 17 | public kcsapi_deck[] api_data_deck { get; set; } 18 | } 19 | // ReSharper restore InconsistentNaming 20 | } 21 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/RawDataWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Livet; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 艦これ API からの応答に含まれる api_data (生のデータ) をラップします。 11 | /// 12 | /// ラップする api_data (生のデータ) の型。 13 | public abstract class RawDataWrapper : NotificationObject 14 | { 15 | /// 16 | /// 艦これ API からの応答に含まれる api_data をパースした生のデータを取得します。 17 | /// 18 | internal T RawData { get; private set; } 19 | 20 | /// 21 | /// ラップする api_data (生のデータ) を使用して、 クラスの新しいインスタンスを初期化します。 22 | /// 23 | /// ラップする生のデータ。 24 | protected RawDataWrapper(T rawData) 25 | { 26 | this.RawData = rawData; 27 | } 28 | 29 | /// 30 | /// Update the RawData for all derived classes. 31 | /// 32 | /// RawData to update to. 33 | protected void UpdateRawData(T rawData) 34 | { 35 | this.RawData = rawData; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/RepairingCompletedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public class RepairingCompletedEventArgs 10 | { 11 | /// 12 | /// 入渠が完了したドックを一意に識別する ID を取得します。 13 | /// 14 | public int DockId { get; private set; } 15 | 16 | /// 17 | /// 入渠が完了した艦娘を取得します。 18 | /// 19 | public Ship Ship { get; private set; } 20 | 21 | public RepairingCompletedEventArgs(int id, Ship ship) 22 | { 23 | this.DockId = id; 24 | this.Ship = ship; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/RepairingDockState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | /// 9 | /// 入渠ドックの状態を示す識別子を定義します。 10 | /// 11 | public enum RepairingDockState 12 | { 13 | /// 14 | /// ドックは未開放です。 15 | /// 16 | Locked = -1, 17 | 18 | /// 19 | /// ドックを使用可能です。 20 | /// 21 | Unlocked = 0, 22 | 23 | /// 24 | /// 艦娘の修理中です。 25 | /// 26 | Repairing = 1, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ShipCriticalConditionEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public class ShipCriticalConditionEventArgs 10 | { 11 | public Ship Ship { get; private set; } 12 | 13 | public string FleetName { get; private set; } 14 | 15 | public ShipCriticalConditionEventArgs(Ship ship) 16 | { 17 | this.Ship = ship; 18 | //this.FleetName = fleetname; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ShipSituation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Grabacr07.KanColleWrapper.Models 7 | { 8 | [Flags] 9 | public enum ShipSituation 10 | { 11 | None = 0, 12 | //Sortie = 1, 13 | Repair = 1 << 1, 14 | Evacuation = 1 << 2, 15 | Tow = 1 << 3, 16 | //ModerateDamaged = 1 << 4, 17 | HeavilyDamaged = 1 << 5, 18 | DamageControlled = 1 << 6, 19 | } 20 | } -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ShipSlot.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/Grabacr07.KanColleWrapper/Models/ShipSlot.cs -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ShipSpeed.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | /// 10 | /// 速力を示す識別子を定義します。 11 | /// 12 | public enum ShipSpeed 13 | { 14 | /// 15 | /// 低速。 16 | /// 17 | Low = 5, 18 | 19 | /// 20 | /// 高速。 21 | /// 22 | Fast = 10, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/ShipType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleWrapper.Models.Raw; 8 | using Grabacr07.KanColleWrapper.Internal; 9 | 10 | namespace Grabacr07.KanColleWrapper.Models 11 | { 12 | /// 13 | /// 艦種を表します。 14 | /// 15 | public class ShipType : RawDataWrapper, IIdentifiable 16 | { 17 | public int Id 18 | { 19 | get { return this.RawData.api_id; } 20 | } 21 | 22 | public string Name 23 | { 24 | get { return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.ShipTypes, this.RawData, this.Id); } 25 | } 26 | 27 | public int SortNumber 28 | { 29 | get { return this.RawData.api_sortno; } 30 | } 31 | 32 | public double RepairMultiplier 33 | { 34 | get { return this.RawData.api_scnt * 0.5; } 35 | } 36 | 37 | public ShipType(kcsapi_mst_stype rawData) : base(rawData) { } 38 | 39 | public override string ToString() 40 | { 41 | return string.Format("ID = {0}, Name = \"{1}\"", this.Id, this.Name); 42 | } 43 | 44 | #region static members 45 | 46 | private static ShipType dummy = new ShipType(new kcsapi_mst_stype 47 | { 48 | api_id = 999, 49 | api_sortno = 999, 50 | api_name = "不審船", 51 | }); 52 | 53 | public static ShipType Dummy 54 | { 55 | get { return dummy; } 56 | } 57 | 58 | #endregion 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/SlotItemType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Models 8 | { 9 | public enum SlotItemType 10 | { 11 | 艦上戦闘機 = 6, 12 | 艦上爆撃機 = 7, 13 | 艦上攻撃機 = 8, 14 | 艦上偵察機 = 9, 15 | 水上偵察機 = 10, 16 | 水上爆撃機 = 11, 17 | 小型電探 = 12, 18 | 大型電探 = 13, 19 | 20 | 応急修理要員 = 23, 21 | 22 | オートジャイロ = 25, 23 | 対潜哨戒機 = 26, 24 | 25 | 探照灯 = 29, 26 | 27 | 大型飛行艇 = 41, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/UseItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleWrapper.Models.Raw; 8 | 9 | namespace Grabacr07.KanColleWrapper.Models 10 | { 11 | /// 12 | /// 消費アイテム表します。 13 | /// 14 | public class UseItem : RawDataWrapper, IIdentifiable 15 | { 16 | public int Id 17 | { 18 | get { return this.RawData.api_id; } 19 | } 20 | 21 | public string Name 22 | { 23 | get { return this.RawData.api_name; } 24 | } 25 | 26 | public int Count 27 | { 28 | get { return this.RawData.api_count; } 29 | } 30 | 31 | internal UseItem(kcsapi_useitem rawData) : base(rawData) { } 32 | 33 | public override string ToString() 34 | { 35 | return string.Format("ID = {0}, Name = \"{1}\", Count = {2}", this.Id, this.Name, this.Count); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Models/UseItemInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleWrapper.Models.Raw; 8 | 9 | namespace Grabacr07.KanColleWrapper.Models 10 | { 11 | /// 12 | /// 消費アイテムの種類に基づく情報を表します。 13 | /// 14 | public class UseItemInfo : RawDataWrapper, IIdentifiable 15 | { 16 | public int Id 17 | { 18 | get { return this.RawData.api_id; } 19 | } 20 | 21 | public string Name 22 | { 23 | get { return this.RawData.api_name; } 24 | } 25 | 26 | internal UseItemInfo(kcsapi_mst_useitem rawData) : base(rawData) { } 27 | 28 | public override string ToString() 29 | { 30 | return string.Format("ID = {0}, Name = \"{1}\"", this.Id, this.Name); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("KanColleWrapper")] 9 | [assembly: AssemblyDescription("KanColleWrapper")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("grabacr.net")] 12 | [assembly: AssemblyProduct("KanColleWrapper")] 13 | [assembly: AssemblyCopyright("Copyright c 2013 Grabacr07")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です 23 | [assembly: Guid("b76c421d-fe89-42b1-9687-48102f6c0921")] 24 | 25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 33 | // 既定値にすることができます: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/TimerNotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reactive.Linq; 5 | using System.Reactive.Subjects; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Grabacr07.KanColleWrapper.Internal; 9 | using Livet; 10 | 11 | namespace Grabacr07.KanColleWrapper 12 | { 13 | /// 14 | /// 1 秒刻みのタイマー機能をサポートする変更通知オブジェクトを表します。 15 | /// 16 | public class TimerNotifier : NotificationObject, IDisposable 17 | { 18 | #region static members 19 | 20 | private static readonly IConnectableObservable timer; 21 | 22 | static TimerNotifier() 23 | { 24 | timer = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1)).Publish(); 25 | timer.Connect(); 26 | } 27 | 28 | #endregion 29 | 30 | private readonly IDisposable subscriber; 31 | 32 | public TimerNotifier() 33 | { 34 | this.subscriber = timer.Subscribe(_ => this.Tick()); 35 | } 36 | 37 | protected virtual void Tick() { } 38 | 39 | public virtual void Dispose() 40 | { 41 | this.subscriber.SafeDispose(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Win32/INTERNET_PROXY_INFO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleWrapper.Win32 8 | { 9 | // ReSharper disable InconsistentNaming 10 | internal struct INTERNET_PROXY_INFO 11 | { 12 | public int dwAccessType; 13 | public IntPtr proxy; 14 | public IntPtr proxyBypass; 15 | } 16 | // ReSharper restore InconsistentNaming 17 | } 18 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/Win32/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Grabacr07.KanColleWrapper.Win32 9 | { 10 | internal class NativeMethods 11 | { 12 | [DllImport("wininet.dll", SetLastError = true)] 13 | public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Grabacr07.KanColleWrapper/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Grabacr07 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Plugins/Calculator/KancolleCalculator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.Composition; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | using Grabacr07.KanColleViewer.Plugins.ViewModels; 8 | using Grabacr07.KanColleViewer.Plugins.Views; 9 | using Grabacr07.KanColleWrapper; 10 | 11 | namespace Grabacr07.KanColleViewer.Plugins 12 | { 13 | [Export(typeof(IToolPlugin))] 14 | [ExportMetadata("Title", "Calculator")] 15 | [ExportMetadata("Description", "Calculator experience")] 16 | [ExportMetadata("Version", "1.1")] 17 | [ExportMetadata("Author", "@Zharay")] 18 | public class KancolleCalculator : IToolPlugin 19 | { 20 | private CalculatorViewModel calculatorViewModel; 21 | 22 | public string ToolName 23 | { 24 | get { return "Calculator"; } 25 | } 26 | 27 | 28 | public object GetSettingsView() 29 | { 30 | return null; 31 | } 32 | 33 | public object GetToolView() 34 | { 35 | if (this.calculatorViewModel == null) 36 | { 37 | if (KanColleClient.Current.Homeport != null) this.calculatorViewModel = new CalculatorViewModel(); 38 | } 39 | return new Calculator { DataContext = this.calculatorViewModel }; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Plugins/Calculator/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // このコードはツールによって生成されました。 4 | // ランタイム バージョン:4.0.30319.34209 5 | // 6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 7 | // コードが再生成されるときに損失したりします。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Grabacr07.KanColleViewer.Plugins.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Plugins/Calculator/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Plugins/Calculator/Views/Calculator.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Plugins.Views 17 | { 18 | /// 19 | /// Portal.xaml の相互作用ロジック 20 | /// 21 | public partial class Calculator : UserControl 22 | { 23 | public Calculator() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Plugins/Calculator/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Plugins/Calculator/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Plugins/Counter/CounterView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Counter 17 | { 18 | /// 19 | /// CounterView.xaml の相互作用ロジック 20 | /// 21 | public partial class CounterView : UserControl 22 | { 23 | public CounterView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Plugins/Counter/CounterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleWrapper; 8 | using Livet; 9 | 10 | namespace Counter 11 | { 12 | public class CounterViewModel : ViewModel 13 | { 14 | #region Counters 変更通知プロパティ 15 | 16 | private ObservableCollection _Counters; 17 | 18 | public ObservableCollection Counters 19 | { 20 | get { return this._Counters; } 21 | set 22 | { 23 | if (this._Counters != value) 24 | { 25 | this._Counters = value; 26 | this.RaisePropertyChanged(); 27 | } 28 | } 29 | } 30 | 31 | #endregion 32 | 33 | public CounterViewModel() 34 | { 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Plugins/Counter/KanColleCounter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.ComponentModel.Composition; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleViewer.Composition; 8 | using Grabacr07.KanColleWrapper; 9 | 10 | namespace Counter 11 | { 12 | [Export(typeof(IToolPlugin))] 13 | [ExportMetadata("Title", "KanColleCounter")] 14 | [ExportMetadata("Description", "シンプルな回数カウント機能を提供します。")] 15 | [ExportMetadata("Version", "1.0")] 16 | [ExportMetadata("Author", "@Grabacr07")] 17 | public class KanColleCounter : IToolPlugin 18 | { 19 | private readonly CounterViewModel viewmodel = new CounterViewModel 20 | { 21 | Counters = new ObservableCollection 22 | { 23 | new SupplyCounter(KanColleClient.Current.Proxy), 24 | new ItemDestroyCounter(KanColleClient.Current.Proxy), 25 | new MissionCounter(KanColleClient.Current.Proxy), 26 | } 27 | }; 28 | 29 | public string ToolName 30 | { 31 | get { return "Counter"; } 32 | } 33 | 34 | public object GetSettingsView() 35 | { 36 | return null; 37 | } 38 | 39 | public object GetToolView() 40 | { 41 | return new CounterView { DataContext = this.viewmodel, }; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Plugins/Counter/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Counter.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Plugins/Counter/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Plugins/Counter/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Plugins/Counter/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Plugins/LogViewer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Plugins/LogViewer/Behaviors/IgnoreMouseWheelBehavior.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Input; 8 | using System.Windows.Interactivity; 9 | 10 | namespace Grabacr07.KanColleViewer.Plugins.Behaviors 11 | { 12 | internal class IgnoreMouseWheelBehavior : Behavior 13 | { 14 | protected override void OnAttached() 15 | { 16 | base.OnAttached(); 17 | this.AssociatedObject.PreviewMouseWheel += this.AssociatedObject_PreviewMouseWheel; 18 | } 19 | 20 | protected override void OnDetaching() 21 | { 22 | this.AssociatedObject.PreviewMouseWheel -= this.AssociatedObject_PreviewMouseWheel; 23 | base.OnDetaching(); 24 | } 25 | 26 | private void AssociatedObject_PreviewMouseWheel(object sender, MouseWheelEventArgs e) 27 | { 28 | 29 | e.Handled = true; 30 | 31 | var e2 = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) { RoutedEvent = UIElement.MouseWheelEvent }; 32 | 33 | this.AssociatedObject.RaiseEvent(e2); 34 | 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Plugins/LogViewer/LogViewer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.Composition; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | using Grabacr07.KanColleViewer.Plugins.ViewModels; 8 | using Grabacr07.KanColleViewer.Plugins.Views; 9 | 10 | namespace Grabacr07.KanColleViewer.Plugins 11 | { 12 | [Export(typeof(IToolPlugin))] 13 | [ExportMetadata("Title", "LogViewer")] 14 | [ExportMetadata("Description", "ドロップ・建造・開発ログを表示する。")] 15 | [ExportMetadata("Version", "1.1")] 16 | [ExportMetadata("Author", "+PaddyXu")] 17 | public class LogViewer : IToolPlugin 18 | { 19 | private readonly PortalViewModel logViewerViewModel = new PortalViewModel(); 20 | 21 | public string ToolName 22 | { 23 | get { return "Log Viewer"; } 24 | } 25 | 26 | 27 | public object GetSettingsView() 28 | { 29 | return null; 30 | } 31 | 32 | public object GetToolView() 33 | { 34 | return new Portal { DataContext = this.logViewerViewModel }; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Plugins/LogViewer/ViewModels/LogItemCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Grabacr07.KanColleViewer.Plugins.ViewModels 8 | { 9 | public class LogItemCollection : IEnumerable 10 | { 11 | public List Columns = new List(); 12 | public List Rows = new List(); 13 | 14 | public IEnumerator GetEnumerator() 15 | { 16 | return this.Rows.GetEnumerator(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Plugins/LogViewer/Views/Portal.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Plugins.Views 17 | { 18 | /// 19 | /// Portal.xaml の相互作用ロジック 20 | /// 21 | public partial class Portal : UserControl 22 | { 23 | public Portal() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Plugins/LogViewer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/MasterDataViewer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.Composition; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Grabacr07.KanColleViewer.Composition; 7 | using Grabacr07.KanColleViewer.Plugins.ViewModels; 8 | using Grabacr07.KanColleViewer.Plugins.Views; 9 | 10 | namespace Grabacr07.KanColleViewer.Plugins 11 | { 12 | [Export(typeof(IToolPlugin))] 13 | [ExportMetadata("Title", "MastarData")] 14 | [ExportMetadata("Description", "start2 で取得される、艦これのマスター データを閲覧するためのビュー機能を提供します。")] 15 | [ExportMetadata("Version", "1.0")] 16 | [ExportMetadata("Author", "@Grabacr07")] 17 | public class MasterDataViewer : IToolPlugin 18 | { 19 | private readonly PortalViewModel portalViewModel = new PortalViewModel(); 20 | 21 | public string ToolName 22 | { 23 | get { return "MasterView"; } 24 | } 25 | 26 | 27 | public object GetSettingsView() 28 | { 29 | return null; 30 | } 31 | 32 | public object GetToolView() 33 | { 34 | return new Portal { DataContext = this.portalViewModel }; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // このコードはツールによって生成されました。 4 | // ランタイム バージョン:4.0.30319.34209 5 | // 6 | // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 7 | // コードが再生成されるときに損失したりします。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Grabacr07.KanColleViewer.Plugins.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/ViewModels/PortalViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Livet; 7 | 8 | namespace Grabacr07.KanColleViewer.Plugins.ViewModels 9 | { 10 | public class PortalViewModel : ViewModel 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/Views/Portal.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Grabacr07.KanColleViewer.Plugins.Views 17 | { 18 | /// 19 | /// Portal.xaml の相互作用ロジック 20 | /// 21 | public partial class Portal : UserControl 22 | { 23 | public Portal() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Plugins/MasterDataViewer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Plugins/WindowsNotifier/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 6 | // アセンブリに関連付けられている情報を変更するには、 7 | // これらの属性値を変更してください。 8 | [assembly: AssemblyTitle("提督業も忙しい! Windows 通知プラグイン")] 9 | [assembly: AssemblyDescription("提督業も忙しい! Windows 通知プラグイン")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("grabacr.net")] 12 | [assembly: AssemblyProduct("KanColleViewer")] 13 | [assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから 18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 19 | // その型の ComVisible 属性を true に設定してください。 20 | [assembly: ComVisible(false)] 21 | 22 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 30 | // 既定値にすることができます: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | -------------------------------------------------------------------------------- /Plugins/WindowsNotifier/WindowsNotifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.Composition; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Threading.Tasks; 7 | using Grabacr07.KanColleViewer.Composition; 8 | 9 | namespace Grabacr07.KanColleViewer.Plugins 10 | { 11 | [Export(typeof(INotifier))] 12 | [ExportMetadata("Title", "WindowsNotifier")] 13 | [ExportMetadata("Description", "Use Windows OS's notification function (toast notice, balloon notice)")] 14 | [ExportMetadata("Version", "1.0")] 15 | [ExportMetadata("Author", "@Grabacr07")] 16 | public class WindowsNotifier : INotifier 17 | { 18 | private readonly INotifier notifier; 19 | 20 | public WindowsNotifier() 21 | { 22 | this.notifier = Windows8Notifier.IsSupported 23 | ? (INotifier) new Windows8Notifier() 24 | : new Windows7Notifier(); 25 | } 26 | 27 | public void Dispose() 28 | { 29 | this.notifier.Dispose(); 30 | } 31 | 32 | public void Initialize() 33 | { 34 | this.notifier.Initialize(); 35 | } 36 | 37 | public void Show(NotifyType type, string header, string body, Action activated, Action failed = null) 38 | { 39 | this.notifier.Show(type, header, body, activated, failed); 40 | } 41 | 42 | public object GetSettingsView() 43 | { 44 | return this.notifier.GetSettingsView(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Plugins/WindowsNotifier/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Plugins/WindowsNotifier/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assemblies/CoreAudioApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/assemblies/CoreAudioApi.dll -------------------------------------------------------------------------------- /assemblies/FiddlerCore4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/assemblies/FiddlerCore4.dll -------------------------------------------------------------------------------- /assemblies/Microsoft.Expression.Drawing.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/assemblies/Microsoft.Expression.Drawing.dll -------------------------------------------------------------------------------- /assemblies/Portable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/assemblies/Portable.dll -------------------------------------------------------------------------------- /resources/Sounds/Construction/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Sounds/Critical Ship Warning/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Sounds/Expedition/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Sounds/Fatigue Recovery Completed/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Sounds/Repairyard/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Sounds/Updater/readme.txt: -------------------------------------------------------------------------------- 1 | Place sound notifications here. 2 | Subfolders are fine! 3 | 4 | It doesn't matter the number of sounds, they are picked at random for their specific notification. 5 | 6 | Supported sound formats: 7 | * MP3 (extension .mp3) 8 | * Wave (extension .wav) 9 | 10 | -------------------------------------------------------------------------------- /resources/Version.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | App 5 | 3.8.2.557 6 | https://github.com/yuyuvn/KanColleViewer/releases/tag/v3.8.2r557 7 | 8 | 9 | Equipment 10 | 1.0.23 11 | http://yuyuvn.github.io/KanColleViewer/resources/translations/Equipment.xml 12 | 13 | 14 | Expeditions 15 | 1.3.0 16 | http://yuyuvn.github.io/KanColleViewer/resources/translations/Expeditions.xml 17 | 18 | 19 | Operations 20 | 1.0.8 21 | http://yuyuvn.github.io/KanColleViewer/resources/translations/Operations.xml 22 | 23 | 24 | Quests 25 | 1.1.22 26 | http://yuyuvn.github.io/KanColleViewer/resources/translations/Quests.xml 27 | 28 | 29 | Ships 30 | 1.1.6 31 | http://yuyuvn.github.io/KanColleViewer/resources/translations/Ships.xml 32 | 33 | 34 | ShipTypes 35 | 1.0.7 36 | http://yuyuvn.github.io/KanColleViewer/resources/translations/ShipTypes.xml 37 | 38 | -------------------------------------------------------------------------------- /resources/icons/application/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/128.png -------------------------------------------------------------------------------- /resources/icons/application/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/16.png -------------------------------------------------------------------------------- /resources/icons/application/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/20.png -------------------------------------------------------------------------------- /resources/icons/application/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/24.png -------------------------------------------------------------------------------- /resources/icons/application/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/256.png -------------------------------------------------------------------------------- /resources/icons/application/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/32.png -------------------------------------------------------------------------------- /resources/icons/application/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/40.png -------------------------------------------------------------------------------- /resources/icons/application/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/48.png -------------------------------------------------------------------------------- /resources/icons/application/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/64.png -------------------------------------------------------------------------------- /resources/icons/application/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/app.ico -------------------------------------------------------------------------------- /resources/icons/application/data/icon-app.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/data/icon-app.ai -------------------------------------------------------------------------------- /resources/icons/application/data/icon-app.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/resources/icons/application/data/icon-app.psd -------------------------------------------------------------------------------- /tools-release/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !/.gitignore 3 | !/*.ps1 4 | -------------------------------------------------------------------------------- /tools/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tools/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyuvn/KanColleViewer/3b684127c29247ded90733d7e844750544ed4fde/tools/.nuget/NuGet.exe -------------------------------------------------------------------------------- /tools/Grabacr07.Tools.JsonViewer/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tools/Grabacr07.Tools.JsonViewer/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tools/Grabacr07.Tools.JsonViewer/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Grabacr07.Tools.JsonViewer 10 | { 11 | /// 12 | /// App.xaml の相互作用ロジック 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tools/Grabacr07.Tools.JsonViewer/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using Codeplex.Data; 16 | 17 | namespace Grabacr07.Tools.JsonViewer 18 | { 19 | partial class MainWindow 20 | { 21 | public MainWindow() 22 | { 23 | InitializeComponent(); 24 | } 25 | 26 | private void Parse(object sender, RoutedEventArgs e) 27 | { 28 | var target = this.TextBox.Text; 29 | if (!string.IsNullOrEmpty(target)) 30 | { 31 | target = target.Replace(""", "\""); 32 | var obj = DynamicJson.Parse(target); 33 | } 34 | // ↖ ここにブレークポイントを仕掛けよう 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tools/Grabacr07.Tools.JsonViewer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | --------------------------------------------------------------------------------