Пример #1
0
        /// <summary>
        /// すべてを更新する
        /// </summary>
        private void AllRefresh()
        {
            // 設定オブジェクト生成
            BgwcSetting set = new BgwcSetting();

            // 更新する前に現在の個別壁紙設定を保存
            set.SaveWallpaperSetting();
            // 現在の壁紙のパス更新
            MainFunc.NowWallpaperUpdate(this.NowWallpaper, MainFunc.RegWallpaperPath);
            // 壁紙リストを再構築
            ListCreate();
        }
        public static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // アプリケーションパス格納
            ApplicationPath = Application.StartupPath;

            // 設定オブジェクト生成
            set = new BgwcSetting();

            // 設定をロード
            set.LoadSetting();

            // コマンドライン取得
            if (args.Length > 0)
            {
                CommandLine = args[0];
            }

            // BGWChangerGraphicのパスを設定
            gBGWChangerGraphicPath = ApplicationPath + "\\BGWChangerGraphic.bmp";
            // BGWChanger.exeのパスを設定
            gExeFilePath = ApplicationPath + "\\" + conExecFileName;

            _frmMain = new MainForm();
            Application.Run(_frmMain);

            /*
             *  終了されたとき
             */

            // 設定を保存
            set.AlwaysOnTop = _frmMain.frmOpt.AlwaysOnTop;
            set.StartUp     = _frmMain.frmOpt.StartUp;
            set.ChangeMode  = _frmMain.frmOpt.ChangeMode;
            set.SaveAllSetting();
        }