Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CONFIG.Load();

            CARD.Open();

            int[] d = new int[5];

            d[0] = FUNC.ToInt32(0x27, 0x26, 0x13, 0x1A);
            d[1] = FUNC.ToInt32(0x04, 0x04, 0x0C, 0x00);
            d[2] = 0;
            d[3] = 0;
            d[4] = 0;

            CARD.SendCMD(1, 1, 1, 0x10, d, 100);

            Console.WriteLine("选择工作模式:1 有线 2 无线");
            int mode = -1;

            int.TryParse(Console.ReadLine(), out mode);
            switch (mode)
            {
            case 1: Test1(); break;

            case 2: Test2(); break;
            }

            CARD.Close();
        }
Exemplo n.º 2
0
        private void fmMain_Load(object sender, EventArgs e)
        {
            bool r;

            AppMutex = new Mutex(true, "AndonSys.AppHelper", out r);
            if (!r)
            {
                MessageBox.Show("系统已运行!", this.Text);
                Close();
                return;
            }

            CONFIG.Load();

            log = new Log(Application.StartupPath, "AppHelper", Log.DEBUG_LEVEL);

            log.Debug("系统运行");

            gdApp.AutoGenerateColumns = false;

            LoadApp();

            tbApp.Show();

            timer.Enabled = true;
        }
Exemplo n.º 3
0
        private void fmMain_Load(object sender, EventArgs e)
        {
            CONFIG.Load();

            bool bl = IPCast.Connect("127.0.0.1", "admin", "admin");

            Log(string.Format("IPCast.Connect={0}", bl));

            StopAll();

            string con = CONFIG.GetText("SQLDB", "ConStr", "");

            db = new DB("System.Data.SqlClient", con);
            db.Open();

            InitClient();

            timer.Enabled = true;
        }
Exemplo n.º 4
0
        private void fmMain_Load(object sender, EventArgs e)
        {
            CONFIG.Load();

            edDB.Text = CONFIG.GetText("SQLDB", "ConStr");
        }