如何为整个应用程序设置通用时区.
因此,即使时区发生变化,应用程序也应按照通用时区显示时间.
那么可以设置整个应用程序时区吗?
我有一个Textbox带面具的货币.面具显示textbox为--------.--
因此用户在掩码上键入数字.
现在客户说他不想从左到右输入信件.他想从右到左打字.
类似于我们在计算器中的含义.
现在我尝试改变它textbox的righttoleft属性,但这对我的事业没有帮助.
最后,我坚持处理关键事件以手动更改位置.我能够改变位置,但是完成了逻辑.
这是我的代码的样子:
void Textbx_KeyDown(object sender, KeyEventArgs e)
{
String temp = T.Text;
string temp2 = T.Text;
int CursorIndex = T.SelectionStart - 1;
for (int i = 0; i <= CursorIndex; i++)
{
if (i == 7)
{
temp2 = temp2.Insert(i, temp[i + 2].ToString());
temp2 = temp2.Remove(i, 2);
//i = i + 2;
}
else if (CursorIndex == i)
{
temp2 = temp2.Remove(i, 1);
temp2 = temp2.Insert(i, …Run Code Online (Sandbox Code Playgroud)