private void ButtonAlert_Click(object sender, EventArgs e) { if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveSWF) { 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.SaveSWF = true; UpdateButtonAlert(); } } if (!FleetImageGenerator.HasShipSwfImage(ToFleetIDs())) { MessageBox.Show("現在の艦隊を出力するための艦船画像データが不足しています。\r\n\r\nキャッシュを削除したのち再読み込みを行い、\r\n艦これ本体側で出力したい艦隊の編成ページを開くと\r\n艦船画像データが保存されます。", "艦船画像データ不足", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); UpdateButtonAlert(); } }
private void ButtonAlert_Click(object sender, EventArgs e) { if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveSWF) { if (MessageBox.Show("It is necessary to enable save ship image option in order\r\nto export fleet image. Would you like to enable it?", "Invalid Settings", 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.SaveSWF = true; UpdateButtonAlert(); } } if (!FleetImageGenerator.HasShipSwfImage(ToFleetIDs())) { MessageBox.Show("One or more ship image of the current fleet are missing.\r\n\r\nClear cache and reload the game. The ship images are automatically\r\nsaved when you view the current fleet within the game.", "Ship Image Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); UpdateButtonAlert(); } }
private void UpdateButtonAlert() { bool visibility = false; if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveSWF) { visibility = true; ButtonAlert.Text = "艦船画像保存設定が無効です(詳細表示...)"; } if (!FleetImageGenerator.HasShipSwfImage(ToFleetIDs())) { visibility = true; ButtonAlert.Text = "艦船画像が足りません(詳細表示...)"; } ButtonAlert.Visible = visibility; }
private void UpdateButtonAlert() { bool visibility = false; if (!Utility.Configuration.Config.Connection.SaveReceivedData || !Utility.Configuration.Config.Connection.SaveSWF) { visibility = true; ButtonAlert.Text = "Invalid settings"; } if (!FleetImageGenerator.HasShipSwfImage(ToFleetIDs())) { visibility = true; ButtonAlert.Text = "Ship image not found"; } ButtonAlert.Visible = visibility; }