├── .gitattributes
├── .gitignore
├── .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.xaml
└── packages.config
├── Grabacr07.KanColleViewer
├── App.config
├── App.xaml
├── App.xaml.cs
├── Assets
│ └── app.ico
├── KanColleViewer.VisualElementsManifest.xml
├── KanColleViewer.csproj
├── Models
│ ├── BrowserZoomFactor.cs
│ ├── CustomSound.cs
│ ├── Data
│ │ └── Xml
│ │ │ ├── XmlFileReader.cs
│ │ │ ├── XmlFileWriter.cs
│ │ │ └── XmlSerializableDictionary.cs
│ ├── Helper.cs
│ ├── INavigator.cs
│ ├── IWindowsNotifier.cs
│ ├── IZoomFactor.cs
│ ├── Internal
│ │ ├── Windows7Notifier.cs
│ │ └── Windows8Notifier.cs
│ ├── Mode.cs
│ ├── ProductInfo.cs
│ ├── RelayCommand.cs
│ ├── ResourceService.cs
│ ├── Settings.cs
│ ├── StatusService.cs
│ ├── SupportedImageFormat.cs
│ ├── Toast.cs
│ ├── Volume.cs
│ └── WindowsNotification.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.en.resx
│ ├── Resources.ko-KR.resx
│ ├── Resources.resx
│ ├── Resources.zh-CN.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── SampleData
│ ├── DockyardViewModelSampleData.xaml
│ ├── FleetViewModelSampleData.xaml
│ ├── FleetsViewModelSampleData.xaml
│ ├── RankingsViewModelSampleData.xaml
│ └── RepairyardViewModelSampleData.xaml
├── Styles
│ ├── Colors.xaml
│ ├── Controls.HorizontalFlatListBox.xaml
│ ├── Controls.ListView.xaml
│ ├── Controls.PinButton.xaml
│ ├── Controls.Text.xaml
│ └── Controls.xaml
├── Themes
│ ├── Accents
│ │ └── Red.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
├── ViewModels
│ ├── BindableTextViewModel.cs
│ ├── Catalogs
│ │ ├── ShipCatalogFilter.cs
│ │ ├── ShipCatalogSortTarget.cs
│ │ ├── ShipCatalogSortWorker.cs
│ │ ├── ShipCatalogWindowViewModel.cs
│ │ ├── ShipTypeViewModel.cs
│ │ ├── ShipViewModel.cs
│ │ ├── SlotItemCatalogViewModel.cs
│ │ ├── SlotItemViewModel.cs
│ │ └── SortableColumnViewModel.cs
│ ├── Contents
│ │ ├── AdmiralViewModel.cs
│ │ ├── Docks
│ │ │ ├── BuildingDockViewModel.cs
│ │ │ ├── DockyardViewModel.cs
│ │ │ ├── RepairingDockViewModel.cs
│ │ │ └── RepairyardViewModel.cs
│ │ ├── ExpeditionsViewModel.cs
│ │ ├── Fleets
│ │ │ ├── ExpeditionViewModel.cs
│ │ │ ├── FleetViewModel.cs
│ │ │ ├── FleetsViewModel.cs
│ │ │ ├── ReSortieBarViewModel.cs
│ │ │ ├── RepairingBarViewModel.cs
│ │ │ └── TimerViewModel.cs
│ │ ├── MaterialsViewModel.cs
│ │ ├── OverviewViewModel.cs
│ │ ├── QuestViewModel.cs
│ │ ├── QuestsViewModel.cs
│ │ ├── ShipViewModel.cs
│ │ ├── ShipsViewModel.cs
│ │ ├── SlotItemViewModel.cs
│ │ ├── SlotItemsViewModel.cs
│ │ ├── Tools
│ │ │ ├── CalculatorViewModel.cs
│ │ │ ├── RankingViewModel.cs
│ │ │ └── RankingsViewModel.cs
│ │ └── ToolsViewModel.cs
│ ├── CultureViewModel.cs
│ ├── Dev
│ │ └── DebugTabViewModel.cs
│ ├── MainContentViewModel.cs
│ ├── MainWindowViewModel.cs
│ ├── Messages
│ │ ├── Response.cs
│ │ ├── ScreenshotMessage.cs
│ │ ├── SetWindowLocationMessage.cs
│ │ └── ZoomMessage.cs
│ ├── NavigatorViewModel.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
│ │ ├── Dockyard.xaml
│ │ ├── Dockyard.xaml.cs
│ │ ├── Expeditions.xaml
│ │ ├── Expeditions.xaml.cs
│ │ ├── Fleets.xaml
│ │ ├── Fleets.xaml.cs
│ │ ├── Homeport.xaml
│ │ ├── Homeport.xaml.cs
│ │ ├── Overview.xaml
│ │ ├── Overview.xaml.cs
│ │ ├── QuestViewSource.cs
│ │ ├── Quests.xaml
│ │ ├── Quests.xaml.cs
│ │ ├── Repairyard.xaml
│ │ └── Repairyard.xaml.cs
│ ├── Controls
│ │ ├── AppIcon.cs
│ │ ├── BuildingDock.cs
│ │ ├── ColorIndicator.cs
│ │ ├── ConditionIcon.cs
│ │ ├── CrossFrameIE.cs
│ │ ├── KanColleHost.cs
│ │ ├── Quest.cs
│ │ ├── SlotItemIcon.cs
│ │ ├── WebBrowserHelper.cs
│ │ ├── ZoomFactorSelector.xaml
│ │ └── ZoomFactorSelector.xaml.cs
│ ├── Converters
│ │ ├── BooleanToWidthConverter.cs
│ │ └── QuestCategoryToColorConverter.cs
│ ├── Dev
│ │ ├── DebugTab.xaml
│ │ └── DebugTab.xaml.cs
│ ├── ExitDialog.xaml
│ ├── ExitDialog.xaml.cs
│ ├── MainContent.xaml
│ ├── MainContent.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── NotStarted.xaml
│ ├── Settings
│ │ ├── Browser.xaml
│ │ ├── Browser.xaml.cs
│ │ ├── Common.xaml
│ │ ├── Language.xaml
│ │ ├── Language.xaml.cs
│ │ ├── Network.xaml
│ │ ├── Network.xaml.cs
│ │ ├── Operation.xaml
│ │ ├── Operation.xaml.cs
│ │ ├── Others.xaml
│ │ ├── Others.xaml.cs
│ │ ├── Settings.xaml
│ │ ├── Settings.xaml.cs
│ │ ├── Updates.xaml
│ │ ├── Updates.xaml.cs
│ │ ├── Window.xaml
│ │ └── Window.xaml.cs
│ ├── StartContent.xaml
│ ├── StartContent.xaml.cs
│ ├── StatusBar.xaml
│ ├── StatusBar.xaml.cs
│ └── Tools
│ │ ├── Calculator.xaml
│ │ ├── Calculator.xaml.cs
│ │ ├── Common.xaml
│ │ ├── Rankings.xaml
│ │ ├── Rankings.xaml.cs
│ │ ├── Tools.xaml
│ │ └── Tools.xaml.cs
├── Win32
│ ├── DVTARGETDEVICE.cs
│ ├── INTERNET_CACHE_ENTRY_INFOA.cs
│ ├── IServiceProvider.cs
│ ├── IViewObject.cs
│ ├── NativeMethods.cs
│ ├── RECT.cs
│ ├── ShellHelpers.cs
│ └── WinInet.cs
└── packages.config
├── Grabacr07.KanColleWrapper
├── Calculator.cs
├── Dockyard.cs
├── DynamicJson.cs
├── Extensions.cs
├── Homeport.cs
├── Internal
│ ├── Definitions.cs
│ ├── Extensions.cs
│ └── RetryObservableExtensions.cs
├── KanColleClient.cs
├── KanColleError.cs
├── KanColleProxy.Endpoints.cs
├── KanColleProxy.Endpoints.tt
├── KanColleProxy.cs
├── KanColleWrapper.csproj
├── Logger.cs
├── Master.cs
├── MasterTable.cs
├── Materials.cs
├── MemberTable.cs
├── Models
│ ├── Admiral.cs
│ ├── BUildingDockState.cs
│ ├── BuildingCompletedEventArgs.cs
│ ├── BuildingDock.cs
│ ├── CanReSortieReason.cs
│ ├── ConditionType.cs
│ ├── Expedition.cs
│ ├── ExpeditionReturnedEventArgs.cs
│ ├── Experience.cs
│ ├── Fleet.cs
│ ├── FleetReSortie.cs
│ ├── FleetState.cs
│ ├── IIdentifiable.cs
│ ├── LimitedValue.cs
│ ├── ModernizableStatus.cs
│ ├── Quest.cs
│ ├── QuestCategory.cs
│ ├── QuestProgress.cs
│ ├── QuestState.cs
│ ├── QuestType.cs
│ ├── Rank.cs
│ ├── Ranking.cs
│ ├── Raw
│ │ ├── kcsapi_basic.cs
│ │ ├── kcsapi_battleresult.cs
│ │ ├── kcsapi_change.cs
│ │ ├── kcsapi_charge.cs
│ │ ├── kcsapi_createitem.cs
│ │ ├── kcsapi_createship.cs
│ │ ├── kcsapi_deck.cs
│ │ ├── kcsapi_destroyship.cs
│ │ ├── kcsapi_getship.cs
│ │ ├── kcsapi_kdock.cs
│ │ ├── kcsapi_kdock_getship.cs
│ │ ├── kcsapi_material.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_ship.cs
│ │ ├── kcsapi_ship2.cs
│ │ ├── kcsapi_ship3.cs
│ │ ├── kcsapi_slot_data.cs
│ │ ├── kcsapi_slotitem.cs
│ │ ├── kcsapi_start2.cs
│ │ ├── kcsapi_useitem.cs
│ │ └── svdata.cs
│ ├── RawDataWrapper.cs
│ ├── RepairingCompletedEventArgs.cs
│ ├── RepairingDock.cs
│ ├── RepairingDockState.cs
│ ├── Ship.cs
│ ├── ShipCriticalConditionEventArgs.cs
│ ├── ShipInfo.cs
│ ├── ShipType.cs
│ ├── ShipTypeId.cs
│ ├── SlotItem.cs
│ ├── SlotItemInfo.cs
│ ├── SlotItemType.cs
│ ├── Speed.cs
│ ├── SvData.cs
│ ├── TranslationType.cs
│ ├── UseItem.cs
│ └── UseItemInfo.cs
├── Organization.cs
├── Properties
│ └── AssemblyInfo.cs
├── Quests.cs
├── Rankings.cs
├── Repairyard.cs
├── TimerNotificator.cs
├── Translations.cs
├── Updater.cs
├── Win32
│ ├── INTERNET_PROXY_INFO.cs
│ └── NativeMethods.cs
├── assemblies
│ ├── FiddlerCore4.XML
│ └── FiddlerCore4.dll
└── packages.config
├── KanColleViewer.sln
├── KanColleViewer.sln.DotSettings
├── LICENSE.txt
├── README.md
├── assemblies
├── CoreAudioApi.dll
├── MetroRadiance.Chrome.dll
├── MetroRadiance.Chrome.xml
├── MetroRadiance.Core.dll
├── MetroRadiance.Core.xml
├── MetroRadiance.dll
├── MetroRadiance.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
│ ├── Operations.xml
│ ├── Quests.xml
│ ├── ShipTypes.xml
│ ├── Ships.xml
│ ├── ko-KR
│ ├── Equipment.xml
│ ├── Operations.xml
│ ├── Quests.xml
│ ├── ShipTypes.xml
│ └── Ships.xml
│ └── zh-CN
│ ├── Equipment.xml
│ ├── Operations.xml
│ ├── Quests.xml
│ ├── ShipTypes.xml
│ └── Ships.xml
└── 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
/.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 |
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/.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/Converters/UniversalBooleanToVisibilityConverter.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 | using Grabacr07.Portable;
9 |
10 | namespace Grabacr07.Desktop.Metro.Converters
11 | {
12 | public class UniversalBooleanToVisibilityConverter : IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | Visibility result;
17 | var bValue = false;
18 | if (value is bool)
19 | {
20 | bValue = (bool)value;
21 | }
22 |
23 | if (bValue)
24 | {
25 | result = Visibility.Visible; // true に対応する Visibility
26 | var pValue = parameter as string;
27 | if (pValue != null)
28 | {
29 | var p = pValue.Split(':');
30 | if (p.Length >= 1)
31 | {
32 | // 最初のパラメーターに Visible 以外が設定されていたら、true に対応する Visibility を上書き
33 | if (p[0].Compare("Hidden")) result = Visibility.Hidden;
34 | else if (p[0].Compare("Collapsed")) result = Visibility.Collapsed;
35 | }
36 | }
37 | }
38 | else
39 | {
40 | result = Visibility.Collapsed; // false に対応する Visibility
41 | var pValue = parameter as string;
42 | if (pValue != null)
43 | {
44 | var p = pValue.Split(':');
45 | if (p.Length >= 2)
46 | {
47 | // 2 番目のパラメーターに Collapsed 以外が設定されていたら、false に対応する Visibility を上書き
48 | if (p[1].Compare("Visible")) result = Visibility.Visible;
49 | else if (p[1].Compare("Hidden")) result = Visibility.Hidden;
50 | }
51 | }
52 | }
53 |
54 | return result;
55 | }
56 |
57 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
58 | {
59 | throw new NotImplementedException();
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Grabacr07.Desktop.Metro/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
8 | // アセンブリに関連付けられている情報を変更するには、
9 | // これらの属性値を変更してください。
10 | [assembly: AssemblyTitle("Grabacr07.Desktop.Metro")]
11 | [assembly: AssemblyDescription("Grabacr07.Desktop.Metro")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("grabacr.net")]
14 | [assembly: AssemblyProduct("Grabacr07.Desktop.Metro")]
15 | [assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
20 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | // またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | // アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/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/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Assets/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/Grabacr07.KanColleViewer/Assets/app.ico
--------------------------------------------------------------------------------
/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/IWindowsNotifier.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 | ///
9 | /// Windows の通知機能を公開します。
10 | ///
11 | public interface IWindowsNotifier : IDisposable
12 | {
13 | void Initialize();
14 | void Show(string header, string body, Action activated, Action failed = null);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/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/Internal/Windows7Notifier.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Windows.Forms;
6 | using Application = System.Windows.Application;
7 |
8 | namespace Grabacr07.KanColleViewer.Models.Internal
9 | {
10 | ///
11 | /// 通知領域アイコンを利用した通知機能を提供します。
12 | ///
13 | internal class Windows7Notifier : IWindowsNotifier
14 | {
15 | CustomSound sound = new CustomSound();
16 | private NotifyIcon notifyIcon;
17 | private EventHandler activatedAction;
18 |
19 | public void Initialize()
20 | {
21 | const string iconUri = "pack://application:,,,/KanColleViewer;Component/Assets/app.ico";
22 |
23 | Uri uri;
24 | if (!Uri.TryCreate(iconUri, UriKind.Absolute, out uri)) return;
25 |
26 | var streamResourceInfo = Application.GetResourceStream(uri);
27 | if (streamResourceInfo == null) return;
28 |
29 | using (var stream = streamResourceInfo.Stream)
30 | {
31 | this.notifyIcon = new NotifyIcon
32 | {
33 | Text = App.ProductInfo.Title,
34 | Icon = new Icon(stream),
35 | Visible = true,
36 | };
37 | }
38 | }
39 |
40 | public void Show(string header, string body, Action activated, Action failed = null)
41 | {
42 | if (this.notifyIcon == null) return;
43 |
44 | if (activated != null)
45 | {
46 | this.notifyIcon.BalloonTipClicked -= this.activatedAction;
47 |
48 | this.activatedAction = (sender, args) => activated();
49 | this.notifyIcon.BalloonTipClicked += this.activatedAction;
50 | }
51 |
52 | sound.SoundOutput(header, false);
53 | notifyIcon.ShowBalloonTip(1000, header, body, ToolTipIcon.None);
54 | }
55 |
56 | public void Dispose()
57 | {
58 | if (this.notifyIcon != null)
59 | {
60 | this.notifyIcon.Dispose();
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/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/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/StatusService.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 Livet;
9 |
10 | namespace Grabacr07.KanColleViewer.Models
11 | {
12 | ///
13 | /// 主にメイン ウィンドウのステータス バーに表示する
14 | ///
15 | public class StatusService : NotificationObject
16 | {
17 | #region static members
18 |
19 | private static readonly StatusService current = new StatusService();
20 | public static StatusService Current
21 | {
22 | get { return current; }
23 | }
24 |
25 | #endregion
26 |
27 | private readonly Subject notifier;
28 | private string persisitentMessage = "";
29 | private string notificationMessage;
30 |
31 | #region Message 変更通知プロパティ
32 |
33 | ///
34 | /// 現在のステータスを示す文字列を取得します。
35 | ///
36 | public string Message
37 | {
38 | get { return this.notificationMessage ?? this.persisitentMessage; }
39 | set
40 | {
41 | if (this.persisitentMessage != value)
42 | {
43 | this.persisitentMessage = value;
44 | this.RaisePropertyChanged();
45 | }
46 | }
47 | }
48 |
49 | #endregion
50 |
51 | private StatusService()
52 | {
53 | this.notifier = new Subject();
54 | this.notifier
55 | .Do(x =>
56 | {
57 | this.notificationMessage = x;
58 | this.RaiseMessagePropertyChanged();
59 | })
60 | .Throttle(TimeSpan.FromMilliseconds(5000))
61 | .Subscribe(_ =>
62 | {
63 | this.notificationMessage = null;
64 | this.RaiseMessagePropertyChanged();
65 | });
66 | }
67 |
68 | public void Set(string message)
69 | {
70 | this.Message = message;
71 | }
72 |
73 | public void Notify(string message)
74 | {
75 | this.notifier.OnNext(message);
76 | }
77 |
78 | private void RaiseMessagePropertyChanged()
79 | {
80 | this.RaisePropertyChanged("Message");
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/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/Models/Toast.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Windows.Foundation;
6 | using Windows.UI.Notifications;
7 |
8 | namespace Grabacr07.KanColleViewer.Models
9 | {
10 | ///
11 | /// Windows 8 のトースト通知機能を提供します。
12 | ///
13 | public class Toast
14 | {
15 | #region static members
16 |
17 | ///
18 | /// トースト通期機能をサポートしているかどうかを示す値を取得します。
19 | ///
20 | ///
21 | /// 動作しているオペレーティング システムが Windows 8 (NT 6.2) 以降の場合は true、それ以外の場合は false。
22 | ///
23 | public static bool IsSupported
24 | {
25 | get { return Helper.IsWindows8OrGreater; }
26 | }
27 |
28 | #endregion
29 |
30 | public const string AppId = "Grabacr07.KanColleViewer";
31 |
32 | private readonly ToastNotification toast;
33 |
34 | public event TypedEventHandler Activated
35 | {
36 | add { this.toast.Activated += value; }
37 | remove { this.toast.Activated -= value; }
38 | }
39 |
40 | public event TypedEventHandler Dismissed
41 | {
42 | add { this.toast.Dismissed += value; }
43 | remove { this.toast.Dismissed -= value; }
44 | }
45 |
46 | public event TypedEventHandler ToastFailed
47 | {
48 | add { this.toast.Failed += value; }
49 | remove { this.toast.Failed -= value; }
50 | }
51 |
52 | public Toast(string header, string body)
53 | {
54 | var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);
55 |
56 | var stringElements = toastXml.GetElementsByTagName("text");
57 | if (stringElements.Length == 2)
58 | {
59 | stringElements[0].AppendChild(toastXml.CreateTextNode(header));
60 | stringElements[1].AppendChild(toastXml.CreateTextNode(body));
61 | }
62 |
63 | this.toast = new ToastNotification(toastXml);
64 | }
65 |
66 | public void Show()
67 | {
68 | ToastNotificationManager.CreateToastNotifier(AppId).Show(this.toast);
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Models/WindowsNotification.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Grabacr07.KanColleViewer.Models.Internal;
6 |
7 | namespace Grabacr07.KanColleViewer.Models
8 | {
9 | ///
10 | /// Windows の通知機能を提供します。Windows のバージョンに依存する実装の差異は隠蔽されます。
11 | ///
12 | public static class WindowsNotification
13 | {
14 | private static IWindowsNotifier notifier;
15 |
16 | ///
17 | /// 現在の OS バージョンに適合する通知機能へアクセスできるようにします。
18 | ///
19 | public static IWindowsNotifier Notifier
20 | {
21 | get { return notifier ?? (notifier = Windows8Notifier.IsSupported ? (IWindowsNotifier)new Windows8Notifier() : new Windows7Notifier()); }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
8 | // アセンブリに関連付けられている情報を変更するには、
9 | // これらの属性値を変更してください。
10 | [assembly: AssemblyTitle("KanColleViewer!")]
11 | [assembly: AssemblyDescription("KanColleViewer! β")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("grabacr.net")]
14 | [assembly: AssemblyProduct("KanColleViewer! β")]
15 | [assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
20 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("2.6.0.461")]
55 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/SampleData/RankingsViewModelSampleData.xaml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
12 |
22 |
23 |
24 |
34 |
35 |
36 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Styles/Controls.HorizontalFlatListBox.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Styles/Controls.Text.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
21 |
22 |
29 |
30 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Styles/Controls.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/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/Generic.ColorIndicator.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
23 |
24 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Themes/Generic.ConditionIcon.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
45 |
46 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Themes/Generic.KanColleHost.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
16 |
17 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Themes/Generic.Modernizable.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
43 |
44 |
--------------------------------------------------------------------------------
/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/Catalogs/ShipTypeViewModel.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.Catalogs
9 | {
10 | public class ShipTypeViewModel : ViewModel
11 | {
12 | public Action SelectionChangedAction { get; set; }
13 |
14 | #region Id 変更通知プロパティ
15 |
16 | private int _Id;
17 |
18 | public int Id
19 | {
20 | get { return this._Id; }
21 | set
22 | {
23 | if (this._Id != value)
24 | {
25 | this._Id = value;
26 | this.RaisePropertyChanged();
27 | }
28 | }
29 | }
30 |
31 | #endregion
32 |
33 | #region DisplayName 変更通知プロパティ
34 |
35 | private string _DisplayName;
36 |
37 | public string DisplayName
38 | {
39 | get { return this._DisplayName; }
40 | set
41 | {
42 | if (this._DisplayName != value)
43 | {
44 | this._DisplayName = value;
45 | this.RaisePropertyChanged();
46 | }
47 | }
48 | }
49 |
50 | #endregion
51 |
52 | #region IsSelected 変更通知プロパティ
53 |
54 | private bool _IsSelected;
55 |
56 | public bool IsSelected
57 | {
58 | get { return this._IsSelected; }
59 | set
60 | {
61 | if (this._IsSelected != value)
62 | {
63 | this._IsSelected = value;
64 | this.RaisePropertyChanged();
65 | if (this.SelectionChangedAction != null) this.SelectionChangedAction();
66 | }
67 | }
68 | }
69 |
70 | #endregion
71 |
72 |
73 | public ShipTypeViewModel(ShipType stype)
74 | {
75 | this.Id = stype.Id;
76 |
77 | // [ID = 8 (金剛型戦艦)] と [ID = 9 (金剛型以外の戦艦)] がどちらも "戦艦" 表記で区別がつかないため、
78 | // ID = 8 の方を "巡洋戦艦" に変更
79 | this.DisplayName = (stype.Id == 8 && stype.Name == "戦艦") ? "巡洋戦艦" : stype.Name;
80 | }
81 |
82 | public void Set(bool selected)
83 | {
84 | this._IsSelected = selected;
85 | this.RaisePropertyChanged("IsSelected");
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipViewModel.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;
7 | using Livet;
8 |
9 | namespace Grabacr07.KanColleViewer.ViewModels.Catalogs
10 | {
11 | public class ShipViewModel : ViewModel
12 | {
13 | public int Index { get; private set; }
14 | public Ship Ship { get; private set; }
15 | public List SlotItems { get; private set; }
16 |
17 | public ShipViewModel(int index, Ship ship)
18 | {
19 | this.Index = index;
20 | this.Ship = ship;
21 | this.SlotItems = ship.SlotItems.Select(i => new SlotItemViewModel(i.Info)).ToList();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/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/Docks/RepairyardViewModel.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 Livet;
8 | using Livet.EventListeners;
9 |
10 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks
11 | {
12 | public class RepairyardViewModel : TabItemViewModel
13 | {
14 | public override string Name
15 | {
16 | get { return Properties.Resources.Repairyard; }
17 | protected set { throw new NotImplementedException(); }
18 | }
19 |
20 | #region Docks 変更通知プロパティ
21 |
22 | private RepairingDockViewModel[] _Docks;
23 |
24 | public RepairingDockViewModel[] Docks
25 | {
26 | get { return this._Docks; }
27 | set
28 | {
29 | if (!Equals(this._Docks, value))
30 | {
31 | this._Docks = value;
32 | this.RaisePropertyChanged();
33 | }
34 | }
35 | }
36 |
37 | #endregion
38 |
39 | #region IsNotifyCompleted 変更通知プロパティ
40 |
41 | public bool IsNotifyCompleted
42 | {
43 | get { return Settings.Current.NotifyRepairingCompleted; }
44 | set
45 | {
46 | if (Settings.Current.NotifyRepairingCompleted != value)
47 | {
48 | Settings.Current.NotifyRepairingCompleted = value;
49 | this.Docks.ForEach(x => x.IsNotifyCompleted = value);
50 | this.RaisePropertyChanged();
51 | }
52 | }
53 | }
54 |
55 | #endregion
56 |
57 | public bool IsSupportedNotification
58 | {
59 | get { return Helper.IsWindows8OrGreater; }
60 | }
61 |
62 |
63 | public RepairyardViewModel()
64 | {
65 | this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Homeport.Repairyard)
66 | {
67 | { "Docks", (sender, args) => this.Update() },
68 | });
69 | this.Update();
70 | }
71 |
72 | private void Update()
73 | {
74 | this.Docks = KanColleClient.Current.Homeport.Repairyard.Docks.Select(kvp => new RepairingDockViewModel(kvp.Value)).ToArray();
75 | this.Docks.ForEach(x => x.IsNotifyCompleted = this.IsNotifyCompleted);
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/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/RepairingBarViewModel.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 Grabacr07.KanColleWrapper;
7 | using Grabacr07.KanColleWrapper.Models;
8 |
9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents.Fleets
10 | {
11 | public class RepairingBarViewModel : TimerViewModel
12 | {
13 | private readonly Fleet source;
14 |
15 | public RepairingBarViewModel(Fleet fleet)
16 | {
17 | this.source = fleet;
18 | }
19 |
20 | protected override string CreateMessage()
21 | {
22 | var dock = source.Ships
23 | .Join(KanColleClient.Current.Homeport.Repairyard.Docks.Values.Where(d => d.Ship != null), s => s.Id, d => d.Ship.Id, (s, d) => d)
24 | .OrderByDescending(d => d.CompleteTime)
25 | .FirstOrDefault();
26 | if (dock == null)
27 | {
28 | return Properties.Resources.MessageBar_Repairing_Null;
29 | }
30 | var remaining = dock.CompleteTime.Value.LocalDateTime - DateTimeOffset.Now - TimeSpan.FromMinutes(1.0);
31 | return string.Format(@Properties.Resources.MessageBar_Repairing,
32 | dock.CompleteTime.Value.LocalDateTime, (int)remaining.TotalHours, remaining);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/TimerViewModel.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.Contents.Fleets
8 | {
9 | public abstract class TimerViewModel : ViewModel
10 | {
11 | public Func TimerProc
12 | {
13 | get { return this.CreateMessage; }
14 | }
15 |
16 | protected abstract string CreateMessage();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/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/OverviewViewModel.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.Properties;
7 | using Grabacr07.KanColleViewer.ViewModels.Catalogs;
8 | using Livet;
9 | using Livet.Messaging;
10 |
11 | namespace Grabacr07.KanColleViewer.ViewModels.Contents
12 | {
13 | public class OverviewViewModel : TabItemViewModel
14 | {
15 | public override string Name
16 | {
17 | get { return Resources.IntegratedView; }
18 | protected set { throw new NotImplementedException(); }
19 | }
20 |
21 | public MainContentViewModel Content { get; private set; }
22 |
23 |
24 | public OverviewViewModel(MainContentViewModel owner)
25 | {
26 | this.Content = owner;
27 | }
28 |
29 |
30 | public void Jump(string tabName)
31 | {
32 | TabItemViewModel target = null;
33 |
34 | switch (tabName)
35 | {
36 | case "Fleets":
37 | target = this.Content.Fleets;
38 | break;
39 | case "Expeditions":
40 | target = this.Content.Expeditions;
41 | break;
42 | case "Quests":
43 | target = this.Content.Quests;
44 | break;
45 | case "Repairyard":
46 | target = this.Content.Repairyard;
47 | break;
48 | case "Dockyard":
49 | target = this.Content.Dockyard;
50 | break;
51 | }
52 |
53 | if (target != null) target.IsSelected = true;
54 | }
55 |
56 | public void ShowShipCatalog()
57 | {
58 | var catalog = new ShipCatalogWindowViewModel();
59 | var message = new TransitionMessage(catalog, "Show/ShipCatalogWindow");
60 | this.Messenger.RaiseAsync(message);
61 | }
62 |
63 | public void ShowSlotItemCatalog()
64 | {
65 | var catalog = new SlotItemCatalogViewModel();
66 | var message = new TransitionMessage(catalog, "Show/SlotItemCatalogWindow");
67 | this.Messenger.RaiseAsync(message);
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/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.Update();
39 | }
40 |
41 | private void Update()
42 | {
43 | this.Count = KanColleClient.Current.Homeport.Organization.Ships.Count;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/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)
35 | {
36 | { "SlotItems", (sender, args) => this.Update() }
37 | });
38 | this.Update();
39 | }
40 |
41 | private void Update()
42 | {
43 | this.Count = KanColleClient.Current.Homeport.SlotItems.Count;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/ViewModels/Contents/ToolsViewModel.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.Tools;
7 | using Livet;
8 |
9 | namespace Grabacr07.KanColleViewer.ViewModels.Contents
10 | {
11 | public class ToolsViewModel : TabItemViewModel
12 | {
13 | public CalculatorViewModel Calculator { get; private set; }
14 | public RankingsViewModel Rankings { get; private set; }
15 |
16 | public IList TabItems { get; private set; }
17 |
18 | #region SelectedItem 変更通知プロパティ
19 |
20 | private TabItemViewModel _SelectedItem;
21 |
22 | public TabItemViewModel SelectedItem
23 | {
24 | get { return this._SelectedItem; }
25 | set
26 | {
27 | if (this._SelectedItem != value)
28 | {
29 | this._SelectedItem = value;
30 | this.RaisePropertyChanged();
31 |
32 | App.ViewModelRoot.StatusBar = value;
33 | }
34 | }
35 | }
36 |
37 | #endregion
38 |
39 | public override string Name
40 | {
41 | get { return "Tools"; }
42 | protected set { throw new NotImplementedException(); }
43 | }
44 |
45 | public ToolsViewModel()
46 | {
47 | this.Calculator = new CalculatorViewModel();
48 | this.Rankings = new RankingsViewModel();
49 |
50 | this.TabItems = new List
51 | {
52 | this.Calculator,
53 | this.Rankings,
54 | };
55 |
56 | this.SelectedItem = this.TabItems.FirstOrDefault();
57 | }
58 |
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/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.Text;
5 | using System.Threading.Tasks;
6 | using Grabacr07.KanColleViewer.Models;
7 |
8 | namespace Grabacr07.KanColleViewer.ViewModels.Dev
9 | {
10 | public class DebugTabViewModel : TabItemViewModel
11 | {
12 | public override string Name
13 | {
14 | get { return Properties.Resources.Debug; }
15 | protected set { throw new NotImplementedException(); }
16 | }
17 |
18 | public void Notify()
19 | {
20 | WindowsNotification.Notifier.Show(Properties.Resources.Debug_NotificationMessage_Title, Properties.Resources.Debug_NotificationMessage, () => App.ViewModelRoot.Activate());
21 | }
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/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/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/ViewModels/TabItemViewModel.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 | using MetroRadiance.Controls;
8 | using Grabacr07.KanColleViewer.Models;
9 | using Livet.EventListeners;
10 |
11 | namespace Grabacr07.KanColleViewer.ViewModels
12 | {
13 | public abstract class TabItemViewModel : ViewModel, ITabItem
14 | {
15 | #region Name 変更通知プロパティ
16 |
17 | ///
18 | /// タブ名を取得します。
19 | ///
20 | public abstract string Name { get; protected set; }
21 |
22 | #endregion
23 |
24 | #region Badge 変更通知プロパティ
25 |
26 | private int? _Badge;
27 |
28 | ///
29 | /// バッジを取得します。
30 | ///
31 | public virtual int? Badge
32 | {
33 | get { return this._Badge; }
34 | protected set
35 | {
36 | if (this._Badge != value)
37 | {
38 | this._Badge = value;
39 | this.RaisePropertyChanged();
40 | }
41 | }
42 | }
43 |
44 | #endregion
45 |
46 | #region IsSelected 変更通知プロパティ
47 |
48 | private bool _IsSelected;
49 |
50 | public virtual bool IsSelected
51 | {
52 | get { return this._IsSelected; }
53 | set
54 | {
55 | if (this._IsSelected != value)
56 | {
57 | this._IsSelected = value;
58 | this.RaisePropertyChanged();
59 | }
60 | }
61 | }
62 |
63 | #endregion
64 |
65 | #region Status 変更通知プロパティ
66 |
67 | private ViewModel _Status;
68 |
69 | ///
70 | /// ステータス バーに表示するステータスを取得します。
71 | ///
72 | public virtual ViewModel Status
73 | {
74 | get { return this._Status; }
75 | protected set
76 | {
77 | if (this._Status != value)
78 | {
79 | this._Status = value;
80 | this.RaisePropertyChanged();
81 | }
82 | }
83 | }
84 |
85 | #endregion
86 |
87 | public TabItemViewModel()
88 | {
89 | if (Helper.IsInDesignMode) return;
90 |
91 | this.CompositeDisposable.Add(new PropertyChangedEventListener(ResourceService.Current)
92 | {
93 | (sender, args) => this.RaisePropertyChanged("Name"),
94 | });
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/ViewModels/VolumeViewModel.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.KanColleViewer.Models;
8 | using Livet;
9 | using Livet.EventListeners;
10 |
11 | namespace Grabacr07.KanColleViewer.ViewModels
12 | {
13 | public class VolumeViewModel : ViewModel
14 | {
15 | private Volume volume;
16 |
17 | #region IsMute 変更通知プロパティ
18 |
19 | private bool _IsMute;
20 |
21 | public bool IsMute
22 | {
23 | get { return this._IsMute; }
24 | set
25 | {
26 | if (this._IsMute != value)
27 | {
28 | this._IsMute = value;
29 | this.RaisePropertyChanged();
30 | }
31 | }
32 | }
33 |
34 | #endregion
35 |
36 |
37 | public VolumeViewModel()
38 | {
39 | this.CreateVolumeInstanceIfNull();
40 | }
41 |
42 | public void ToggleMute()
43 | {
44 | if (this.CreateVolumeInstanceIfNull())
45 | {
46 | this.volume.ToggleMute();
47 | }
48 | }
49 |
50 | private bool CreateVolumeInstanceIfNull()
51 | {
52 | if (this.volume == null)
53 | {
54 | try
55 | {
56 | this.volume = Volume.GetInstance();
57 | this.CompositeDisposable.Add(new PropertyChangedEventListener(this.volume)
58 | {
59 | { "IsMute", (sender, args) => this.IsMute = this.volume.IsMute },
60 | });
61 | this.IsMute = this.volume.IsMute;
62 | }
63 | catch (Exception ex)
64 | {
65 | Debug.WriteLine(ex);
66 | return false;
67 | }
68 | }
69 |
70 | return true;
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Behaviors/CountdownBehavior.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 |
8 | namespace Grabacr07.KanColleViewer.Views.Behaviors
9 | {
10 | ///
11 | /// 指定した時間までのカウントダウン機能を有する です。
12 | ///
13 | public class CountdownBehavior : TimerBehavior
14 | {
15 | #region Period 依存関係プロパティ
16 |
17 | ///
18 | /// カウントダウンの終了時刻を取得または設定します。
19 | ///
20 | public DateTimeOffset? Period
21 | {
22 | get { return (DateTimeOffset?)this.GetValue(PeriodProperty); }
23 | set { this.SetValue(PeriodProperty, value); }
24 | }
25 |
26 | ///
27 | /// 依存関係プロパティを識別します。
28 | ///
29 | public static readonly DependencyProperty PeriodProperty =
30 | DependencyProperty.Register("Period", typeof(DateTimeOffset?), typeof(CountdownBehavior), new UIPropertyMetadata(null, PeriodChangedCallback));
31 |
32 | private static void PeriodChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
33 | {
34 | var instance = (CountdownBehavior)d;
35 | var period = (DateTimeOffset?)e.NewValue;
36 |
37 | if (period.HasValue)
38 | {
39 | instance.Proc = () => DateTimeOffset.Now.Subtract(period.Value).ToString();
40 | instance.Start();
41 | }
42 | else
43 | {
44 | instance.Stop();
45 | }
46 | }
47 |
48 | #endregion
49 |
50 | protected override void OnAttached()
51 | {
52 | this.Initialize();
53 | if (this.Period.HasValue) this.Start();
54 | }
55 |
56 | protected override void Stop()
57 | {
58 | base.Stop();
59 | this.AssociatedObject.Text = "";
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Behaviors/GridViewBehaviors.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.Interactivity;
9 |
10 | namespace Grabacr07.KanColleViewer.Views.Behaviors
11 | {
12 | public class GridViewBehaviors : GridViewColumnHeader
13 | {
14 | public static readonly DependencyProperty CollapseableColumnProperty = DependencyProperty.RegisterAttached("CollapseableColumn", typeof(bool), typeof(GridViewBehaviors), new UIPropertyMetadata(false, OnCollapseableColumnChanged));
15 |
16 | public static bool GetCollapseableColumn(DependencyObject d)
17 | {
18 | return (bool)d.GetValue(CollapseableColumnProperty);
19 | }
20 |
21 | public static void SetCollapseableColumn(DependencyObject d, bool value)
22 | {
23 | d.SetValue(CollapseableColumnProperty, value);
24 | }
25 |
26 | private static void OnCollapseableColumnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
27 | {
28 | GridViewColumnHeader header = sender as GridViewColumnHeader;
29 | if (header == null)
30 | return;
31 |
32 | header.IsVisibleChanged += new DependencyPropertyChangedEventHandler(AdjustWidth);
33 | }
34 |
35 | static void AdjustWidth(object sender, DependencyPropertyChangedEventArgs e)
36 | {
37 | GridViewColumnHeader header = sender as GridViewColumnHeader;
38 | if (header == null)
39 | return;
40 |
41 | if (header.Visibility == Visibility.Collapsed)
42 | header.Column.Width = 0;
43 | else
44 | header.Column.Width = double.NaN; // "Auto"
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/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/Modernizable.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.Catalogs
18 | {
19 | ///
20 | /// の表示をサポートします。
21 | ///
22 | public class Modernizable : Control
23 | {
24 | static Modernizable()
25 | {
26 | DefaultStyleKeyProperty.OverrideMetadata(typeof(Modernizable), new FrameworkPropertyMetadata(typeof(Modernizable)));
27 | }
28 |
29 |
30 | #region Status 依存関係プロパティ
31 |
32 | public ModernizableStatus Status
33 | {
34 | get { return (ModernizableStatus)this.GetValue(StatusProperty); }
35 | set { this.SetValue(StatusProperty, value); }
36 | }
37 | public static readonly DependencyProperty StatusProperty =
38 | DependencyProperty.Register("Status", typeof(ModernizableStatus), typeof(Modernizable), new UIPropertyMetadata(ModernizableStatus.Dummy, StatusPropertyChangedCallback));
39 |
40 | private static void StatusPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
41 | {
42 | var source = (Modernizable)d;
43 | var status = (ModernizableStatus)e.NewValue;
44 |
45 | source.IsMax = status.IsMax;
46 | }
47 |
48 | #endregion
49 |
50 | #region IsMax 依存関係プロパティ
51 |
52 | public bool IsMax
53 | {
54 | get { return (bool)this.GetValue(IsMaxProperty); }
55 | private set { this.SetValue(IsMaxProperty, value); }
56 | }
57 | public static readonly DependencyProperty IsMaxProperty =
58 | DependencyProperty.Register("IsMax", typeof(bool), typeof(Modernizable), new UIPropertyMetadata(false));
59 |
60 | #endregion
61 |
62 |
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/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/Dockyard.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 | /// Dockyard.xaml の相互作用ロジック
11 | ///
12 | public partial class Dockyard : UserControl
13 | {
14 | public Dockyard()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/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/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.Type == 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/Repairyard.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 | /// Repairyard.xaml の相互作用ロジック
11 | ///
12 | public partial class Repairyard : UserControl
13 | {
14 | public Repairyard()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Controls/AppIcon.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.Controls
17 | {
18 | public class AppIcon : Control
19 | {
20 | static AppIcon()
21 | {
22 | DefaultStyleKeyProperty.OverrideMetadata(typeof(AppIcon), new FrameworkPropertyMetadata(typeof(AppIcon)));
23 | }
24 |
25 |
26 | #region AnchorVisibility 依存関係プロパティ
27 |
28 | public Visibility AnchorVisibility
29 | {
30 | get { return (Visibility)this.GetValue(AnchorVisibilityProperty); }
31 | set { this.SetValue(AnchorVisibilityProperty, value); }
32 | }
33 | public static readonly DependencyProperty AnchorVisibilityProperty =
34 | DependencyProperty.Register("AnchorVisibility", typeof(Visibility), typeof(AppIcon), new UIPropertyMetadata(Visibility.Visible));
35 |
36 | #endregion
37 |
38 | #region BandVisibility 依存関係プロパティ
39 |
40 | public Visibility BandVisibility
41 | {
42 | get { return (Visibility)this.GetValue(BandVisibilityProperty); }
43 | set { this.SetValue(BandVisibilityProperty, value); }
44 | }
45 | public static readonly DependencyProperty BandVisibilityProperty =
46 | DependencyProperty.Register("BandVisibility", typeof(Visibility), typeof(AppIcon), new UIPropertyMetadata(Visibility.Visible));
47 |
48 | #endregion
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Controls/ConditionIcon.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 ConditionIcon : Control
23 | {
24 | static ConditionIcon()
25 | {
26 | DefaultStyleKeyProperty.OverrideMetadata(typeof(ConditionIcon), new FrameworkPropertyMetadata(typeof(ConditionIcon)));
27 | }
28 |
29 | #region Condition 依存関係プロパティ
30 |
31 | ///
32 | /// 艦娘のコンディションを取得または設定します。
33 | ///
34 | public ConditionType ConditionType
35 | {
36 | get { return (ConditionType)this.GetValue(ConditionTypeProperty); }
37 | set { this.SetValue(ConditionTypeProperty, value); }
38 | }
39 | ///
40 | /// 依存関係プロパティを識別します。
41 | ///
42 | public static readonly DependencyProperty ConditionTypeProperty =
43 | DependencyProperty.Register("ConditionType", typeof(ConditionType), typeof(ConditionIcon), new UIPropertyMetadata(ConditionType.Normal));
44 |
45 | #endregion
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/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/Controls/WebBrowserHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Reflection;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 |
10 | namespace Grabacr07.KanColleViewer.Views.Controls
11 | {
12 | public class WebBrowserHelper
13 | {
14 | #region ScriptErrorsSuppressed 添付プロパティ
15 |
16 | public static readonly DependencyProperty ScriptErrorsSuppressedProperty =
17 | DependencyProperty.RegisterAttached("ScriptErrorsSuppressed", typeof(bool), typeof(WebBrowserHelper), new PropertyMetadata(default(bool), ScriptErrorsSuppressedChangedCallback));
18 |
19 | public static void SetScriptErrorsSuppressed(WebBrowser browser, bool value)
20 | {
21 | browser.SetValue(ScriptErrorsSuppressedProperty, value);
22 | }
23 |
24 | public static bool GetScriptErrorsSuppressed(WebBrowser browser)
25 | {
26 | return (bool)browser.GetValue(ScriptErrorsSuppressedProperty);
27 | }
28 |
29 | private static void ScriptErrorsSuppressedChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
30 | {
31 | var browser = d as WebBrowser;
32 | if (browser == null) return;
33 | if (!(e.NewValue is bool)) return;
34 |
35 | try
36 | {
37 | var axIWebBrowser2 = typeof(WebBrowser).GetProperty("AxIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic);
38 | if (axIWebBrowser2 == null) return;
39 |
40 | var comObj = axIWebBrowser2.GetValue(browser, null);
41 | if (comObj == null) return;
42 |
43 | comObj.GetType().InvokeMember("Silent", BindingFlags.SetProperty, null, comObj, new[] { e.NewValue, });
44 | }
45 | catch (Exception ex)
46 | {
47 | Debug.WriteLine(ex);
48 | }
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Converters/BooleanToWidthConverter.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/QuestCategoryToColorConverter.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 QuestCategoryToColorConverter : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | if (value is QuestCategory)
18 | {
19 | var category = (QuestCategory)value;
20 | switch (category)
21 | {
22 | case QuestCategory.Composition:
23 | return Color.FromRgb(42, 125, 70);
24 | case QuestCategory.Sortie:
25 | return Color.FromRgb(181, 59, 54);
26 | case QuestCategory.Expeditions:
27 | return Color.FromRgb(59, 160, 157);
28 | case QuestCategory.Practice:
29 | return Color.FromRgb(141, 198, 96);
30 | case QuestCategory.Supply:
31 | return Color.FromRgb(178, 147, 47);
32 | case QuestCategory.Building:
33 | return Color.FromRgb(100, 68, 59);
34 | case QuestCategory.Remodelling:
35 | return Color.FromRgb(169, 135, 186);
36 | }
37 | }
38 |
39 | return Color.FromRgb(128, 128, 128);
40 | }
41 |
42 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
43 | {
44 | throw new NotImplementedException();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/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/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/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Drawing.Imaging;
6 | using System.Linq;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using System.Windows.Media;
11 |
12 | namespace Grabacr07.KanColleViewer.Views
13 | {
14 | ///
15 | /// KanColleViewer のメイン ウィンドウを表します。
16 | ///
17 | partial class MainWindow
18 | {
19 | public static MainWindow Current { get; private set; }
20 |
21 | public MainWindow()
22 | {
23 | InitializeComponent();
24 | Current = this;
25 | }
26 |
27 | protected override void OnClosing(CancelEventArgs e)
28 | {
29 | // ToDo: 確認ダイアログを実装したかった…
30 | //e.Cancel = true;
31 |
32 | //var dialog = new ExitDialog { Owner = this, };
33 | //dialog.Show();
34 |
35 | base.OnClosing(e);
36 | }
37 |
38 | public void RefreshNavigator()
39 | {
40 | App.ViewModelRoot.Navigator.Refresh();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/NotStarted.xaml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/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 | /// Interaction logic for Browser.xaml
20 | ///
21 | public partial class Browser : UserControl
22 | {
23 | public Browser()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/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/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/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/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/Views/Tools/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.Views.Tools
17 | {
18 | ///
19 | /// Interaction logic for Calculator.xaml
20 | ///
21 | public partial class Calculator : UserControl
22 | {
23 | public Calculator()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Tools/Rankings.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.Tools
17 | {
18 | ///
19 | /// Missions.xaml ?????????
20 | ///
21 | public partial class Rankings : UserControl
22 | {
23 | public Rankings()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleViewer/Views/Tools/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.Tools
17 | {
18 | ///
19 | /// Interaction logic for Tools.xaml
20 | ///
21 | public partial class Tools : UserControl
22 | {
23 | public Tools()
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/INTERNET_CACHE_ENTRY_INFOA.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
4 |
5 | namespace Grabacr07.KanColleViewer.Win32
6 | {
7 | // ReSharper disable InconsistentNaming
8 | [StructLayout(LayoutKind.Explicit, Size = 80)]
9 | internal struct INTERNET_CACHE_ENTRY_INFOA
10 | {
11 | [FieldOffset(0)]
12 | public uint dwStructSize;
13 | [FieldOffset(4)]
14 | public IntPtr lpszSourceUrlName;
15 | [FieldOffset(8)]
16 | public IntPtr lpszLocalFileName;
17 | [FieldOffset(12)]
18 | public uint CacheEntryType;
19 | [FieldOffset(16)]
20 | public uint dwUseCount;
21 | [FieldOffset(20)]
22 | public uint dwHitRate;
23 | [FieldOffset(24)]
24 | public uint dwSizeLow;
25 | [FieldOffset(28)]
26 | public uint dwSizeHigh;
27 | [FieldOffset(32)]
28 | public FILETIME LastModifiedTime;
29 | [FieldOffset(40)]
30 | public FILETIME ExpireTime;
31 | [FieldOffset(48)]
32 | public FILETIME LastAccessTime;
33 | [FieldOffset(56)]
34 | public FILETIME LastSyncTime;
35 | [FieldOffset(64)]
36 | public IntPtr lpHeaderInfo;
37 | [FieldOffset(68)]
38 | public uint dwHeaderInfoSize;
39 | [FieldOffset(72)]
40 | public IntPtr lpszFileExtension;
41 | [FieldOffset(76)]
42 | public uint dwReserved;
43 | [FieldOffset(76)]
44 | public uint dwExemptDelta;
45 | }
46 |
47 | internal enum WININETCACHEENTRYTYPE
48 | {
49 | ALL = 0x31003d,
50 | COOKIE_CACHE_ENTRY = 0x100000,
51 | EDITED_CACHE_ENTRY = 8,
52 | None = 0,
53 | NORMAL_CACHE_ENTRY = 1,
54 | SPARSE_CACHE_ENTRY = 0x10000,
55 | STICKY_CACHE_ENTRY = 4,
56 | TRACK_OFFLINE_CACHE_ENTRY = 0x10,
57 | TRACK_ONLINE_CACHE_ENTRY = 0x20,
58 | URLHISTORY_CACHE_ENTRY = 0x200000
59 | }
60 |
61 | // ReSharper restore InconsistentNaming
62 | }
63 |
--------------------------------------------------------------------------------
/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 | }
12 | }
13 |
--------------------------------------------------------------------------------
/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/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Calculator.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;
7 |
8 | namespace Grabacr07.KanColleWrapper
9 | {
10 | static class Calculator
11 | {
12 | ///
13 | /// 装備と搭載数を指定して、スロット単位の制空能力を計算します。
14 | ///
15 | /// 対空能力を持つ装備。
16 | /// 搭載数。
17 | ///
18 | public static int CalcAirSuperiorityPotential(this SlotItem slotItem, int onslot)
19 | {
20 | if (slotItem.Info.IsAirSuperiorityFighter)
21 | {
22 | return (int)(slotItem.Info.AA * Math.Sqrt(onslot));
23 | }
24 |
25 | return 0;
26 | }
27 |
28 | ///
29 | /// 指定した艦の制空能力を計算します。
30 | ///
31 | public static int CalcAirSuperiorityPotential(this Ship ship)
32 | {
33 | return ship.SlotItems.Zip(ship.OnSlot, (item, i) => item.CalcAirSuperiorityPotential(i)).Sum();
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Extensions.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;
7 |
8 | namespace Grabacr07.KanColleWrapper
9 | {
10 | public static class Extensions
11 | {
12 | ///
13 | /// コレクションを展開し、メンバーの文字列表現を指定した区切り文字で連結した文字列を返します。
14 | ///
15 | /// コレクションに含まれる任意の型。
16 | /// 対象のコレクション。
17 | /// セパレーターとして使用する文字列。
18 | /// コレクションの文字列表現を展開し、指定したセパレーターで連結した文字列。
19 | public static string ToString(this IEnumerable source, string separator)
20 | {
21 | return string.Join(separator, source);
22 | }
23 |
24 | ///
25 | /// シーケンスが null でなく、1 つ以上の要素を含んでいるかどうかを確認します。
26 | ///
27 | public static bool HasItems(this IEnumerable source)
28 | {
29 | return source != null && source.Any();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/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/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/Master.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 Grabacr07.KanColleWrapper.Internal;
7 | using Grabacr07.KanColleWrapper.Models;
8 | using Grabacr07.KanColleWrapper.Models.Raw;
9 |
10 | namespace Grabacr07.KanColleWrapper
11 | {
12 | ///
13 | /// プレイヤー データに依存しないマスター情報を表します。
14 | ///
15 | public class Master
16 | {
17 | ///
18 | /// すべての艦娘の定義を取得します。
19 | ///
20 | public MasterTable Ships { get; private set; }
21 |
22 | ///
23 | /// すべての装備アイテムの定義を取得します。
24 | ///
25 | public MasterTable SlotItems { get; private set; }
26 |
27 | ///
28 | /// すべての消費アイテムの定義を取得します。
29 | ///
30 | public MasterTable UseItems { get; private set; }
31 |
32 | ///
33 | /// 艦種を取得します。
34 | ///
35 | public MasterTable ShipTypes { get; private set; }
36 |
37 |
38 | internal Master(kcsapi_start2 start2)
39 | {
40 | this.ShipTypes = new MasterTable(start2.api_mst_stype.Select(x => new ShipType(x)));
41 | this.Ships = new MasterTable(start2.api_mst_ship.Select(x => new ShipInfo(x)));
42 | this.SlotItems = new MasterTable(start2.api_mst_slotitem.Select(x => new SlotItemInfo(x)));
43 | this.UseItems = new MasterTable(start2.api_mst_useitem.Select(x => new UseItemInfo(x)));
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/MasterTable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Grabacr07.KanColleWrapper.Models;
7 |
8 | namespace Grabacr07.KanColleWrapper
9 | {
10 | ///
11 | /// 整数値の ID をキーとして使用する、艦これマスター データ用のテーブルを定義します。
12 | ///
13 | /// マスター データの型。
14 | public class MasterTable : IReadOnlyDictionary where TValue : class, IIdentifiable
15 | {
16 | private readonly IDictionary dictionary;
17 |
18 | ///
19 | /// テーブルから指定した ID の要素を取得します。ID が存在しない場合は null を返します。
20 | ///
21 | public TValue this[int key]
22 | {
23 | get { return this.dictionary.ContainsKey(key) ? this.dictionary[key] : null; }
24 | }
25 |
26 |
27 | public MasterTable() : this(new List()) { }
28 |
29 | public MasterTable(IEnumerable source)
30 | {
31 | this.dictionary = source.ToDictionary(x => x.Id);
32 | }
33 |
34 | #region IReadOnlyDictionary members
35 |
36 | public IEnumerator> GetEnumerator()
37 | {
38 | return this.dictionary.GetEnumerator();
39 | }
40 |
41 | IEnumerator IEnumerable.GetEnumerator()
42 | {
43 | return GetEnumerator();
44 | }
45 |
46 | public int Count
47 | {
48 | get { return this.dictionary.Count; }
49 | }
50 |
51 | public bool ContainsKey(int key)
52 | {
53 | return this.dictionary.ContainsKey(key);
54 | }
55 |
56 | public bool TryGetValue(int key, out TValue value)
57 | {
58 | return this.dictionary.TryGetValue(key, out value);
59 | }
60 |
61 | public IEnumerable Keys
62 | {
63 | get { return this.dictionary.Keys; }
64 | }
65 |
66 | public IEnumerable Values
67 | {
68 | get { return this.dictionary.Values; }
69 | }
70 |
71 | #endregion
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/MemberTable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Grabacr07.KanColleWrapper.Models;
8 | using Livet;
9 |
10 | namespace Grabacr07.KanColleWrapper
11 | {
12 | ///
13 | /// 整数値の ID をキーとして使用する、艦これユーザー データ用のテーブルを定義します。
14 | ///
15 | /// ユーザー データの型。
16 | public class MemberTable : IReadOnlyDictionary where TValue : class, IIdentifiable
17 | {
18 | private IDictionary dictionary;
19 |
20 | ///
21 | /// テーブルから指定した ID の要素を取得します。ID が存在しない場合は null を返します。
22 | ///
23 | public TValue this[int key]
24 | {
25 | get { return this.dictionary.ContainsKey(key) ? this.dictionary[key] : null; }
26 | }
27 |
28 |
29 | public MemberTable() : this(new List()) { }
30 |
31 | public MemberTable(IEnumerable source)
32 | {
33 | this.dictionary = source.ToDictionary(x => x.Id);
34 | }
35 |
36 | public void Add(int Key, TValue Value)
37 | {
38 | this.dictionary.Add(Key, Value);
39 | }
40 |
41 | #region IReadOnlyDictionary members
42 |
43 | public IEnumerator> GetEnumerator()
44 | {
45 | return this.dictionary.GetEnumerator();
46 | }
47 |
48 | IEnumerator IEnumerable.GetEnumerator()
49 | {
50 | return GetEnumerator();
51 | }
52 |
53 | public int Count
54 | {
55 | get { return this.dictionary.Count; }
56 | }
57 |
58 | public bool ContainsKey(int key)
59 | {
60 | return this.dictionary.ContainsKey(key);
61 | }
62 |
63 | public bool TryGetValue(int key, out TValue value)
64 | {
65 | return this.dictionary.TryGetValue(key, out value);
66 | }
67 |
68 | public IEnumerable Keys
69 | {
70 | get { return this.dictionary.Keys; }
71 | }
72 |
73 | public IEnumerable Values
74 | {
75 | get { return this.dictionary.Values; }
76 | }
77 |
78 | #endregion
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/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/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/CanReSortieReason.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 | [Flags]
13 | public enum CanReSortieReason
14 | {
15 | ///
16 | /// 再出撃に際して問題がないことを表します。
17 | ///
18 | NoProblem = 0,
19 |
20 | ///
21 | /// 艦隊にダメージを受けている艦娘がいることを表します。
22 | ///
23 | Wounded = 0x1,
24 |
25 | ///
26 | /// 艦隊に資源が不十分な艦娘がいることを表します。
27 | ///
28 | LackForResources = 0x2,
29 |
30 | ///
31 | /// 艦隊に疲労している艦娘がいることを表します。
32 | ///
33 | BadCondition = 0x4,
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/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/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/FleetState.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 FleetState
10 | {
11 | Empty,
12 |
13 | ///
14 | /// 出撃準備ができています。
15 | ///
16 | Ready,
17 |
18 | ///
19 | /// 艦隊は遠征中です。
20 | ///
21 | Expedition,
22 |
23 | ///
24 | /// 艦隊に入渠中の艦娘がいます。
25 | ///
26 | Repairing,
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/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/LimitedValue.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 struct LimitedValue
13 | {
14 | ///
15 | /// 現在値を取得します。
16 | ///
17 | public int Current { get; private set; }
18 |
19 | ///
20 | /// 最大値を取得します。
21 | ///
22 | public int Maximum { get; private set; }
23 |
24 | ///
25 | /// 最小値を取得します。
26 | ///
27 | public int Minimum { get; private set; }
28 |
29 | public LimitedValue(int current, int maximum, int minimum)
30 | : this()
31 | {
32 | this.Current = current;
33 | this.Maximum = maximum;
34 | this.Minimum = minimum;
35 | }
36 |
37 | public LimitedValue Update(int current)
38 | {
39 | return new LimitedValue(current, this.Maximum, this.Minimum);
40 | }
41 | }
42 |
43 | ///
44 | /// 上限のある値を表します。
45 | ///
46 | public struct LimitedValue where T : struct
47 | {
48 | ///
49 | /// 現在値を取得します。
50 | ///
51 | public T Current { get; private set; }
52 |
53 | ///
54 | /// 最大値を取得します。
55 | ///
56 | public T Maximum { get; private set; }
57 |
58 | ///
59 | /// 最小値を取得します。
60 | ///
61 | public T Minimum { get; private set; }
62 |
63 | public LimitedValue(T current, T maximum, T minimum)
64 | : this()
65 | {
66 | this.Current = current;
67 | this.Maximum = maximum;
68 | this.Minimum = minimum;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/ModernizableStatus.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 struct ModernizableStatus
13 | {
14 | ///
15 | /// 艦娘ごとに定義されたステータスの最大値を取得します。
16 | ///
17 | public int Max { get; internal set; }
18 |
19 | ///
20 | /// 艦娘ごとに定義されたステータスの初期値を取得します。
21 | ///
22 | public int Default { get; internal set; }
23 |
24 | ///
25 | /// 近代化改修による現在の上昇値を取得します。
26 | ///
27 | public int Upgraded { get; internal set; }
28 |
29 | ///
30 | /// 近代化改修によって上昇した分を含む現在のステータス値を取得します。
31 | ///
32 | public int Current
33 | {
34 | get { return this.Default + this.Upgraded; }
35 | }
36 |
37 | ///
38 | /// このステータスが上限に達するのに必要な値を取得します。
39 | ///
40 | public int Shortfall
41 | {
42 | get { return this.Max - this.Current; }
43 | }
44 |
45 | ///
46 | /// このステータスが上限に達しているかどうかを示す値を取得します。
47 | ///
48 | public bool IsMax
49 | {
50 | get { return this.Max <= this.Current; }
51 | }
52 |
53 |
54 | internal ModernizableStatus(int[] status, int upgraded)
55 | : this()
56 | {
57 | if (status.Length == 2)
58 | {
59 | this.Default = status[0];
60 | this.Max = status[1];
61 | }
62 |
63 | this.Upgraded = upgraded;
64 | }
65 |
66 | public override string ToString()
67 | {
68 | return string.Format("Status = {0}->{1}, Current = {2}{3}", this.Default, this.Max, this.Current, this.IsMax ? "(max)" : "");
69 | }
70 |
71 |
72 | #region static members
73 |
74 | private static readonly ModernizableStatus dummy = new ModernizableStatus(new[] { -1, -1 }, 0);
75 |
76 | public static ModernizableStatus Dummy
77 | {
78 | get { return dummy; }
79 | }
80 |
81 | #endregion
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/Quest.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 Quest : RawDataWrapper, IIdentifiable
11 | {
12 | public int Id
13 | {
14 | get { return this.RawData.api_no; }
15 | }
16 |
17 | ///
18 | /// 任務のカテゴリ (編成、出撃、演習 など) を取得します。
19 | ///
20 | public QuestCategory Category
21 | {
22 | get { return (QuestCategory)this.RawData.api_category; }
23 | }
24 |
25 | ///
26 | /// 任務の種類 (1 回のみ、デイリー、ウィークリー) を取得します。
27 | ///
28 | public QuestType Type
29 | {
30 | get { return (QuestType)this.RawData.api_type; }
31 | }
32 |
33 | ///
34 | /// 任務の状態を取得します。
35 | ///
36 | public QuestState State
37 | {
38 | get { return (QuestState)this.RawData.api_state; }
39 | }
40 |
41 | ///
42 | /// 任務の進捗状況を取得します。
43 | ///
44 | public QuestProgress Progress
45 | {
46 | get { return (QuestProgress)this.RawData.api_progress_flag; }
47 | }
48 |
49 | ///
50 | /// 任務名を取得します。
51 | ///
52 | public string Title
53 | {
54 | get
55 | {
56 | return KanColleClient.Current.Translations.GetTranslation(RawData.api_title, TranslationType.QuestTitle, this.RawData);
57 | }
58 | }
59 |
60 | ///
61 | /// 任務の詳細を取得します。
62 | ///
63 | public string Detail
64 | {
65 | get
66 | {
67 | return KanColleClient.Current.Translations.GetTranslation(RawData.api_detail, TranslationType.QuestDetail, this.RawData);
68 | }
69 | }
70 |
71 |
72 | public Quest(kcsapi_quest rawData) : base(rawData) { }
73 |
74 |
75 | public override string ToString()
76 | {
77 | return string.Format("ID = {0}, Category = {1}, Title = \"{2}\", Type = {3}, State = {4}", this.Id, this.Category, this.Title, this.Type, this.State);
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.Id, this.NickName);
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_basic.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_basic
10 | {
11 | public string api_member_id { get; set; }
12 | public string api_nickname { get; set; }
13 | public string api_nickname_id { get; set; }
14 | public int api_active_flag { get; set; }
15 | public long api_starttime { get; set; }
16 | public int api_level { get; set; }
17 | public int api_rank { get; set; }
18 | public int api_experience { get; set; }
19 | public object api_fleetname { get; set; }
20 | public string api_comment { get; set; }
21 | public string api_comment_id { get; set; }
22 | public int api_max_chara { get; set; }
23 | public int api_max_slotitem { get; set; }
24 | public int api_max_kagu { get; set; }
25 | public int api_playtime { get; set; }
26 | public int api_tutorial { get; set; }
27 | public int[] api_furniture { get; set; }
28 | public int api_count_deck { get; set; }
29 | public int api_count_kdock { get; set; }
30 | public int api_count_ndock { get; set; }
31 | public int api_fcoin { get; set; }
32 | public int api_st_win { get; set; }
33 | public int api_st_lose { get; set; }
34 | public int api_ms_count { get; set; }
35 | public int api_ms_success { get; set; }
36 | public int api_pt_win { get; set; }
37 | public int api_pt_lose { get; set; }
38 | public int api_pt_challenged { get; set; }
39 | public int api_pt_challenged_win { get; set; }
40 | public int api_firstflag { get; set; }
41 | public int api_tutorial_progress { get; set; }
42 | public int[] api_pvp { get; set; }
43 | }
44 | // ReSharper restore InconsistentNaming
45 | }
46 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_battleresult.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_battleresult
11 | {
12 | public string api_win_rank { get; set; }
13 | public string api_quest_name { get; set; }
14 | public int api_quest_level { get; set; }
15 | public kcsapi_enemyinfo api_enemy_info { get; set; }
16 | public kcsapi_getship2 api_get_ship { get; set; }
17 | }
18 |
19 | public class kcsapi_getship2
20 | {
21 | public int api_ship_id { get; set; }
22 | public string api_ship_name { get; set; }
23 | }
24 |
25 | public class kcsapi_enemyinfo
26 | {
27 | public string api_deck_name { get; set; }
28 | }
29 | // ReSharper restore InconsistentNaming
30 | }
--------------------------------------------------------------------------------
/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_create_flag { get; set; }
13 | public int api_shizai_flag { get; set; }
14 | public kcsapi_slotitem api_slot_item { get; set; }
15 | public int[] api_material { get; set; }
16 | public int api_type3 { get; set; }
17 | public int[] api_unsetslot { get; set; }
18 | }
19 | // ReSharper restore InconsistentNaming
20 | }
--------------------------------------------------------------------------------
/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_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_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_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_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_ship2.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 kcsapi_ship2
9 | {
10 | public int api_id { get; set; }
11 | public int api_sortno { get; set; }
12 | public int api_ship_id { get; set; }
13 | public int api_lv { get; set; }
14 | public int[] api_exp { get; set; }
15 | public int api_nowhp { get; set; }
16 | public int api_maxhp { get; set; }
17 | public int api_leng { get; set; }
18 | public int[] api_slot { get; set; }
19 | public int[] api_onslot { get; set; }
20 | public int[] api_kyouka { get; set; }
21 | public int api_backs { get; set; }
22 | public int api_fuel { get; set; }
23 | public int api_bull { get; set; }
24 | public int api_slotnum { get; set; }
25 | public long api_ndock_time { get; set; }
26 | public int[] api_ndock_item { get; set; }
27 | public int api_srate { get; set; }
28 | public int api_cond { get; set; }
29 | public int[] api_karyoku { get; set; }
30 | public int[] api_raisou { get; set; }
31 | public int[] api_taiku { get; set; }
32 | public int[] api_soukou { get; set; }
33 | public int[] api_kaihi { get; set; }
34 | public int[] api_taisen { get; set; }
35 | public int[] api_sakuteki { get; set; }
36 | public int[] api_lucky { get; set; }
37 | public int api_locked { get; set; }
38 | }
39 | // ReSharper restore InconsistentNaming
40 | }
41 |
--------------------------------------------------------------------------------
/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_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.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Grabacr07.KanColleWrapper.Models.Raw
8 | {
9 | // ReSharper disable InconsistentNaming
10 | public class kcsapi_slotitem
11 | {
12 | public int api_id { get; set; }
13 | public int api_slotitem_id { get; set; }
14 | }
15 | // ReSharper restore InconsistentNaming
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 | public RepairingCompletedEventArgs(int id)
17 | {
18 | this.DockId = id;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/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/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
25 | {
26 | return KanColleClient.Current.Translations.GetTranslation(RawData.api_name, TranslationType.ShipTypes, this.RawData, this.Id);
27 | }
28 | }
29 |
30 | public int SortNumber
31 | {
32 | get { return this.RawData.api_sortno; }
33 | }
34 |
35 | public double RepairMultiplier
36 | {
37 | get
38 | {
39 | switch ((ShipTypeId)this.Id)
40 | {
41 | case ShipTypeId.Submarine:
42 | return 0.5;
43 | case ShipTypeId.HeavyCruiser:
44 | case ShipTypeId.RepairShip:
45 | case ShipTypeId.FastBattleship:
46 | case ShipTypeId.LightAircraftCarrier:
47 | return 1.5;
48 | case ShipTypeId.Battleship:
49 | case ShipTypeId.Superdreadnought:
50 | case ShipTypeId.AerialBattleship:
51 | case ShipTypeId.AircraftCarrier:
52 | case ShipTypeId.ArmoredAircraftCarrier:
53 | return 2;
54 | default:
55 | return 1;
56 | }
57 | }
58 | }
59 |
60 | public ShipType(kcsapi_mst_stype rawData) : base(rawData) { }
61 |
62 | public override string ToString()
63 | {
64 | return string.Format("ID = {0}, Name = \"{1}\"", this.Id, this.Name);
65 | }
66 |
67 | #region static members
68 |
69 | private static readonly ShipType dummy = new ShipType(new kcsapi_mst_stype
70 | {
71 | api_id = 999,
72 | api_sortno = 999,
73 | api_name = "不審船",
74 | });
75 |
76 | public static ShipType Dummy
77 | {
78 | get { return dummy; }
79 | }
80 |
81 | #endregion
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/ShipTypeId.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 ShipTypeId
10 | {
11 | Unknown = 0,
12 |
13 | ///
14 | /// 海防艦。
15 | ///
16 | EscortShip = 1,
17 |
18 | ///
19 | /// 駆逐艦。
20 | ///
21 | Destroyer = 2,
22 |
23 | ///
24 | /// 軽巡洋艦。
25 | ///
26 | LightCruiser = 3,
27 |
28 | ///
29 | /// 重雷装巡洋艦。
30 | ///
31 | TorpedoCruiser = 4,
32 |
33 | ///
34 | /// 重巡洋艦。
35 | ///
36 | HeavyCruiser = 5,
37 |
38 | ///
39 | /// 航空巡洋艦。
40 | ///
41 | AerialCruiser = 6,
42 |
43 | ///
44 | /// 軽空母。
45 | ///
46 | LightAircraftCarrier = 7,
47 |
48 | ///
49 | /// 高速戦艦。
50 | ///
51 | FastBattleship = 8,
52 |
53 | ///
54 | /// 戦艦。
55 | ///
56 | Battleship = 9,
57 |
58 | ///
59 | /// 航空戦艦。
60 | ///
61 | AerialBattleship = 10,
62 |
63 | ///
64 | /// 正規空母。
65 | ///
66 | AircraftCarrier = 11,
67 |
68 | ///
69 | /// 超弩級戦艦。
70 | ///
71 | Superdreadnought = 12,
72 |
73 | ///
74 | /// 潜水艦。
75 | ///
76 | Submarine = 13,
77 |
78 | ///
79 | /// 潜水空母。
80 | ///
81 | AircraftCarryingSubmarine = 14,
82 |
83 | ///
84 | /// 補給艦。
85 | ///
86 | ReplenishmentOiler = 15,
87 |
88 | ///
89 | /// 水上機母艦。
90 | ///
91 | SeaplaneCarrier = 16,
92 |
93 | ///
94 | /// 揚陸艦
95 | ///
96 | AmphibiousAssault = 17,
97 |
98 | ///
99 | /// 装甲空母
100 | ///
101 | ArmoredAircraftCarrier = 18,
102 |
103 | ///
104 | /// 工作艦
105 | ///
106 | RepairShip = 19
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/SlotItem.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 | public class SlotItem : RawDataWrapper, IIdentifiable
12 | {
13 | public int Id
14 | {
15 | get { return this.RawData.api_id; }
16 | }
17 |
18 | public SlotItemInfo Info { get; private set; }
19 |
20 | internal SlotItem(kcsapi_slotitem rawData) : base(rawData)
21 | {
22 | this.Info = KanColleClient.Current.Master.SlotItems[this.RawData.api_slotitem_id] ?? SlotItemInfo.Dummy;
23 | }
24 |
25 | public override string ToString()
26 | {
27 | return string.Format("ID = {0}, Name = \"{1}\"", this.Id, this.Info.Name);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/Speed.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 Speed
13 | {
14 | ///
15 | /// 低速。
16 | ///
17 | Low = 0,
18 |
19 | ///
20 | /// 高速。
21 | ///
22 | Fast = 1,
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Grabacr07.KanColleWrapper/Models/TranslationType.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 TranslationType
10 | {
11 | ///
12 | /// Application Translation... Not really. Used for updates.
13 | ///
14 | App = 0,
15 |
16 | ///
17 | /// Equipment translation list
18 | ///
19 | Equipment = 1,
20 |
21 | ///
22 | /// Map and enemy fleet translation lists
23 | ///
24 | Operations = 2,
25 |
26 | ///
27 | /// Quest translation list
28 | ///
29 | Quests = 3,
30 |
31 | ///
32 | /// Ship name translation list
33 | ///
34 | Ships = 4,
35 |
36 | ///
37 | /// Ship type translation list
38 | ///
39 | ShipTypes = 5,
40 |
41 | ///
42 | /// Operation map translations only
43 | ///
44 | OperationMaps = 6,
45 |
46 | ///
47 | /// Operation enemy fleet translations only
48 | ///
49 | OperationSortie = 7,
50 |
51 | ///
52 | /// Quest detail translations only
53 | ///
54 | QuestDetail = 8,
55 |
56 | ///
57 | /// Quest title translations only
58 | ///
59 | QuestTitle = 9
60 | }
61 | }
--------------------------------------------------------------------------------
/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 © 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/TimerNotificator.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 TimerNotificator : NotificationObject, IDisposable
17 | {
18 | #region static members
19 |
20 | private static readonly IConnectableObservable timer;
21 |
22 | static TimerNotificator()
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 TimerNotificator()
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/assemblies/FiddlerCore4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/Grabacr07.KanColleWrapper/assemblies/FiddlerCore4.dll
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/assemblies/CoreAudioApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/assemblies/CoreAudioApi.dll
--------------------------------------------------------------------------------
/assemblies/MetroRadiance.Chrome.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/assemblies/MetroRadiance.Chrome.dll
--------------------------------------------------------------------------------
/assemblies/MetroRadiance.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/assemblies/MetroRadiance.Core.dll
--------------------------------------------------------------------------------
/assemblies/MetroRadiance.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/assemblies/MetroRadiance.dll
--------------------------------------------------------------------------------
/assemblies/Portable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/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 | 2.6.0.461
6 | https://github.com/Zharay/KanColleViewer/releases/tag/v2.6.0r461
7 |
8 | -
9 | Equipment
10 | 1.0.2
11 | https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Equipment.xml
12 |
13 | -
14 | Operations
15 | 1.0.3
16 | https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Operations.xml
17 |
18 | -
19 | Quests
20 | 1.0.1
21 | https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Quests.xml
22 |
23 | -
24 | Ships
25 | 1.0.4
26 | https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/Ships.xml
27 |
28 | -
29 | ShipTypes
30 | 1.0.3
31 | https://raw.github.com/Zharay/KanColleViewer/master/resources/translations/ShipTypes.xml
32 |
33 |
34 |
--------------------------------------------------------------------------------
/resources/icons/application/128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/128.png
--------------------------------------------------------------------------------
/resources/icons/application/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/16.png
--------------------------------------------------------------------------------
/resources/icons/application/20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/20.png
--------------------------------------------------------------------------------
/resources/icons/application/24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/24.png
--------------------------------------------------------------------------------
/resources/icons/application/256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/256.png
--------------------------------------------------------------------------------
/resources/icons/application/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/32.png
--------------------------------------------------------------------------------
/resources/icons/application/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/40.png
--------------------------------------------------------------------------------
/resources/icons/application/48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/48.png
--------------------------------------------------------------------------------
/resources/icons/application/64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/64.png
--------------------------------------------------------------------------------
/resources/icons/application/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/app.ico
--------------------------------------------------------------------------------
/resources/icons/application/data/icon-app.ai:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/data/icon-app.ai
--------------------------------------------------------------------------------
/resources/icons/application/data/icon-app.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/resources/icons/application/data/icon-app.psd
--------------------------------------------------------------------------------
/resources/translations/ShipTypes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 海防艦
6 | DE
7 |
8 |
9 | 2
10 | 駆逐艦
11 | DD
12 |
13 |
14 | 3
15 | 軽巡洋艦
16 | CL
17 |
18 |
19 | 4
20 | 重雷装巡洋艦
21 | CLT
22 |
23 |
24 | 5
25 | 重巡洋艦
26 | CA
27 |
28 |
29 | 6
30 | 航空巡洋艦
31 | CAV
32 |
33 |
34 | 7
35 | 軽空母
36 | CVL
37 |
38 |
39 | 9
40 | 戦艦
41 | BB
42 |
43 |
44 | 8
45 | 戦艦
46 | Fast BB
47 |
48 |
49 | 10
50 | 航空戦艦
51 | BBV
52 |
53 |
54 | 11
55 | 正規空母
56 | CV
57 |
58 |
59 | 12
60 | 超弩級戦艦
61 | B
62 |
63 |
64 | 13
65 | 潜水艦
66 | SS
67 |
68 |
69 | 14
70 | 潜水空母
71 | SSV
72 |
73 |
74 | 15
75 | 補給艦
76 | AE
77 |
78 |
79 | 16
80 | 水上機母艦
81 | AV
82 |
83 |
84 | 17
85 | 揚陸艦
86 | LSD
87 |
88 |
89 | 18
90 | 装甲空母
91 | CVB
92 |
93 |
94 | 19
95 | 工作艦
96 | AR
97 |
98 |
--------------------------------------------------------------------------------
/resources/translations/ko-KR/ShipTypes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 海防艦
6 | DE
7 |
8 |
9 | 2
10 | 駆逐艦
11 | DD
12 |
13 |
14 | 3
15 | 軽巡洋艦
16 | CL
17 |
18 |
19 | 4
20 | 重雷装巡洋艦
21 | CLT
22 |
23 |
24 | 5
25 | 重巡洋艦
26 | CA
27 |
28 |
29 | 6
30 | 航空巡洋艦
31 | CAV
32 |
33 |
34 | 7
35 | 軽空母
36 | CVL
37 |
38 |
39 | 9
40 | 戦艦
41 | BB
42 |
43 |
44 | 8
45 | 戦艦
46 | Fast BB
47 |
48 |
49 | 10
50 | 航空戦艦
51 | BBV
52 |
53 |
54 | 11
55 | 正規空母
56 | CV
57 |
58 |
59 | 12
60 | 超弩級戦艦
61 | B
62 |
63 |
64 | 13
65 | 潜水艦
66 | SS
67 |
68 |
69 | 14
70 | 潜水空母
71 | SSV
72 |
73 |
74 | 15
75 | 補給艦
76 | AE
77 |
78 |
79 | 16
80 | 水上機母艦
81 | AV
82 |
83 |
84 | 17
85 | 揚陸艦
86 | LSD
87 |
88 |
89 | 18
90 | 装甲空母
91 | CVB
92 |
93 |
94 | 19
95 | 工作艦
96 | AR
97 |
98 |
--------------------------------------------------------------------------------
/resources/translations/zh-CN/ShipTypes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 海防艦
6 | DE
7 |
8 |
9 | 2
10 | 駆逐艦
11 | DD
12 |
13 |
14 | 3
15 | 軽巡洋艦
16 | CL
17 |
18 |
19 | 4
20 | 重雷装巡洋艦
21 | CLT
22 |
23 |
24 | 5
25 | 重巡洋艦
26 | CA
27 |
28 |
29 | 6
30 | 航空巡洋艦
31 | CAV
32 |
33 |
34 | 7
35 | 軽空母
36 | CVL
37 |
38 |
39 | 9
40 | 戦艦
41 | BB
42 |
43 |
44 | 8
45 | 戦艦
46 | Fast BB
47 |
48 |
49 | 10
50 | 航空戦艦
51 | BBV
52 |
53 |
54 | 11
55 | 正規空母
56 | CV
57 |
58 |
59 | 12
60 | 超弩級戦艦
61 | B
62 |
63 |
64 | 13
65 | 潜水艦
66 | SS
67 |
68 |
69 | 14
70 | 潜水空母
71 | SSV
72 |
73 |
74 | 15
75 | 補給艦
76 | AE
77 |
78 |
79 | 16
80 | 水上機母艦
81 | AV
82 |
83 |
84 | 17
85 | 揚陸艦
86 | LSD
87 |
88 |
89 | 18
90 | 装甲空母
91 | CVB
92 |
93 |
94 | 19
95 | 工作艦
96 | AR
97 |
98 |
--------------------------------------------------------------------------------
/tools/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tools/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Zharay/KanColleViewer/faeadfc93b10b689f2562e5cc8999f2c0ad6fd16/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:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
29 |
31 |
32 |
33 |
36 |
38 |
43 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/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 | var obj = DynamicJson.Parse(target);
32 | }
33 | // ↖ ここにブレークポイントを仕掛けよう
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tools/Grabacr07.Tools.JsonViewer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
8 | // アセンブリに関連付けられている情報を変更するには、
9 | // これらの属性値を変更してください。
10 | [assembly: AssemblyTitle("JsonViewer")]
11 | [assembly: AssemblyDescription("JsonViewer")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("grabacr.net")]
14 | [assembly: AssemblyProduct("KanColleViewer")]
15 | [assembly: AssemblyCopyright("Copyright © 2013 Grabacr07")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
20 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
21 | // その型の ComVisible 属性を true に設定してください。
22 | [assembly: ComVisible(false)]
23 |
24 | //ローカライズ可能なアプリケーションのビルドを開始するには、
25 | //.csproj ファイルの CultureYouAreCodingWith を
26 | // 内部で設定します。たとえば、
27 | //ソース ファイルで英語を使用している場合、 を en-US に設定します。次に、
28 | //下の NeutralResourceLanguage 属性のコメントを解除します。下の行の "en-US" を
29 | //プロジェクト ファイルの UICulture 設定と一致するよう更新します。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //テーマ固有のリソース ディクショナリが置かれている場所
36 | //(リソースがページ、
37 | //またはアプリケーション リソース ディクショナリに見つからない場合に使用されます)
38 | ResourceDictionaryLocation.SourceAssembly //汎用リソース ディクショナリが置かれている場所
39 | //(リソースがページ、
40 | //アプリケーション、またはいずれのテーマ固有のリソース ディクショナリにも見つからない場合に使用されます)
41 | )]
42 |
43 |
44 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
52 | // 既定値にすることができます:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/tools/Grabacr07.Tools.JsonViewer/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tools/KanColleViewerTools.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.30110.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonViewer", "Grabacr07.Tools.JsonViewer\JsonViewer.csproj", "{577D509B-7B87-42B9-8806-5081EC05F6E6}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{A3DE7091-1B1D-47EF-BC0C-E8A0879F4A8C}"
9 | ProjectSection(SolutionItems) = preProject
10 | .nuget\NuGet.Config = .nuget\NuGet.Config
11 | .nuget\NuGet.exe = .nuget\NuGet.exe
12 | .nuget\NuGet.targets = .nuget\NuGet.targets
13 | EndProjectSection
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Release|Any CPU = Release|Any CPU
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {577D509B-7B87-42B9-8806-5081EC05F6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {577D509B-7B87-42B9-8806-5081EC05F6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {577D509B-7B87-42B9-8806-5081EC05F6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {577D509B-7B87-42B9-8806-5081EC05F6E6}.Release|Any CPU.Build.0 = Release|Any CPU
25 | EndGlobalSection
26 | GlobalSection(SolutionProperties) = preSolution
27 | HideSolutionNode = FALSE
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------