You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.9 KiB
C#
77 lines
1.9 KiB
C#
using DevComponents.DotNetBar.Controls;
|
|
using DevComponents.DotNetBar.SuperGrid;
|
|
using DevComponents.DotNetBar.Touch;
|
|
using POSV.Utils;
|
|
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;
|
|
|
|
namespace POSV.Template
|
|
{
|
|
public partial class TxtKeyboardForm : BusinessForm
|
|
{
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="content">旧内容</param>
|
|
public TxtKeyboardForm(string content)
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.txtContent.Text = content;
|
|
|
|
//默认为中文
|
|
cnCheckBox.Checked = true;
|
|
|
|
//this.ShowInTaskbar = false;
|
|
|
|
//this.TopMost = true;//始终显示在最前
|
|
}
|
|
|
|
private void OnKeyboardClosed(object sender, EventArgs e)
|
|
{
|
|
if (this.Owner != null)
|
|
{
|
|
this.Owner.Close();
|
|
}
|
|
this.Close();
|
|
}
|
|
|
|
private void OnAcceptTouchClick(object sender, POSV.Component.TouchEventArgs e)
|
|
{
|
|
var txt = this.txtContent.Text;
|
|
|
|
this.OnNotifyChanged(new NotifyEventArgs(NotifyAction.Accept, txt));
|
|
//关闭
|
|
this.OnKeyboardClosed(sender, null);
|
|
}
|
|
|
|
private void OnCheckChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 切换输入法
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnChangeInputTouchClick(object sender, POSV.Component.TouchEventArgs e)
|
|
{
|
|
InputSimulatorUtils.SendCtrlShift();
|
|
}
|
|
|
|
public event NofityEventHandler NotifyChanged;
|
|
public virtual void OnNotifyChanged(NotifyEventArgs e)
|
|
{
|
|
NotifyChanged?.Invoke(this, e);
|
|
}
|
|
}
|
|
}
|