{"id":6375,"date":"2014-10-02T08:46:07","date_gmt":"2014-10-01T23:46:07","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=6375"},"modified":"2014-09-30T22:47:02","modified_gmt":"2014-09-30T13:47:02","slug":"winrt-%e3%83%87%e3%82%b9%e3%82%af%e3%83%88%e3%83%83%e3%83%97%e3%82%a2%e3%83%97%e3%83%aa%e3%81%8b%e3%82%89%e3%82%b9%e3%83%88%e3%82%a2%e3%83%97%e3%83%aa%e3%81%b8%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/6375","title":{"rendered":"[WinRT] \u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u304b\u3089\u30b9\u30c8\u30a2\u30d7\u30ea\u3078\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3092\u901a\u3058\u3066\u9023\u643a\u3055\u305b\u308b"},"content":{"rendered":"<p>Kindle Launcher \u30cd\u30bf\u306e\u7d9a\u304d\u3067\u3059\u3002<\/p>\n<p>Windows \u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u3068\u304d\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u300c\u4f01\u696d\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u306b\u3057\u3066\u304a\u304f\u3068\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u3082\u30b9\u30c8\u30a2\u306b\u7d39\u4ecb\u3092\u8f09\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u5e74\u95939.800\u5186\u4e5f\u3092\u652f\u6255\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3044\u3084\u3044\u3084\u307b\u3068\u3093\u3069\u4f7f\u308f\u306a\u3044\u3057\u3084\u3081\u3088\u3046\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u3001\u3064\u3044\u5148\u65e5\u7121\u6599\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u306a\u306e\u3067\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u81ea\u4f53\u306f\u653e\u3063\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u3061\u306a\u307f\u306b\u4eca\u3001\u51fa\u3057\u3066\u3044\u308b moonmile solutions \u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u300c\u500b\u4eba\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u306a\u306e\u3067\u3059\u3002\u4f01\u696d\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u5834\u5408\u3001\u8af8\u3005\u306e\u5be9\u67fb\u304c\u3042\u3063\u3066\u30d6\u30e9\u30f3\u30c9\u540d\u3092\u5909\u3048\u3089\u308c\u306a\u3044\u306e\u3067\u3001\u3053\u3063\u3061\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u3042\u3001\u500b\u4eba\u4e0a\u884c\u4e3b\u306e\u5c4b\u53f7\u3092\u5909\u3048\u308c\u3070\u3044\u3044\u3060\u3051\u306a\u3093\u3067\u3059\u3051\u3069\u306d\u3002<\/p>\n<p>\u30b9\u30c8\u30a2\u30d7\u30ea\u304b\u3089\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3092\u6271\u3048\u306a\u304f\u3066\u3001\u9006\u306b\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u304b\u3089\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3078\u306e\u901a\u77e5\u306f\u3069\u3046\u3084\u308b\u306e\u304b\uff1f\u3068\u3044\u3046\u554f\u984c\u304c\u8af8\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u3072\u3068\u3064\u306f\u300c\u30d7\u30ed\u30c8\u30b3\u30eb\u300d\u3092\u901a\u3058\u3066\u9001\u308b\u65b9\u6cd5\u3067\u3059\u3002\u5e78\u3044\u306b\u3057\u3066\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e\u307b\u3046\u306f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u624b\u8efd\u306b\u767b\u9332\u3059\u308b\u306e\u3067\u3001\u30a2\u30d7\u30ea\u7279\u6709\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u304b\u3089\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u547c\u3073\u51fa\u305b\u3070\u826f\u3044\u306e\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u308c\u306e\u5834\u5408\u306f\u3001\u3044\u3061\u3044\u3061\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3082\u3046\u3072\u3068\u3064\u306e\u65b9\u6cd5\u306f\u3001\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u300d\u306b\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u304b\u3089\u76f4\u63a5\u66f8\u304d\u8fbc\u3093\u3067\u3057\u307e\u3046\u3053\u3068\u3067\u3059\u3002\u3042\u307e\u308a\u898b\u304b\u3051\u306a\u3044\u65b9\u6cd5\uff08\u63a8\u5968\u3055\u308c\u306a\u3044\u65b9\u6cd5\uff1f\uff09\u306a\u306e\u3067\u3059\u304c\u3001\u30ed\u30fc\u30df\u30f3\u30b0\u81ea\u4f53\u306f OS \u304b\u3089\u305d\u3046\u3044\u3046\u624b\u6bb5\u3092\u53d6\u3063\u3066\u3044\u308b\u3057\u3001\u30a2\u30d7\u30eaID \u81ea\u4f53\u306f\u56fa\u6709\u3067\u4f5c\u3089\u308c\u308b\uff08\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u3066\u3082\u5909\u308f\u3089\u306a\u3044\uff09\u306e\u3067\u3053\u308c\u3092\u4f7f\u3046\u306e\u304c\u624b\u8efd\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>\u25a0\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30d5\u30a1\u30df\u30ea\u540d<\/h2>\n<p>Package.appxmanifest \u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u300c\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u300d\u30bf\u30d6\u3092\u8868\u793a\u3055\u305b\u308b\u3068\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30d5\u30a1\u30df\u30ea\u540d\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/09\/wpid-dworkblogimage20140930_08org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/09\/wpid-dworkblogimage20140930_08thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u306b\u4f7f\u308f\u308c\u308b\u30ad\u30fc\u3067\u3001\u30a2\u30d7\u30ea\u3067\u4f7f\u3046\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u306e\u4f4d\u7f6e\u306b\u3082\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e\u30c7\u30fc\u30bf\u306f\u3001<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nC:UsersmasudaAppDataLocalPackages37659MoonmileSolutions.KindleLauncher_fjkmb51crq5v0\r\n<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3001\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e AppData \u306b\u4e0b\u306b\u4f5c\u3089\u308c\u308b\u306e\u3067\u3001\u3053\u3053\u306b\u76f4\u63a5\u66f8\u304d\u8fbc\u3093\u3067\u3057\u307e\u3044\u307e\u3059\u3002Kindle Launcher \u306f\u3001\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u306e LocalState \u306b\u66f8\u7c4d\u306e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u8cfc\u5165\u4e00\u89a7\u306e\u30c4\u30fc\u30eb\u306e\u30c4\u30fc\u30eb\u306f MyBookshelf.xml \u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306f Kindle Launcher \u304c\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u9650\u308a\u540c\u3058\u3082\u306e\u304c\u4f7f\u308f\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4ed6\u306b\u3082\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30af\u30bb\u30b9\u6a29\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u4e0b\u306b\u3042\u308b\u306e\u3067\u3001\u3044\u304f\u3089\u3067\u3082\u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u3067\u3059\u306d\u3002\u4ed6\u306e\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002RoamingState \u30d5\u30a9\u30eb\u30c0\u306b\u66f8\u304d\u8fbc\u3080\u3068\u3001\u81ea\u52d5\u7684\u306b\u30ed\u30fc\u30df\u30f3\u30b0\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u9069\u5f53\u306a\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u306e RoamingState \u306b\u66f8\u3044\u3066\u304a\u3044\u3066\u81ea\u52d5\u7684\u306b\u540c\u671f\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3001\u3068\u3044\u3046\u88cf\u30ef\u30b6\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u25a0\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3067\u8d77\u52d5\u6642\u306b\u8cfc\u5165\u5c65\u6b74\u3092\u8868\u793a\u3059\u308b<\/h2>\n<p>\u8907\u6570\u30da\u30fc\u30b8\u306e\u5834\u5408\u306f\u3001App.xaml.cs \u306b\u66f8\u304f\u307b\u3046\u304c\u3044\u3044\u306e\u3067\u3059\u304c\u3001Kindle Launcher \u306f\uff11\u679a\u3057\u304b\u306a\u3044\u306e\u3067\u3001MainPage.xaml.cs \u306e LoadState \u306b\u66f8\u3044\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nprivate void navigationHelper_LoadState(object sender, LoadStateEventArgs e)\r\n{\r\n    \/\/ TODO: \u30d0\u30a4\u30f3\u30c9\u53ef\u80fd\u306a\u30a2\u30a4\u30c6\u30e0\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092 this.DefaultViewModel&#x5B;&quot;Items&quot;] \u306b\u5272\u308a\u5f53\u3066\u307e\u3059\r\n    GetMyBookshelf();\r\n    vm.Title = &quot;&quot;;\r\n}\r\nasync void GetMyBookshelf()\r\n{\r\n    \/\/ MyBookshelf.xml \u304c\u3042\u308c\u3070\u8aad\u307f\u8fbc\u3080\r\n    var folder = Windows.Storage.ApplicationData.Current.LocalFolder;\r\n    var path = folder + &quot;\\MyBookshelf.xml&quot;;\r\n\r\n    try\r\n    {\r\n        using (var sr = await folder.OpenStreamForReadAsync(&quot;MyBookshelf.xml&quot;))\r\n        {\r\n            var se = new XmlSerializer(typeof(BookList));\r\n            var books = se.Deserialize(sr) as BookList;\r\n            this.vm.Books = books;\r\n        }\r\n    }\r\n    catch\r\n    {\r\n        \/\/ \u7121\u3044\u5834\u5408\u306f\u305d\u306e\u307e\u307e\r\n    }\r\n}\r\n<\/pre>\n<p>\u30ed\u30fc\u30ab\u30eb\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f XmlSerializer \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304c\u3001DataContractSerializer \u3092\u4f7f\u3063\u3066\u3082\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u6c17\u3092\u4ed8\u3051\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u81ea\u4f53\u306f\u300c\u58ca\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308b\u300d\u306e\u3067\u3001\u5fc5\u305a\u5fa9\u5e30\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3059\u3002\u3053\u3053\u3067\u306f try-catch \u3067\u4f8b\u5916\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3068\u3001catch \u3057\u305f\u4f8b\u5916\u306f\u7121\u8996\u3059\u308b\u3053\u3068\u3067\u3059\u306d\u3002\u4f55\u304b\u30a8\u30e9\u30fc\u304c\u3042\u3063\u3066\u3082\u4f55\u4e8b\u3082\u306a\u304b\u3063\u305f\u3088\u3046\u306b\u9032\u307e\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u300c\u30d5\u30a7\u30fc\u30eb\u30bb\u30fc\u30d5\u300d\u306a\u4f5c\u308a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kindle Launcher \u30cd\u30bf\u306e\u7d9a\u304d\u3067\u3059\u3002 Windows \u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u3068\u304d\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u300c\u4f01\u696d\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u306b\u3057\u3066\u304a\u304f\u3068\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u3082\u30b9\u30c8\u30a2\u306b\u7d39\u4ecb\u3092\u8f09\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u5e74\u95939.800\u5186 &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/6375\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23,52],"tags":[],"class_list":["post-6375","post","type-post","status-publish","format-standard","hentry","category-csharp","category-winrt"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=6375"}],"version-history":[{"count":2,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6375\/revisions"}],"predecessor-version":[{"id":6377,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6375\/revisions\/6377"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=6375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=6375"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=6375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}