commit 9db965e8c1401ea1ebf7803e6f5e397a7b1df161 Author: wugang <425674808@qq.com> Date: Mon Nov 20 16:48:38 2017 +0800 提交项目文件 diff --git a/CowOutputClient.sln b/CowOutputClient.sln new file mode 100644 index 0000000..c03701f --- /dev/null +++ b/CowOutputClient.sln @@ -0,0 +1,74 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CowOutputClient", "CowOutputClient\CowOutputClient.csproj", "{F216A33C-71D2-4E4A-926A-B315C2A8B0CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FireBirdUtil", "FireBirdUtil\FireBirdUtil.csproj", "{3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyPad", "KeyPad\KeyPad.csproj", "{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{4768FDF9-DBC5-441F-AC59-5655146B8961}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "Utils\Utils.csproj", "{D123A086-C03A-4B8B-BEFB-124E102D3ADE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeighBusiness", "WeighBusiness\WeighBusiness.csproj", "{35613A1C-A935-480D-9545-78BCF5279AC4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Debug|x86.ActiveCfg = Debug|Any CPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|Any CPU.Build.0 = Release|Any CPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE}.Release|x86.ActiveCfg = Release|Any CPU + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|x86.ActiveCfg = Debug|x86 + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Debug|x86.Build.0 = Debug|x86 + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|Any CPU.Build.0 = Release|Any CPU + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|x86.ActiveCfg = Release|x86 + {3B09E2B6-B649-47DE-BF8D-2E233D47ACFD}.Release|x86.Build.0 = Release|x86 + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.ActiveCfg = Debug|x86 + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.Build.0 = Debug|x86 + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.Build.0 = Release|Any CPU + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.ActiveCfg = Release|x86 + {3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.Build.0 = Release|x86 + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|x86.ActiveCfg = Debug|x86 + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Debug|x86.Build.0 = Debug|x86 + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|Any CPU.Build.0 = Release|Any CPU + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|x86.ActiveCfg = Release|x86 + {4768FDF9-DBC5-441F-AC59-5655146B8961}.Release|x86.Build.0 = Release|x86 + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|x86.ActiveCfg = Debug|x86 + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Debug|x86.Build.0 = Debug|x86 + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|Any CPU.Build.0 = Release|Any CPU + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|x86.ActiveCfg = Release|x86 + {D123A086-C03A-4B8B-BEFB-124E102D3ADE}.Release|x86.Build.0 = Release|x86 + {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|x86.ActiveCfg = Debug|x86 + {35613A1C-A935-480D-9545-78BCF5279AC4}.Debug|x86.Build.0 = Debug|x86 + {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|Any CPU.Build.0 = Release|Any CPU + {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|x86.ActiveCfg = Release|x86 + {35613A1C-A935-480D-9545-78BCF5279AC4}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CowOutputClient/App.xaml b/CowOutputClient/App.xaml new file mode 100644 index 0000000..41ba003 --- /dev/null +++ b/CowOutputClient/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/CowOutputClient/App.xaml.cs b/CowOutputClient/App.xaml.cs new file mode 100644 index 0000000..d237796 --- /dev/null +++ b/CowOutputClient/App.xaml.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Windows; +using CowOutputClient.Utils; +using Update.Utils; + +namespace CowOutputClient +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + public App() + { + //处理程序中未捕获的异常 + DispatcherUnhandledException += App_DispatcherUnhandledException; + } + + private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) + { + WindowUtil.Err(e.Exception.Message.ToString()); + e.Handled = true; + } + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + init(); + LoginUtil.InitRpc(); + Application currApp = Application.Current; + currApp.StartupUri = new Uri("MainWindow.xaml", UriKind.RelativeOrAbsolute); + } + + private void init() + { + var exePath = Process.GetCurrentProcess().MainModule.FileName; + + var folder = new FileInfo(exePath).Directory.FullName; + + var logFolder = Path.Combine(folder, "logs"); + if (!Directory.Exists(logFolder)) { + Directory.CreateDirectory(logFolder); + } + + var fileName = string.Format("{0:yyyyMMdd}.log", DateTime.Now); + var log = Path.Combine(logFolder, fileName); + Trace.Listeners.Clear(); + Trace.Listeners.Add(new TextWriterTraceListener(log)); + Trace.AutoFlush = true; + } + } +} diff --git a/CowOutputClient/Controls/CaptionBarButton.xaml b/CowOutputClient/Controls/CaptionBarButton.xaml new file mode 100644 index 0000000..e6391ff --- /dev/null +++ b/CowOutputClient/Controls/CaptionBarButton.xaml @@ -0,0 +1,79 @@ + + + + + + + diff --git a/CowOutputClient/Controls/CaptionBarButton.xaml.cs b/CowOutputClient/Controls/CaptionBarButton.xaml.cs new file mode 100644 index 0000000..6791d4e --- /dev/null +++ b/CowOutputClient/Controls/CaptionBarButton.xaml.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +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 CowOutputClient +{ + /// + /// CaptionBarButton.xaml 的交互逻辑 + /// + public partial class CaptionBarButton : UserControl, INotifyPropertyChanged + { + public event Predicate PreCloseRequest; + + public CaptionBarButton() + { + InitializeComponent(); + } + + private Window CurWindow { get { return Window.GetWindow(this); } } + + public event PropertyChangedEventHandler PropertyChanged; + public void Notify(string prop) + { + if (PropertyChanged != null) + PropertyChanged.Invoke(this, new PropertyChangedEventArgs(prop)); + } + + #region 依赖属性 + public static readonly DependencyProperty CanMaxinizeProperty; + public bool CanMaxinize + { + set { SetValue(CanMaxinizeProperty, value); } + get { return (bool)GetValue(CanMaxinizeProperty); } + } + static void OnCanMaxinizePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) + { + CaptionBarButton cbb = obj as CaptionBarButton; + cbb.btnMaximize.Visibility = cbb.CanMaxinize ? Visibility.Visible : Visibility.Hidden; + cbb.btnMinimize.Margin = cbb.CanMaxinize ? new Thickness(0, 0, 60, 0) : new Thickness(0, 0, 30, 0); + } + + public static readonly DependencyProperty CanMinimizeProperty; + public bool CanMinimize + { + set { SetValue(CanMinimizeProperty, value); } + get { return (bool)GetValue(CanMinimizeProperty); } + } + static void OnCanMinimizePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) + { + CaptionBarButton cbb = obj as CaptionBarButton; + cbb.btnMinimize.Visibility = cbb.CanMinimize ? Visibility.Visible : Visibility.Hidden; + } + + static CaptionBarButton() + { + FrameworkPropertyMetadata metadata1 = new FrameworkPropertyMetadata(true, OnCanMaxinizePropertyChanged); + CanMaxinizeProperty = DependencyProperty.Register( + "CanMaxinize", typeof(bool), typeof(CaptionBarButton), metadata1, null); + + FrameworkPropertyMetadata metadata2 = new FrameworkPropertyMetadata(true, OnCanMinimizePropertyChanged); + CanMinimizeProperty = DependencyProperty.Register( + "CanMinimize", typeof(bool), typeof(CaptionBarButton), metadata2, null); + } + + #endregion + + + /// + /// 是否是最大化状态 + /// + private bool IsMaximize + { + get + { + if (CurWindow != null) + return Window.GetWindow(this).WindowState == WindowState.Maximized; + else + return false; + } + set + { + if (CurWindow != null) + CurWindow.WindowState = value ? WindowState.Maximized : WindowState.Normal; + Notify("MaximizeToolTip"); + Notify("PathMaximizeVisibility"); + Notify("PathNormalVisibility"); + } + } + + public string MaximizeToolTip + { + get + { + return IsMaximize ? "还原" : "最大化"; + } + } + + public Visibility PathMaximizeVisibility + { + get + { + return IsMaximize ? Visibility.Visible : Visibility.Hidden; + } + } + + public Visibility PathNormalVisibility + { + get + { + return IsMaximize ? Visibility.Hidden : Visibility.Visible; + } + } + + private void btnClose_Click(object sender, RoutedEventArgs e) + { + if (PreCloseRequest == null || PreCloseRequest(this)) + CurWindow.Close(); + } + + private void btnMinimize_Click(object sender, RoutedEventArgs e) + { + CurWindow.WindowState = WindowState.Minimized; + } + + private void btnMaximize_Click(object sender, RoutedEventArgs e) + { + IsMaximize = !IsMaximize; + } + + private void UserControl_Loaded(object sender, RoutedEventArgs e) + { + if (CurWindow != null) + { + IsMaximize = CurWindow.WindowState == WindowState.Maximized; + CurWindow.StateChanged += (s, args) => + { + Notify("MaximizeToolTip"); + Notify("PathMaximizeVisibility"); + Notify("PathNormalVisibility"); + }; + } + } + } +} diff --git a/CowOutputClient/CowOutputClient.csproj b/CowOutputClient/CowOutputClient.csproj new file mode 100644 index 0000000..fe103b3 --- /dev/null +++ b/CowOutputClient/CowOutputClient.csproj @@ -0,0 +1,160 @@ + + + + + Debug + AnyCPU + {F216A33C-71D2-4E4A-926A-B315C2A8B0CE} + WinExe + Properties + CowOutputClient + CowOutputClient + v4.0 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\牛屠宰分割\B3CowButcherClient\FireBirdUtil\FirebirdSql.Data.FirebirdClient.dll + + + False + ..\..\牛屠宰分割\B3CowButcherClient\B3CowButcherClient\bin\Debug\Forks.JsonRpc.Client.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + OperateWindow.xaml + + + SelectedProductWindow.xaml + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + CaptionBarButton.xaml + + + MainWindow.xaml + Code + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + {3b09e2b6-b649-47de-bf8d-2e233d47acfd} + FireBirdUtil + + + {3adbff38-915c-4115-9cdd-81c0cad9733a} + KeyPad + + + {4768fdf9-dbc5-441f-ac59-5655146b8961} + Update + + + {d123a086-c03a-4b8b-befb-124e102d3ade} + Utils + + + {35613a1c-a935-480d-9545-78bcf5279ac4} + WeighBusiness + + + + + \ No newline at end of file diff --git a/CowOutputClient/Images/u15.png b/CowOutputClient/Images/u15.png new file mode 100644 index 0000000..a55b9ae Binary files /dev/null and b/CowOutputClient/Images/u15.png differ diff --git a/CowOutputClient/Images/u17.png b/CowOutputClient/Images/u17.png new file mode 100644 index 0000000..a3f328d Binary files /dev/null and b/CowOutputClient/Images/u17.png differ diff --git a/CowOutputClient/Images/u19.png b/CowOutputClient/Images/u19.png new file mode 100644 index 0000000..fc9347e Binary files /dev/null and b/CowOutputClient/Images/u19.png differ diff --git a/CowOutputClient/Images/u37.png b/CowOutputClient/Images/u37.png new file mode 100644 index 0000000..2533129 Binary files /dev/null and b/CowOutputClient/Images/u37.png differ diff --git a/CowOutputClient/MainWindow.xaml b/CowOutputClient/MainWindow.xaml new file mode 100644 index 0000000..0e54cbc --- /dev/null +++ b/CowOutputClient/MainWindow.xaml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + diff --git a/CowOutputClient/MainWindow.xaml.cs b/CowOutputClient/MainWindow.xaml.cs new file mode 100644 index 0000000..c583984 --- /dev/null +++ b/CowOutputClient/MainWindow.xaml.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +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; +using CowOutputClient.Utils; +using Forks.JsonRpc.Client; +using Forks.JsonRpc.Client.Data; +using CowOutputClient.Utils; +using KeyPad; +using Update.Utils; +using Utils; +using WeighBusiness.BL; +using WeighBusiness.BO; +using WeighBusiness.Utils; + +namespace CowOutputClient +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + + private void btnLogin_Click(object sender, RoutedEventArgs e) + { + try { + if (string.IsNullOrEmpty(txtUserName.Text)) { + WindowUtil.Warn("用户名不能为空"); + return; + } + string errorInfo; + var isExist = UserBL.Exist(txtUserName.Text); + var success = LoginUtil.Login(txtUserName.Text, txtPassWord.Password, out errorInfo); + if (!success) { + if (!string.IsNullOrEmpty(errorInfo)) { + if (!isExist) { + if (errorInfo == "无法连接到远程服务器" || errorInfo == "Unable to connect to the remote server") { + WindowUtil.Warn("网络不通请联系管理员"); + return; + } + WindowUtil.Warn(errorInfo); + return; + } + + if (errorInfo == "无法连接到远程服务器" || errorInfo.Contains("Unable to connect to the remote server")) { + //"无法连接到远程服务器" 就登录客户端本地 + LoginClient(); + } else { + WindowUtil.Warn(errorInfo); + return; + } + } + } else { + UpdateERPUser(); + } + BusinessInfosSync(); + ShowWinodw(); + } catch (Exception exe) { + LogUtil.LogError("登录报错:" + exe.Message); + WindowUtil.Err(exe.ToString()); + } + + } + + private void BusinessInfosSync() + { + WpfUserBL.SyncWpfUser(); + ProductCatalogBL.SyncProductCatalog(); + ProductPlanBL.SyncProductPlan(); + ProductTeamBL.SyncProductTeam(); + } + + private void ShowWinodw() + { + var window = new OperateWindow(); + window.WindowState = System.Windows.WindowState.Maximized; + window.Focus(); + this.Visibility = System.Windows.Visibility.Hidden; + App.Current.MainWindow = window; + App.Current.MainWindow.Show(); + this.Close(); + } + + public void LoginClient() + { + try { + var clientLogin = UserBL.LoginTerminal(txtUserName.Text, txtPassWord.Password); + if (!clientLogin) { + WindowUtil.Inf("无法连接到远程服务器,当前为离线登录模式,用户名或密码不正确"); + } + } catch (LoginError error) { + WindowUtil.Err(error.Message); + } + } + + private void UpdateERPUser() + { + + var clientUser = UserBL.Load(txtUserName.Text); + if (clientUser == null) { + clientUser = CreateERPUser(clientUser); + SetUserIsAdmin(clientUser); + UserBL.Save(clientUser, false); + } else { + clientUser.ERP_User_Password = txtPassWord.Password; + SetUserIsAdmin(clientUser); + UserBL.Save(clientUser, false); + } + UserBL.CurrentUser = clientUser; + } + + private User CreateERPUser(User clientUser) + { + var wpfUser = RpcFacade.Call("/MainSystem/B3_HaoYue/Rpcs/RpcFun/GetCurrentUser"); + clientUser = new User() { + ERP_User_Name = txtUserName.Text, + ERP_User_Password = UserBL.EncodeUserPassword(txtPassWord.Password), + ERP_User_ID = wpfUser == null ? 0 : wpfUser.Get("ID"), + IsDomainManager = false, + }; + return clientUser; + } + + private void SetUserIsAdmin(User user) + { + string method = "/MainSystem/B3_HaoYue/Rpcs/RpcFun/CheckCurrentUserRole"; + try { + user.IsAdmin = RpcFacade.Call(method); + } catch (Exception e) { + } + } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + CheckDataBase(); + } + + private static void CheckDataBase() + { + var creatDatabaseOrTableError = CreateUtil.CreateDataBaseAndTable(); + if (!string.IsNullOrEmpty(creatDatabaseOrTableError)) { + WindowUtil.Warn(creatDatabaseOrTableError); + } + } + + private void txtPassWord_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + var keypadWindow = new Keypad(this); + if (keypadWindow.ShowDialog() == true && !string.IsNullOrEmpty(keypadWindow.Result)) { + try { + txtPassWord.Password = keypadWindow.Result; + } catch (Exception ex) { + LogUtil.LogError(ex); + } + } + } + + private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + DragMove(); + } + + private void txtUserName_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + var keypadWindow = new Keypad(this); + if (keypadWindow.ShowDialog() == true && !string.IsNullOrEmpty(keypadWindow.Result)) { + try { + txtUserName.Text = OnLineLoadNameByCode(keypadWindow.Result); + } catch (Exception ex) { + LogUtil.LogError(ex); + var wpfUser = WpfUserBL.LoadByCode(keypadWindow.Result); + if (wpfUser != null && !string.IsNullOrEmpty(wpfUser.WpfUser_Name)) { + txtUserName.Text = wpfUser.WpfUser_Name; + } else { + WindowUtil.Err("您是第一次登录,网络不通无法进入系统,请联系管理员"); + } + } + } + } + + public static string OnLineLoadNameByCode(string code) + { + string wpfUserMethod = "/MainSystem/B3_HaoYue/Rpcs/RpcFun/GetWpfUserInfoByIds"; + var wpfUsers = RpcFacade.Call>(wpfUserMethod, null, code); + if (wpfUsers.Count() > 0) { + return wpfUsers[0].Get("Name"); + } + return string.Empty; + } + } +} diff --git a/CowOutputClient/OperateWindow.xaml b/CowOutputClient/OperateWindow.xaml new file mode 100644 index 0000000..5fc0f31 --- /dev/null +++ b/CowOutputClient/OperateWindow.xaml @@ -0,0 +1,142 @@ + + + + + + + +