示例#1
0
        public static void ClockStateMini(string hours, string minutes)
        {
            string   showDate = SharedSettings.ShowDate();
            DateTime today    = DateTime.Today;

            string dayString   = today.ToString("ddd");
            string dateString  = today.ToString("dd");
            string monthString = today.ToString("MMM");

            var locationHours   = 0;
            var locationMinutes = 2;

            ProcessValueImg(hours, "bl", locationHours);
            ProcessValueImg(minutes, "bl", locationMinutes);

            if (showDate == "True")
            {
                var locationDayOfWeek = 3;
                var locationDate      = 4;
                var locationMonth     = 5;

                ProcessValueImg(dayString, "bl-sm", locationDayOfWeek);
                ProcessValueImg(dateString, "bl-sm", locationDate);
                ProcessValueImg(monthString, "bl-sm", locationMonth);
            }
        }
示例#2
0
        public static void ClockState(string hours, string minutes)
        {
            string isCompact = SharedSettings.CompactView();
            string showDate  = SharedSettings.ShowDate();

            DateTime today = DateTime.Today;

            string dayString   = today.ToString("ddd");
            string dateString  = today.ToString("dd");
            string monthString = today.ToString("MMM");

            //compact clock view
            if (isCompact == "True")
            {
                var locationHours   = 6;
                var locationMinutes = 8;
                ProcessValueImg(hours, "bl", locationHours);
                ProcessValueImg(minutes, "bl", locationMinutes);
            }
            //expanded clock view
            else
            {
                var locationHours1   = 5;
                var locationHours2   = 6;
                var locationMinutes1 = 8;
                var locationMinutes2 = 9;

                string hours1   = hours[0].ToString();
                string hours2   = hours[1].ToString();
                string minutes1 = minutes[0].ToString();
                string minutes2 = minutes[1].ToString();

                ProcessValueImg(hours1, "bl", locationHours1);
                ProcessValueImg(hours2, "bl", locationHours2);
                ProcessValueImg(minutes1, "bl", locationMinutes1);
                ProcessValueImg(minutes2, "bl", locationMinutes2);
            }

            if (showDate == "True")
            {
                var locationDayOfWeek = 11;
                var locationDate      = 12;
                var locationMonth     = 13;

                ProcessValueImg(dayString, "bl-sm", locationDayOfWeek);
                ProcessValueImg(dateString, "bl-sm", locationDate);
                ProcessValueImg(monthString, "bl-sm", locationMonth);
            }
        }