- 浏览: 472537 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (205)
- HttpClient (5)
- Smarty (1)
- SVN (4)
- WebLogic (4)
- Netty (1)
- DataBase (11)
- Office (2)
- Net (3)
- Web Service (4)
- Spring (8)
- Tomcat (2)
- Ant (1)
- Erorr (3)
- JDK (2)
- LINUX (2)
- plugins (1)
- Flex/flash (2)
- PhotoShop (2)
- ExtJS (1)
- HTML5 (1)
- Slave4J (1)
- SoftWare (1)
- jQuery (2)
- servlet3.0 (1)
- fusionchart (1)
- ASP.Net (2)
- Java (50)
- C++ (1)
- JavaScript (15)
- C # (15)
- DesignMode (1)
- LINQ (1)
- SQLServer (1)
- PHP (1)
- HTML/CSS (1)
- Struts2 (3)
- Hibernate (1)
- XML (5)
- Jsoup (14)
- API (1)
- Json (13)
- HtmlUnit (1)
- Notepad (1)
- Android (3)
- bat (5)
- Apache (1)
- Quartz (1)
- CSS (3)
- HTMLParser (3)
- BootStrap (1)
- Redis (1)
- Web (1)
- Kotlin (1)
最新评论
-
wanggang0321:
666666
代码生成器实现的Entity,Dao,Service,Controller,JSP神器(含代码附件) -
masuweng:
支付宝Alipay源码工程Demo -
Fly_SkyXin:
加上这个包 还是报错 直接访问接口地址没问题 报这个错是什么意 ...
AxisFaultNot Found at org.apache.axis.transport.http.HTTPSender.readFromSocket( -
derongit123:
请问一下Weatherinfo 的这个类怎么弄
HttpClient+Gson解析中国天气网的天气预报信息 -
ai380102002:
j2ee6的包
springmvc+Ibatis+Bootstrap自定义标签分页+登录模版
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using log4net;
using Utility;
namespace WindowsFormsApplication
{
///<summary>
///<Author>JILONGLIANG</Author>
///<Date>2012/09/14</Date>
///<Description>处理皮肤Form窗体</Description>
///</summary>
public partial class MainFrm : Form
{
string app_Path=AccessDirFileHelper.GetInstance().GetWindowsApplicationStartupPath();
private int ComputerTime;//记录本机运行时间
public MainFrm()
{
InitializeComponent();
}
/// <summary>
/// 把设置IsMdiContainer = true;
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_Login_Click(object sender, EventArgs e)
{
// LoginFrm loginFrm = new LoginFrm();
// loginFrm.MdiParent = this;
// loginFrm.Show();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_TestDataBase_Click(object sender, EventArgs e)
{
//ConnectionSetupForm connectionSetupForm = new ConnectionSetupForm();
//connectionSetupForm.MdiParent = this;
//connectionSetupForm.Show();
}
/// <summary>
/// 退出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_Logout_Click(object sender, EventArgs e)
{
Application.Exit();
}
/// <summary>
/// 重启
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_Restart_Click(object sender, EventArgs e)
{
Application.Restart();
}
/// <summary>
/// 加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MainFrm_Load(object sender, EventArgs e)
{
AddChildMenuStripForWindowsStyle();
//ILog log = log4net.LogManager.GetLogger(this.GetType());
//log.Debug(e.ToString());
ComputerTime = Environment.TickCount;//获取本机运行时间
}
/// <summary>
/// 为风格菜单项添加子菜单
/// </summary>
private void AddChildMenuStripForWindowsStyle()
{
string curExePath = app_Path;
string dir = curExePath + "\\Images";
DirectoryInfo di = new DirectoryInfo(dir);
int count = 1;
//先清空下拉框
this.TSMI_WindowSytle.DropDownItems.Clear();
foreach (FileInfo fi in di.GetFiles())
{
if (fi.FullName.LastIndexOf(".gif") == fi.FullName.Length - 4)
{
ToolStripMenuItem newTSMI = new ToolStripMenuItem("皮肤" + (count++));
newTSMI.Tag = fi.FullName;//保存图片
//订阅此菜单的鼠标悬浮事件
newTSMI.MouseHover += new EventHandler(TSMI_WindowSytle_MouseHover);
//订阅此菜单的鼠标离开事件
newTSMI.MouseLeave += new EventHandler(TSMI_WindowSytle_MouseLeave);
//订阅此菜单的鼠标点击事件
newTSMI.Click += new EventHandler(TSMI_WindowSytle_Click);
this.TSMI_WindowSytle.DropDownItems.Add(newTSMI);
}
}
}
/// <summary>
/// 菜单的鼠标悬浮事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_WindowSytle_MouseHover(object sender, EventArgs e)
{
try
{
string picturePath = ((ToolStripMenuItem)sender).Tag.ToString();
this.pictureBoxImages.BackgroundImage = Image.FromFile(picturePath);
this.pictureBoxImages.BackgroundImageLayout = ImageLayout.Stretch;
this.pictureBoxImages.Visible = true;
Point point;
if (MousePosition.Y >= 300)
{
point = new Point(MousePosition.X + 62, 200);//调整位置
}
else
{
point = new Point(MousePosition.X + 62, MousePosition.Y - 10);
}
this.pictureBoxImages.Location = point;
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 鼠标离开事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_WindowSytle_MouseLeave(object sender, EventArgs e)
{
this.pictureBoxImages.Visible = false;
}
/// <summary>
/// 鼠标点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TSMI_WindowSytle_Click(object sender, EventArgs e)
{
try
{
string picturePath = ((ToolStripMenuItem)sender).Tag.ToString();
string skinFillPath = picturePath.Substring(0, picturePath.Length - 3) + "ssk";
this.skinEngine1.SkinFile = skinFillPath;
this.Refresh();
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 当前系统应用时间
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ShowApplicationTime_Tick(object sender, EventArgs e)
{
long CurTickValue = Environment.TickCount;
long Difference = CurTickValue - ComputerTime;
long ComputerHours, ComputerMinutes, ComputerSeconds;
long ApplicationHours, ApplicationMinuters, ApplicationSecons;
ComputerHours = (CurTickValue / (3600 * 999)) % 24;
ComputerMinutes = (CurTickValue / (60 * 999)) % 60;
ComputerSeconds = (CurTickValue / 999) % 60;
ApplicationHours = (Difference / (3600 * 999)) % 24;//小时
ApplicationMinuters = (Difference / (60 * 999)) % 60;//分钟
ApplicationSecons = (Difference / 999) % 60;//秒
this.ComputerSystemTime.Text = string.Format("本计算机已运行了{0}小时{1}分{2}秒",
ComputerHours.ToString(), ComputerMinutes.ToString(), ComputerSeconds.ToString());
this.ApplicationFrmSystemTime.Text = string.Format("本应用程序已运行了{0}小时{1}分{2}秒",
ApplicationHours.ToString(), ApplicationMinuters.ToString(), ApplicationSecons.ToString());
}
/// <summary>
/// 加载窗体的时候触发时间.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CurrentNowTime_Tick(object sender, EventArgs e)
{
//this.CurrentNowTime.Enabled = true;//启用Elapsed事件生成
//this.CurrentNowTime.Interval = 1000;//可以在窗体设置
tssl_currNowTime.Text = Convert.ToString(DateTime.Now);
}
}
}
效果图
发表评论
-
NSpring.Net学习 控制反转(IoC)和面向切面编程(AOP)(转)
2015-12-16 17:17 751在开始写之前,先给出spring.net官方网站,在那里有 ... -
C#的NHibernate的CRUD开发入门代码例子
2015-12-16 16:22 936本文档适合初级开发 ... -
Asp.Net+ EntityFramework+MVC
2015-12-16 16:18 1224using System.Collections.Gener ... -
自定义封装Messages
2013-03-20 00:21 932using System; using System ... -
C#的Session的封装
2013-03-20 00:22 1168using System; using System ... -
C# 32Bit电脑环境帮助类
2013-03-20 00:22 1029using System; using System ... -
C# URL的封装UrlAppHelper
2013-03-19 12:18 1041using System; using System ... -
C# Cookie的封装类CookieHelper
2013-03-19 12:16 3052using System; using System ... -
C#访问文件路径通用类
2013-03-19 12:14 1181using System; using System ... -
C#的随机类封装RandomHelper
2013-03-19 12:01 1152using System; using System ... -
C#的SQLHelper封装
2013-03-19 11:57 2247using System; using System ... -
通用验证类Validate
2012-09-07 17:49 1212using System; using System.C ... -
最全C#时间处理通用类(DateTimeHelper)
2012-08-10 14:31 2264using System; using System.Co ... -
DateTimeHelper时间处理类
2012-08-10 14:26 4[code="DateTimeHelper& ... -
C#加密帮助类EncryptHelper
2012-07-30 20:50 2738///之前这篇加密帮助类觉得不够严谨,不够强,所以特意修 ...
相关推荐
一个C#编写的WinForm皮肤控件如何使用的功能例子。
aimp2皮肤skins
皮肤选择器73款换肤winform皮肤Skins随你挑选 IrisSkin4
Spine 皮肤Skins_官方文档中文版
skins皮肤,上百个,供编程人员美化程序界面使用
基于C#的IrisSkin4控件和73款不同样式的皮肤可随意切换美化应用
GBA VBA Visual Boy Advance Skins 皮肤 4个
100套 LMEDIADEV SKINS Delphi皮肤资源文件,就Delphi换肤控件调用的资源文件,控件名称是LMEDIADEV SKINS,将这些文件拷贝至指定的皮肤目录中,可以实现调用,风格还挺多,有Office风格、WindowsXP风格,金属风格、...
IrisSkin的使用C#窗体换皮肤渲染。 1、下载IrisSkin4.dll实现WinForm窗体换皮肤 2、 解压。将IrisSkin4.dll与Skins(皮肤)一起拷贝到项目的\bin\Debug文件夹下 3、在程序的资源管理器中的【引用】上单击右键,...
risSkin4.dll是一款很不错的免费皮肤控件,利用它可以轻松的实现WinForm窗体换肤,压缩包包括73中美化皮肤可以自由选择切换
skins皮肤280款 Delphi2010
您可以分发多个skin文件在一个比如Skins的子目录下,然后您的客户可以选择他们喜欢的skin,而您的程序只需要做如下动作: skinEngine1.SkinFile = Application.StartupPath + "\\Skins\\DeepCyan.ssk";
Spine_Skins_皮肤切换
BusinessSkinForm-Skins最全皮肤257套完整
IrisSkin2.dll是一款很不错的免费皮肤控件,利用它可以轻松的实现WinForm窗体换肤然而IrisSkin2.dll只能在.NET Faremwork 4.0以及之前的版本使用,所以要在VS2010中使用它需要将自己的项目框架设置为.NET Framework ...
BCB.dephi控件,BSF-Skins50套
flsah 的开发皮肤包 flsah 的开发皮肤包 flsah 的开发皮肤包