Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void StartTread() //типа паток запускаем
- {
- Thread trd = new Thread(new ThreadStart(this.Thread1));
- trd.IsBackground = true;
- trd.Start();
- }
- private void Thread1() //бесконечный цикл который проверяет по суте дела раз в пол секунды переменную stop_ass= тру или фолс
- //если тру - иконка не меняется,если false- меняется
- {
- { for ( ; ; )
- if (stop_ass == false)
- {
- if (blink_ass == false)
- {
- System.Threading.Thread.Sleep(500);
- notifyIcon1.Icon = new Icon("emblem-important1.ico");
- blink_ass = true;
- }
- else
- {
- System.Threading.Thread.Sleep(500);
- notifyIcon1.Icon = new Icon("emblem-important2.ico");
- blink_ass = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement