{"id":306,"date":"2014-05-15T20:49:41","date_gmt":"2014-05-15T11:49:41","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=306"},"modified":"2018-03-03T08:38:25","modified_gmt":"2018-03-02T23:38:25","slug":"%e5%88%a5%e3%82%af%e3%83%a9%e3%82%b9%e3%81%8b%e3%82%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%83%95%e3%82%a9%e3%83%bc%e3%83%a0%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%ab%e3%82%92%e6%93%8d","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=306","title":{"rendered":"\u5225\u30af\u30e9\u30b9\u304b\u3089\u30e1\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u64cd\u4f5c\u3059\u308b"},"content":{"rendered":"<p>\u30af\u30e9\u30b9\u306f\u3001partial \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8907\u6570\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u5206\u3051\u3066\u3001\u6574\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>public partial class MyClass<br \/>\n{<\/p>\n<p>}<\/p>\n<p>\u3057\u304b\u3057\u3001Form1\u30af\u30e9\u30b9\u306e\u5834\u5408\u3001\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u3067\u3001\u5206\u3051\u305fForm1\u30af\u30e9\u30b9\u7528\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30c7\u30b6\u30a4\u30f3\u753b\u9762\u304c\u65b0\u898f\u3067\u4f5c\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u30c7\u30b6\u30a4\u30f3\u753b\u9762\u304c\u4f5c\u3089\u308c\u3066\u3082\u5bb3\u306f\u306a\u3044\u306e\u3067\u3001\u6c17\u306b\u3057\u306a\u3051\u308c\u3070\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u305d\u308c\u304c\u5acc\u306a\u5834\u5408\u306f\u3001\u5225\u30af\u30e9\u30b9\u3092\u8a2d\u3051\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u30e1\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u306b\u5c5e\u3057\u3066\u3044\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u3001\u4ed6\u306e\u30af\u30e9\u30b9\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >\r\n[Form1.Designer.cs\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30fc\u30c9]\r\n\r\n\u307e\u305a\u3001Form1.Designer.cs\u30d5\u30a1\u30a4\u30eb\u3067\u306e\u8a72\u5f53\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e private \u6307\u5b9a\u3092 public \u6307\u5b9a\u306b\u5909\u66f4\u3057\u3066\u3001\u4ed6\u306e\u30af\u30e9\u30b9\u304b\u3089\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\r\n\r\n&lt; \u5909\u66f4\u524d&gt;\r\n\r\nprivate System.Windows.Forms.TextBox textBox1;\r\nprivate System.Windows.Forms.TextBox textBox2;\r\n\r\n&lt; \u5909\u66f4\u5f8c&gt;\r\n\r\npublic System.Windows.Forms.TextBox textBox1;\r\npublic System.Windows.Forms.TextBox textBox2;\r\n\r\n[\u4f5c\u6210\u30af\u30e9\u30b9\u306e\u30b3\u30fc\u30c9]\r\n\r\npublic class MyClass\r\n{\r\n\/\/============\r\n\/\/ Form1\u3092\u793a\u3059\u30e1\u30f3\u30d0\u30fc\u5909\u6570\r\npublic Form1 Form1Obj;\r\n\r\n\/\/============\r\n\/\/ \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\npublic MyClass(\r\nForm1 Form1_Obj)\r\n{\r\nForm1Obj = Form1_Obj;\r\n}\r\n\r\n\/\/============\r\n\/\/ \u521d\u671f\u5316\u30e1\u30bd\u30c3\u30c9\r\npublic void InitializeData()\r\n{\r\nForm1Obj.textBox1.Text = \"hoge\";\r\nForm1Obj.textBox2.Text = \"hoge2\";\r\n}\r\n}\r\n\r\n[Form1\u30af\u30e9\u30b9\u306e\u30b3\u30fc\u30c9]\r\n\r\npublic partial class Form1 : Form\r\n{\r\npublic Form1()\r\n{\r\nInitializeComponent();\r\n}\r\n\r\nprivate void Form1_Load(object sender, EventArgs e)\r\n{\r\nMyClass MyClassObj = new MyClass(this);\r\nMyClassObj.InitializeData();\r\n}\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30af\u30e9\u30b9\u306f\u3001partial \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8907\u6570\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u5206\u3051\u3066\u3001\u6574\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002 public partial class MyClass { } \u3057\u304b\u3057\u3001Form1\u30af\u30e9\u30b9\u306e\u5834\u5408\u3001\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30a8\u30af\u30b9\u30d7\u30ed\u30fc [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_lightning_design_setting":[],"footnotes":""},"categories":[11],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=306"}],"version-history":[{"count":3,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":827,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/306\/revisions\/827"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}