public Parameters(Window DialogParentWindow) { InitializeComponent(); Owner = DialogParentWindow; Config = ((MainWindow)DialogParentWindow).Config; Desks[0] = new DeskParams(Desk1, 1, Config.GetConfigValue("Desk_1_Sound_Card"), Config.GetConfigValue("Desk_1_Pan")); Desks[1] = new DeskParams(Desk2, 2, Config.GetConfigValue("Desk_2_Sound_Card"), Config.GetConfigValue("Desk_2_Pan")); }
public MainWindow() { InitializeComponent(); Config = new SQLite.SQLiteConfig("config.db"); IdleImage.Source = new BitmapImage(new Uri(Path.GetFullPath(Config.GetConfigValue("stop_image")))); WarningImage.Source = new BitmapImage( new Uri(Path.GetFullPath(Config.GetConfigValue("warning_image")))); DispatcherTimer CheckTime = new DispatcherTimer(); CheckTime.Tick += CheckTimeTick; CheckTime.Interval = TimeSpan.FromMilliseconds(50); CheckTime.Start(); }
private void RunVideo(int Number) { switch (PlayStatus) { case MediaStatus.Play: return; case MediaStatus.Pause: if (WarningGrid.Opacity > 0) { WarningGrid.BeginAnimation(OpacityProperty, OpacityAnimation(WarningGrid.Opacity, 0, 10)); } else { WarningGrid.BeginAnimation(OpacityProperty, OpacityAnimation(WarningGrid.Opacity, 1, 10)); WarningMessage(); return; } break; case MediaStatus.Stop: ImageGrid.BeginAnimation(OpacityProperty, OpacityAnimation(ImageGrid.Opacity, 0, 500)); break; } mediaElement.Source = null; mediaElement.Source = new Uri(Path.GetFullPath(Config.GetConfigValue("video_" + Number.ToString()))); StopList = Config.GetStringList("video_" + Number.ToString() + "_stop"); mediaElement.Play(); PlayStatus = MediaStatus.Play; }