/// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook2 = new Telerik.Windows.Documents.Spreadsheet.Model.Workbook();
     this.radSpreadsheet1 = new Telerik.WinControls.UI.RadSpreadsheet();
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).BeginInit();
     this.SuspendLayout();
     //
     // radSpreadsheet1
     //
     this.radSpreadsheet1.BackColor = System.Drawing.SystemColors.ControlLightLight;
     this.radSpreadsheet1.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.radSpreadsheet1.Location  = new System.Drawing.Point(0, 0);
     this.radSpreadsheet1.Margin    = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.radSpreadsheet1.Name      = "radSpreadsheet1";
     //
     //
     //
     this.radSpreadsheet1.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 480, 320);
     this.radSpreadsheet1.Size     = new System.Drawing.Size(1067, 554);
     this.radSpreadsheet1.TabIndex = 0;
     workbook2.ActiveTabIndex      = -1;
     workbook2.Name = "Book1";
     workbook2.WorkbookContentChangedInterval = System.TimeSpan.Parse("00:00:00.0300000");
     this.radSpreadsheet1.Workbook            = workbook2;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1067, 554);
     this.Controls.Add(this.radSpreadsheet1);
     this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.Name   = "Form1";
     this.Text   = "Form1";
     this.Shown += new System.EventHandler(this.Form1_Shown);
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).EndInit();
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook2 = new Telerik.Windows.Documents.Spreadsheet.Model.Workbook();
     this.radSpreadsheet1 = new Telerik.WinControls.UI.RadSpreadsheet();
     this.importBtn       = new Telerik.WinControls.UI.RadButton();
     this.exportBtn       = new Telerik.WinControls.UI.RadButton();
     this.panel1          = new System.Windows.Forms.Panel();
     this.crystalTheme1   = new Telerik.WinControls.Themes.CrystalTheme();
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.importBtn)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.exportBtn)).BeginInit();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // radSpreadsheet1
     //
     this.radSpreadsheet1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.radSpreadsheet1.Font     = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radSpreadsheet1.Location = new System.Drawing.Point(0, 0);
     this.radSpreadsheet1.Margin   = new System.Windows.Forms.Padding(0);
     this.radSpreadsheet1.Name     = "radSpreadsheet1";
     this.radSpreadsheet1.Size     = new System.Drawing.Size(973, 535);
     this.radSpreadsheet1.TabIndex = 0;
     workbook2.ActiveTabIndex      = -1;
     workbook2.Name = "Book1";
     workbook2.WorkbookContentChangedInterval = System.TimeSpan.Parse("00:00:00.0300000");
     this.radSpreadsheet1.Workbook            = workbook2;
     //
     // importBtn
     //
     this.importBtn.Location = new System.Drawing.Point(8, 8);
     this.importBtn.Name     = "importBtn";
     this.importBtn.Size     = new System.Drawing.Size(120, 36);
     this.importBtn.TabIndex = 3;
     this.importBtn.Text     = "Import";
     this.importBtn.Click   += new System.EventHandler(this.importBtn_Click);
     //
     // exportBtn
     //
     this.exportBtn.Location = new System.Drawing.Point(147, 8);
     this.exportBtn.Name     = "exportBtn";
     this.exportBtn.Size     = new System.Drawing.Size(120, 36);
     this.exportBtn.TabIndex = 4;
     this.exportBtn.Text     = "Export";
     this.exportBtn.Click   += new System.EventHandler(this.exportBtn_Click);
     //
     // panel1
     //
     this.panel1.Controls.Add(this.radSpreadsheet1);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel1.Location = new System.Drawing.Point(0, 50);
     this.panel1.Margin   = new System.Windows.Forms.Padding(0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(973, 535);
     this.panel1.TabIndex = 5;
     //
     // StudentsListView
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.AutoSize            = true;
     this.BackColor           = System.Drawing.Color.White;
     this.Controls.Add(this.exportBtn);
     this.Controls.Add(this.importBtn);
     this.Controls.Add(this.panel1);
     this.Name    = "StudentsListView";
     this.Padding = new System.Windows.Forms.Padding(0, 50, 0, 0);
     this.Size    = new System.Drawing.Size(973, 585);
     this.Load   += new System.EventHandler(this.StudentsListView_Load);
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.importBtn)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.exportBtn)).EndInit();
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #3
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook2 = new Telerik.Windows.Documents.Spreadsheet.Model.Workbook();
     this.radSpreadsheet1          = new Telerik.WinControls.UI.RadSpreadsheet();
     this.radSpreadsheetRibbonBar1 = new Telerik.WinControls.UI.RadSpreadsheetRibbonBar();
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheetRibbonBar1)).BeginInit();
     this.SuspendLayout();
     //
     // radSpreadsheet1
     //
     this.radSpreadsheet1.BackColor = System.Drawing.SystemColors.ControlLightLight;
     this.radSpreadsheet1.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.radSpreadsheet1.Location  = new System.Drawing.Point(0, 207);
     this.radSpreadsheet1.Margin    = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.radSpreadsheet1.Name      = "radSpreadsheet1";
     //
     //
     //
     this.radSpreadsheet1.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 480, 320);
     this.radSpreadsheet1.Size     = new System.Drawing.Size(1067, 347);
     this.radSpreadsheet1.TabIndex = 0;
     workbook2.ActiveTabIndex      = -1;
     workbook2.Name = "Book1";
     workbook2.WorkbookContentChangedInterval = System.TimeSpan.Parse("00:00:00.0300000");
     this.radSpreadsheet1.Workbook            = workbook2;
     //
     // radSpreadsheetRibbonBar1
     //
     this.radSpreadsheetRibbonBar1.ApplicationMenuStyle  = Telerik.WinControls.UI.ApplicationMenuStyle.BackstageView;
     this.radSpreadsheetRibbonBar1.AssociatedSpreadsheet = this.radSpreadsheet1;
     this.radSpreadsheetRibbonBar1.BackColor             = System.Drawing.SystemColors.ControlLightLight;
     //
     //
     //
     //
     //
     //
     this.radSpreadsheetRibbonBar1.ExitButton.ButtonElement.UseCompatibleTextRendering = false;
     this.radSpreadsheetRibbonBar1.ExitButton.Text = "Exit";
     this.radSpreadsheetRibbonBar1.ExitButton.UseCompatibleTextRendering = false;
     this.radSpreadsheetRibbonBar1.LocalizationSettings.LayoutModeText   = "Simplified Layout";
     this.radSpreadsheetRibbonBar1.Location = new System.Drawing.Point(0, 0);
     this.radSpreadsheetRibbonBar1.Margin   = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.radSpreadsheetRibbonBar1.Name     = "radSpreadsheetRibbonBar1";
     //
     //
     //
     //
     //
     //
     this.radSpreadsheetRibbonBar1.OptionsButton.ButtonElement.UseCompatibleTextRendering = false;
     this.radSpreadsheetRibbonBar1.OptionsButton.Text = "Options";
     this.radSpreadsheetRibbonBar1.OptionsButton.UseCompatibleTextRendering = false;
     //
     //
     //
     this.radSpreadsheetRibbonBar1.RootElement.ControlBounds     = new System.Drawing.Rectangle(0, 0, 1412, 310);
     this.radSpreadsheetRibbonBar1.RootElement.StretchVertically = true;
     this.radSpreadsheetRibbonBar1.ShowLayoutModeButton          = true;
     this.radSpreadsheetRibbonBar1.SimplifiedHeight = 140;
     this.radSpreadsheetRibbonBar1.Size             = new System.Drawing.Size(1067, 207);
     this.radSpreadsheetRibbonBar1.TabIndex         = 0;
     this.radSpreadsheetRibbonBar1.Text             = "Form1";
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1067, 554);
     this.Controls.Add(this.radSpreadsheet1);
     this.Controls.Add(this.radSpreadsheetRibbonBar1);
     this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.Name   = "Form1";
     this.Text   = "Form1";
     this.Shown += new System.EventHandler(this.Form1_Shown);
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheet1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radSpreadsheetRibbonBar1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Пример #4
0
        /// <summary>
        /// Writes a Telerik DPL Workbook to an output stream in JSON format
        /// </summary>
        /// <param name="document">A Telerik DPL Workbook</param>
        /// <param name="output">The stream to write to</param>
        protected override void ExportOverride(Document document, Stream output)
        {
            var workbook = Workbook.FromDocument(document);

            var serializer = new JsonSerializer();
            using (var writer = new StreamWriter(output, ExportSettings.Encoding, ExportSettings.BufferSize))
            using (var jsonWriter = new JsonTextWriter(writer))
            {
                serializer.Serialize(jsonWriter, workbook);
            }
        }