Example #1
0
        private void PicFileRefButton_Click(object sender, RoutedEventArgs e)
        {
            var path = FileController.OpenFileDialog(
                Extensions,
                "画像ファイルを開いてください",
                ExtensionDescription);

            if (path == string.Empty)
            {
                return;
            }

            PicFilePathTextBox.Text = path;
            StopSlideShow();
            SetPicConfig();
            SetSinglePicture();
        }
Example #2
0
        private void PicFolderRefButton_Click(object sender, RoutedEventArgs e)
        {
            var path = FileController.OpenFolderDialog("", "画像フォルダを開いてください");

            if (path == string.Empty)
            {
                return;
            }

            PicFolderDirectoryTextBox.Text = path;

            var timeSpan = TimeSpanTextBox.Text;

            SetPicConfig();
            if (Regex.IsMatch(timeSpan, @"^[0-9]+$"))
            {
                StartSlideShow();
            }
        }
Example #3
0
        public static void ReadConfigIni()
        {
            AppConfigItemsContainer.IsOpenConfigAtStart =
                FileController.ReadIniDataBool("AppSetting", "OpenConfigAtStart", AppConfigItemsContainer.IsOpenConfigAtStart);
            AppConfigItemsContainer.IsShowBySlideShow =
                FileController.ReadIniDataBool("AppSetting", "ShowBySlideShow", AppConfigItemsContainer.IsShowBySlideShow);
            AppConfigItemsContainer.IsEnlargePictureToLimit =
                FileController.ReadIniDataBool("DrawSetting", "EnlargePictureToLimit", AppConfigItemsContainer.IsEnlargePictureToLimit);
            AppConfigItemsContainer.IsUseHotKey =
                FileController.ReadIniDataBool("AppSetting", "UseHotKey", AppConfigItemsContainer.IsUseHotKey);
            AppConfigItemsContainer.PicFolderDirectory =
                FileController.ReadIniData("AppSetting", "PictureFolderDirectory");
            AppConfigItemsContainer.PicPath =
                FileController.ReadIniData("AppSetting", "PictureFilePath");
            AppConfigItemsContainer.PositionX =
                FileController.ReadIniDataInt("DrawSetting", "DrawPositionHorizontalValue", AppConfigItemsContainer.PositionX);
            AppConfigItemsContainer.PositionY =
                FileController.ReadIniDataInt("DrawSetting", "DrawPositionVerticalValue", AppConfigItemsContainer.PositionY);
            AppConfigItemsContainer.SizeLimitX =
                FileController.ReadIniDataInt("DrawSetting", "DrawSizeLimitHorizontalValue", AppConfigItemsContainer.SizeLimitX);
            AppConfigItemsContainer.SizeLimitY =
                FileController.ReadIniDataInt("DrawSetting", "DrawSizeLimitVerticalValue", AppConfigItemsContainer.SizeLimitY);
            AppConfigItemsContainer.Opacity =
                FileController.ReadIniDataInt("DrawSetting", "DrawOpacityValue", AppConfigItemsContainer.Opacity);
            AppConfigItemsContainer.TimeSpan =
                FileController.ReadIniDataInt("AppSetting", "SlideShowTimeSpan", AppConfigItemsContainer.TimeSpan);

            AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseCtrl =
                FileController.ReadIniDataBool("HotKeySetting", "MinimizeUseCtrl", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseCtrl);
            AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseShift =
                FileController.ReadIniDataBool("HotKeySetting", "MinimizeUseShift", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseShift);
            AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseAlt =
                FileController.ReadIniDataBool("HotKeySetting", "MinimizeUseAlt", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseAlt);

            AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseCtrl =
                FileController.ReadIniDataBool("HotKeySetting", "OpenConfigimizeUseCtrl", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseCtrl);
            AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseShift =
                FileController.ReadIniDataBool("HotKeySetting", "OpenConfigimizeUseShift", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseShift);
            AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseAlt =
                FileController.ReadIniDataBool("HotKeySetting", "OpenConfigimizeUseAlt", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseAlt);
        }
Example #4
0
        public static void StartSlideShow()
        {
            StopTimer();

            if (!Directory.Exists(AppConfigItemsContainer.PicFolderDirectory))
            {
                return;
            }

            PicPaths = FileController.GetFilePaths(AppConfigItemsContainer.PicFolderDirectory, Extensions);

            if (PicPaths.Length == 0)
            {
                return;
            }

            ResetNotShowedPics();

            StartTimer();

            SetNewPictureofFolder();
        }
Example #5
0
        public static void SaveConfigIni()
        {
            FileController.SaveIniData("AppSetting", "OpenConfigAtStart", AppConfigItemsContainer.IsOpenConfigAtStart.ToString());
            FileController.SaveIniData("AppSetting", "ShowBySlideShow", AppConfigItemsContainer.IsShowBySlideShow.ToString());
            FileController.SaveIniData("DrawSetting", "EnlargePictureToLimit", AppConfigItemsContainer.IsEnlargePictureToLimit.ToString());
            FileController.SaveIniData("AppSetting", "UseHotKey", AppConfigItemsContainer.IsUseHotKey.ToString());
            FileController.SaveIniData("AppSetting", "PictureFolderDirectory", AppConfigItemsContainer.PicFolderDirectory);
            FileController.SaveIniData("AppSetting", "PictureFilePath", AppConfigItemsContainer.PicPath);
            FileController.SaveIniData("DrawSetting", "DrawPositionHorizontalValue", AppConfigItemsContainer.PositionX.ToString());
            FileController.SaveIniData("DrawSetting", "DrawPositionVerticalValue", AppConfigItemsContainer.PositionY.ToString());
            FileController.SaveIniData("DrawSetting", "DrawSizeLimitHorizontalValue", AppConfigItemsContainer.SizeLimitX.ToString());
            FileController.SaveIniData("DrawSetting", "DrawSizeLimitVerticalValue", AppConfigItemsContainer.SizeLimitY.ToString());
            FileController.SaveIniData("DrawSetting", "DrawOpacityValue", AppConfigItemsContainer.Opacity.ToString());
            FileController.SaveIniData("AppSetting", "SlideShowTimeSpan", AppConfigItemsContainer.TimeSpan.ToString());

            FileController.SaveIniData("HotKeySetting", "MinimizeUseCtrl", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseCtrl.ToString());
            FileController.SaveIniData("HotKeySetting", "MinimizeUseShift", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseShift.ToString());
            FileController.SaveIniData("HotKeySetting", "MinimizeUseAlt", AppConfigItemsContainer.MinHotKeyConfigContainer.IsUseAlt.ToString());

            FileController.SaveIniData("HotKeySetting", "OpenConfigimizeUseCtrl", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseCtrl.ToString());
            FileController.SaveIniData("HotKeySetting", "OpenConfigimizeUseShift", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseShift.ToString());
            FileController.SaveIniData("HotKeySetting", "OpenConfigimizeUseAlt", AppConfigItemsContainer.OpenConfigHotKeyConfigContainer.IsUseAlt.ToString());
        }