/// <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; } }
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); } }
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(); }
/// <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; } }
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; } }
/// <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; } }
/// <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; } }