コード例 #1
0
ファイル: AppicationHelper.cs プロジェクト: marcellus/fivemen
        /// <summary>
        /// 执行皮肤的初始化
        /// </summary>
        public static void BeforeStart()
        {
            object obj     = System.Configuration.ConfigurationManager.AppSettings["ApplySkin"];
            bool   useSkin = obj != null && obj.ToString().ToLower() == "true";

            if (useSkin)
            {
                DevExpress.UserSkins.BonusSkins.Register();
                DevExpress.UserSkins.OfficeSkins.Register();
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (useSkin)
            {
                if (!DevExpress.Skins.SkinManager.AllowFormSkins)
                {
                    DevExpress.Skins.SkinManager.EnableFormSkins();
                }


                SystemAllConfig config = StaticCacheManager.GetConfig <SystemAllConfig>();
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = config.SkinName;
            }
        }
コード例 #2
0
ファイル: AboutPlugin.cs プロジェクト: romanu6891/fivemen
        void tmp1_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem skin = sender as ToolStripMenuItem;
            string text = skin.Text;
            if(text.Length>0)
            {
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = text;
                SystemAllConfig config = new SystemAllConfig();
                config.SkinName = text;
                StaticCacheManager.SaveConfig<SystemAllConfig>(config);

            }

            //throw new Exception("The method or operation is not implemented.");
        }