Esempio n. 1
0
        /// <summary>接続設定ファイルのパスを取得します。</summary>
        /// <returns>接続設定ファイルのパスを表す文字列。</returns>
        private string getSettingFilePath()
        {
            var execPath = AssemblyUtility.GetExecutingPath();

            return(Path.Combine(execPath,
                                DbConnectionSettingLoader.FLD_SETTING_FOLDER_NAME,
                                DbConnectionSettingLoader.FLE_SETTING_FILE_NAME));
        }
Esempio n. 2
0
        /// <summary>接続設定ファイルのパスを取得します。</summary>
        /// <returns>接続設定ファイルのパスを表す文字列。</returns>
        protected virtual string getSettingFilePath()
        {
            var execPath = AssemblyUtility.GetExecutingPath();

            if (string.IsNullOrEmpty(this.FolderName))
            {
                return(Path.Combine(execPath, this.SettingFileName));
            }
            else
            {
                return(Path.Combine(execPath, this.FolderName, this.SettingFileName));
            }
        }
Esempio n. 3
0
        /// <summary>
        /// データベースファイルへのパスを生成します。
        /// </summary>
        /// <returns>データベースファイルへのパスを表す文字列。</returns>
        private string createDbFilePath()
        {
            if (Regex.IsMatch(SqliteAccessHelper.connectInfo.DataSource, "^{exePath}."))
            {
                var execPath = AssemblyUtility.GetExecutingPath();

                return(Regex.Replace(SqliteAccessHelper.connectInfo.DataSource, "{exePath}", execPath));
            }
            else
            {
                return(SqliteAccessHelper.connectInfo.DataSource);
            }
        }
        /// <summary>
        /// zipファイルの作成を開始します。
        /// </summary>
        /// <param name="settings">zipファイル設定を表すZipFileSettings。</param>
        /// <param name="appSettings">アプリの設定を表すIImaZipCoreProto01Settings。</param>
        /// <returns>zipファイルの作成開始Task。</returns>
        public Task StartCreateZipAsync(ZipFileSettings settings, IImaZipCoreProto01Settings appSettings)
        {
            var zipId = this.saveZipSettings(settings);

            if (!zipId.HasValue)
            {
                return(Task.CompletedTask);
            }

            // ZipBookCreator起動
            Process.Start(new ProcessStartInfo()
            {
                UseShellExecute = true,
                FileName        = Path.Combine(AssemblyUtility.GetExecutingPath(), appSettings.CreatorExeFileName),
                Arguments       = zipId.Value.ToString()
            });

            return(Task.CompletedTask);
        }