本文整理汇总了C#中System.Windows.Controls.TextBox.get_HMSType方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.get_HMSType方法的具体用法?C# TextBox.get_HMSType怎么用?C# TextBox.get_HMSType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.TextBox
的用法示例。
在下文中一共展示了TextBox.get_HMSType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ManipulateValue
private void ManipulateValue(TextBox tb, ValueManipulator ValMan)
{
if (tb.get_HMSType() == HMSType.t || tb.get_HMSType() == HMSType.tt)
{
AM_PM_Change(tb);
return;
}
int NewValue;
if (int.TryParse(tb.Text, out NewValue))
ValMan(tb, NewValue);
tb.Focus();
tb.SelectAll();
}
示例2: DecrementValue
private void DecrementValue(TextBox tb, int NewValue)
{
NewValue = (NewValue > tb.get_Min()) ? NewValue - 1 : tb.get_Max() - 1;
NewValue = AdjustHalfDayHour(tb, NewValue);
Value = Value.ResetTime(NewValue, tb.get_HMSType());
}
示例3: AM_PM_Change
void AM_PM_Change(TextBox tb)
{
if (tb.get_HMSType() == HMSType.tt)
tb.Text = (tb.Text == SystemDateInfo.AMDesignator) ? SystemDateInfo.PMDesignator : SystemDateInfo.AMDesignator;
else // tb.get_HMSType() == HMSType.t
{
int Idx = TimeCtrlExtensions.Get_t_Idx();
tb.Text = (tb.Text == SystemDateInfo.AMDesignator[Idx].ToString()) ?
SystemDateInfo.PMDesignator[Idx].ToString() : SystemDateInfo.AMDesignator[Idx].ToString();
}
AM_PM_Handle(tb);
}
示例4: AM_PM_HandleInput
bool AM_PM_HandleInput(TextBox tb, string InputTxt, string AM_PM_Designator, int Idx)
{
if (string.Compare(InputTxt, AM_PM_Designator[Idx].ToString(), true) == 0)
{
if (tb.get_HMSType() == HMSType.tt)
tb.Text = AM_PM_Designator;
else // tb.get_HMSType() == HMSType.t
tb.Text = AM_PM_Designator[Idx].ToString();
AM_PM_Handle(tb);
return true;
}
return false;
}
示例5: AM_PM_Handle
void AM_PM_Handle(TextBox tb)
{
bool IsAm;
if (tb.get_HMSType() == HMSType.tt)
IsAm = (tb.Text == SystemDateInfo.AMDesignator);
else // tb.get_HMSType() == HMSType.t
IsAm = (tb.Text == SystemDateInfo.AMDesignator[TimeCtrlExtensions.Get_t_Idx()].ToString());
Value = Value.Reset_AM_PM_Time(IsAm);
tb.SelectAll();
}