Exemplo n.º 1
0
        /// <summary>
        /// 壁紙の無効を設定(解除)する
        /// </summary>
        /// <param name="bolVal">true:設定 false:解除</param>
        public void NonWallpaper(bool bolVal)
        {
            GeneralFunction gfunc = new GeneralFunction();

            // WaitForm生成
            WaitForm waitfrm = new WaitForm();

            waitfrm.StartWait();

            if (bolVal)
            {
                // 無効にする
                RegistryUtils.setCURegistryKeyStringValue(MainProgram.conWallpaperSubKey, "Wallpaper", "");

                // 壁紙を無効に設定
                gfunc.SettingWallpaper("");
            }
            else
            {
                // 有効にする
                RegistryUtils.setCURegistryKeyStringValue(MainProgram.conWallpaperSubKey, "Wallpaper", MainProgram.gBGWChangerGraphicPath);

                // 壁紙を有効に設定
                gfunc.SettingWallpaper(MainProgram.gBGWChangerGraphicPath);
            }

            waitfrm.EndWait();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 壁紙スタイルを変更する
        /// </summary>
        public void ChangeWallpaperStyle()
        {
            GeneralFunction gfunc = new GeneralFunction();

            // WaitForm生成
            WaitForm waitfrm = new WaitForm();

            waitfrm.StartWait();

            switch (MainProgram.frmMain.frmOpt.WallpaperStyle)
            {
            case (int)MainProgram.enuViewPos.ORIGINAL:
                MainProgram.frmMain.frmOpt.OptFunc.WallpaperStyleWrite(
                    (int)MainProgram.enuTileWallpaper.CENTER,
                    (int)MainProgram.enuWallpaperStyle.NONE);
                break;

            case (int)MainProgram.enuViewPos.ARRANGE:
                MainProgram.frmMain.frmOpt.OptFunc.WallpaperStyleWrite(
                    (int)MainProgram.enuTileWallpaper.FILL,
                    (int)MainProgram.enuWallpaperStyle.NONE);
                break;

            case (int)MainProgram.enuViewPos.FIT:
                MainProgram.frmMain.frmOpt.OptFunc.WallpaperStyleWrite(
                    (int)MainProgram.enuTileWallpaper.CENTER,
                    (int)MainProgram.enuWallpaperStyle.STRETCH);
                break;
            }

            gfunc.SettingWallpaper(MainProgram.frmMain.MainFunc.RegWallpaperPath);

            waitfrm.EndWait();
        }