首页 > 其他 > 详细

E-Retail 框架学习

时间:2014-01-26 15:13:49      阅读:399      评论:0      收藏:0      [点我收藏+]

1.程序入口:program.cs

Application.EnableVisualStyles();

 

启用应用程序的可视样式。 通常是 Main 函数的第一行,必须在应用程序中创建任何控件之前调用它;当调用时,无需单独的清单即可启用可视化样式。

Application.SetCompatibleTextRenderingDefault(false);

 

将某些控件上定义的 UseCompatibleTextRendering 属性设置为应用程序范围内的默认值。

  • true, new controls that support UseCompatibleTextRendering use the GDI+ based Graphics class for text rendering; if false, new controls use the GDI based TextRenderer class.‘ data-guid="040762dd64fa15b1fb1f7618f1fa86fb">true,则支持 UseCompatibleTextRendering 的新控件使用基于 GDI+ 的 Graphics 类进行文本呈现;
  • true, new controls that support UseCompatibleTextRendering use the GDI+ based Graphics class for text rendering; if false, new controls use the GDI based TextRenderer class.‘ data-guid="040762dd64fa15b1fb1f7618f1fa86fb">false,则新控件使用基于 GDI 的 TextRenderer 类。 
bubuko.com,布布扣
//系统初始化
public static bool Init()
{
    //sql 代理实例
    string ProxyMode = Eurostop.ProxyClient.SysError.ProxyMode;//数据成员,值取自配置文件,默认为0
    SqlProxyMode _sqlProxyMode = SqlProxyMode.Local;//自定义枚举项 ,none:无/Local:局域网/Wcf:Wcf分布式
    switch (ProxyMode)
    {
        case "0": _sqlProxyMode = SqlProxyMode.Local;
             break;
        case "1": _sqlProxyMode = SqlProxyMode.Wcf ;
             break;
        default: _sqlProxyMode = SqlProxyMode.None;
             break;
    }
    Eurostop.Proxy.SqlProxy.Instance = Eurostop.Proxy.SqlProxyFactory.Instance(_sqlProxyMode);//全局静态变量赋值,如果是None和Local,则用LocalSqlProxy对象,如果是Wcf,则用WcfSqlProxy对象
    return true;
}   
bubuko.com,布布扣

 

判断系统是否已初始化Instace变量,如果是则显示登陆窗体

2.登陆:

构造函数:

bubuko.com,布布扣
/// <summary>
/// 注册用户皮肤
/// </summary>
public void RegisterUserSkins()
{
    //窗口样式
    DevExpress.Skins.SkinManager.EnableFormSkins();
    DevExpress.UserSkins.BonusSkins.Register();
    DevExpress.UserSkins.OfficeSkins.Register();
}    
bubuko.com,布布扣

 

DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(Config.SystemStyle);//加载皮肤样式,从配置文件读取

 

窗体初始化:

System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(System.Threading.Thread.CurrentThread.CurrentCulture.Name);

E-Retail 框架学习

原文:http://www.cnblogs.com/KevinG/p/3533822.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!