示例#1
0
 /// <summary>
 /// Applies the skin.
 /// </summary>
 /// <param name="form">The form.</param>
 public static void ApplySkin(Form form)
 {
     if (se != null)
     {
         se.AddForm(form);
         //se.Active = true;
     }
 }
示例#2
0
 private void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         OpenFileDialog op = new OpenFileDialog();
         op.Filter = "SSK文件|*.ssk";
         if (op.ShowDialog() != System.Windows.Forms.DialogResult.OK)
         {
             return;
         }
         skin.SkinFile = op.FileName;
         skin.AddForm(this);
     }
 }
示例#3
0
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.F5)
            {
                return;
            }
            OpenFileDialog op = new OpenFileDialog();

            op.Title  = "请选择皮肤文件";
            op.Filter = "SSK文件|*.ssk";
            if (op.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            skin = new Sunisoft.IrisSkin.SkinEngine(this, op.FileName);
            skin.AddForm(this);
            this.Refresh();
        }
示例#4
0
 /// <summary>
 /// Changes the skin.
 /// </summary>
 /// <param name="st">The st.</param>
 public static void ChangeSkin(SkinType st)
 {
     System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();
     if (se == null)
     {
         se        = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0], thisDll.GetManifestResourceStream("Fm.Src.Common.SkinProcessor.Skins." + st.ToString() + ".ssk"));
         se.Active = true;
         for (int i = 0; i < Application.OpenForms.Count; i++)
         {
             se.AddForm(Application.OpenForms[i]);
         }
     }
     else
     {
         se.SkinStream = thisDll.GetManifestResourceStream("FT.Commons.SkinProcessor.Skins." + st.ToString() + ".ssk");
         se.Active     = true;
     }
 }
示例#5
0
 public static void ChangeSkin(string skinName)
 {
     System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();
     if (skinEngineSel == null)
     {
         skinEngineSel          = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0]);
         skinEngineSel.SkinFile = skinName;
         skinEngineSel.Active   = true;
         for (int i = 0; i < Application.OpenForms.Count; i++)
         {
             skinEngineSel.AddForm(Application.OpenForms[i]);
         }
     }
     else
     {
         skinEngineSel.SkinFile = skinName;
         skinEngineSel.Active   = true;
     }
 }
示例#6
0
        /// <summary>
        /// Changes the skin.
        /// </summary>
        /// <param name="st">The st.</param>
        public static void ChangeSkin(SkinType st)
        {
            System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();
            if (se == null)
            {
                se = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0], thisDll.GetManifestResourceStream("Fm.Src.Common.SkinProcessor.Skins." + st.ToString() + ".ssk"));
                se.Active = true;
                for (int i = 0; i < Application.OpenForms.Count; i++)
                {
                    se.AddForm(Application.OpenForms[i]);
                }

            }
            else
            {
                se.SkinStream = thisDll.GetManifestResourceStream("FT.Commons.SkinProcessor.Skins." + st.ToString() + ".ssk");
                se.Active = true;
            }
        }
 /// <summary>
 /// 改变皮肤
 /// </summary>
 /// <param name="st"></param>
 public static void ChangeSkin(SkinType st)
 {
     System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();
     if (se == null)
     {
         //ShortMessageClient是指命名空间,这里你可以换成你自己的。
         se        = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0], thisDll.GetManifestResourceStream("OSM.skin." + st.ToString() + ".ssk"));
         se.Active = true;
         for (int i = 0; i < Application.OpenForms.Count; i++)
         {
             se.AddForm(Application.OpenForms[i]);
         }
     }
     else
     {
         //ShortMessageClient是指命名空间,这里你可以换成你自己的。
         se.SkinStream = thisDll.GetManifestResourceStream("OSM.Skin." + st.ToString() + ".ssk");
         se.Active     = true;
     }
 }
示例#8
0
        /// <summary>
        /// 改变皮肤
        /// </summary>
        /// <param name="st"></param>

        public static void ChangeSkin(SkinType st)
        {
            System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();


            if (se == null)
            {
                //WallControl是指命名空间,这里你可以换成你自己的。
                se        = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0], thisDll.GetManifestResourceStream("WallControl.skin." + st.ToString() + ".ssk"));
                se.Active = true;
                for (int i = 0; i < Application.OpenForms.Count; i++)
                {
                    se.AddForm(Application.OpenForms[i]);
                }
            }
            else
            {
                //WallControl是指命名空间,这里你可以换成你自己的。
                se.SkinAllForm = true;    // 这句话是用来设置整个系统下所有窗体都采用这个皮肤
                se.SkinStream  = thisDll.GetManifestResourceStream("WallControl.skin." + st.ToString() + ".ssk");
                se.Active      = true;
            }
        }
        /// <summary> 
        /// 改变皮肤 
        /// </summary> 
        /// <param name="st"></param> 
        public static void ChangeSkin(SkinType st)
        {
            System.Reflection.Assembly thisDll = System.Reflection.Assembly.GetExecutingAssembly();
            if (se == null)
            {
                //ShortMessageClient是指命名空间,这里你可以换成你自己的。
                se = new Sunisoft.IrisSkin.SkinEngine(Application.OpenForms[0], thisDll.GetManifestResourceStream("OSM.skin." + st.ToString() + ".ssk"));
                se.Active = true;
                for (int i = 0; i < Application.OpenForms.Count; i++)
                {
                    se.AddForm(Application.OpenForms[i]);
                }

            }
            else
            {
                //ShortMessageClient是指命名空间,这里你可以换成你自己的。
                se.SkinStream = thisDll.GetManifestResourceStream("OSM.Skin." + st.ToString() + ".ssk");
                se.Active = true;
            }
        }