|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
-
- namespace BPASmartClient.ScreenLib
- {
- /// <summary>
- /// ScreenSplitMealsControl3.xaml 的交互逻辑
- /// </summary>
- public partial class ScreenSplitMealsControl3 : UserControl
- {
- public ScreenSplitMealsControl3()
- {
- InitializeComponent();
- this.DataContext = new ScreenSplitMealsControl3ViewModel();
-
- if (int.Parse(System.Configuration.ConfigurationManager.AppSettings["ShowForm"].ToString()) == 0)
- {
- guanggao.Visibility = Visibility.Visible;
- diqiu.Visibility = Visibility.Collapsed;
- }
- else
- {
- guanggao.Visibility = Visibility.Collapsed;
- diqiu.Visibility = Visibility.Visible;
- }
- Show();
- }
-
-
- /// <summary>
- /// 点击切换广告
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void StackPanel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- try
- {
- guanggao.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
- diqiu.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
- Show();
- }
- catch (Exception ex)
- {
-
- }
- }
-
- /// <summary>
- /// 显示广告
- /// </summary>
- public void Show()
- {
- string str = string.Empty;
- if (Main.GetInstance.SaasRouteReturn != null && Main.GetInstance.SaasRouteReturn.Count >= 6)
- {
- AdDTO dto = Main.GetInstance.SaasRouteReturn?.Find(par => par.Address == "02");
- if (dto != null)
- {
- str = dto.Ad;
- Main.GetInstance.InitView2(str, webView, guanggao);
- }
- }
- }
- }
- }
|