{"id":1714,"date":"2014-02-08T14:25:24","date_gmt":"2014-02-08T07:25:24","guid":{"rendered":"http:\/\/www.payitforward.edu.vn\/wordpress\/?page_id=1714"},"modified":"2014-02-08T14:31:27","modified_gmt":"2014-02-08T07:31:27","slug":"csharp-nang-cao-phan-6","status":"publish","type":"page","link":"https:\/\/payitforward.edu.vn\/wordpress\/tutorials\/lap-trinh-csharp-va-ung-dung-voi-vi-dieu-khien\/csharp-nang-cao-phan-6\/","title":{"rendered":"C# n\u00e2ng cao &#8211; Ph\u1ea7n 6"},"content":{"rendered":"<blockquote><p>T\u00e0i li\u1ec7u n\u00e0y \u0111\u01b0\u1ee3c bi\u00ean so\u1ea1n kh\u00f4ng nh\u1eb1m v\u00e0o b\u1ea5t k\u1ef3 m\u1ee5c \u0111\u00edch n\u00e0o mang t\u00ednh th\u01b0\u01a1ng m\u1ea1i. B\u1ea1n c\u00f3 quy\u1ec1n sao ch\u00e9p, s\u1eeda ch\u1eefa v\u00e0 ph\u00e2n ph\u00e1t b\u1eb1ng b\u1ea5t k\u1ef3 h\u00ecnh th\u1ee9c n\u00e0o. H\u00e3y s\u1eed d\u1ee5ng t\u00e0i li\u1ec7u n\u00e0y, s\u1eeda ch\u1eefa, b\u1ed5 sung v\u00e0 g\u1eedi cho nh\u1eefng ai c\u1ea7n n\u00f3. Ch\u00fang t\u00f4i kh\u00f4ng \u0111\u1ec1 t\u00ean t\u00e1c gi\u1ea3 bi\u00ean so\u1ea1n. T\u00e0i li\u1ec7u n\u00e0y thu\u1ed9c quy\u1ec1n s\u1edf h\u1eefu nh\u1eefng ai \u0111ang d\u00f9ng n\u00f3.<\/p>\n<p>Pay it forward\u2026<\/p><\/blockquote>\n<p>Trong AutoCAD, c\u00f3 2 l\u1ec7nh sau: measure v\u00e0 div. Ch\u1ee9c n\u0103ng c\u1ee7a n\u00f3 l\u00e0 s\u1ebd \u0111\u1eb7t c\u00e1c \u0111i\u1ec3m (point) d\u1ecdc theo bi\u00ean c\u1ee7a c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng (line, spline, circle&#8230;) theo 2 c\u00e1ch: kho\u1ea3ng c\u00e1ch gi\u1eefa 2 \u0111i\u1ec3m ho\u1eb7c s\u1ed1 \u0111i\u1ec3m s\u1ebd n\u1eb1m tr\u00ean \u0111\u01b0\u1eddng cong \u0111\u00f3. V\u00e0 m\u1ed1i l\u1ea7n th\u1ef1c hi\u1ec7n ch\u1ec9 thao t\u00e1c \u0111\u01b0\u1ee3c tr\u00ean 1 \u0111\u1ed1i t\u01b0\u1ee3ng. Nh\u01b0 v\u1eady, n\u1ebfu b\u1ea3n v\u1ebd c\u00f3 100 \u0111\u1ed1i t\u01b0\u1ee3ng, ta ph\u1ea3i th\u1ef1c hi\u1ec7n l\u1ec7nh n\u00e0y 100 l\u1ea7n? (&#8211;&gt; \u0110au kh\u1ed5 \ud83d\ude41 ).<\/p>\n<p>Demo d\u01b0\u1edbi \u0111\u00e2y (b\u00e0i 17 l\u00e0 demo, b\u00e0i 18 l\u00e0 h\u01b0\u1edbng d\u1eabn code) t\u1ea1o ra 1 l\u1ec7nh m\u1edbi, m\u00e0 n\u00f3 c\u00f3 th\u1ec3 thao t\u00e1c tr\u00ean t\u1ea5t c\u1ea3 \u0111\u1ed1i t\u01b0\u1ee3ng trong b\u1ea3n v\u1ebd. Sau \u0111\u00f3, l\u1ea5y t\u1ecda \u0111\u1ed9 c\u1ee7a c\u00e1c \u0111i\u1ec3m \u0111\u00f3 xu\u1ea5t ra file .txt (n\u1ebfu \u0111\u00e3 c\u00f3 t\u1ecda \u0111\u1ed9, ta c\u00f3 th\u1ec3 d\u00f9ng ph\u1ea7n m\u1ec1m n\u00e0o \u0111\u00f3, \u0111\u1ecdc t\u1ecda \u0111\u1ed9 \u0111\u1ec3 gia c\u00f4ng ra s\u1ea3n ph\u1ea9m nh\u01b0 thi\u1ebft k\u1ebf tr\u00ean b\u1ea3n v\u1ebd \ud83d\ude00 &#8211;&gt;th\u00fa v\u1ecb).<\/p>\n<p>Phi\u00ean b\u1ea3n AutoCAD 2008, m\u1eb7c \u0111\u1ecbnh support cho framework 2.0. \u0110\u1ec3 n\u00f3 c\u00f3 th\u1ec3 load (command: netload) \u0111\u01b0\u1ee3c file .dll (\u0111\u01b0\u1ee3c t\u1ea1o ra trong vs2010 l\u00e0 framework 4.0) th\u00ec ta c\u1ea7n ph\u1ea3i config l\u1ea1i file acad.exe.config trong th\u01b0 m\u1ee5c c\u00e0i c\u1ee7a autocad. M\u1edf file \u0111\u00f3 l\u00ean b\u1eb1ng notepad, copy \u0111o\u1ea1n code sau v\u00e0 paste v\u00e0o:<\/p>\n<pre>&lt;configuration&gt;\r\n&lt;startup useLegacyV2RuntimeActivationPolicy=\"true\"&gt;\r\n&lt;!--We always use the latest version of the framework installed on the computer. \r\nIf you are having problems then explicitly specify .NET 2.0 by uncommenting\r\nthe following line.\r\n&lt;supportedRuntime version=\"v2.0.50727\"\/&gt;\r\n--&gt;\r\n&lt;supportedRuntime version=\"v4.0\"\/&gt;\r\n&lt;\/startup&gt;\r\n&lt;\/configuration&gt;<\/pre>\n<h4>B\u00e0i 17: Demo Command AutoCAD<\/h4>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/BCXYafXl9C8\" height=\"315\" width=\"560\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<h4>B\u00e0i 18: T\u1ea1o File Dll Cho AutoCAD<\/h4>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/4pneVclq7zA\" height=\"315\" width=\"560\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p><strong>T\u00e0i li\u1ec7u tham kh\u1ea3o:<\/strong> <a title=\"T\u00ecm hi\u1ec3u c\u1ea5u tr\u00fac AutoCAD\" href=\"http:\/\/docs.autodesk.com\/ACD\/2010\/ENU\/AutoCAD%20.NET%20Developer%27s%20Guide\/\">T\u00ecm hi\u1ec3u c\u1ea5u tr\u00fac AutoCAD<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>T\u00e0i li\u1ec7u n\u00e0y \u0111\u01b0\u1ee3c bi\u00ean so\u1ea1n kh\u00f4ng nh\u1eb1m v\u00e0o b\u1ea5t k\u1ef3 m\u1ee5c \u0111\u00edch n\u00e0o mang t\u00ednh th\u01b0\u01a1ng m\u1ea1i. B\u1ea1n c\u00f3 quy\u1ec1n sao ch\u00e9p, s\u1eeda ch\u1eefa v\u00e0 ph\u00e2n ph\u00e1t b\u1eb1ng b\u1ea5t k\u1ef3 h\u00ecnh th\u1ee9c n\u00e0o. H\u00e3y s\u1eed d\u1ee5ng t\u00e0i li\u1ec7u n\u00e0y, s\u1eeda ch\u1eefa, b\u1ed5 sung v\u00e0 g\u1eedi cho nh\u1eefng ai c\u1ea7n n\u00f3. Ch\u00fang t\u00f4i kh\u00f4ng \u0111\u1ec1 t\u00ean t\u00e1c gi\u1ea3 bi\u00ean so\u1ea1n. T\u00e0i li\u1ec7u n\u00e0y thu\u1ed9c quy\u1ec1n s\u1edf h\u1eefu nh\u1eefng ai \u0111ang d\u00f9ng n\u00f3. Pay it forward\u2026 Trong AutoCAD, c\u00f3 2 l\u1ec7nh sau: measure v\u00e0 div. Ch\u1ee9c n\u0103ng c\u1ee7a n\u00f3 l\u00e0 s\u1ebd \u0111\u1eb7t c\u00e1c \u0111i\u1ec3m (point) d\u1ecdc theo bi\u00ean c\u1ee7a c\u00e1c \u0111\u1ed1i \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/payitforward.edu.vn\/wordpress\/tutorials\/lap-trinh-csharp-va-ung-dung-voi-vi-dieu-khien\/csharp-nang-cao-phan-6\/\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1691,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1714","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/pages\/1714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/comments?post=1714"}],"version-history":[{"count":7,"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/pages\/1714\/revisions"}],"predecessor-version":[{"id":1721,"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/pages\/1714\/revisions\/1721"}],"up":[{"embeddable":true,"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/pages\/1691"}],"wp:attachment":[{"href":"https:\/\/payitforward.edu.vn\/wordpress\/wp-json\/wp\/v2\/media?parent=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}