Ejemplo n.º 1
0
        private void Convert2CSV_Click(object sender, EventArgs e)
        {
            CSV       = true;
            Save.Text = "Save CSV";

/*
 *          res = model.Convert2CSVvisual(Horizontal.Checked, SortLast.Checked, ID.Text);
 *          if (res.Length < PreviewLimit) Result.Text = res.ToString();
 *          else Result.Text = res.ToString(0, PreviewLimit) + "...";
 *          return;//*/
            mem = new MemoryStream();
            StreamWriter sw = new StreamWriter(mem);

            model.Convert2CSVquick(sw, Horizontal.Checked, SortLast.Checked, ID.Text);
            if (mem.Length < PreviewLimit)
            {
                Result.Text = Encoding.UTF8.GetString(mem.ToArray(), 0, (int)mem.Length);
            }
            else
            {
                Result.Text = Encoding.UTF8.GetString(mem.ToArray(), 0, PreviewLimit) + "...";
            }
        }