Exemplo n.º 1
0
        public static int getint <T>(this T o)
        {
            int number = 0;

            try
            {
                number = (int)Convert.ChangeType(o, typeof(int));
            }
            catch (Exception ex)
            {
                LogManagerSimple.WriteLog_Gui(ex.Message, DateTime.Now.ToString("yyyyMMdd") + "_" + 123);
                return(0);
            }

            return(number);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Tool.GameTool.A星.Start start = new Tool.GameTool.A星.Start();
            start.StartMap();

            Console.ReadLine();
            return;

            Tool.GameTool.GameTest.Test();
//             while (true)
//             {
//                 Console.WriteLine("按下回车,摇一下");
//                 Console.ReadLine();
//                 Random random = new Random();
//                 int re = random.Next(10);
//                 Console.WriteLine((fan)re);
//             }
            tryMJcard.Tool.PayTool.YungouosPay.Handler();
            Test.GetAddressByIp();//("221.15.216.126");
            Start();
            tryMJcard.Tool.TimerTool.TimerExample.Start();
            Test.SetSQLSERVER();
            LogManagerSimple.WriteLog_Gui("我真棒------------------------------------------------------------------------------------", "" + "gui");
            Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            Test.WriteLineTest();
            Program program = new Program();

            if (program.timeronPengGangHu != null && program.timeronPengGangHu.Enabled)
            {
                program.timeronPengGangHu.Stop();
            }
            object obj = 1;

            program.timeronPengGangHu           = new TimerManage();
            program.timeronPengGangHu.parameter = obj;
            program.timeronPengGangHu.Interval  = 10000;
            program.timeronPengGangHu.Elapsed  += new ElapsedEventHandler(program.TimerHanlderOnPengGangHu);
            program.timeronPengGangHu.AutoReset = false;
            program.timeronPengGangHu.Start();
            Console.ReadLine();
        }