예제 #1
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);
                }
            }
        }
예제 #2
0
 //synchronization zone with excavotor
 void SyncZoneExcv()
 {
     foreach (var z in _zones.Where(x => x.Type == 1))
     {
         foreach (var e in _transports.Where(x => x.TypeId == "2"))
         {
             if (z.Points[0] == e.CurrentLocation)
             {
                 z.ExcavatorId = e.TransportId;
                 e.ZoneId      = z.Id;
                 TXTWriter.Write(string.Format("{0, 10}[{1}|{2}] : {3, 10}[{4}|{5}]\n",
                                               z.DisplayName, z.Points[0].Latitude, z.Points[0].Longitude,
                                               e.TransportId, e.CurrentLocation.Latitude, e.CurrentLocation.Longitude));
             }
         }
     }
 }
예제 #3
0
        private void outputResultsToTXTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            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);
                    writer.Generate(saveFileDialogTxt.FileName, frames);
                }
            }
        }
예제 #4
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);
                }
            }
        }