chore: 首次簽入 Thinkyu ASP.NET 專案

- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
2026-09-10 09:42:37 +08:00
commit 577060bc78
2496 changed files with 501389 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
[DefaultBindingProperty("Time")]
public partial class utility_TimeInput : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (ViewState["TIME"] != null)
SetTime(ViewState["TIME"].ToString());
}
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
public string Time
{
get
{
return GetTime();
}
set
{
ViewState["TIME"] = value;
SetTime(value);
}
}
private void SetTime(string time)
{
if (time == null || time.Length < 5)
return;
string h = time.Substring(0, 2);
string m = time.Substring(3, 2);
if (ddlHour.Items.FindByValue(h) != null)
ddlHour.SelectedValue = h;
if (ddlMinute.Items.FindByValue(m) != null)
ddlMinute.SelectedValue = m;
}
private string GetTime()
{
if (ddlHour.SelectedValue == "" || ddlMinute.SelectedValue == "")
return "";
else
return ddlHour.SelectedValue + ":" + ddlMinute.SelectedValue;
}
}