Newer
Older
laserPTZ_CS / DialogPointInsert.cs
wangxitong on 11 Sep 1 KB first commit
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
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 laserPTZ
{
    public partial class DialogPointInsert : Form
    {
        
        public DialogPointInsert()
        {
            InitializeComponent();
            txt_name.Text = "";
        }
        public static bool IsInteger(string s)
        {
            try
            {
                int var1 = Convert.ToInt32(s);
                return true;
            }
            catch
            {
                return false;
            }
        }
        private void btn_save_Click(object sender, EventArgs e)
        {
            try
            {
                if(txt_name.Text.Trim() == "")
                {
                    MessageBox.Show("请输入预置点名称");
                    return;
                }
                CtrlRealTime.ctrlRealTime.insertPoint(txt_name.Text.Trim());
                this.Close();
            }
            catch { }
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}