FrmKeyCollection.cs 1.2 KB
using BLL;
using SmartScan.SetControl.WPF;
using SmartScan.SetControl.WPF.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static SmartScan.SetControl.WPF.Model.NeoAlertBox;

namespace SmartScan.PlusSettingFrm
{
    public partial class FrmKeyCollection : Asa.FaceControl.FaceFormFixed
    {
       public string keyname = null;
        public FrmKeyCollection()
        {
            InitializeComponent();
            keyList.Items.AddRange(BLLCommon.macroKey.ToArray());
            keyList.SelectedIndex = 0;
        }

        private void faceButton1_Click(object sender, EventArgs e)
        {
            if (keyList.SelectedIndex==-1)
            {
                string msg = LanguageWwitchover.Dialog("NoKeywordSelected", "未选择关键字!");
                bool resutl = NeoAlertBox.Show("", msg, AlertType.Warning, "NEO SCAN", true); 
                return;
            }
            keyname = keyList.SelectedText;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}