/// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.ClearChart     = new Nevron.UI.WinForm.Controls.NButton();
     this.ImportFromCSV  = new Nevron.UI.WinForm.Controls.NButton();
     this.label1         = new System.Windows.Forms.Label();
     this.nDataGridView1 = new Nevron.UI.WinForm.Controls.NDataGridView();
     ((System.ComponentModel.ISupportInitialize)(this.nDataGridView1)).BeginInit();
     this.SuspendLayout();
     //
     // ClearChart
     //
     this.ClearChart.Location = new System.Drawing.Point(8, 8);
     this.ClearChart.Name     = "ClearChart";
     this.ClearChart.Size     = new System.Drawing.Size(151, 24);
     this.ClearChart.TabIndex = 0;
     this.ClearChart.Text     = "Clear Chart";
     this.ClearChart.Click   += new System.EventHandler(this.ClearChart_Click);
     //
     // ImportFromCSV
     //
     this.ImportFromCSV.Location = new System.Drawing.Point(8, 40);
     this.ImportFromCSV.Name     = "ImportFromCSV";
     this.ImportFromCSV.Size     = new System.Drawing.Size(151, 23);
     this.ImportFromCSV.TabIndex = 1;
     this.ImportFromCSV.Text     = "Import From CSV File";
     this.ImportFromCSV.Click   += new System.EventHandler(this.ImportFromCSV_Click);
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(5, 76);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(86, 13);
     this.label1.TabIndex = 3;
     this.label1.Text     = "CSV file content:";
     //
     // nDataGridView1
     //
     this.nDataGridView1.AllowUserToAddRows    = false;
     this.nDataGridView1.AllowUserToDeleteRows = false;
     this.nDataGridView1.AllowUserToResizeRows = false;
     this.nDataGridView1.ReadOnly = true;
     this.nDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.nDataGridView1.Location = new System.Drawing.Point(8, 93);
     this.nDataGridView1.Name     = "nDataGridView1";
     this.nDataGridView1.Size     = new System.Drawing.Size(199, 228);
     this.nDataGridView1.TabIndex = 4;
     //
     // NImportingFromCSVUC
     //
     this.Controls.Add(this.nDataGridView1);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.ImportFromCSV);
     this.Controls.Add(this.ClearChart);
     this.Name = "NImportingFromCSVUC";
     this.Size = new System.Drawing.Size(210, 400);
     ((System.ComponentModel.ISupportInitialize)(this.nDataGridView1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #2
0
        private void ShowDataButton_Click(object sender, EventArgs e)
        {
            Nevron.UI.WinForm.Controls.NForm f = new Nevron.UI.WinForm.Controls.NForm();
            f.SuspendLayout();

            //Create the data grid view
            Nevron.UI.WinForm.Controls.NDataGridView dg = new Nevron.UI.WinForm.Controls.NDataGridView();
            dg.Dock = DockStyle.Fill;
            dg.AllowUserToAddRows = false;
            dg.AlternatingRowsDefaultCellStyle.BackColor = Color.LightSteelBlue;
            dg.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            dg.RowHeadersVisible   = false;
            dg.ReadOnly            = true;
            dg.DataSource          = m_MapImporter.GetLayerAt(cbFile.SelectedIndex).DataTable;
            f.Controls.Add(dg);

            //Init the form
            f.Icon        = this.Form.Icon;
            f.WindowState = FormWindowState.Maximized;
            f.Text        = string.Format("DBF data for '{0}'", m_MapImporter.GetLayerAt(cbFile.SelectedIndex).Name);

            f.ResumeLayout();
            f.ShowDialog();
        }