Exemple #1
0
        /// <summary>
        /// 更新をチェック
        /// </summary>
        /// <param name="isPortable">ポータブル版かどうか</param>
        /// <param name="updateFoundProc">更新が見つかった時の処理</param>
        public static void Check(bool isPortable, Action <UpdateInfoEventArgs> updateFoundProc)
        {
            UpdateFoundProc = updateFoundProc;

            var edition  = (isPortable ? "portable" : "standard");
            var platform = ApplicationEnvironment.GetPlatform();
            var url      = $"https://inazumaapps.info/inazumasearch/autoupdate/AutoUpdate-{edition}-{platform}-after-0.24.0.xml";

            AutoUpdater.Start(url);
        }
        protected virtual string GetReportBody()
        {
            var body = new StringBuilder();

            body.AppendLine(ExceptionString);
            body.AppendLine();
            body.AppendLine(new string('-', 80));
            if (!string.IsNullOrWhiteSpace(TxtErrorComment.Text))
            {
                body.AppendLine("<補足>:" + TxtErrorComment.Text);
                body.AppendLine(new string('-', 80));
            }
            body.AppendLine($"バージョン: Inazuma Search {ApplicationEnvironment.GetVersion().ToString()}" + (ApplicationEnvironment.GetPlatform() == "x86" ? " (32ビットバージョン)" : ""));
            body.AppendLine($"発生日時: {RaisedTime.ToString("yyyy-MM-dd HH:mm:ss")}");
            if (UserSetting.LastLoadedUserUuid != null)
            {
                body.AppendLine($"UUID: {UserSetting.LastLoadedUserUuid}");
            }
            body.AppendLine();
            body.AppendLine($"[OS]");
            var bitCaption = (OSIs64Bit == null ? "ビット数不明" : OSIs64Bit.Value ? "64ビット" : "32ビット");

            body.AppendLine($"{OSCaption ?? "不明"} {bitCaption}");
            body.AppendLine($"[メモリ使用量]");
            body.AppendLine($"物理RAM            : {FormatMemorySize(ProcessWorkingSet)}  (ピーク: {FormatMemorySize(ProcessPeakWorkingSet)})");
            body.AppendLine($"ページングファイル : {FormatMemorySize(ProcessPagedMemorySize)}  (ピーク: {FormatMemorySize(ProcessPeakPagedMemorySize)})");


            return(body.ToString());
        }