终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

78 líneas
2.3 KiB

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