From 5085acdc9356f8b1c0ee1c89145d160e942923cb Mon Sep 17 00:00:00 2001 From: fyf Date: Fri, 14 Oct 2022 10:19:19 +0800 Subject: [PATCH 01/19] 1 --- BPASmart.MenuLoad/App.xaml.cs | 5 +- BeDesignerSCADA/BeDesignerSCADA.csproj | 15 +-- BeDesignerSCADA/Controls/CanvasPanelNew.xaml | 3 +- BeDesignerSCADA/Controls/MainCanvasPanel.xaml | 2 +- BeDesignerSCADA/Helper/SystemHelper.cs | 97 +++++++++--------- BeDesignerSCADA/Images/配置.ico | Bin 0 -> 2686 bytes BeDesignerSCADA/View/ChildEditWindow.xaml | 2 +- BeDesignerSCADA/View/RunWindows.xaml | 2 +- BeDesignerSCADA/View/RunWindowsLao.xaml | 2 +- 9 files changed, 65 insertions(+), 63 deletions(-) create mode 100644 BeDesignerSCADA/Images/配置.ico diff --git a/BPASmart.MenuLoad/App.xaml.cs b/BPASmart.MenuLoad/App.xaml.cs index 27f00a03..8f138296 100644 --- a/BPASmart.MenuLoad/App.xaml.cs +++ b/BPASmart.MenuLoad/App.xaml.cs @@ -47,8 +47,9 @@ namespace BPASmart.MenuLoad this.Dispatcher.Invoke(() => { if (File.Exists(_path)) { - SystemHelperNew.GetInstance.CreateDesktopShortcut("BeDesignerSCADA.exe"); - SystemHelperNew.GetInstance.CreateDesktopShortcut(); + SystemHelperNew.GetInstance.CreateShortcutOnDesktop(); + SystemHelperNew.GetInstance.CreateShortcutOnDesktop("可视化配置工具"); + //SystemHelperNew.GetInstance.CreateDesktopShortcut(); run.LoadingData(_path); run.Show(); isShow = true; diff --git a/BeDesignerSCADA/BeDesignerSCADA.csproj b/BeDesignerSCADA/BeDesignerSCADA.csproj index 3b2ea24f..59a1df02 100644 --- a/BeDesignerSCADA/BeDesignerSCADA.csproj +++ b/BeDesignerSCADA/BeDesignerSCADA.csproj @@ -5,7 +5,8 @@ net6.0-windows enable true - Images\fyf.ico + Images\配置.ico + 可视化配置工具 @@ -74,10 +75,7 @@ - - - - + @@ -109,7 +107,12 @@ - + + Always + + + Always + diff --git a/BeDesignerSCADA/Controls/CanvasPanelNew.xaml b/BeDesignerSCADA/Controls/CanvasPanelNew.xaml index 39d4fdf2..acfceaa1 100644 --- a/BeDesignerSCADA/Controls/CanvasPanelNew.xaml +++ b/BeDesignerSCADA/Controls/CanvasPanelNew.xaml @@ -15,7 +15,8 @@ - + + diff --git a/BeDesignerSCADA/Controls/MainCanvasPanel.xaml b/BeDesignerSCADA/Controls/MainCanvasPanel.xaml index b40e5ee4..7eaf2de9 100644 --- a/BeDesignerSCADA/Controls/MainCanvasPanel.xaml +++ b/BeDesignerSCADA/Controls/MainCanvasPanel.xaml @@ -16,7 +16,7 @@ - + diff --git a/BeDesignerSCADA/Helper/SystemHelper.cs b/BeDesignerSCADA/Helper/SystemHelper.cs index f643c342..f48189fb 100644 --- a/BeDesignerSCADA/Helper/SystemHelper.cs +++ b/BeDesignerSCADA/Helper/SystemHelper.cs @@ -3,6 +3,7 @@ using Microsoft.Win32; using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -33,67 +34,63 @@ namespace BeDesignerSCADA.Helper /// 创建桌面快捷方式 /// /// 成功或失败 - public bool CreateDesktopShortcut() + public void CreateShortcutOnDesktop() { - //1、在COM对象中找到 Windows Script Host Object Model - //2、添加引用 using IWshRuntimeLibrary; - string deskTop = string.Empty; - try + //添加引用 (com->Windows Script Host Object Model),using IWshRuntimeLibrary; + String shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), $"{AppDomain.CurrentDomain.FriendlyName}.lnk"); + if (!System.IO.File.Exists(shortcutPath)) { - deskTop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\"; - if (System.IO.File.Exists(deskTop + GetApplicationName + ".lnk")) // + // 获取当前应用程序目录地址 + String exePath = Process.GetCurrentProcess().MainModule.FileName; + IWshShell shell = new WshShell(); + // 确定是否已经创建的快捷键被改名了 + foreach (var item in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "*.lnk")) { - return true; + WshShortcut tempShortcut = (WshShortcut)shell.CreateShortcut(item); + if (tempShortcut.TargetPath == exePath) + { + return; + } } - WshShell shell = new WshShell(); - //快捷键方式创建的位置、名称 - IWshShortcut shortcut = shell.CreateShortcut(deskTop + GetApplicationName + ".lnk") as IWshShortcut; - shortcut.TargetPath = GetApplicationPath; //目标文件 - //该属性指定应用程序的工作目录,当用户没有指定一个具体的目录时,快捷方式的目标应用程序将使用该属性所指定的目录来装载或保存文件。 - shortcut.WorkingDirectory = System.Environment.CurrentDirectory; - shortcut.WindowStyle = 1; //目标应用程序的窗口状态分为普通、最大化、最小化【1,3,7】 - shortcut.Description = GetApplicationName; //描述 - //shortcut.IconLocation = exePath + "\\logo.ico"; //快捷方式图标 - shortcut.Arguments = ""; - //shortcut.Hotkey = "CTRL+ALT+F11"; // 快捷键 - shortcut.Save(); //必须调用保存快捷才成创建成功 - return true; - } - catch (Exception ex) - { - return false; + WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(shortcutPath); + shortcut.TargetPath = exePath; + shortcut.Arguments = "";// 参数 + shortcut.Description = AppDomain.CurrentDomain.FriendlyName; + shortcut.WorkingDirectory = Environment.CurrentDirectory;//程序所在文件夹,在快捷方式图标点击右键可以看到此属性 + shortcut.IconLocation = exePath;//图标,该图标是应用程序的资源文件 + //shortcut.Hotkey = "CTRL+SHIFT+W";//热键,发现没作用,大概需要注册一下 + shortcut.WindowStyle = 1; + shortcut.Save(); } } - public bool CreateDesktopShortcut(string Name) + public void CreateShortcutOnDesktop(string Name) { - //1、在COM对象中找到 Windows Script Host Object Model - //2、添加引用 using IWshRuntimeLibrary; - string deskTop = string.Empty; - try + //添加引用 (com->Windows Script Host Object Model),using IWshRuntimeLibrary; + String shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), $"{Name}.lnk"); + if (!System.IO.File.Exists(shortcutPath)) { - deskTop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\"; - if (System.IO.File.Exists(deskTop + Name + ".lnk")) // + // 获取当前应用程序目录地址 + String exePath = $"{AppDomain.CurrentDomain.BaseDirectory}{Name}.exe";// Process.GetCurrentProcess().MainModule.FileName; + IWshShell shell = new WshShell(); + // 确定是否已经创建的快捷键被改名了 + foreach (var item in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "*.lnk")) { - return true; + WshShortcut tempShortcut = (WshShortcut)shell.CreateShortcut(item); + if (tempShortcut.TargetPath == exePath) + { + return; + } } - WshShell shell = new WshShell(); - //快捷键方式创建的位置、名称 - IWshShortcut shortcut = shell.CreateShortcut(deskTop + Name + ".lnk") as IWshShortcut; - shortcut.TargetPath = GetApplicationPath; //目标文件 - //该属性指定应用程序的工作目录,当用户没有指定一个具体的目录时,快捷方式的目标应用程序将使用该属性所指定的目录来装载或保存文件。 - shortcut.WorkingDirectory = System.Environment.CurrentDirectory; - shortcut.WindowStyle = 1; //目标应用程序的窗口状态分为普通、最大化、最小化【1,3,7】 - shortcut.Description = Name; //描述 - //shortcut.IconLocation = exePath + "\\logo.ico"; //快捷方式图标 - shortcut.Arguments = ""; - //shortcut.Hotkey = "CTRL+ALT+F11"; // 快捷键 - shortcut.Save(); //必须调用保存快捷才成创建成功 - return true; - } - catch (Exception ex) - { - return false; + WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(shortcutPath); + shortcut.TargetPath = exePath; + shortcut.Arguments = "";// 参数 + shortcut.Description = AppDomain.CurrentDomain.FriendlyName; + shortcut.WorkingDirectory = Environment.CurrentDirectory;//程序所在文件夹,在快捷方式图标点击右键可以看到此属性 + shortcut.IconLocation = exePath;//图标,该图标是应用程序的资源文件 + //shortcut.Hotkey = "CTRL+SHIFT+W";//热键,发现没作用,大概需要注册一下 + shortcut.WindowStyle = 1; + shortcut.Save(); } } diff --git a/BeDesignerSCADA/Images/配置.ico b/BeDesignerSCADA/Images/配置.ico new file mode 100644 index 0000000000000000000000000000000000000000..0c00208f299b96d10b5c04dd44d68d303eb1258b GIT binary patch literal 2686 zcmbVOv5w<55FNvZjP4MCCKkxSP28r;;;O5>pK~R*BDazbDacM|TygNyOiW@*;>dj$gbrb;m@1i=kCQHFD+_x$V+?+j&qXbhS}&MF%wj?;`0hJLGW|p zvtJ0RAX{PY)?VDA!1_8^c6V#<{X$?ucndB^-MeVbTX3pCU`^$no$mI)j!HN|0Xw|L zjT^lv1Y_~>AeoGgU99~CYWDW`ad7PQsq@cz{b?K>dwuGH*82Ml0Vmma>%QvsD*|@u zWM$(}3RXjOpU87!|O-A-|O9a z;-=6kapS_NIUzgIJ*O)*YQyc!D?l$Gc4F+z-`h1?mvUz$Br#e{0QyjvXMLG zVF!Yh<&nTD)UlE!dPrP=K(nFeD*^mC*%5y55IyYHAF+W~0=BIbA_$-osurJD)=UVv z5jd`-w)km9*3(G9zSOZ2d?TtWc2fd>Dr*&j>?a&^A^2Fv`6M7HKnk1Ot86AP<(NTB zZWjK&+Y>N77MHx)+BDqs0|9?uT_-p@sj5uC=KXjMIHD-8cT^^@W~aXm_!<||T$ zrD)EyJTGA*EiYm_S|+ha*srh$*ao&CPWZmYuMO0~R_rF7@gdr#3xsK|b( zkoo@{3F?IfH3ysXl~L%`f - + diff --git a/BeDesignerSCADA/View/RunWindows.xaml b/BeDesignerSCADA/View/RunWindows.xaml index 611c1d3d..1866a3fb 100644 --- a/BeDesignerSCADA/View/RunWindows.xaml +++ b/BeDesignerSCADA/View/RunWindows.xaml @@ -12,7 +12,7 @@ - + diff --git a/BeDesignerSCADA/View/RunWindowsLao.xaml b/BeDesignerSCADA/View/RunWindowsLao.xaml index 247d4663..76b99164 100644 --- a/BeDesignerSCADA/View/RunWindowsLao.xaml +++ b/BeDesignerSCADA/View/RunWindowsLao.xaml @@ -11,7 +11,7 @@ - + From 5d1bb5aaadc1f6d3ad6107b6b67e1ed01c6247cc Mon Sep 17 00:00:00 2001 From: fyf Date: Fri, 14 Oct 2022 10:25:37 +0800 Subject: [PATCH 02/19] 1 --- BPASmart.PageLoad/MainWindow.xaml | 4 ++-- .../DLL/BPASmartClient.Compiler.dll | Bin 55808 -> 55808 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BPASmart.PageLoad/MainWindow.xaml b/BPASmart.PageLoad/MainWindow.xaml index 943a6d58..31f9ff63 100644 --- a/BPASmart.PageLoad/MainWindow.xaml +++ b/BPASmart.PageLoad/MainWindow.xaml @@ -2,7 +2,7 @@ x:Class="BPASmart.PageLoad.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:ctrl="clr-namespace:BeDesignerSCADA.Controls;assembly=BeDesignerSCADA" + xmlns:ctrl="clr-namespace:BeDesignerSCADA.Controls;assembly=可视化配置工具" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:BPASmart.PageLoad" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -13,7 +13,7 @@ mc:Ignorable="d"> - + diff --git a/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll b/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll index 3331c0b18cfedf496661f09e63c8ec8bc13716c3..c77b1d4f276535ff435161f578c5df3ff460a01d 100644 GIT binary patch delta 294 zcmZqJ!rZWhc|r$ERZ`TVi9Irm`zEdoXUv++$f(Ym@t%PpWU?ZY&g4i&b;cu;8yV{v z=S^m05@vl;#=yWh`Qat=%>hiioEZ;q=62gFBKd-qfk8PmnBhwz1A_nqknJAo=>nu# zHb0C~OBD3hXLuictWzx5cVb@s)7bLB$r^jC7#Sxg?@<+4sjJw_DirG2wJ`mo$~~5~ zn`i8KA|m=_bI=9o%x9{4`A6JZ@z>f(Kkx`ws;ynXH$Yez(oyn1m>Wo(=H!{{U zuA9urB+UAyjDdl1^2JN$n**43IWu0~%nuh zHb0C~OH_>3XK-RjWpDxFVunnHbcQ@2tB4_(!I{AkDC)>CSz?bBBg5q2J*om5!Zuv- zWl8j&BlqpjEX9`A%^iE5h={iT{d$Oj(KmnzXlOeSp8-1X%;d(4;;g|R7#M;l&%LND z;AXa=;%@VI=QXlBdY-hq7)`!#vC0T4*bEZ{8ssFDz9qwJ!HTGVWt-R8-cvKcq?UHQe#birV=;Enf;6Ajn_P2FpL From c69ce1adaad17f34632205e819a052fff298376c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com> Date: Fri, 14 Oct 2022 10:41:20 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Fonts/iconfont.ttf | Bin 8156 -> 10276 bytes .../Pages/View/LoginView.xaml.cs | 4 +- .../Pages/View/PromptView.xaml | 52 ++++ .../Pages/View/PromptView.xaml.cs | 33 +++ .../UserControls/NumberTextBox.xaml | 230 ++++++++++++++++++ .../UserControls/NumberTextBox.xaml.cs | 81 ++++++ .../Fonts/iconfont.ttf | Bin 9412 -> 10276 bytes .../Models/BaseModel.cs | 3 + .../ViewModels/NewOutletViewModel.cs | 31 ++- .../ViewModels/NewRecipeViewModel.cs | 14 ++ .../ViewModels/NewSiloViewModel.cs | 45 ++-- .../Views/NewOutletView.xaml | 8 + .../Views/NewRecipeView.xaml | 10 +- .../Views/PromptView.xaml | 22 ++ .../Views/PromptView.xaml.cs | 27 ++ WPFDemo/App.xaml | 2 +- WPFDemo/Window2.xaml | 89 +++++++ WPFDemo/Window2.xaml.cs | 32 +++ 18 files changed, 659 insertions(+), 24 deletions(-) create mode 100644 BPASmartClient.CustomResource/Pages/View/PromptView.xaml create mode 100644 BPASmartClient.CustomResource/Pages/View/PromptView.xaml.cs create mode 100644 BPASmartClient.CustomResource/UserControls/NumberTextBox.xaml create mode 100644 BPASmartClient.CustomResource/UserControls/NumberTextBox.xaml.cs create mode 100644 BPASmartClient.SmallBatchingSystem/Views/PromptView.xaml create mode 100644 BPASmartClient.SmallBatchingSystem/Views/PromptView.xaml.cs create mode 100644 WPFDemo/Window2.xaml create mode 100644 WPFDemo/Window2.xaml.cs diff --git a/BPASmartClient.CustomResource/Fonts/iconfont.ttf b/BPASmartClient.CustomResource/Fonts/iconfont.ttf index 3fa0ee4cc0364857bbc20c64d2e4d64c0f7685e8..d6a19d36c377479389afc3dd0ba2c05baeb156f1 100644 GIT binary patch delta 3038 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 JuSA>4e*iQKi8BBI delta 941 zcmZ{i%}Z2K7{;G-@15(+IDXV*O-|G(IrzCS#z9GH7l8;71QJROjylAQ3b}AH8pUXn zh;X;2PviC-{c_HhDH)*w$lBStTz&@CD^B$(mBpmGX z9!gV+YPr8@%!K%xdpfwUTQl9Dt~9;Cy-UL{B; z3qsA19s|`w`V9KpN!mb1kO2d|L52-<2^llcFC=TAb4bp>3?Kyq(|{B;+CTq#vTR^P zkW~Z2f@~OcMzUjIfG95*7$quYgAP>>1vR4HSuyLO^}=@T`*y{yI$>u&P#;JIUb!hZ o@7{Bt2m3?8(A#j$_3)$cvv755x2_mdaqng_t+4ew*`a9rFCV+!&;S4c diff --git a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs index ee02bb0e..c3acb29d 100644 --- a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs @@ -28,7 +28,7 @@ namespace BPASmartClient.CustomResource.Pages.View { InitializeComponent(); //grid.Visibility = Visibility.Collapsed; - Username.Focus(); + //Username.Focus(); Username.SelectionStart = Username.Text.Trim().Length; this.Loaded += LoginView_Loaded; ActionManage.GetInstance.Register(new Action(() => @@ -55,6 +55,8 @@ namespace BPASmartClient.CustomResource.Pages.View //player.Unloaded += new RoutedEventHandler(media_Unloaded);// 添加元素卸载完成事件 -- 停止播放 //player.MediaOpened += Player_MediaOpened;//已播放事件 } + grid.Visibility = Visibility.Visible; + Username.Focus(); } private void Player_MediaOpened(object sender, RoutedEventArgs e) diff --git a/BPASmartClient.CustomResource/Pages/View/PromptView.xaml b/BPASmartClient.CustomResource/Pages/View/PromptView.xaml new file mode 100644 index 00000000..917ceb69 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/View/PromptView.xaml @@ -0,0 +1,52 @@ + + + + + + + +