private void ButtonAlert_Click(object sender, EventArgs e) { if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveOtherFile) { if (MessageBox.Show("編成画像を出力するためには、艦船画像を保存する設定を有効にする必要があります。\r\n有効にしますか?", "艦船画像保存設定が無効です", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) { if (!Utility.Configuration.Config.Connection.SaveReceivedData) { Utility.Configuration.Config.Connection.SaveReceivedData = true; Utility.Configuration.Config.Connection.SaveResponse = false; // もともと不要にしていたユーザーには res は邪魔なだけだと思うので } Utility.Configuration.Config.Connection.SaveOtherFile = true; UpdateButtonAlert(); } } if (!FleetImageGenerator.HasShipImage(ToFleetIDs(), ReflectDamageGraphic.Checked, GetResourceType(ImageType))) { MessageBox.Show("現在の艦隊を出力するための艦船画像データが不足しています。\r\n\r\nキャッシュを削除したのち再読み込みを行い、\r\n艦これ本体側で出力したい艦隊の編成ページを開くと\r\n艦船画像データが保存されます。", "艦船画像データ不足", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); UpdateButtonAlert(); } }
private void UpdateButtonAlert() { bool visibility = false; if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveOtherFile) { visibility = true; ButtonAlert.Text = "艦船画像保存設定が無効です(詳細表示...)"; } if (!FleetImageGenerator.HasShipImage(ToFleetIDs(), ReflectDamageGraphic.Checked, GetResourceType(ImageType))) { visibility = true; ButtonAlert.Text = "艦船画像が足りません(詳細表示...)"; } ButtonAlert.Visible = visibility; }