终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ScreenSplitMealsControl1.xaml.cs 2.4 KiB

vor 2 Jahren
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using BPA.CustomResource.UserControls;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace BPASmartClient.ScreenLib
  17. {
  18. /// <summary>
  19. /// ScreenSplitMealsControl1.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class ScreenSplitMealsControl1 : UserControl
  22. {
  23. public ScreenSplitMealsControl1()
  24. {
  25. InitializeComponent();
  26. this.DataContext = new ScreenSplitMealsControl1ViewModel();
  27. if (int.Parse(System.Configuration.ConfigurationManager.AppSettings["ShowForm"].ToString()) == 0)
  28. {
  29. guanggao.Visibility = Visibility.Visible;
  30. diqiu.Visibility = Visibility.Collapsed;
  31. }
  32. else
  33. {
  34. guanggao.Visibility = Visibility.Collapsed;
  35. diqiu.Visibility = Visibility.Visible;
  36. }
  37. Show();
  38. }
  39. /// <summary>
  40. /// 点击切换广告
  41. /// </summary>
  42. /// <param name="sender"></param>
  43. /// <param name="e"></param>
  44. private void StackPanel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  45. {
  46. try
  47. {
  48. guanggao.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
  49. diqiu.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
  50. Show();
  51. }
  52. catch (Exception ex)
  53. {
  54. }
  55. }
  56. /// <summary>
  57. /// 显示广告
  58. /// </summary>
  59. public void Show()
  60. {
  61. string str = string.Empty;
  62. if (Main.GetInstance.SaasRouteReturn != null && Main.GetInstance.SaasRouteReturn.Count >= 6)
  63. {
  64. AdDTO dto = Main.GetInstance.SaasRouteReturn?.Find(par => par.Address == "01");
  65. if (dto != null)
  66. {
  67. str = dto.Ad;
  68. Main.GetInstance.InitView2(str, webView, guanggao);
  69. }
  70. }
  71. }
  72. }
  73. }