{"id":801,"date":"2020-06-11T17:47:02","date_gmt":"2020-06-11T14:47:02","guid":{"rendered":"https:\/\/www.it-earth.ru\/?p=801"},"modified":"2020-06-11T17:48:00","modified_gmt":"2020-06-11T14:48:00","slug":"%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80-%d0%bf%d1%80%d0%be%d1%81%d1%82%d0%be%d0%b3%d0%be-%d0%b1%d1%83%d0%b4%d0%b8%d0%bb%d1%8c%d0%bd%d0%b8%d0%ba%d0%b0","status":"publish","type":"post","link":"https:\/\/www.it-earth.ru\/?p=801","title":{"rendered":"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430"},"content":{"rendered":"<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0442\u043e \u043b\u0438\u0431\u043e \u0438\u043d\u043e\u0435 \u041f\u041e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u0438 Web \u0411\u0440\u0430\u0443\u0437\u0435\u0440.<br \/>\n\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a.<br \/>\n\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<ul>\n<li>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u043d\u0438\u0435 c#.<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 Visual Studio 2019 Community.<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0434\u0438\u0430 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 wav.<\/li>\n<li>\u0418 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>\u0418 \u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c Visual Studio 2019 Community \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Windows Form .Net Framework (c#, Windows, \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0421\u0442\u043e\u043b).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1h\/kr\/iz\/1hkrizzme4sjfnqvbjzictfvsii.png\" \/><\/p>\n<p>\u041d\u0430\u0437\u043e\u0432\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u00abAlarm clock\u00bb, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e .Net 4.7.2 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u00bb.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vi\/kf\/do\/vikfdofe2xej-qqgjet9ykoitx8.png\" \/><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0443, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:<\/p>\n<p>\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f: \u0415\u0433\u043e \u0418\u043c\u044f<\/p>\n<ul>\n<li>Button btn_Start<\/li>\n<li>        MaskedTextBox maskedTextBox1<\/li>\n<li>        Button btn_Stop<\/li>\n<li>        Button btn_SelectFont<\/li>\n<li>        Button btn_SelectColorForm<\/li>\n<li>        Button btn_About <\/li>\n<li>        Timer timer1<\/li>\n<li>        Label label1<\/li>\n<li>        Label label2<\/li>\n<\/ul>\n<p>\u0412 \u0418\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u043e\u0440\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435<br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ka\/is\/tg\/kaistgqg4jyspaxzdmhktg1fyx4.png\" \/><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443:<\/p>\n<p>       <code><br \/>\n using System.Media;<br \/>\n<\/code><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u043e\u0440\u043c\u0443 \u041e \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0451 \u0444\u043e\u0440\u043c\u0430 frmAboutBox<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uz\/1b\/m-\/uz1bm-1cjltxqfzhp7mnqz8deby.png\" \/><\/p>\n<p>\u0438 \u043a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 InitializeComponent();:<\/p>\n<p>      <code><br \/>\n  FontDialog FD = new FontDialog(); \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f FontDialog<br \/>\n        ColorDialog cd = new ColorDialog();   \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ColorDialog<br \/>\n        frmAboutBox frmAbout = new frmAboutBox();  \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f  frmAboutBox, \u0444\u043e\u0440\u043c\u0430 \u041e \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<br \/>\n<\/code><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u043e\u0440\u043c\u044b UI.<\/p>\n<p><code><br \/>\n private void Form1_Load(object sender, EventArgs e)<br \/>\n        {<br \/>\n            this.Text = \"Alarm clock\";<br \/>\n            btn_SelectFont.Text = \"\u0412\u044b\u0431\u043e\u0440 \u0428\u0440\u0438\u0444\u0442\u0430...\";<br \/>\n            btn_Start.Text = \"\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\";<br \/>\n            btn_Stop.Text = \"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\";<br \/>\n            btn_About.Text = \"\u041e \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435...\";<br \/>\n            btn_SelectColorForm.Text = \"\u0412\u044b\u0431\u043e\u0440 \u0426\u0432\u0435\u0442\u0430...\";<\/p>\n<p>            this.AutoSize = false;<br \/>\n            this.MaximizeBox = false;<br \/>\n            this.MinimizeBox = false;<\/p>\n<p>            label2.Visible = true;<br \/>\n            label2.Enabled = true;<br \/>\n            label2.Text = \"\";<\/p>\n<p>            timer1.Interval = 1000;<br \/>\n            timer1.Enabled = true;<br \/>\n            btn_Stop.Enabled = false;<\/p>\n<p>            timer1.Tick += new EventHandler(Timer1_Tick);<br \/>\n            timer1.Start();<\/p>\n<p>        }<br \/>\n<\/code><\/p>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Backpacker.wav \u0444\u0430\u0439\u043b\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a2\/0j\/cp\/a20jcplnwgizo1p6ltbbkrv2sr8.png\" \/><br \/>\n<code><br \/>\nSoundPlayer player = new SoundPlayer(\"Backpacker.wav\");<\/p>\n<p>        bool b = false;<br \/>\n<\/code><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b:<br \/>\n<code><br \/>\n  private void Btn_SelectFont_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            FD.ShowDialog();<br \/>\n            label1.Font = FD.Font;<br \/>\n            label2.Font = FD.Font;<br \/>\n            maskedTextBox1.Font = FD.Font;<\/p>\n<p>        }<\/p>\n<p>        private void Btn_Start_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            if (b == false)<br \/>\n            {<br \/>\n                label2.Text = maskedTextBox1.Text;<br \/>\n                timer1.Start();<br \/>\n                maskedTextBox1.Visible = false;<br \/>\n                btn_Start.Text = \"\u0423\u0431\u0440\u0430\u0442\u044c \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\";<br \/>\n                b = true;<\/p>\n<p>            }<br \/>\n            else if (b == true)<br \/>\n            {<br \/>\n                label1.Text = \"00:00\";<br \/>\n                timer1.Stop();<br \/>\n                maskedTextBox1.Visible = true;<br \/>\n                btn_Start.Text = \"\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\";<\/p>\n<p>            }<br \/>\n        }<\/p>\n<p>        private void Timer1_Tick(object sender, EventArgs e)<br \/>\n        {<br \/>\n            label1.Text = DateTime.Now.Hour.ToString(\"00\") + \":\" + DateTime.Now.Minute.ToString(\"00\") + \":\" + DateTime.Now.Second.ToString(\"00\");<br \/>\n            if (label1.Text == label2.Text + \":00\")<br \/>\n            {<br \/>\n                btn_Stop.Enabled = true;<br \/>\n                player.Play();<br \/>\n            }<br \/>\n        }<\/p>\n<p>        private void Btn_Stop_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            player.Stop();<br \/>\n            btn_Stop.Enabled = false;<br \/>\n            maskedTextBox1.Visible = true;<br \/>\n            btn_Start.Text = \"\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\";<br \/>\n            b = false;<\/p>\n<p>        }<\/p>\n<p>        private void Btn_About_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            frmAbout.ShowDialog(this);<br \/>\n        }<\/p>\n<p>        private void Btn_SelectColorForm_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            cd.ShowDialog();<br \/>\n            this.ForeColor = cd.Color;<br \/>\n        }<br \/>\n    }<br \/>\n <\/code><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ac\/j1\/ol\/acj1ol-wa5g89fghed2ljnksboc.png\" \/><\/p>\n<p><a href=\"https:\/\/github.com\/antonitprof\/Alarm-clock\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u043e\u0435\u043c GitHub<\/a><\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432: 49<\/p>","protected":false},"excerpt":{"rendered":"<p>.NET,C#,Visual Studio,\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0434 Windows, \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0411\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,173,12],"tags":[185,186,187,184,188],"class_list":["post-801","post","type-post","status-publish","format-standard","hentry","category-itmemo","category-173","category-software","tag-net","tag-c","tag-visual-studio","tag-184","tag---windows"],"_links":{"self":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=801"}],"version-history":[{"count":2,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/801\/revisions"}],"predecessor-version":[{"id":803,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/801\/revisions\/803"}],"wp:attachment":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}