{"id":3504,"date":"2012-06-11T08:29:07","date_gmt":"2012-06-10T23:29:07","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/3504"},"modified":"2012-06-11T10:43:10","modified_gmt":"2012-06-11T01:43:10","slug":"community-open-day-2012-%e3%81%ae%e8%a3%9c%e8%b6%b3%e3%81%9d%e3%81%ae%ef%bc%91","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/3504","title":{"rendered":"Community Open Day 2012 \u306e\u88dc\u8db3\u305d\u306e\uff11"},"content":{"rendered":"<p>Community Open Day 2012<br \/>\n<a href=\"http:\/\/cod.ms\/\">http:\/\/cod.ms\/<\/a><br \/>\nCommunity Open Day 2012 \u306e\u6e96\u5099 | Moonmile Solutions Blog<br \/>\n<a href=\"http:\/\/www.moonmile.net\/blog\/archives\/3476\">http:\/\/www.moonmile.net\/blog\/archives\/3476<\/a><\/p>\n<p>\u306a\u3068\u3053\u308d\u3067\u3001\u767a\u8868\u3057\u305f\u3082\u306e\u306e\u3001\u4e8b\u524d\u6e96\u5099\u304c\u8db3\u308a\u306a\u3044&#8230;\u3064\u30fc\u304b\u3001\u30b3\u30fc\u30c9\u81ea\u4f53\u3092\u898b\u305b\u308b\u306e\u5fd8\u308c\u3066\u3044\u305f\u306e\u3067\u88dc\u8db3\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u30b9\u30e9\u30a4\u30c9\u81ea\u4f53\u306f\u3001<\/p>\n<p>Cod2012 \u30c7\u30d0\u30c3\u30b0\u8b1b\u5ea7<br \/>\n<a href=\"http:\/\/www.slideshare.net\/moonmile\/cod2012\">http:\/\/www.slideshare.net\/moonmile\/cod2012<\/a><\/p>\n<p>\u306a\u3068\u3053\u308d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6982\u8981\u3057\u304b\u66f8\u3044\u3066\u7121\u304f\u3066\u3001\u5b9f\u969b\u306f\u3001\u30b9\u30ec\u30fc\u30c8pc \u3078\u306e\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30b0\u304c\u4e3b\u306a\u3068\u3053\u308d\u3067\u3059\u3002<br \/>\n\u958b\u767a\u30de\u30b7\u30f3\u304b\u3089\u30b9\u30ec\u30fc\u30c8PC\u3078\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u3059\u308b\u5834\u5408\u306f\u3001Visual Studio \u304b\u3089\u63a5\u7d9a\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3044\u304f\u3068\u3044\u304f\u3064\u304b\u554f\u984c\u304c\u3042\u3063\u305f\u306e\u3067\u3059\u3002<\/p>\n<ul>\n<li>Visual Studio \u304b\u3089\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3057\u3066\u3044\u308b\u3068\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u306a\u3044\u3002<\/li>\n<li>\u30b9\u30ec\u30fc\u30c8PC\u3078\u306e\u63a5\u7d9a\u306f\u300c\u7121\u7ddaLAN\u300d\u306a\u306e\u3067\u3001\u30b9\u30d4\u30fc\u30c9\u81ea\u4f53\u306b\u554f\u984c\u304c\u3067\u305d\u3046\u3002<\/li>\n<\/ul>\n<p>\u591a\u5206\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u306a\u3044\u306e\u306f\u30c7\u30d0\u30c3\u30b0\u30e2\u30fc\u30c9\u3067\u52d5\u3044\u3066\u3044\u308b\u305f\u3081\u306b\u3001\u6a29\u9650\u304c desktop \u30a2\u30d7\u30ea\u5074\u306b\u3042\u308b\u304b\u3089\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0\u6642\u306b\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u3066\u8cb0\u3063\u3066\u3082\u56f0\u308b\u3057\u3001\u3068\u3044\u3046\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3002<br \/>\n\u304c\u3001\u5b9f\u6a5f\u3067\u52d5\u304b\u3059\u5834\u5408\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u3059\u308b\u6642\u3001\u30b5\u30b9\u30da\u30f3\u30c9\u304b\u3089\u5fa9\u5e30\u3059\u308b\u6642\u3001\u3068\u3044\u3046\u306e\u304c metro \u30a2\u30d7\u30ea\u3067\u306f\u7d50\u69cb\u91cd\u8981\u3067\u3001\u3053\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u5b9f\u6a5f\u3067\u307f\u308b\u306e\u306f\u91cd\u8981\u304b\u306a\u3068\u601d\u3063\u305f\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3067\u3001\u901a\u5e38\u306f\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u308f\u3051\u3067\u3059\u304c\u3001metro \u30a2\u30d7\u30ea\u306e\u5834\u5408\u306f desktop \u5074\u3078\u306e\u5236\u9650\u304c\u53b3\u3057\u3044\u305f\u3081\u306b\u3001<\/p>\n<ul>\n<li>\u30de\u30a4\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u30a2\u30af\u30bb\u30b9\u306b\u3001\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u5909\u3048\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002<\/li>\n<li>metro \u30a2\u30d7\u30ea\u5185\u306e\u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9\u306b\u66f8\u304d\u8fbc\u3080\u3068\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u6642\u306b\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3082\u4e00\u7dd2\u306b\u6d88\u3048\u3066\u3057\u307e\u3046\u3002<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u6b20\u70b9\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u3001\u3072\u3068\u3064\u306e\u624b\u6bb5\u3068\u3057\u3066\u3001metro \u30a2\u30d7\u30ea\u304b\u3089 HttpClient \u3092\u4f7f\u3063\u3066\u958b\u767a\u6a5f\u306b\u30ed\u30b0\u3092\u98db\u3070\u305d\u3046\u3068\u3044\u3046\u8a66\u307f\u3067\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u3001log4net \u306e\u3088\u3046\u306b\u4f7f\u3048\u308b\u3068\u3044\u3044\u3093\u3067\u3057\u3087\u3046\u306d\u3048\u3002<\/p>\n<p>\u30c7\u30e2\u3067\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u81ea\u4f53\u306f\u3001<\/p>\n<p>win8\/MetroMemoPadiPadLike at master \u30fb moonmile\/win8 \u30fb GitHub<br \/>\n<a href=\"https:\/\/github.com\/moonmile\/win8\/tree\/master\/MetroMemoPadiPadLike\">https:\/\/github.com\/moonmile\/win8\/tree\/master\/MetroMemoPadiPadLike<\/a><\/p>\n<p>\u306b\u4e00\u5f0f\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u25a0 metro \u30a2\u30d7\u30ea\u304b\u3089\u30ed\u30b0\u51fa\u529b<\/p>\n<p>App.xaml.cs \u306e\u4e2d\u306b\u6b21\u306e\u3088\u3046\u306a\u30ed\u30b0\u95a2\u6570\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002\u5358\u7d14\u306b\u300cwin8rp-pc.local\u300d\u3068\u3044\u3046\u30de\u30b7\u30f3\u306b HttpClinet \u3092\u98db\u3070\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<br \/>\n\u672c\u6765\u306a\u3089\u3070\u3001\u304d\u3061\u3093\u3068 Web REST \u5f62\u5f0f\u306b\u3059\u308c\u3070\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u307e\u3042\u30b5\u30f3\u30d7\u30eb\u3068\u3044\u3046\u3053\u3068\u3067\u3002<br \/>\n\u30ed\u30b0\u81ea\u4f53\u306f\u3001WCF \u30b5\u30fc\u30d3\u30b9\u306b\u3059\u308b\u3068\u304d\u3063\u3061\u308a\u3068\u4f5c\u308c\u308b\u306e\u3067\u3057\u3087\u3046\u304c\u3001WCF \u3060\u3068\u3044\u3061\u3044\u3061\u30b5\u30fc\u30d3\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u7d50\u69cb\u9762\u5012\u3067\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u9069\u5f53\u306b GET \u30b3\u30de\u30f3\u30c9\u3067\u9001\u308c\u308b\u30d1\u30bf\u30fc\u30f3\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n        public async static void DebugLog(string text)\r\n        {\r\n            string url = &quot;http:\/\/win8rp-pc.local:8083\/metro\/method&quot;;\r\n            HttpClient client = new HttpClient();\r\n            try\r\n            {\r\n                HttpResponseMessage res = await client.GetAsync(url + &quot;\/&quot; + text);\r\n            }\r\n            catch\r\n            {\r\n            }\r\n            \/\/ string response = await res.Content.ReadAsStringAsync();\r\n        }\r\n<\/pre>\n<p>\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u5834\u5408\u3082\u3042\u308b\u306e\u3067\u3001try-catch \u306f\u5fc5\u9808\u3067\u3059\u306d\u3002\u307e\u305f\u3001\u3053\u306e\u30d1\u30bf\u30fc\u30f3\u3060\u3068\u3044\u3061\u3044\u3061 new HttpClient \u3092\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u672c\u5f53\u306f\u5225\u306b privete \u5909\u6570\u3067\u4fdd\u6301\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n        private void OnSuspending(object sender, SuspendingEventArgs e)\r\n        {\r\n            App.DebugLog(&quot;OnSuspending&quot;);\r\n            var deferral = e.SuspendingOperation.GetDeferral();\r\n            \/\/TODO: Save application state and stop any background activity\r\n            deferral.Complete();\r\n        }\r\n<\/pre>\n<p>metro \u30a2\u30d7\u30ea\u81ea\u4f53\u306e\u30b5\u30b9\u30da\u30f3\u30c9\u306f\u3001App.OnSuspending \u306b\u306a\u308b\u306e\u3067\u3001\u3053\u3053\u306b\u4ed5\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u25a0\u56de\u8ee2\u6642\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b<\/p>\n<p>\u30b9\u30ec\u30fc\u30c8PC\u3092\u56de\u8ee2\u3055\u305b\u305f\u3068\u304d\u306e\u30ed\u30b0\u51fa\u529b\u306f\u3001MainPage.xml.cs \u306e Current_SizeChanged \u30e1\u30bd\u30c3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u306f\u3001\u3042\u3089\u304b\u3058\u3081 Window.Current.SizeChanged += Current_SizeChanged; \u306e\u3088\u3046\u306b\u56de\u8ee2\u30a4\u30d9\u30f3\u30c8\u306b\u4ed5\u8fbc\u3093\u3067\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n        private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)\r\n        {\r\n            var state = Windows.UI.ViewManagement.ApplicationView.Value;\r\n            VisualStateManager.GoToState(this, state.ToString(), false);\r\n            App.DebugLog(&quot;Current_SizeChanged &quot; + state.ToString());\r\n        }\r\n<\/pre>\n<p>\u3053\u3046\u3059\u308b\u3068\u3001\u5b9f\u6a5f\u3092\u56de\u8ee2\u3057\u305f\u6642\u306b\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u25a0\u7c21\u6613\u30ed\u30b0\u30b5\u30fc\u30d0\u30fc<\/p>\n<p>metro \u30a2\u30d7\u30ea\u304b\u3089\u30ed\u30b0\u53d7\u4fe1\u3092\u3059\u308b\u305f\u3081\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\nHttpListener \u30af\u30e9\u30b9\u3068\u3044\u3046\u76ee\u7684\u305d\u306e\u307e\u307e\u306e\u30af\u30e9\u30b9\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306f non-blocking \u3067\u52d5\u304f\u306e\u3067\u3001background \u30b9\u30ec\u30c3\u30c9\u3092\u4f5c\u3089\u306a\u304f\u3066\u3088\u3044\u306e\u3067\u3001\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nnamespace MetroLogServer\r\n{\r\n    public partial class Form1 : Form\r\n    {\r\n        public Form1()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        HttpListener listener;\r\n\r\n        private void button1_Click(object sender, EventArgs e)\r\n        {\r\n            string url = &quot;http:\/\/*:8083\/metro\/&quot;;\r\n            \/\/ \u958b\u59cb\r\n            listener = new HttpListener();\r\n            listener.Prefixes.Add(url);\r\n\r\n            listener.Start();\r\n            listBox1.Items.Add(&quot;\u30b5\u30fc\u30d0\u30fc\u958b\u59cb&quot;);\r\n            listener.BeginGetContext(ListenerCallback, listener);\r\n        }\r\n\r\n        public void ListenerCallback(IAsyncResult result)\r\n        {\r\n            \/\/ HttpListener listener = (HttpListener)result.AsyncState;\r\n            HttpListenerContext context;\r\n            try\r\n            {\r\n                context = listener.EndGetContext(result);\r\n            }\r\n            catch\r\n            {\r\n                \/\/ stop \u30e1\u30bd\u30c3\u30c9\u3067\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u3001\u5bfe\u51e6\r\n                return;\r\n            }\r\n            \/\/ var content = listener.GetContext();\r\n            var req = context.Request;\r\n            var url = req.RawUrl;\r\n            var res = context.Response;\r\n\r\n            string text = url.Replace(&quot;\/metro\/method\/&quot;, &quot;&quot;);\r\n            text = System.Web.HttpUtility.UrlDecode(text);\r\n            listBox1.Items.Add(&quot;\u53d7\u4fe1:&quot; +  text);\r\n\r\n            var output = new StreamWriter(res.OutputStream);\r\n            output.WriteLine(string.Format(&quot;called {0}&quot;, url));\r\n            output.Close();\r\n\r\n            \/\/ \u6b21\u306e\u53d7\u4fe1\u306e\u6e96\u5099\r\n            listener.BeginGetContext(ListenerCallback, listener);\r\n        }\r\n\r\n        private void button2_Click(object sender, EventArgs e)\r\n        {\r\n            \/\/ \u7d42\u4e86\r\n            listener.Stop();\r\n            listBox1.Items.Add(&quot;\u30b5\u30fc\u30d0\u30fc\u7d42\u4e86&quot;);\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>\u672c\u5f53\u306f\u3001\u3053\u308c\u3092\u8aac\u660e\u3057\u306a\u3044\u3068\u99c4\u76ee\u3060\u3063\u305f\u3093\u3067\u3059\u3051\u3069\u306d&#8230;\u306a\u3093\u304b\u3001\u3044\u304d\u304a\u3044\u30c7\u30e2\u306e\u307b\u3046\u306b\u9032\u3093\u3067\u3057\u307e\u3063\u3066\u3001\u524d\u63d0\u306e\u30b3\u30fc\u30c9\u306e\u7d39\u4ecb\u304c\u629c\u3051\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u6642\u9593\u914d\u5206\u306f10\u5206\u3054\u3068\u306b\u78ba\u8a8d\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u56de\u8ee2\u6642\u306e\u52d5\u4f5c\u3068\u304b\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u3068\u304b\u306e\u89e3\u8aac\u306b\u529b\u3092\u5165\u308c\u904e\u304e\u3066\u3057\u307e\u3063\u305f\u3068\u3044\u3046\u611f\u3058\u3067\u3059\u3002<\/p>\n<p>\u3053\u3093\u306a\u98a8\u306b\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u4e0a\u3068\u958b\u767a\u6a5f\u3067\u901a\u4fe1\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a title=\"20120611_01\" href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/06\/20120611_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/06\/20120611_01-300x178.jpg\" title=\"20120611_01\" width=\"300\" height=\"178\" class=\"alignnone size-medium wp-image-3507\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/06\/20120611_01-300x178.jpg 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/06\/20120611_01-1024x609.jpg 1024w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/06\/20120611_01.jpg 1379w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3068\u3044\u3046\u8a33\u3067\u3001\u3082\u3046\u3061\u3087\u3063\u3068 cod2012 \u306e\u8a71\u304c\u7d9a\u304f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Community Open Day 2012 http:\/\/cod.ms\/ Community Open Day 2012 \u306e\u6e96\u5099 | Moonmile Solutions Blog http:\/\/www.moonmi &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/3504\">\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,44],"tags":[],"class_list":["post-3504","post","type-post","status-publish","format-standard","hentry","category-csharp","category-windows-8"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3504","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=3504"}],"version-history":[{"count":3,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3504\/revisions"}],"predecessor-version":[{"id":3508,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3504\/revisions\/3508"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=3504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=3504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=3504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}