Example #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);
            }
        }
Example #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);
            }
        }
        public static void LoadValues(string currentProfile)
        {
            headerFont1         = SharedSettings.HeaderFont1(currentProfile);
            headerFont2         = SharedSettings.HeaderFont2(currentProfile);
            valueFont           = SharedSettings.ValueFont(currentProfile);
            headerFontColor1    = SharedSettings.HeaderFontColor1(currentProfile);
            headerFontColor2    = SharedSettings.HeaderFontColor2(currentProfile);
            valuesFontColor     = SharedSettings.ValuesFontColor(currentProfile);
            headerFont1Position = SharedSettings.HeaderFont1Position(currentProfile);
            headerFont2Position = SharedSettings.HeaderFont2Position(currentProfile);
            valuesFontPosition  = SharedSettings.ValuesFontPosition(currentProfile);
            backgroundFillColor = SharedSettings.BackgroundFillColor(currentProfile);
            headerFontSize1     = int.Parse(SharedSettings.HeaderFontSize1(currentProfile).ToString());
            headerFontSize2     = int.Parse(SharedSettings.HeaderFontSize2(currentProfile).ToString());
            valueFontSize       = int.Parse(SharedSettings.ValueFontSize(currentProfile).ToString());
            displayBrightness   = int.Parse(SharedSettings.DisplayBrightness(currentProfile).ToString());
            framesToProcess     = int.Parse(SharedSettings.FramesToProcess(currentProfile).ToString());
            animFramerate       = int.Parse(SharedSettings.AnimFramerate(currentProfile).ToString());
            imageName           = SharedSettings.ImageName(currentProfile);
            animName            = SharedSettings.AnimName(currentProfile);
            isAnimationEnabled  = SharedSettings.IsAnimationEnabled(currentProfile);

            //clock settings
            timeFont             = SharedSettings.TimeFontType();
            colonFont            = SharedSettings.ColonFontType();
            dateFont             = SharedSettings.DateFontType();
            timeFontSize         = int.Parse(SharedSettings.TimeFontSize().ToString());
            colonFontSize        = int.Parse(SharedSettings.ColonFontSize().ToString());
            dateFontSize         = int.Parse(SharedSettings.DateFontSize().ToString());
            timeFontColor        = SharedSettings.TimeFontColor();
            colonFontColor       = SharedSettings.ColonFontColor();
            dateFontColor        = SharedSettings.DateFontColor();
            clockBackgroundColor = SharedSettings.ClockBackgroundColor();
            isCompactView        = SharedSettings.IsCompactView();
            isDateShown          = SharedSettings.IsDateShown();
            timePosition         = int.Parse(SharedSettings.TimePosition().ToString());
            colonPosition        = int.Parse(SharedSettings.ColonPosition().ToString());
            datePosition         = int.Parse(SharedSettings.DatePosition().ToString());

            //create file list of fonts in fontDir
            fontList = new List <string> {
            };
            foreach (var font in Directory.GetFiles(SharedSettings.fontDir))
            {
                fontList.Add((Path.GetFileNameWithoutExtension(font)));
            }

            //create file list of images in staticImgDir
            imageList = new List <string> {
            };
            foreach (var img in Directory.GetFiles(SharedSettings.staticImgDir))
            {
                if (img.Contains(".png"))
                {
                    imageList.Add((Path.GetFileNameWithoutExtension(img)));
                }
            }

            //create file list of videos in animationImgDir
            animList = new List <string> {
            };
            foreach (var vid in Directory.GetFiles(SharedSettings.animationImgDir))
            {
                if (vid.Contains(".mp4"))
                {
                    animList.Add((Path.GetFileNameWithoutExtension(vid)));
                }
            }

            //create list of available StreamDeckMonitor colors
            string[] colors = { "Beige",    "Black",  "Blue",   "Brown",   "Cyan",  "Gold",   "Green", "Grey",
                                "HoneyDew", "Khaki",  "Lime",   "Mint",    "Olive", "Orange", "Pink",  "Purple",
                                "Red",      "Salmon", "Silver", "SkyBlue", "Teal",  "White",  "Yellow" };

            colorList = new List <string> {
            };
            foreach (var color in colors)
            {
                colorList.Add(color);
            }

            //create list of profiles
            string[] profiles = { "Profile 1", "Profile 2", "Profile 3" };

            profileList = new List <string> {
            };
            foreach (var profile in profiles)
            {
                profileList.Add(profile);
            }
        }