Example #1
0
        public SlideShow()
        {
            if (!(File.Exists(Program.PATH + "settings.ini") && File.Exists(Program.PATH + "imagelist.cfg")))
            {
                StartConfig();
            }

            _config = new SlideShowConfig();
            _config.Load();
            _images = File.ReadAllLines(Program.PATH + "imagelist.cfg");

            if (_images.Length < 1)
            {
                StartConfig();
            }

            Width  = "100%";
            Height = "100%";

            Children = new List <Component>()
            {
                new PictureBox(_images[0])
                {
                    Width       = "100%",
                    Height      = "100%",
                    StretchMode = PictureBox.Stretch.Letterbox,
                    Name        = "picturebox",
                    SmoothImage = true
                }
            };

            _stopwatch = Stopwatch.StartNew();
        }
Example #2
0
        public PrepareCollection()
        {
            Width    = "100%";
            Height   = "100%";
            Padding  = "20px";
            Layout   = LayoutType.Column;
            Children = new List <Component>()
            {
                new Label("Przygotowywanie kolekcji zdjęć")
                {
                    Font         = Fonts.MontserratSemiBold,
                    MarginBottom = "10px"
                },
                new Label("To może trochę potrwać..."),
                new Spacer(),
                new ProgressBar()
                {
                    Width        = "100%",
                    Intermediate = true
                }
            };

            SlideShowConfig config = new SlideShowConfig();

            config.Load();

            Task searchTask = Task.Run(() => Search(config.Directory, config.UseSubdirectories));
        }
Example #3
0
        private void LoadSettings()
        {
            SlideShowConfig config = new SlideShowConfig();

            config.Load();

            (FindChild("current_dir") as Label).Text = config.Directory;
            (FindChild("use_subdirectories") as CheckBox).IsChecked = config.UseSubdirectories;
            (FindChild("speed_select").Children[config.IntervalId] as RadioButton).IsMarked = true;
            (FindChild("randomise") as CheckBox).IsChecked = config.Random;
        }