diff --git a/BO/BO.csproj b/BO/BO.csproj index 4b1b525..29e10d1 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -17,7 +17,7 @@ full false bin\Debug\ - TRACE + DEBUG;TRACE prompt 4 diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 4508900..92a363c 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -18,17 +18,16 @@ namespace BO.Utils public static class AfterLoginUtil { - - // static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - //new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), - // new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), - // new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), - // new Tuple("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), - // new Tuple("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), - // new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution") - - //}; - +#if DEBUG + static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), + new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), + new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + new Tuple("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), + new Tuple("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), + new Tuple("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution") + }; +#else static List> roleToAssemblies = new List>() { new Tuple("排宰员",@"ButcherOrder"), @@ -38,20 +37,18 @@ namespace BO.Utils new Tuple("窒晕员",@"OrderConfirm"), new Tuple("掉猪处理员",@"DropPigReOrder"), }; - - +#endif public static Form CreateForm(string role) { var first = roleToAssemblies.FirstOrDefault(x => x.Item1 == role); if (first == null) throw new Exception("未注册的角色"); - //#if debug - //var filePath = string.Format("{0}.dll", first.Item2); - //#endif - //#if !debug +#if DEBUG + var filePath = string.Format("{0}.dll", first.Item2); +#else var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); - //#endif +#endif if (!File.Exists(filePath)) throw new Exception("相关模块不存在"); var formType = typeof(IAfterLogin);