@@ -0,0 +1,9 @@ | |||
<Application x:Class="BPASmartClient.MinimalistUI.App" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:local="clr-namespace:BPASmartClient.MinimalistUI" | |||
StartupUri="MainWindow.xaml"> | |||
<Application.Resources> | |||
</Application.Resources> | |||
</Application> |
@@ -0,0 +1,17 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Configuration; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
namespace BPASmartClient.MinimalistUI | |||
{ | |||
/// <summary> | |||
/// Interaction logic for App.xaml | |||
/// </summary> | |||
public partial class App :Application | |||
{ | |||
} | |||
} |
@@ -0,0 +1,10 @@ | |||
using System.Windows; | |||
[assembly: ThemeInfo( | |||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | |||
//(used if a resource is not found in the page, | |||
// or application resource dictionaries) | |||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | |||
//(used if a resource is not found in the page, | |||
// app, or any theme specific resource dictionaries) | |||
)] |
@@ -0,0 +1,45 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<OutputType>WinExe</OutputType> | |||
<TargetFramework>net6.0-windows</TargetFramework> | |||
<Nullable>enable</Nullable> | |||
<UseWPF>true</UseWPF> | |||
<ApplicationIcon>Images\fyf.ico</ApplicationIcon> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<None Remove="Images\bj.png" /> | |||
<None Remove="Images\fyf.ico" /> | |||
<None Remove="Images\logo-pic.png" /> | |||
<None Remove="Images\logo-Text.png" /> | |||
<None Remove="Images\top_h.png" /> | |||
<None Remove="Images\椭圆 22 副本 2.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Images\fyf.ico" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\BPASmart.Model\BPASmart.Model.csproj" /> | |||
<ProjectReference Include="..\BPASmartClient.Compiler\BPASmartClient.Compiler.csproj" /> | |||
<ProjectReference Include="..\BPASmartClient.MessageCommunication\BPASmartClient.MessageCommunication.csproj" /> | |||
<ProjectReference Include="..\BPASmartClient.MessageName\BPASmartClient.MessageName.csproj" /> | |||
<ProjectReference Include="..\BPASmartClient.SCADAControl\BPASmartClient.SCADAControl.csproj" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Resource Include="Images\bj.png" /> | |||
<Resource Include="Images\fyf.ico" /> | |||
<Resource Include="Images\logo-pic.png" /> | |||
<Resource Include="Images\logo-Text.png" /> | |||
<Resource Include="Images\top_h.png" /> | |||
<Resource Include="Images\椭圆 22 副本 2.png" /> | |||
</ItemGroup> | |||
</Project> |
@@ -0,0 +1,32 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Globalization; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows.Data; | |||
namespace BPASmartClient.MinimalistUI.Converters | |||
{ | |||
public class ZoomConverter :IValueConverter | |||
{ | |||
public bool IsHeight { get; set; } | |||
public object Convert(object value,Type targetType,object parameter,CultureInfo culture) | |||
{ | |||
if (double.TryParse(value.ToString(),out double zoom)) | |||
{ | |||
return IsHeight ? zoom * 1080 : zoom * 1920; | |||
} | |||
else | |||
{ | |||
return IsHeight ? 1080 : 1920; | |||
} | |||
} | |||
public object ConvertBack(object value,Type targetType,object parameter,CultureInfo culture) | |||
{ | |||
return value; | |||
} | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
<UserControl x:Class="BPASmartClient.MinimalistUI.FControl.RunCanvas" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:local="clr-namespace:BPASmartClient.MinimalistUI.FControl" | |||
xmlns:con="clr-namespace:BPASmartClient.MinimalistUI.Converters" | |||
mc:Ignorable="d" | |||
d:DesignHeight="450" d:DesignWidth="800"> | |||
<UserControl.Resources> | |||
<con:ZoomConverter x:Key="ZoomX" IsHeight="False"/> | |||
<con:ZoomConverter x:Key="ZoomY" IsHeight="True"/> | |||
</UserControl.Resources> | |||
<Grid ClipToBounds="True"> | |||
<Canvas x:Name="RootCanvas" ClipToBounds="True" Background="Transparent" MouseLeftButtonUp="RootCanvas_MouseLeftButtonUp" | |||
MouseMove="RootCanvas_MouseMove" MouseLeftButtonDown="RootCanvas_MouseLeftButtoDown" MouseWheel="RootCanvas_MouseWheel"> | |||
<Canvas.RenderTransform> | |||
<TransformGroup> | |||
<ScaleTransform x:Name="Scale"/> | |||
<TranslateTransform x:Name="Translate"/> | |||
</TransformGroup> | |||
</Canvas.RenderTransform> | |||
</Canvas> | |||
<Grid VerticalAlignment="Bottom" Background="#4B959595"> | |||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="8 0"> | |||
<CheckBox x:Name="DragEnable" Content="拖动" Margin="4"/> | |||
<CheckBox x:Name="ZoomEnable" Content="缩放" Margin="4"/> | |||
</StackPanel> | |||
</Grid> | |||
</Grid> | |||
</UserControl> |
@@ -0,0 +1,135 @@ | |||
using BPASmartClient.Compiler; | |||
using BPASmartClient.MessageName.接收消息Model; | |||
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.MinimalistUI.FControl | |||
{ | |||
/// <summary> | |||
/// RunCanvas.xaml 的交互逻辑 | |||
/// </summary> | |||
public partial class RunCanvas :UserControl | |||
{ | |||
public RunCanvas() | |||
{ | |||
InitializeComponent(); | |||
Unloaded += (s,e) => Destory(); | |||
} | |||
/// <summary> | |||
/// Dispose子集 | |||
/// </summary> | |||
public void Destory() | |||
{ | |||
foreach (var item in RootCanvas.Children) | |||
{ | |||
if (item is IDisposable disposable) | |||
{ | |||
disposable.Dispose(); | |||
} | |||
} | |||
} | |||
public List<EventReceiveMessage> Run(List<FrameworkElement> canvas) | |||
{ | |||
List<EventReceiveMessage> messages = new List<EventReceiveMessage>(); | |||
RootCanvas.Children.Clear(); | |||
foreach (FrameworkElement element in canvas) | |||
{ | |||
if (element is IExecutable executable) | |||
{ | |||
executable.IsExecuteState = true; | |||
//if (executable.EventNameList != null && executable.EventNameList.Count > 0) | |||
//{ | |||
// messages.AddRange(executable.EventNameList); | |||
//} | |||
} | |||
RootCanvas.Children.Add(element); | |||
RegisterJsName(element); | |||
} | |||
return messages; | |||
} | |||
// 注册名称到Js | |||
static void RegisterJsName(FrameworkElement element) | |||
{ | |||
Config.GetInstance().SetVariable(element.Name,element); | |||
if (element is Panel panel) | |||
{ | |||
foreach (var item in panel.Children) | |||
{ | |||
RegisterJsName(item as FrameworkElement); | |||
} | |||
} | |||
} | |||
#region 拖动与缩放 | |||
private void RootCanvas_MouseMove(object sender,MouseEventArgs e) | |||
{ | |||
if (DragEnable.IsChecked == false) | |||
{ | |||
return; | |||
} | |||
if (e.LeftButton == MouseButtonState.Pressed && isPressed) | |||
{ | |||
Point point = e.GetPosition(this); | |||
var movex = (point.X - last.X); | |||
var movey = (point.Y - last.Y); | |||
Translate.X += movex; | |||
Translate.Y += movey; | |||
last = point; | |||
} | |||
} | |||
bool isPressed = false; | |||
Point last;//记录上次鼠标坐标位置 | |||
private void RootCanvas_MouseLeftButtoDown(object sender,MouseButtonEventArgs e) | |||
{ | |||
last = e.GetPosition(this); | |||
isPressed = true; | |||
} | |||
private void RootCanvas_MouseLeftButtonUp(object sender,MouseButtonEventArgs e) | |||
{ | |||
isPressed = false; | |||
} | |||
// 缩放 | |||
private void RootCanvas_MouseWheel(object sender,MouseWheelEventArgs e) | |||
{ | |||
if (ZoomEnable.IsChecked == false) | |||
{ | |||
return; | |||
} | |||
var zoomS = (e.Delta / 960d); | |||
var zoom = zoomS + Scale.ScaleX; | |||
if (zoom > 3 || zoom < 0.8) | |||
{ | |||
return; | |||
} | |||
Scale.ScaleX = Scale.ScaleY = zoom; | |||
Point mouse = e.GetPosition(RootCanvas); | |||
Point newMouse = new Point(mouse.X * zoomS,mouse.Y * zoomS); | |||
Translate.X -= newMouse.X; | |||
Translate.Y -= newMouse.Y; | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,154 @@ | |||
<Window x:Class="BPASmartClient.MinimalistUI.MainWindow" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
xmlns:local="clr-namespace:BPASmartClient.MinimalistUI" | |||
xmlns:hc="clr-namespace:BPASmartClient.SCADAControl.Converters;assembly=BPASmartClient.SCADAControl" | |||
xmlns:ctrl="clr-namespace:BPASmartClient.MinimalistUI.FControl" | |||
mc:Ignorable="d" | |||
WindowState="Maximized" | |||
Title="黑菠萝可视化软件" Height="450" Width="800" > | |||
<Window.Resources> | |||
<ResourceDictionary> | |||
<LinearGradientBrush x:Key="yanjing" EndPoint="0,1"> | |||
<GradientStop Color="#CC00EAFF" Offset="0.08"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.08"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.16"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.16"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.24"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.24"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.32"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.32"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.40"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.40"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.48"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.48"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.56"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.56"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.64"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.64"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.72"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.72"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.80"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.80"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.88"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.88"></GradientStop> | |||
<GradientStop Color="Transparent" Offset="0.96"></GradientStop> | |||
<GradientStop Color="#CC00EAFF" Offset="0.96"></GradientStop> | |||
</LinearGradientBrush> | |||
<Storyboard x:Key="Storyboard1" RepeatBehavior="Forever"> | |||
<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.StartPoint)" | |||
Storyboard.TargetName="rectangle"> | |||
<EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.855,0.148"/> | |||
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.852,0.855"/> | |||
<EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.148,0.855"/> | |||
<EasingPointKeyFrame KeyTime="0:0:2" Value="0.144,0.149"/> | |||
<EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,0"/> | |||
<EasingPointKeyFrame KeyTime="0:0:3" Value="0.855,0.148"/> | |||
<EasingPointKeyFrame KeyTime="0:0:3.5" Value="0.852,0.855"/> | |||
<EasingPointKeyFrame KeyTime="0:0:4" Value="0.148,0.855"/> | |||
<EasingPointKeyFrame KeyTime="0:0:4.5" Value="0.144,0.149"/> | |||
<EasingPointKeyFrame KeyTime="0:0:5" Value="0,0"/> | |||
</PointAnimationUsingKeyFrames> | |||
<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.EndPoint)" | |||
Storyboard.TargetName="rectangle"> | |||
<EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.145,0.852"/> | |||
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.148,0.145"/> | |||
<EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.852,0.145"/> | |||
<EasingPointKeyFrame KeyTime="0:0:2" Value="0.856,0.851"/> | |||
<EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,1"/> | |||
<EasingPointKeyFrame KeyTime="0:0:3" Value="0.145,0.852"/> | |||
<EasingPointKeyFrame KeyTime="0:0:3.5" Value="0.148,0.145"/> | |||
<EasingPointKeyFrame KeyTime="0:0:4" Value="0.852,0.145"/> | |||
<EasingPointKeyFrame KeyTime="0:0:4.5" Value="0.856,0.851"/> | |||
<EasingPointKeyFrame KeyTime="0:0:5" Value="0,1"/> | |||
</PointAnimationUsingKeyFrames> | |||
<ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)"> | |||
<EasingColorKeyFrame KeyTime="00:00:02" Value="Lime"/> | |||
<EasingColorKeyFrame KeyTime="00:00:02.5000000" Value="#FF075AFF"/> | |||
<EasingColorKeyFrame KeyTime="00:00:4.5" Value="Lime"/> | |||
<EasingColorKeyFrame KeyTime="00:00:5" Value="#FF075AFF"/> | |||
</ColorAnimationUsingKeyFrames> | |||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="ico_map"> | |||
<EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="-180"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:5" Value="-360"/> | |||
</DoubleAnimationUsingKeyFrames> | |||
</Storyboard> | |||
<Storyboard x:Key="StoryboardZY" RepeatBehavior="Forever"> | |||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="border"> | |||
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="12"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="6"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="12"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="12"/> | |||
</DoubleAnimationUsingKeyFrames> | |||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="border1"> | |||
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="12"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="6"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="12"/> | |||
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="12"/> | |||
</DoubleAnimationUsingKeyFrames> | |||
</Storyboard> | |||
</ResourceDictionary> | |||
</Window.Resources> | |||
<Window.Triggers> | |||
<EventTrigger RoutedEvent="FrameworkElement.Loaded"> | |||
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/> | |||
<BeginStoryboard Storyboard="{StaticResource StoryboardZY}"/> | |||
</EventTrigger> | |||
</Window.Triggers> | |||
<Grid> | |||
<Grid.Background> | |||
<ImageBrush ImageSource="/Images/bj.png"/> | |||
</Grid.Background> | |||
<ctrl:RunCanvas x:Name="runCanvas"/> | |||
<Grid Width="100" Height="100" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20"> | |||
<Image x:Name="ico_map" Width="85" Height="85" UseLayoutRounding="True" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="HighQuality" Source="/Images/椭圆 22 副本 2.png" RenderTransformOrigin="0.5,0.5" > | |||
<Image.RenderTransform> | |||
<TransformGroup> | |||
<ScaleTransform/> | |||
<SkewTransform/> | |||
<RotateTransform/> | |||
<TranslateTransform/> | |||
</TransformGroup> | |||
</Image.RenderTransform> | |||
</Image> | |||
<Image HorizontalAlignment="Center" Margin="0,90,0,0" UseLayoutRounding="True" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="HighQuality" VerticalAlignment="Top" Width="100" Height="20" Source="/Images/top_h.png" /> | |||
<Grid x:Name="grid_xiaoboluo" Width="100" Height="100" MouseEnter="grid_MouseEnter" MouseLeave="grid_MouseLeave"> | |||
<Grid> | |||
<Ellipse x:Name="rectangle" Width="70" Height="70" StrokeThickness="4" Fill="#FF022E50"> | |||
<Ellipse.Stroke> | |||
<LinearGradientBrush Opacity="1"> | |||
<GradientStop Color="Transparent" Offset="0"/> | |||
<GradientStop Color="#FF075AFF" Offset="1"/> | |||
</LinearGradientBrush> | |||
</Ellipse.Stroke> | |||
</Ellipse> | |||
<Image x:Name="ico" UseLayoutRounding="True" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="-20,25,0,0" Width="25" Height="30" Source="/Images/logo-pic.png" /> | |||
<Image Width="31.6" UseLayoutRounding="True" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="HighQuality" Height="7.9" Margin="20,0,0,25" Source="/Images/logo-Text.png" /> | |||
<TextBlock Margin="0,24,0,0" UseLayoutRounding="True" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" Foreground="#FF00EAFF" FontFamily="黑体" FontWeight="Bold">智能卓越</TextBlock> | |||
</Grid> | |||
<Grid x:Name="grid_celine" Visibility="Collapsed"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition></ColumnDefinition> | |||
<ColumnDefinition></ColumnDefinition> | |||
</Grid.ColumnDefinitions> | |||
<Ellipse Grid.ColumnSpan="2" Width="70" Height="70" Fill="#2571ac" ></Ellipse> | |||
<Grid x:Name="yanjing_move" Grid.ColumnSpan="2" Width="35" Height="35"> | |||
<Grid > | |||
<Border x:Name="border1" HorizontalAlignment="Left" Grid.Column="0" Background="{DynamicResource yanjing}" CornerRadius="2" Width="8" Height="12"/> | |||
<Border x:Name="border" HorizontalAlignment="Right" Grid.Column="1" Background="{DynamicResource yanjing}" CornerRadius="2" Width="8" Height="12"/> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Window> |
@@ -0,0 +1,74 @@ | |||
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; | |||
} | |||
} | |||
} |
@@ -170,6 +170,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerTestDemo", "Compute | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "5.加载UI程序", "5.加载UI程序", "{1DA0F827-5F3D-4B87-9B51-6C0BF5365A3F}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MinimalistUI", "BPASmartClient.MinimalistUI\BPASmartClient.MinimalistUI.csproj", "{AE49009F-B7D9-482E-AD1F-4514435272E1}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
@@ -1544,6 +1546,26 @@ Global | |||
{8940F1E2-693D-407E-AD03-722718860609}.Release|x64.Build.0 = Release|Any CPU | |||
{8940F1E2-693D-407E-AD03-722718860609}.Release|x86.ActiveCfg = Release|Any CPU | |||
{8940F1E2-693D-407E-AD03-722718860609}.Release|x86.Build.0 = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|ARM.Build.0 = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|ARM64.ActiveCfg = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|ARM64.Build.0 = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|x64.ActiveCfg = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|x64.Build.0 = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Debug|x86.Build.0 = Debug|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|ARM.ActiveCfg = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|ARM.Build.0 = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|ARM64.ActiveCfg = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|ARM64.Build.0 = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|x64.ActiveCfg = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|x64.Build.0 = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|x86.ActiveCfg = Release|Any CPU | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1}.Release|x86.Build.0 = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
@@ -1622,6 +1644,7 @@ Global | |||
{1062F7C7-0117-413C-A45E-8F9B525FC036} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | |||
{8940F1E2-693D-407E-AD03-722718860609} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | |||
{1DA0F827-5F3D-4B87-9B51-6C0BF5365A3F} = {7B0175AD-BB74-4A98-B9A7-1E289032485E} | |||
{AE49009F-B7D9-482E-AD1F-4514435272E1} = {1DA0F827-5F3D-4B87-9B51-6C0BF5365A3F} | |||
EndGlobalSection | |||
GlobalSection(ExtensibilityGlobals) = postSolution | |||
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC} | |||