天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using QM.Account;
namespace QM.Assist
{
///<summary>
/// 模块编号:QM.Assist.CtlApp
/// 作 用:窗体内部控制
/// 作 者:孙高峰
/// 编写日期:2009-02-13
///</summary>
public class CtlApp
{
/// <summary>
/// 取自动刷新时间间隔
/// </summary>
/// <param name="pTime">带单位的时间值(分秒) 例 10分</param>
public static int GetInterval(string pTime)
{
string strUnit = pTime.Substring(pTime.Length - 1, 1);
string strTime = pTime.Remove(pTime.Length - 1, 1);
try
{
if (strUnit == AccountEnum.TimeType.SEC.GetHashCode().ToString())
{
return int.Parse(strTime) * 1000;
}
else
{
return int.Parse(strTime) * 60000;
}
}
catch (Exception)
{
return 1;
}
}
}
}