Пример #1
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine(RegUtility.GetCpuNumber());

                RegLib.reginfo reg = new RegLib.reginfo();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine(RegUtility.GetCpuNumber());

                RegLib.reginfo reg = new RegLib.reginfo();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }

        }
Пример #3
0
        private const int WS_SHOWNORMAL = 1; //0不可见但仍然运行,1居中,2最小化,3最大化


        private static void MainStart()
        {
            //启动程序
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if !DEBUG     //DEBUG RELEASE
               //系统说明
               //frmLoading frmLd = new frmLoading();
               //frmLd.ShowDialog();

            checkVersion frmcv = new checkVersion();
            if (frmcv.ShowDialog() == DialogResult.Abort)
            {
                return;
            }

            //注册检测
            bool bIsHost = false;
            try
            {
                UPServer.PatSISvsSoapClient ws = new UPServer.PatSISvsSoapClient();
                dtWebHost = ws.getWebHostDateTime();
                bIsHost   = true;
            }
            catch (Exception ex)
            {
                bIsHost = false;
            }

            RegLib.reginfo reg = new RegLib.reginfo();
            //using (StreamWriter sw = new StreamWriter("log.txt", true))
            //{
            //    sw.WriteLine("登录:" + DateTime.Now.ToString());
            //    sw.WriteLine("最后一次使用时间:" + RegLib.reginfo.LastUsedTime.ToString());
            //    sw.WriteLine("授权截止时间:" + RegLib.reginfo.DtSqEndDate.ToString());
            //    sw.WriteLine("机器码:" + RegLib.reginfo.DiskNumber.ToString());
            //    sw.WriteLine("授权码:" + RegLib.reginfo.StrPC_SQM.ToString());
            //}
            //
            if (!reg.CheckRegedit(dtWebHost, bIsHost))
            {
                frmRegLogin frm = new frmRegLogin();
                if (!frm.ShowDialog().Equals(DialogResult.OK))
                {
                    return;
                }
            }
            try
            {
                DBSchemaAutoUpdata.CheckAndUpData();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
#endif
            // Application.Run(new frmFilter("ccc",1,"CPRS"));

            Application.Run(new MDIMain());
        }
Пример #4
0
        private const int WS_SHOWNORMAL = 1; //0不可见但仍然运行,1居中,2最小化,3最大化


        private static void MainStart()
        {
            //启动程序
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if !DEBUG     //DEBUG RELEASE
            //系统说明
            //frmLoading frmLd = new frmLoading();
            //frmLd.ShowDialog();

            checkVersion frmcv = new checkVersion();
            if (frmcv.ShowDialog() == DialogResult.Abort)
            {
                return;
            }

            //注册检测
            bool bIsHost = false;
            try
            {
                UPServer.PatSISvsSoapClient ws = new UPServer.PatSISvsSoapClient();
                dtWebHost = ws.getWebHostDateTime();
                bIsHost = true;
            }
            catch (Exception ex)
            {
                bIsHost = false;
            }

            RegLib.reginfo reg = new RegLib.reginfo();
            //using (StreamWriter sw = new StreamWriter("log.txt", true))
            //{
            //    sw.WriteLine("登录:" + DateTime.Now.ToString());
            //    sw.WriteLine("最后一次使用时间:" + RegLib.reginfo.LastUsedTime.ToString());
            //    sw.WriteLine("授权截止时间:" + RegLib.reginfo.DtSqEndDate.ToString());
            //    sw.WriteLine("机器码:" + RegLib.reginfo.DiskNumber.ToString());
            //    sw.WriteLine("授权码:" + RegLib.reginfo.StrPC_SQM.ToString());
            //}
            //
            if (!reg.CheckRegedit(dtWebHost, bIsHost))
            {
                frmRegLogin frm = new frmRegLogin();
                if (!frm.ShowDialog().Equals(DialogResult.OK))
                {
                    return;
                }
            }
            try
            {
                DBSchemaAutoUpdata.CheckAndUpData();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }


#endif
           // Application.Run(new frmFilter("ccc",1,"CPRS"));

            Application.Run(new MDIMain());
        }