|
- using BPASmartClient.Compiler;
- using BPASmartClient.MessageCommunication;
- using BPASmartClient.MessageCommunication.MsgControl;
- using BPASmartClient.MessageName;
- using BPASmartClient.MessageName.EnumHelp;
- using BPASmartClient.MessageName.发送消息Model;
- using BPASmartClient.MessageName.接收消息Model;
- using BPASmartClient.MessageName.接收消息Model.物料仓;
- using Microsoft.Win32;
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.IO;
- 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.Markup;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
-
- namespace BPASmartClient.MinimalistUI
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow :Window
- {
- public MainWindow()
- {
- InitializeComponent();
- LoadingData(System.AppDomain.CurrentDomain.BaseDirectory + "LayoutFile\\物料仓管理.lay");
- }
- /// <summary>
- /// 加载数据
- /// </summary>
- public void LoadingData(string path)
- {
- //加载控件
- List<FrameworkElement> Children = new List<FrameworkElement>();
- FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
- using (StreamReader sr = new StreamReader(fs,System.Text.Encoding.Unicode))
- {
- while (sr.Peek() > -1)
- {
- string str = sr.ReadLine();
- var ele = XamlReader.Parse(str) as FrameworkElement;
- Children.Add(ele);
- }
- }
- if (Children.Count > 0)
- {
- runCanvas.Run(Children);
- }
-
- }
-
- private void grid_MouseEnter(object sender,MouseEventArgs e)
- {
- grid_celine.Visibility = Visibility.Visible;
- }
-
- private void grid_MouseLeave(object sender,MouseEventArgs e)
- {
- grid_celine.Visibility = Visibility.Collapsed;
- }
- }
- }
|