﻿Imports System.Drawing
Imports System.Windows.Forms
Imports FarPoint.Win.Spread
Imports FarPoint.Win.Spread.CellType
Imports FarPoint.Win.Spread.Model
Imports Spread.Common.Features.Spread.Common.Features.Sample

Namespace Features
    Partial Public Class DragFillDemo
        Inherits BaseSampleControl
        Private _dateCell As DateTimeCellType
        Private _date As Double

#Region "ctor"
        Public Sub New()
            InitializeComponent()
            Name = "Drag Fill"

            _dateCell = New DateTimeCellType()
            _date = New DateTime(DateTime.Now.Year, DateTime.Now.Month, 28).ToOADate()

            InitSpreadSheet(fpSpread.ActiveSheet)
            InitControls()

            AddHandler checkBoxAllowDragFill.CheckedChanged, AddressOf CheckBoxAllowDragFill_CheckedChanged
            AddHandler checkBoxEnableDragFillMenu.CheckedChanged, AddressOf CheckBoxEnableDragFillMenu_CheckedChanged
            AddHandler checkBoxDragFillDataOnly.CheckedChanged, AddressOf CheckBoxDragFillDataOnly_CheckedChanged
            AddHandler comboDragFillMode.SelectedIndexChanged, AddressOf ComboDragFillMode_SelectedIndexChanged
            AddHandler comboSampleData.SelectedIndexChanged, AddressOf ComboSampleData_SelectedIndexChanged

            AddHandler btnFill.Click, AddressOf BtnFill_Click

            AddHandler fpSpread.ActiveSheetChanged, AddressOf FpSpread_ActiveSheetChanged
        End Sub
#End Region

#Region "Private methods"
        Private Sub InitSpreadSheet(sheet As SheetView)
            fpSpread.AllowCellOverflow = True
            fpSpread.AllowEditOverflow = True
            fpSpread.AllowDragFill = True
            fpSpread.EnableDragFillMenu = True
            fpSpread.DragFillDataOnly = False
            sheet.SelectionPolicy = SelectionPolicy.Range

            sheet.SheetName = "Drag Fill"
            sheet.Cells(1, 1).Text = "Select a cell with data below, hold your cursor over the " & "bottom right border until you see the ‘+’,"
            sheet.Cells(2, 1).Text = "Then drag down to autofill the cell data."

            sheet.Columns(3).Width = 120
            sheet.Cells(4, 3).Text = "Sample Data"
            sheet.SetArray(5, 3, New Object(,) {{1}, {2}, {3}, {4}, {5}, {6}})
            sheet.Cells(5, 3, 10, 3).BackColor = Color.LightYellow
            sheet.Cells(5, 3, 10, 3).ForeColor = Color.Green

            Dim customSheet As New SheetView("Custom Fill")
            fpSpread.Sheets.Add(customSheet)

            customSheet.Cells(1, 1).Text = "Custom Drag-Fill"
            customSheet.Cells(1, 1).Font = New Font("Segoe", 12, FontStyle.Bold)
            customSheet.Cells(1, 1).ForeColor = Color.CadetBlue
            customSheet.Rows(1).Height = 20

            customSheet.Cells(2, 1).Text = "Select a range of cells and set Drag-Fill parameters"
            customSheet.Cells(3, 1).Text = "Only Data: Copy only data (or include Styles and Spans)"
            customSheet.Cells(4, 1).Text = "Only Values: Copy only values (or include Formulas, Notes, and Tags)"
            customSheet.Cells(5, 1).Text = "Fill Series: If possible copy progression of selected range (otherwise copy selected range)"

            sheet.Rows(1, 5).Locked = True

            AddSampleData(customSheet)
            AddCustomFillSeries()
        End Sub

        Private Sub InitControls()
            For Each fillMode As Object In [Enum].GetValues(GetType(DragFillMode))
                comboDragFillMode.Items.Add(fillMode)
            Next
            comboDragFillMode.SelectedIndex = 0
            fpSpread.RangeDragFillMode = CType(comboDragFillMode.SelectedItem, DragFillMode)

            comboSampleData.SelectedIndex = 0

            For Each direction As Object In [Enum].GetValues(GetType(FillDirection))
                comboFillDirection.Items.Add(direction)
            Next
            comboFillDirection.SelectedItem = FillDirection.Down
        End Sub

        Private Sub AddCustomFillSeries()
            fpSpread.CustomFillSeriesList.AddList(New String() {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn",
                "Uranus", "Neptune"})
        End Sub

        Private Sub AddSampleData(sheet As SheetView)
            For i As Integer = 0 To 4
                sheet.Cells(12 + i, 2).Value = i + 1
            Next

            Dim dateFormatInfo As New System.Globalization.DateTimeFormatInfo()
            Dim monthNames = dateFormatInfo.AbbreviatedMonthNames
            For i As Integer = 0 To 5
                sheet.Cells(12 + i, 8).Value = monthNames(i)
            Next

            sheet.SetClip(20, 5, 3, 1, [String].Join(vbLf, "Mercury", "Venus", "Earth"))
        End Sub
