public SlideSelectionDialog()
 {
     InitializeComponent();
     SlideList = new ObservableCollection<ImageItem>();
     DialogTitleProperty = new ObservableString();
     SlideListBox.DataContext = this;
     DialogTitle.DataContext = DialogTitleProperty;
 }
 public TextBlockDialog()
 {
     InitializeComponent();
     DialogTitleProperty = new ObservableString();
     DialogTextBlockProperty = new ObservableString();
     DialogTitle.DataContext = DialogTitleProperty;
     DialogTextBlock.DataContext = DialogTextBlockProperty;
 }
        private void InitUiModels()
        {
            StylesVariationList = new ObservableCollection<ImageItem>();
            StylesVariationListSelectedId = new ObservableInt {Number = -1};
            StylesVariationListSelectedItem = new ObservableImageItem();
            CurrentVariantCategory = new ObservableString();
            CurrentVariantCategoryId = new ObservableInt {Number = -1};
            VariantsCategory = new ObservableCollection<string>();
            SelectedFontId = new ObservableInt();
            SelectedFontFamily = new ObservableFont();

            StylesPreviewList = new ObservableCollection<ImageItem>();
            StylesPreviewListSelectedId = new ObservableInt {Number = -1};
            StylesPreviewListSelectedItem = new ObservableImageItem();

            ImageSelectionList = new ObservableCollection<ImageItem>();
            ImageSelectionList.Add(CreateChoosePicturesItem());

            if (StoragePath.IsFirstTimeUsage())
            {
                ImageSelectionList.Add(CreateSamplePic1Item());
                ImageSelectionList.Add(CreateSamplePic2Item());
            }
            else
            {
                var loadedImageSelectionList = StoragePath.Load();
                foreach (var item in loadedImageSelectionList)
                {
                    ImageSelectionList.Add(item);
                }
            }

            ImageSelectionListSelectedId = new ObservableInt {Number = -1};
            ImageSelectionListSelectedItem = new ObservableImageItem();
            IsActiveDownloadProgressRing = new ObservableBoolean {Flag = false};
        }
 private void InitDragAndDrop()
 {
     DragAndDropInstructionText = new ObservableString { Text = TextCollection.PictureSlidesLabText.DragAndDropInstruction };
     DragAndDropInstructions.DataContext = DragAndDropInstructionText;
 }
        private void InitUiModels()
        {
            StylesVariationList = new ObservableCollection<ImageItem>();
            StylesVariationListSelectedId = new ObservableInt {Number = -1};
            StylesVariationListSelectedItem = new ObservableImageItem();
            CurrentVariantCategory = new ObservableString();
            CurrentVariantCategoryId = new ObservableInt {Number = -1};
            VariantsCategory = new ObservableCollection<string>();
            SelectedFontId = new ObservableInt();
            SelectedFontFamily = new ObservableFont();

            StylesPreviewList = new ObservableCollection<ImageItem>();
            StylesPreviewListSelectedId = new ObservableInt {Number = -1};
            StylesPreviewListSelectedItem = new ObservableImageItem();

            ImageSelectionList = new ObservableCollection<ImageItem>();
            ImageSelectionList.Add(CreateChoosePicturesItem());

            Settings = StoragePath.LoadSettings();

            if (StoragePath.IsFirstTimeUsage())
            {
                Logger.Log("First time use PSL");
                ImageSelectionList.Add(CreateSamplePic1Item());
                ImageSelectionList.Add(CreateSamplePic2Item());
            }
            else
            {
                var loadedImageSelectionList = StoragePath.LoadPictures();
                foreach (var item in loadedImageSelectionList)
                {
                    if (item.FullSizeImageFile == null && item.BackupFullSizeImageFile != null)
                    {
                        item.FullSizeImageFile = item.BackupFullSizeImageFile;
                    }
                    else if (item.FullSizeImageFile == null && item.BackupFullSizeImageFile == null)
                    {
                        Logger.Log("Corrupted picture found. To be removed");
                        continue;
                    }
                    ImageSelectionList.Add(item);
                }
            }

            ImageSelectionListSelectedId = new ObservableInt {Number = -1};
            ImageSelectionListSelectedItem = new ObservableImageItem();
            IsActiveDownloadProgressRing = new ObservableBoolean {Flag = false};
        }