Example #1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Load(object sender, EventArgs e)
        {
            #region 时间同步

            try
            {
                if (logic == null)
                {
                    logic = new LogicHandle();
                }
                logic.GetTime(crTime =>
                {
                    if (crTime != null && crTime.Result > 0)
                    {
                        DateTime dtServerTime = Yl.Ticket5.Common40.Utilities.TextureHelper.IntToDateTime(crTime.Result);
                        var rst = LogicHandle.SetTime(dtServerTime);
                    }
                });
            }
            catch (Exception ex)
            {
            }

            #endregion
        }
Example #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public MainForm()
        {
            try
            {
                InitializeComponent();

                tmr_Breath          = new System.Timers.Timer(10000);
                tmr_Breath.Elapsed += (tmr_Breath_Elapsed);
                tmr_Breath.Start();

                tmr_Countdown          = new System.Timers.Timer(1000);
                tmr_Countdown.Elapsed += (tmr_Countdown_Eapsed);

                Config.Instance.MainForm = this;

                var result = new SplashForm().ShowDialog(this);
                SetFormType(GetUcZr(0), null, "");

                this.BackgroundImage = Resources.backgroud;


                logic = new LogicHandle();
                Show();
            }
            catch (Exception ex)
            {
            }
        }
Example #3
0
 void Start()
 {
     mLogicHandle = gameObject.GetComponent <LogicHandle>();
 }