DynAreaBlowing.xaml.cs 2.6 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2
using FLY.UI.Module;
using System;
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
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 FLY.Thick.Blowing.UI.Fix.Client.UIModule
{
    /// <summary>
    /// DynAreaBlowing.xaml 的交互逻辑
    /// </summary>
    public partial class DynAreaBlowing : UserControl
    {
潘栩锋's avatar
潘栩锋 committed
24
        
25 26 27 28
        public DynAreaBlowing()
        {
            InitializeComponent();
        }
潘栩锋's avatar
潘栩锋 committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

        public void Init(int id)
        {
            var gage = Application.Current.Properties["Gage"] as TDGage;
            Border_Blowing.DataContext = gage.mRenZiJiaService;
            border_bDetect.DataContext = gage.mBDetect;
            Border_Width.DataContext = gage.mBDetect;
        }

        private void Border_Blowing_Click(object sender, RoutedEventArgs e)
        {
            var gage = Application.Current.Properties["Gage"] as TDGage;

            PgBlowing p = new PgBlowing();
            p.Init(gage.mSysParam.ServerIPEP);
            (Application.Current.Properties["NavigationService"] as NavigationService).Navigate(p);
        }
    }

    public class UIModule_DynAreaBlowing : IUIModule
    {
        /// <summary>
        /// 控件标题
        /// 它的值取决于culture
        /// </summary>
        public string Title
        {
            get
            {
                return "吹膜动态";
            }
        }

        /// <summary>
        /// 控件
        /// 创建时,需要给它唯一ID,让加载自己的数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FrameworkElement GetComponent(int id)
        {
            DynAreaBlowing graph = new DynAreaBlowing();
            graph.Init(id);
            return graph;
        }

        /// <summary>
        /// 控件缩略图,用于编辑界面时,大致看看
        /// 创建时,需要给它唯一ID,让加载自己的数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FrameworkElement GetThumbnail(int id)
        {
            return new System.Windows.Controls.Grid();
        }


        /// <summary>
        /// 给出全部控件ID, 控件自行删除没有的参数
        /// </summary>
        /// <param name="IDs"></param>
        public void MatchParam(int[] IDs)
        {

        }
95 96
    }
}