{"id":1135,"date":"2023-01-05T20:19:36","date_gmt":"2023-01-05T17:19:36","guid":{"rendered":"https:\/\/ru.robotnet.org\/blog\/?post_type=docs&#038;p=1135"},"modified":"2023-01-06T19:18:35","modified_gmt":"2023-01-06T16:18:35","slug":"csharp-sample-control-panel-api","status":"publish","type":"docs","link":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/","title":{"rendered":"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET"},"content":{"rendered":"\n<p><strong>sdk\\c-sharp\\api\\api\\Program.cs<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code console-output has-small-font-size\"><code>using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing System.IO;\r\n\r\nusing RobotNET.API;\r\n\r\nnamespace RoboAPI\r\n{\r\n    class Program\r\n    {\r\n        static void Main( string&#91;] args )\r\n        {\r\n            Console.WriteLine( string.Format( \"Program started!\" ) );\r\n\r\n            try\r\n            {\r\n                using( API api = new API( \"ya.ru\", \"111\" ) )\r\n                {\r\n                    \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043c\u0435\u043d\u0430\r\n                    \/\/string addrlist = api.AddrList(); Console.WriteLine( addrlist );\r\n                    \/\/string addr = api.Addr(); Console.WriteLine( addr );\r\n\r\n                    \/\/ \u0412\u041d\u0418\u041c\u0410\u041d\u0418\u0415! \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0439!\r\n                    \/\/api.LicenseCleanup();\r\n\r\n                    \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0421\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0439\r\n                    \/\/string licenses = api.Licenses(); XmlDocument _licenses = new XmlDocument(); _licenses.LoadXml( licenses );\r\n\r\n                    \/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\r\n                    \/\/string license = api.License( \"aaaa@ya.ru\", \"sdk.samples-20200101.xml.lic\", true );\r\n\r\n                    \/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u043d\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\r\n                    \/\/string epconf = api.EpConf(); Console.WriteLine( epconf );\r\n\r\n                    \/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\r\n                    \/\/api.EpConFile( \"aaaa@ya.ru\", \"config\\\\sbin.ghost.exe.xml\", Directory.GetCurrentDirectory() + \"\\\\test.xml\" );\r\n\r\n                    \/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u043e-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043f\u043e IP\r\n                    string myip = api.MyIP( \"87.250.250.242\" ); Console.WriteLine( myip );\r\n                }\r\n            }\r\n            catch( Exception e )\r\n            {\r\n                Console.WriteLine( e.ToString() );\r\n            }\r\n\r\n            Console.WriteLine( string.Format( \"Program finished!\" ) );\r\n        }\r\n    }\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>sdk\\c-sharp\\api\\api\\Program.cs<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[33],"doc_tag":[],"class_list":["post-1135","docs","type-docs","status-publish","hentry","doc_category-c-sharp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET\" \/>\n<meta property=\"og:description\" content=\"sdkc-sharpapiapiProgram.cs\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-06T16:18:35+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 \u043c\u0438\u043d\u0443\u0442\u0430\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/\",\"url\":\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/\",\"name\":\"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET\",\"isPartOf\":{\"@id\":\"https:\/\/ru.robotnet.org\/blog\/#website\"},\"datePublished\":\"2023-01-05T17:19:36+00:00\",\"dateModified\":\"2023-01-06T16:18:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/ru.robotnet.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ru.robotnet.org\/blog\/#website\",\"url\":\"https:\/\/ru.robotnet.org\/blog\/\",\"name\":\"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RobotNET\",\"description\":\"\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u041f\u0438\u0440\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u041c\u0438\u043a\u0440\u043e-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 RobotNET\",\"alternateName\":\"\u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ru.robotnet.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/","og_locale":"ru_RU","og_type":"article","og_title":"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET","og_description":"sdkc-sharpapiapiProgram.cs","og_url":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/","og_site_name":"\u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET","article_modified_time":"2023-01-06T16:18:35+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"1 \u043c\u0438\u043d\u0443\u0442\u0430"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/","url":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/","name":"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET - \u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET","isPartOf":{"@id":"https:\/\/ru.robotnet.org\/blog\/#website"},"datePublished":"2023-01-05T17:19:36+00:00","dateModified":"2023-01-06T16:18:35+00:00","breadcrumb":{"@id":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ru.robotnet.org\/blog\/doc\/c-sharp\/csharp-sample-control-panel-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/ru.robotnet.org\/blog\/"},{"@type":"ListItem","position":2,"name":"9.3.13. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RobotNET"}]},{"@type":"WebSite","@id":"https:\/\/ru.robotnet.org\/blog\/#website","url":"https:\/\/ru.robotnet.org\/blog\/","name":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f RobotNET","description":"\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u041f\u0438\u0440\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u041c\u0438\u043a\u0440\u043e-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 RobotNET","alternateName":"\u0411\u043b\u043e\u0433, \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f RobotNET","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ru.robotnet.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"}]}},"_links":{"self":[{"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/docs\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/comments?post=1135"}],"version-history":[{"count":0,"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/docs\/1135\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/media?parent=1135"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/doc_category?post=1135"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/ru.robotnet.org\/blog\/wp-json\/wp\/v2\/doc_tag?post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}