Пример #1
0
        private void ibExport_ButtonClicked()
        {
            MidsContext.Config.ExportScheme     = csList.SelectedIndex;
            MidsContext.Config.ExportTarget     = lstCodes.SelectedIndex;
            MidsContext.Config.DisableExportHex = false;
            var config = MidsContext.Config;

            config.I9.DisableExportDataChunk     = !chkDataChunk.Checked;
            config.I9.ExportIOLevels             = !chkNoIOLevel.Checked;
            config.I9.ExportStripSetNames        = chkNoSetName.Checked;
            config.I9.ExportStripEnh             = chkNoEnh.Checked;
            MidsContext.Config.ExportBonusTotals = chkBonusList.Checked;
            MidsContext.Config.ExportBonusList   = chkBreakdown.Checked;
            MidsContext.Config.ExportChunkOnly   = chkChunkOnly.Checked;
            Exporter = new clsOutput();
            var str1 = "";
            //this creates the data link
            var iDataLink = MidsCharacterFileFormat.MxDBuildSaveHyperlink(!Exporter.HTML);

            if (!chkChunkOnly.Checked)
            {
                str1 = Exporter.Build(iDataLink);
            }

            var str2 = ExportConfig.FormatCodes.FillCode(
                MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].SizeOn, "5");
            var sizeOff = MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].SizeOff;

            if (!chkChunkOnly.Checked)
            {
                str1 += "\r\n\r\n";
            }
            if ((iDataLink == "") | chkAlwaysDataChunk.Checked | chkChunkOnly.Checked &&
                chkDataChunk.Checked | chkAlwaysDataChunk.Checked | chkChunkOnly.Checked)
            {
                str1 = str1 + str2 + MidsCharacterFileFormat.MxDBuildSaveString(false, true) + sizeOff;
            }
            Clipboard.SetDataObject(str1, true);
            MessageBox.Show("The build data has been placed on the clipboard and is ready to paste into a forum post. If your forum allows you to disable emoticons/smileys in your post, you should do so.", "Export Done", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Hide();
        }
Пример #2
0
        void ibExport_ButtonClicked()
        {
            MidsContext.Config.ExportScheme = this.csList.SelectedIndex;
            MidsContext.Config.ExportTarget = this.lstCodes.SelectedIndex;
            MidsContext.Config.ExportHex    = true;
            ConfigData config = MidsContext.Config;

            config.I9.ExportDataChunk            = this.chkDataChunk.Checked;
            config.I9.ExportIOLevels             = !this.chkNoIOLevel.Checked;
            config.I9.ExportStripSetNames        = this.chkNoSetName.Checked;
            config.I9.ExportStripEnh             = this.chkNoEnh.Checked;
            MidsContext.Config.ExportBonusTotals = this.chkBonusList.Checked;
            MidsContext.Config.ExportBonusList   = this.chkBreakdown.Checked;
            MidsContext.Config.ExportChunkOnly   = this.chkChunkOnly.Checked;
            this.Exporter = new clsOutput();
            string str       = "";
            string iDataLink = MidsCharacterFileFormat.MxDBuildSaveHyperlink(!this.Exporter.HTML, false);

            if (!this.chkChunkOnly.Checked)
            {
                str = this.Exporter.Build(iDataLink);
            }
            string str2    = ExportConfig.FormatCodes.FillCode(MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].SizeOn, "5");
            string sizeOff = MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].SizeOff;

            if (!this.chkChunkOnly.Checked)
            {
                str += "\r\n\r\n";
            }
            if ((iDataLink == "" | this.chkAlwaysDataChunk.Checked | this.chkChunkOnly.Checked) && (this.chkDataChunk.Checked | this.chkAlwaysDataChunk.Checked | this.chkChunkOnly.Checked))
            {
                str = str + str2 + MidsCharacterFileFormat.MxDBuildSaveString(false, true) + sizeOff;
            }
            Clipboard.SetDataObject(str, true);
            string prompt = "The build data has been placed on the clipboard and is ready to paste into a forum post. If your forum allows you to disable emoticons/smileys in your post, you should do so.";

            Interaction.MsgBox(prompt, MsgBoxStyle.Information, "Export Done");
            base.Hide();
        }