public static void StartPmpL() { //Насос номер 0 if (StateButton.ButtonPmpL[0].IsState == true && PmpL0 == true) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade21.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade21Anim); Blade22.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade22Anim); PmpL0 = false; } if (StateButton.ButtonPmpL[0].IsState == false && PmpL0 == false) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); /*C:/Users/Николос/Downloads/Останов.mp3*/ MStop.Play(); Blade21.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade22.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); PmpL0 = true; } //Насос номер 1 if (StateButton.ButtonPmpL[1].IsState == true && PmpL1 == true) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade31.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade31Anim); Blade32.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade32Anim); PmpL1 = false; } if (StateButton.ButtonPmpL[1].IsState == false && PmpL1 == false) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); MStop.Play(); Blade31.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade32.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); PmpL1 = true; } //Насос номер 2 if (StateButton.ButtonPmpL[2].IsState == true && PmpL2 == true) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade41.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade41Anim); Blade42.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade42Anim); PmpL2 = false; } if (StateButton.ButtonPmpL[2].IsState == false && PmpL2 == false) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); MStop.Play(); Blade41.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade42.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); PmpL2 = true; } }
public static void StartPmpL(int l, int t) { //Насос номер 0 if (GetButtons.ButtonsPmpLC[0].IsState == true && l == 349 && t == 246) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade21.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade21Anim); Blade22.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade22Anim); } if (GetButtons.ButtonsPmpLC[0].IsState == false && l == 349 && t == 246) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); /*C:/Users/Николос/Downloads/Останов.mp3*/ MStop.Play(); Blade21.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade22.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); } //Насос номер 1 if (GetButtons.ButtonsPmpLC[1].IsState == true && l == 349 && t == 310) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade31.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade31Anim); Blade32.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade32Anim); } if (GetButtons.ButtonsPmpLC[1].IsState == false && l == 349 && t == 310) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); MStop.Play(); Blade31.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade32.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); } //Насос номер 2 if (GetButtons.ButtonsPmpLC[2].IsState == true && l == 349 && t == 374) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); MStart.Play(); Blade41.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade41Anim); Blade42.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade42Anim); } if (GetButtons.ButtonsPmpLC[2].IsState == false && l == 349 && t == 374) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); MStop.Play(); Blade41.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade42.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); } }
public static void StartPmpR(int l, int t) { if (GetButtons.ButtonsPmpRC[0].IsState == true && l == 380 && t == 146) { MStart.Open(new Uri("../../../Resources/Zapusk.mp3", UriKind.RelativeOrAbsolute)); /*C:/Users/Николос/source/repos/teplo/Teplo/Resources/Start.mp3" */ //дома /*C:/Users/Nikolos/Desktop/All/Новая папка/Картинки для проекта/Запуск.mp3*/ запасной метод Directory.GetCurrentDirectory() + "/Sounds/Zapusk.mp3" MStart.Play(); Blade1.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade1Anim); Blade2.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, Blade2Anim); RotationPmpR = true; } if (GetButtons.ButtonsPmpRC[0].IsState == false && l == 380 && t == 146) { MStop.Open(new Uri("../../../Resources/Ostanov.mp3", UriKind.RelativeOrAbsolute)); //C:/Users/Николос/Downloads/Останов.mp3 дома C:/Users/Nikolos/Desktop/All/Новая папка/Картинки для проекта/Останов.mp3 запасной метод Directory.GetCurrentDirectory() + "/Sounds/Ostanov.mp3" MStop.Play(); Blade1.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); Blade2.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null); RotationPmpR = false; } }