#End Region

#Region "Event handlers"
        Private Sub FpSpread_ActiveSheetChanged(sender As Object, e As EventArgs)
            groupBox4.Enabled = fpSpread.ActiveSheetIndex = 1
            groupBox3.Enabled = Not (fpSpread.ActiveSheetIndex = 1)
        End Sub

        Private Sub BtnFill_Click(sender As Object, e As EventArgs)
            Dim range As CellRange = fpSpread.ActiveSheet.GetSelection(0)
            If range Is Nothing Then
                MessageBox.Show("Please select a valid range", "Range Selection", MessageBoxButtons.OK, MessageBoxIcon.Information)
                Return
            End If

            Try
                Dim fillCount As Integer = Integer.Parse(txtFillCount.Text)
                fpSpread.ActiveSheet.FillRange(range.Row, range.Column, range.RowCount, range.ColumnCount, fillCount, CType(comboFillDirection.SelectedItem, FillDirection),
                    checkBoxOnlyData.Checked, checkBoxOnlyValues.Checked, checkBoxFillSeries.Checked, fpSpread.CustomFillSeriesList)
            Catch ex As ArgumentOutOfRangeException
                MessageBox.Show("Invalid FillCount value", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.[Error])
            Catch ex As FormatException
                MessageBox.Show("Cannot parse FillCount value. A whole number is expected.", "Invalid Format", MessageBoxButtons.OK, MessageBoxIcon.[Error])
            End Try
        End Sub

        Private Sub ComboSampleData_SelectedIndexChanged(sender As Object, e As EventArgs)
            Dim row As Integer = 5, col As Integer = 3
            fpSpread.ActiveSheet.Cells(row, col, row + 5, col).ResetCellType()
            Select Case comboSampleData.SelectedIndex
                Case 0
                    For i As Integer = 0 To 5
                        fpSpread.ActiveSheet.Cells(row + i, col).Value = i + 1
                    Next
                    Exit Select
                Case 1
                    For i As Integer = 0 To 5
                        fpSpread.ActiveSheet.Cells(row + i, col).Value = (i + 1).ToString()
                    Next
                    Exit Select
                Case 2
                    For i As Integer = 0 To 5
                        fpSpread.ActiveSheet.Cells(row + i, col).Value = "Drag-fill data"
                    Next
                    Exit Select
                Case 3
                    For i As Integer = 0 To 5
                        _date += _date
                        fpSpread.ActiveSheet.Cells(row + i, col).Value = _date
                    Next
                    fpSpread.ActiveSheet.Cells(row, col, row + 5, col).CellType = _dateCell
                    Exit Select
                Case 4
                    For i As Integer = 0 To 2
                        fpSpread.ActiveSheet.Cells(row + 2 * i, col).Value = "Date " & i + 1 & " "
                        _date += _date
                        fpSpread.ActiveSheet.Cells(row + 2 * i + 1, col).Value = _date
                        fpSpread.ActiveSheet.Cells(row + 2 * i + 1, col).CellType = _dateCell
                    Next
                    Exit Select
            End Select
        End Sub

        Private Sub ComboDragFillMode_SelectedIndexChanged(sender As Object, e As EventArgs)
            fpSpread.RangeDragFillMode = CType(comboDragFillMode.SelectedItem, DragFillMode)
        End Sub

        Private Sub CheckBoxDragFillDataOnly_CheckedChanged(sender As Object, e As EventArgs)
            fpSpread.DragFillDataOnly = checkBoxDragFillDataOnly.Checked
        End Sub

        Private Sub CheckBoxEnableDragFillMenu_CheckedChanged(sender As Object, e As EventArgs)
            fpSpread.EnableDragFillMenu = checkBoxEnableDragFillMenu.Checked
        End Sub

        Private Sub CheckBoxAllowDragFill_CheckedChanged(sender As Object, e As EventArgs)
            fpSpread.AllowDragFill = checkBoxAllowDragFill.Checked
        End Sub
