private void SaveConfiguration()
        {
            var config = Utility.Configuration.Config.FleetImageGenerator;

            if (config.Argument != null)
            {
                config.Argument.DisposeResources();
            }

            config.Argument = CurrentArgument.Clone();

            if (ImageTypeCard.Checked)
            {
                config.ImageType = 0;
            }
            else if (ImageTypeCutin.Checked)
            {
                config.ImageType = 1;
            }
            else if (ImageTypeBanner.Checked)
            {
                config.ImageType = 2;
            }

            config.OutputType                 = OutputToClipboard.Checked ? 1 : 0;
            config.OpenImageAfterOutput       = OpenImageAfterOutput.Checked;
            config.DisableOverwritePrompt     = DisableOverwritePrompt.Checked;
            config.AutoSetFileNameToDate      = AutoSetFileNameToDate.Checked;
            config.SyncronizeTitleAndFileName = SyncronizeTitleAndFileName.Checked;

            config.LastOutputPath = OutputPath.Text;
        }
        private FleetImageArgument ApplyToArgument(FleetImageArgument defaultValue = null)
        {
            var ret = defaultValue == null ? new FleetImageArgument() : defaultValue.Clone();

            ret.FleetIDs = new[] {
                TargetFleet1.Checked ? 1 : 0,
                    TargetFleet2.Checked ? 2 : 0,
                    TargetFleet3.Checked ? 3 : 0,
                    TargetFleet4.Checked ? 4 : 0
            }.Where(i => i > 0).ToArray();

            ret.HorizontalFleetCount = (int)HorizontalFleetCount.Value;
            ret.HorizontalShipCount  = (int)HorizontalShipCount.Value;

            ret.ReflectDamageGraphic      = ReflectDamageGraphic.Checked;
            ret.AvoidTwitterDeterioration = AvoidTwitterDeterioration.Checked;

            var fonts = ret.Fonts;

            for (int i = 0; i < fonts.Length; i++)
            {
                if (fonts[i] != null)
                {
                    fonts[i].Dispose();
                }
                fonts[i] = SerializableFont.StringToFont(TextFontList[i].Text, true);
            }
            ret.Fonts = fonts;

            ret.BackgroundImagePath = BackgroundImagePath.Text;

            ret.Title   = Title.Text;
            ret.Comment = Comment.Text;

            return(ret);
        }