示例#1
0
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            //  Going to need to present the user with a File Dialog and
            //  then interate through the Grid, outputting columns that
            //  are visible.

            saveFileDialogTxt.AddExtension = true;
            saveFileDialogTxt.Title = "Save Output to TXT";
            saveFileDialogTxt.Filter = "TXT Files|*.txt";
            saveFileDialogTxt.FileName = "rngreporter.txt";
            if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
            {
                //  Get the name of the file and then go ahead
                //  and create and save the thing to the hard
                //  drive.

                // Throws an exception if the wrong object type
                // And goes to the other one

                var writer = new TXTWriter(dgvHiddenGrottos);
                try
                {
                    var frames = (List<Hollow>) ((BindingSource) dgvHiddenGrottos.DataSource).DataSource;

                    if (frames.Count > 0)
                    {
                        //  Need to know what sort of display we are doing here.  The
                        //  easiset thing to do is to take the value of the dropdown.
                        //IFrameEggPIDTXTWriter writer = new IFrameEggPIDTXTWriter();

                        writer.Generate(saveFileDialogTxt.FileName, frames);
                    }
                }
                catch
                {
                    var frames = (List<Hollow>) ((BindingSource) dgvHiddenGrottos.DataSource).DataSource;

                    if (frames.Count > 0)
                    {
                        //  Need to know what sort of display we are doing here.  The
                        //  easiset thing to do is to take the value of the dropdown.
                        //IFrameEggPIDTXTWriter writer = new IFrameEggPIDTXTWriter();

                        writer.Generate(saveFileDialogTxt.FileName, frames);
                    }
                }
            }
        }
示例#2
0
        private void outputCapResultsToTXTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //  Going to need to present the user with a File Dialog and
            //  then interate through the Grid, outputting columns that
            //  are visible.

            saveFileDialogTxt.AddExtension = true;
            saveFileDialogTxt.Title = "Save Output to TXT";
            saveFileDialogTxt.Filter = "TXT Files|*.txt";
            saveFileDialogTxt.FileName = "rngreporter.txt";
            if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
            {
                //  Get the name of the file and then go ahead
                //  and create and save the thing to the hard
                //  drive.
                List<IFrameCapture> frames = iframes;

                if (frames.Count > 0)
                {
                    var writer = new TXTWriter(dataGridViewCapValues);
                    writer.Generate(saveFileDialogTxt.FileName, frames);
                }
            }
        }
示例#3
0
        private void generateTXTFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //  Going to need to present the user with a File Dialog and
            //  then interate through the Grid, outputting columns that
            //  are visible.

            saveFileDialogTxt.AddExtension = true;
            saveFileDialogTxt.Title = "Save Output to TXT";
            saveFileDialogTxt.Filter = "TXT Files|*.txt";
            saveFileDialogTxt.FileName = "rngreporter.txt";

            if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
            {
                //  Get the name of the file and then go ahead
                //  and create and save the thing to the hard
                //  drive.
                var adjacents = (List<Adjacent>) dataGridViewAdjacents.DataSource;

                if (adjacents.Count > 0)
                {
                    var writer = new TXTWriter(dataGridViewAdjacents);
                    writer.Generate(saveFileDialogTxt.FileName, adjacents);
                }
            }
        }
示例#4
0
        private void outputResultsToTXTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //  Going to need to present the user with a File Dialog and
            //  then interate through the Grid, outputting columns that
            //  are visible.

            saveFileDialogTxt.AddExtension = true;
            saveFileDialogTxt.Title = "Save Output to TXT";
            saveFileDialogTxt.Filter = "TXT Files|*.txt";
            saveFileDialogTxt.FileName = "rngreporter.txt";
            if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
            {
                //  Get the name of the file and then go ahead
                //  and create and save the thing to the hard
                //  drive.

                List<IFrameBreeding> frames = iframesEggIVs;

                if (iframesEggIVs != null && iframesEggIVs.Count > 0)
                {
                    //  Need to know what sort of display we are doing here.  The
                    //  easiset thing to do is to take the value of the dropdown.
                    var writer = new TXTWriter(dataGridViewEggIVValues);

                    writer.Generate(saveFileDialogTxt.FileName, frames);
                }
            }
        }
示例#5
0
        private void outputResultsToTXTToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            //  Going to need to present the user with a File Dialog and
            //  then interate through the Grid, outputting columns that
            //  are visible.

            saveFileDialogTxt.AddExtension = true;
            saveFileDialogTxt.Title = "Save Output to TXT";
            saveFileDialogTxt.Filter = "TXT Files|*.txt";
            saveFileDialogTxt.FileName = "rngreporter.txt";
            if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
            {
                //  Get the name of the file and then go ahead
                //  and create and save the thing to the hard
                //  drive.

                // Throws an exception if the wrong object type
                // And goes to the other one

                var writer = new TXTWriter(dataGridViewShinyResults);
                try
                {
                    var frames = (List<IFrameEggPID>) listBindingShiny.DataSource;

                    if (frames.Count > 0)
                    {
                        writer.Generate(saveFileDialogTxt.FileName, frames);
                    }
                }
                catch
                {
                    var frames = (List<IFrameCapture>) listBindingShiny.DataSource;

                    if (frames.Count > 0)
                    {
                        writer.Generate(saveFileDialogTxt.FileName, frames);
                    }
                }
            }
        }
示例#6
0
        private void outputSelectedColumnsToTXTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (columns != null && columns.Count > 0)
            {
                saveFileDialogTxt.AddExtension = true;
                saveFileDialogTxt.Title = "Save Output to TXT";
                saveFileDialogTxt.Filter = "TXT Files|*.txt";
                saveFileDialogTxt.FileName = "rngreporter.txt";
                if (saveFileDialogTxt.ShowDialog() == DialogResult.OK)
                {
                    //  Get the name of the file and then go ahead
                    //  and create and save the thing to the hard
                    //  drive.
                    var frames = (List<FrameResearch>) dataGridViewValues.DataSource;

                    if (frames.Count > 0)
                    {
                        var writer = new TXTWriter(dataGridViewValues, columns);
                        writer.Generate(saveFileDialogTxt.FileName, frames);
                    }
                }
            }
        }