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 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 Bitmap GenerateFleetImage(FleetImageArgument args, int mode)
        {
            switch (mode)
            {
            case 0:
            default:
                return(FleetImageGenerator.GenerateCardBitmap(args));

            case 1:
                return(FleetImageGenerator.GenerateCutinBitmap(args));

            case 2:
                return(FleetImageGenerator.GenerateBannerBitmap(args));
            }
        }
Example #4
0
        private bool HasShipImage()
        {
            switch (ImageType)
            {
            case 0:
                return(FleetImageGenerator.HasShipImageCard(ToFleetIDs(), ReflectDamageGraphic.Checked));

            case 1:
                return(FleetImageGenerator.HasShipImageCutin(ToFleetIDs(), ReflectDamageGraphic.Checked));

            case 2:
                return(FleetImageGenerator.HasShipImageBanner(ToFleetIDs(), ReflectDamageGraphic.Checked));

            default:
                return(true);
            }
        }
        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.SaveOtherFile)
            {
                visibility       = true;
                ButtonAlert.Text = "艦船画像保存設定が無効です(詳細表示...)";
            }

            if (!FleetImageGenerator.HasShipImage(ToFleetIDs(), ReflectDamageGraphic.Checked, GetResourceType(ImageType)))
            {
                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;
        }