Ejemplo n.º 1
0
        private void Timer_Tick(object sender, object e)
        {
            switch (WebStatusHelper.GetConnType())
            {
            case ConnectionType.DataConn: txt_web.Text = "数据流量"; break;

            case ConnectionType.WlanConn: txt_web.Text = "WiFi"; break;

            case ConnectionType.PPPoE: txt_web.Text = "宽带"; break;

            case ConnectionType.NoConn: txt_web.Text = "无连接"; break;
            }
            txt_now.Text = DateTime.Now.Hour.ToString("00") + " :" + DateTime.Now.Minute.ToString("00");
            txt_bat.Text = ((double)Battery.AggregateBattery.GetReport().RemainingCapacityInMilliwattHours / (double)Battery.AggregateBattery.GetReport().FullChargeCapacityInMilliwattHours * 100).ToString("00") + "%";
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 动态刷新基本信息
        /// </summary>
        private async void Timer_Tick(object sender, object e)
        {
            switch (WebStatusHelper.GetConnType())
            {
            case ConnectionType.DataConn: txt_web.Text = "数据流量"; break;

            case ConnectionType.WlanConn: txt_web.Text = "WiFi"; break;

            case ConnectionType.PPPoE: txt_web.Text = "宽带"; break;

            case ConnectionType.NoConn: txt_web.Text = "无连接"; break;
            }
            txt_now.Text = DateTime.Now.Hour.ToString("00") + " :" + DateTime.Now.Minute.ToString("00");
            txt_bat.Text = ((double)Battery.AggregateBattery.GetReport().RemainingCapacityInMilliwattHours / (double)Battery.AggregateBattery.GetReport().FullChargeCapacityInMilliwattHours * 100).ToString("00") + "%";
            if (SettingHelper.ContainsKey("_cursor"))
            {
                if ((bool)SettingHelper.GetValue("_cursor") == false)
                {
                    return;
                }
            }
            await HideCursor();
        }