#End Region
    End Class
End Namespace

'
'DragFillDemo.designer.vb
'

Namespace Features
	Partial Class DragFillDemo
		''' <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.fpSpread = New FarPoint.Win.Spread.FpSpread()
			Me.fpSpread_Sheet1 = New FarPoint.Win.Spread.SheetView()
			Me.groupBox1 = New System.Windows.Forms.GroupBox()
			Me.checkBoxDragFillDataOnly = New System.Windows.Forms.CheckBox()
			Me.checkBoxEnableDragFillMenu = New System.Windows.Forms.CheckBox()
			Me.checkBoxAllowDragFill = New System.Windows.Forms.CheckBox()
			Me.groupBox2 = New System.Windows.Forms.GroupBox()
			Me.comboDragFillMode = New System.Windows.Forms.ComboBox()
			Me.groupBox3 = New System.Windows.Forms.GroupBox()
			Me.comboSampleData = New System.Windows.Forms.ComboBox()
			Me.groupBox4 = New System.Windows.Forms.GroupBox()
			Me.txtFillCount = New System.Windows.Forms.TextBox()
			Me.checkBoxFillSeries = New System.Windows.Forms.CheckBox()
			Me.checkBoxOnlyValues = New System.Windows.Forms.CheckBox()
			Me.checkBoxOnlyData = New System.Windows.Forms.CheckBox()
			Me.comboFillDirection = New System.Windows.Forms.ComboBox()
			Me.label6 = New System.Windows.Forms.Label()
			Me.label2 = New System.Windows.Forms.Label()
			Me.btnFill = New System.Windows.Forms.Button()
			Me.pnlMain.SuspendLayout()
			Me.pnlControls.SuspendLayout()
			DirectCast(Me.fpSpread, System.ComponentModel.ISupportInitialize).BeginInit()
			DirectCast(Me.fpSpread_Sheet1, System.ComponentModel.ISupportInitialize).BeginInit()
			Me.groupBox1.SuspendLayout()
			Me.groupBox2.SuspendLayout()
			Me.groupBox3.SuspendLayout()
			Me.groupBox4.SuspendLayout()
			Me.SuspendLayout()
			' 
			' pnlMain
			' 
			Me.pnlMain.Controls.Add(Me.fpSpread)
			Me.pnlMain.Size = New System.Drawing.Size(477, 618)
			' 
			' pnlControls
			' 
			Me.pnlControls.Controls.Add(Me.groupBox4)
			Me.pnlControls.Controls.Add(Me.groupBox3)
			Me.pnlControls.Controls.Add(Me.groupBox2)
			Me.pnlControls.Controls.Add(Me.groupBox1)
			Me.pnlControls.Size = New System.Drawing.Size(157, 618)
			' 
			' fpSpread
			' 
			Me.fpSpread.Dock = System.Windows.Forms.DockStyle.Fill
			Me.fpSpread.Location = New System.Drawing.Point(0, 0)
			Me.fpSpread.Name = "fpSpread"
			Me.fpSpread.Sheets.AddRange(New FarPoint.Win.Spread.SheetView() {Me.fpSpread_Sheet1})
			Me.fpSpread.Size = New System.Drawing.Size(477, 618)
			Me.fpSpread.TabIndex = 0
			' 
			' fpSpread_Sheet1
			' 
			Me.fpSpread_Sheet1.Reset()
			Me.fpSpread_Sheet1.SheetName = "Sheet1"
			' Formulas and custom names must be loaded with R1C1 reference style
			Me.fpSpread_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1
			Me.fpSpread_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1
			' 
			' groupBox1
			' 
			Me.groupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.groupBox1.Controls.Add(Me.checkBoxDragFillDataOnly)
			Me.groupBox1.Controls.Add(Me.checkBoxEnableDragFillMenu)
			Me.groupBox1.Controls.Add(Me.checkBoxAllowDragFill)
			Me.groupBox1.Location = New System.Drawing.Point(3, 16)
			Me.groupBox1.Margin = New System.Windows.Forms.Padding(2)
			Me.groupBox1.Name = "groupBox1"
			Me.groupBox1.Padding = New System.Windows.Forms.Padding(2)
			Me.groupBox1.Size = New System.Drawing.Size(151, 119)
			Me.groupBox1.TabIndex = 18
			Me.groupBox1.TabStop = False
			Me.groupBox1.Text = "Drag Fill"
			' 
			' checkBoxDragFillDataOnly
			' 
			Me.checkBoxDragFillDataOnly.AutoSize = True
			Me.checkBoxDragFillDataOnly.Location = New System.Drawing.Point(14, 88)
			Me.checkBoxDragFillDataOnly.Name = "checkBoxDragFillDataOnly"
			Me.checkBoxDragFillDataOnly.Size = New System.Drawing.Size(105, 17)
			Me.checkBoxDragFillDataOnly.TabIndex = 12
			Me.checkBoxDragFillDataOnly.Text = "DragFillDataOnly"
			Me.checkBoxDragFillDataOnly.UseVisualStyleBackColor = True
			' 
			' checkBoxEnableDragFillMenu
			' 
			Me.checkBoxEnableDragFillMenu.AutoSize = True
			Me.checkBoxEnableDragFillMenu.Checked = True
			Me.checkBoxEnableDragFillMenu.CheckState = System.Windows.Forms.CheckState.Checked
			Me.checkBoxEnableDragFillMenu.Location = New System.Drawing.Point(14, 56)
			Me.checkBoxEnableDragFillMenu.Name = "checkBoxEnableDragFillMenu"
			Me.checkBoxEnableDragFillMenu.Size = New System.Drawing.Size(121, 17)
			Me.checkBoxEnableDragFillMenu.TabIndex = 11
			Me.checkBoxEnableDragFillMenu.Text = "EnableDragFillMenu"
			Me.checkBoxEnableDragFillMenu.UseVisualStyleBackColor = True
			' 
			' checkBoxAllowDragFill
			' 
			Me.checkBoxAllowDragFill.AutoSize = True
			Me.checkBoxAllowDragFill.Checked = True
			Me.checkBoxAllowDragFill.CheckState = System.Windows.Forms.CheckState.Checked
			Me.checkBoxAllowDragFill.Location = New System.Drawing.Point(14, 23)
			Me.checkBoxAllowDragFill.Margin = New System.Windows.Forms.Padding(2)
			Me.checkBoxAllowDragFill.Name = "checkBoxAllowDragFill"
			Me.checkBoxAllowDragFill.Size = New System.Drawing.Size(92, 17)
			Me.checkBoxAllowDragFill.TabIndex = 10
			Me.checkBoxAllowDragFill.Text = "Allow Drag Fill"
			' 
			' groupBox2
			' 
			Me.groupBox2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.groupBox2.Controls.Add(Me.comboDragFillMode)
			Me.groupBox2.Location = New System.Drawing.Point(2, 139)
			Me.groupBox2.Margin = New System.Windows.Forms.Padding(2)
			Me.groupBox2.Name = "groupBox2"
			Me.groupBox2.Padding = New System.Windows.Forms.Padding(2)
			Me.groupBox2.Size = New System.Drawing.Size(152, 59)
			Me.groupBox2.TabIndex = 19
			Me.groupBox2.TabStop = False
			Me.groupBox2.Text = "Drag Fill Mode"
			' 
			' comboDragFillMode
			' 
			Me.comboDragFillMode.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.comboDragFillMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
			Me.comboDragFillMode.FormattingEnabled = True
			Me.comboDragFillMode.Location = New System.Drawing.Point(14, 22)
			Me.comboDragFillMode.Name = "comboDragFillMode"
			Me.comboDragFillMode.Size = New System.Drawing.Size(121, 21)
			Me.comboDragFillMode.TabIndex = 0
			' 
			' groupBox3
			' 
			Me.groupBox3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.groupBox3.Controls.Add(Me.comboSampleData)
			Me.groupBox3.Location = New System.Drawing.Point(5, 203)
			Me.groupBox3.Name = "groupBox3"
			Me.groupBox3.Size = New System.Drawing.Size(149, 70)
			Me.groupBox3.TabIndex = 1
			Me.groupBox3.TabStop = False
			Me.groupBox3.Text = "Sample Data"
			' 
			' comboSampleData
			' 
			Me.comboSampleData.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.comboSampleData.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
			Me.comboSampleData.FormattingEnabled = True
			Me.comboSampleData.Items.AddRange(New Object() {"Number", "Number (Text)", "String", "DateTime", "Combine"})
			Me.comboSampleData.Location = New System.Drawing.Point(12, 30)
			Me.comboSampleData.Name = "comboSampleData"
			Me.comboSampleData.Size = New System.Drawing.Size(121, 21)
			Me.comboSampleData.TabIndex = 0
			' 
			' groupBox4
			' 
			Me.groupBox4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.groupBox4.Controls.Add(Me.txtFillCount)
			Me.groupBox4.Controls.Add(Me.btnFill)
			Me.groupBox4.Controls.Add(Me.checkBoxFillSeries)
			Me.groupBox4.Controls.Add(Me.checkBoxOnlyValues)
			Me.groupBox4.Controls.Add(Me.checkBoxOnlyData)
			Me.groupBox4.Controls.Add(Me.comboFillDirection)
			Me.groupBox4.Controls.Add(Me.label6)
			Me.groupBox4.Controls.Add(Me.label2)
			Me.groupBox4.Enabled = False
			Me.groupBox4.Location = New System.Drawing.Point(0, 294)
			Me.groupBox4.Name = "groupBox4"
			Me.groupBox4.Size = New System.Drawing.Size(157, 243)
			Me.groupBox4.TabIndex = 21
			Me.groupBox4.TabStop = False
			Me.groupBox4.Text = "Custom Fill"
			' 
			' txtFillCount
			' 
			Me.txtFillCount.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.txtFillCount.Location = New System.Drawing.Point(8, 43)
			Me.txtFillCount.Name = "txtFillCount"
			Me.txtFillCount.Size = New System.Drawing.Size(143, 20)
			Me.txtFillCount.TabIndex = 20
			' 
			' checkBoxFillSeries
			' 
			Me.checkBoxFillSeries.AutoSize = True
			Me.checkBoxFillSeries.Location = New System.Drawing.Point(8, 166)
			Me.checkBoxFillSeries.Name = "checkBoxFillSeries"
			Me.checkBoxFillSeries.Size = New System.Drawing.Size(70, 17)
			Me.checkBoxFillSeries.TabIndex = 19
			Me.checkBoxFillSeries.Text = "Fill Series"
			Me.checkBoxFillSeries.UseVisualStyleBackColor = True
			' 
			' checkBoxOnlyValues
			' 
			Me.checkBoxOnlyValues.AutoSize = True
			Me.checkBoxOnlyValues.Location = New System.Drawing.Point(8, 143)
			Me.checkBoxOnlyValues.Name = "checkBoxOnlyValues"
			Me.checkBoxOnlyValues.Size = New System.Drawing.Size(82, 17)
			Me.checkBoxOnlyValues.TabIndex = 18
			Me.checkBoxOnlyValues.Text = "Only Values"
			Me.checkBoxOnlyValues.UseVisualStyleBackColor = True
			' 
			' checkBoxOnlyData
			' 
			Me.checkBoxOnlyData.AutoSize = True
			Me.checkBoxOnlyData.Location = New System.Drawing.Point(8, 120)
			Me.checkBoxOnlyData.Name = "checkBoxOnlyData"
			Me.checkBoxOnlyData.Size = New System.Drawing.Size(73, 17)
			Me.checkBoxOnlyData.TabIndex = 17
			Me.checkBoxOnlyData.Text = "Only Data"
			Me.checkBoxOnlyData.UseVisualStyleBackColor = True
			' 
			' comboFillDirection
			' 
			Me.comboFillDirection.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.comboFillDirection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
			Me.comboFillDirection.FormattingEnabled = True
			Me.comboFillDirection.Location = New System.Drawing.Point(8, 87)
			Me.comboFillDirection.Name = "comboFillDirection"
			Me.comboFillDirection.Size = New System.Drawing.Size(143, 21)
			Me.comboFillDirection.TabIndex = 16
			' 
			' label6
			' 
			Me.label6.AutoSize = True
			Me.label6.Location = New System.Drawing.Point(5, 71)
			Me.label6.Name = "label6"
			Me.label6.Size = New System.Drawing.Size(67, 13)
			Me.label6.TabIndex = 15
			Me.label6.Text = "Fill Direction:"
			' 
			' label2
			' 
			Me.label2.AutoSize = True
			Me.label2.Location = New System.Drawing.Point(5, 27)
			Me.label2.Name = "label2"
			Me.label2.Size = New System.Drawing.Size(53, 13)
			Me.label2.TabIndex = 14
			Me.label2.Text = "Fill Count:"
			' 
			' btnFill
			' 
			Me.btnFill.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
			Me.btnFill.Location = New System.Drawing.Point(18, 198)
			Me.btnFill.Name = "btnFill"
			Me.btnFill.Size = New System.Drawing.Size(120, 23)
			Me.btnFill.TabIndex = 20
			Me.btnFill.Text = "Fill"
			Me.btnFill.UseVisualStyleBackColor = True
			' 
			' DragFillDemo
			' 
			Me.AutoScaleDimensions = New System.Drawing.SizeF(6F, 13F)
			Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
			Me.Name = "DragFillDemo"
			Me.Size = New System.Drawing.Size(635, 618)
			Me.pnlMain.ResumeLayout(False)
			Me.pnlControls.ResumeLayout(False)
			DirectCast(Me.fpSpread, System.ComponentModel.ISupportInitialize).EndInit()
			DirectCast(Me.fpSpread_Sheet1, System.ComponentModel.ISupportInitialize).EndInit()
			Me.groupBox1.ResumeLayout(False)
			Me.groupBox1.PerformLayout()
			Me.groupBox2.ResumeLayout(False)
			Me.groupBox3.ResumeLayout(False)
			Me.groupBox4.ResumeLayout(False)
			Me.groupBox4.PerformLayout()
			Me.ResumeLayout(False)

		End Sub

		#End Region

		Private fpSpread As FarPoint.Win.Spread.FpSpread
		Private fpSpread_Sheet1 As FarPoint.Win.Spread.SheetView
		Friend groupBox2 As System.Windows.Forms.GroupBox
		Private comboDragFillMode As System.Windows.Forms.ComboBox
		Friend groupBox1 As System.Windows.Forms.GroupBox
		Private checkBoxDragFillDataOnly As System.Windows.Forms.CheckBox
		Private checkBoxEnableDragFillMenu As System.Windows.Forms.CheckBox
		Friend checkBoxAllowDragFill As System.Windows.Forms.CheckBox
		Private groupBox3 As System.Windows.Forms.GroupBox
		Private comboSampleData As System.Windows.Forms.ComboBox
		Private groupBox4 As System.Windows.Forms.GroupBox
		Private txtFillCount As System.Windows.Forms.TextBox
		Private checkBoxFillSeries As System.Windows.Forms.CheckBox
		Private checkBoxOnlyValues As System.Windows.Forms.CheckBox
		Private checkBoxOnlyData As System.Windows.Forms.CheckBox
		Private comboFillDirection As System.Windows.Forms.ComboBox
		Private label6 As System.Windows.Forms.Label
		Private label2 As System.Windows.Forms.Label
		Private btnFill As System.Windows.Forms.Button
	End Class
End Namespace