
Imports FarPoint.Win.Spread
Imports Spread.Common.DataStore
Imports Spread.Common.Features.Spread.Common.Features.Sample

Partial Public Class Introduction
    Inherits BaseSampleControl
    Public Sub New()
        InitializeComponent()
        Name = "Introduction"
        skinComboBox.DataSource = DefaultSpreadSkins.Skins

        sheetView.DataAutoSizeColumns = False
        sheetView.Columns.[Default].Width = 90
        sheetView.Rows.[Default].Height = 25
        sheetView.DataSource = New DataService().AccessDataSource.GetNWINDData("Products")
        spread.StatusBarVisible = True
        spread.DefaultSkin = DefaultSpreadSkins.Office2016DarkGray
        skinComboBox.SelectedIndex = Array.IndexOf(DefaultSpreadSkins.Skins, DefaultSpreadSkins.Office2016DarkGray)
    End Sub
    Private Sub SkinComboBox_IndexChanged(sender As Object, e As EventArgs)
        spread.DefaultSkin = DirectCast(skinComboBox.SelectedItem, SpreadSkin)
    End Sub
End Class

'
'Introduction.Designer.vb
'

Partial Class Introduction
	''' <summary> 
	''' Required designer variable.
	''' </summary>
	Private components As System.ComponentModel.IContainer = Nothing

    ''' <summary> 
    ''' Clean up any resources being used.
    ''' </summary>
    ''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    Protected Overloads Sub Dispose(disposing As Boolean)
        If disposing AndAlso (components IsNot Nothing) Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

#Region "Component Designer generated code"

    ''' <summary> 
    ''' Required method for Designer support - do not modify 
    ''' the contents of this method with the code editor.
    ''' </summary>
    Private Sub InitializeComponent()
		Me.spread = New FarPoint.Win.Spread.FpSpread()
		Me.sheetView = New FarPoint.Win.Spread.SheetView()
		Me.skinLabel = New System.Windows.Forms.Label()
		Me.skinComboBox = New System.Windows.Forms.ComboBox()
		Me.pnlMain.SuspendLayout()
		Me.pnlControls.SuspendLayout()
		DirectCast(Me.spread, System.ComponentModel.ISupportInitialize).BeginInit()
		DirectCast(Me.sheetView, System.ComponentModel.ISupportInitialize).BeginInit()
		Me.SuspendLayout()
		' 
		' pnlMain
		' 
		Me.pnlMain.Controls.Add(Me.spread)
		' 
		' pnlControls
		' 
		Me.pnlControls.Controls.Add(Me.skinLabel)
		Me.pnlControls.Controls.Add(Me.skinComboBox)
		' 
		' spread
		' 
		Me.spread.Dock = System.Windows.Forms.DockStyle.Fill
		Me.spread.Location = New System.Drawing.Point(0, 0)
		Me.spread.Name = "spread"
		Me.spread.Sheets.AddRange(New FarPoint.Win.Spread.SheetView() {Me.sheetView})
		Me.spread.Size = New System.Drawing.Size(477, 487)
		Me.spread.TabIndex = 0
		' 
		' sheetView
		' 
		Me.sheetView.Reset()
		Me.sheetView.SheetName = "Introduction"
		' Formulas and custom names must be loaded with R1C1 reference style
		Me.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1
		Me.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1
		' 
		' skinLabel
		' 
		Me.skinLabel.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
		Me.skinLabel.Location = New System.Drawing.Point(5, 23)
		Me.skinLabel.Name = "skinLabel"
		Me.skinLabel.Size = New System.Drawing.Size(136, 20)
		Me.skinLabel.TabIndex = 4
		Me.skinLabel.Text = "Select Skin"
		' 
		' skinComboBox
		' 
		Me.skinComboBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
		Me.skinComboBox.FormattingEnabled = True
		Me.skinComboBox.Location = New System.Drawing.Point(5, 46)
		Me.skinComboBox.Name = "skinComboBox"
		Me.skinComboBox.Size = New System.Drawing.Size(136, 21)
		Me.skinComboBox.TabIndex = 3
		AddHandler Me.skinComboBox.SelectedIndexChanged, New System.EventHandler(AddressOf Me.SkinComboBox_IndexChanged)
		' 
		' Introduction
		' 
		Me.AutoScaleDimensions = New System.Drawing.SizeF(6F, 13F)
		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
		Me.Name = "Introduction"
		Me.pnlMain.ResumeLayout(False)
		Me.pnlControls.ResumeLayout(False)
		DirectCast(Me.spread, System.ComponentModel.ISupportInitialize).EndInit()
		DirectCast(Me.sheetView, System.ComponentModel.ISupportInitialize).EndInit()
		Me.ResumeLayout(False)

	End Sub

	#End Region

	Private spread As FarPoint.Win.Spread.FpSpread
	Private sheetView As FarPoint.Win.Spread.SheetView
	Private skinLabel As System.Windows.Forms.Label
	Private skinComboBox As System.Windows.Forms.ComboBox
End Class
