Imports System.IO
Imports Spread.Common.Features.Spread.Common.Features.Sample

Public Class LAMBDAHelperFunction
    Inherits BaseSampleControl
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        FpSpread1.AsWorkbook().WorkbookSet.CalculationEngine.CalcFeatures = FpSpread1.AsWorkbook().WorkbookSet.CalculationEngine.CalcFeatures Or GrapeCity.Spreadsheet.CalcFeatures.ReserveFormulaWhiteSpaces
        FpSpread1.BorderCollapse = FarPoint.Win.Spread.BorderCollapse.Enhanced
        Using s As MemoryStream = New MemoryStream(My.Resources.ExcelTemplates.lambda_function_examples)
            FpSpread1.OpenExcel(s)
        End Using
        SplitContainer1.SplitterDistance = 21
        FpSpread1.Focus()
    End Sub

    Private Sub NameManagerToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NameManagerToolStripMenuItem.Click
        FpSpread1.ShowListCustomNameForm(Me.ParentForm)
    End Sub
End Class


'
'LAMBDAHelperFunction.Designer.vb
'


Imports System.Windows.Forms

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class LAMBDAHelperFunction
    ''' <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

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(LAMBDAHelperFunction))
        Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
        Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
        Me.NameBox1 = New FarPoint.Win.Spread.NameBox()
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.FormulaTextBox1 = New FarPoint.Win.Spread.FormulaTextBox()
        Me.FpSpread1 = New FarPoint.Win.Spread.FpSpread(FarPoint.Win.Spread.LegacyBehaviors.None, CType(resources.GetObject("SplitContainer1.Panel2.Controls"), Object))
        Me.FpSpread1_Sheet1 = Me.FpSpread1.GetSheet(0)
        Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
        Me.NameManagerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SplitContainer1.Panel1.SuspendLayout()
        Me.SplitContainer1.Panel2.SuspendLayout()
        Me.SplitContainer1.SuspendLayout()
        CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SplitContainer2.Panel1.SuspendLayout()
        Me.SplitContainer2.Panel2.SuspendLayout()
        Me.SplitContainer2.SuspendLayout()
        Me.Panel1.SuspendLayout()
        CType(Me.FpSpread1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.MenuStrip1.SuspendLayout()
        Me.SuspendLayout()
        '
        'SplitContainer1
        '
        Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.SplitContainer1.Location = New System.Drawing.Point(0, 24)
        Me.SplitContainer1.Name = "SplitContainer1"
        Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
        '
        'SplitContainer1.Panel1
        '
        Me.SplitContainer1.Panel1.Controls.Add(Me.SplitContainer2)
        Me.SplitContainer1.Panel1MinSize = 21
        '
        'SplitContainer1.Panel2
        '
        Me.SplitContainer1.Panel2.Controls.Add(Me.FpSpread1)
        Me.SplitContainer1.Size = New System.Drawing.Size(800, 426)
        Me.SplitContainer1.SplitterDistance = 25
        Me.SplitContainer1.TabIndex = 0
        '
        'SplitContainer2
        '
        Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
        Me.SplitContainer2.Location = New System.Drawing.Point(0, 0)
        Me.SplitContainer2.Name = "SplitContainer2"
        '
        'SplitContainer2.Panel1
        '
        Me.SplitContainer2.Panel1.Controls.Add(Me.NameBox1)
        '
        'SplitContainer2.Panel2
        '
        Me.SplitContainer2.Panel2.Controls.Add(Me.Panel1)
        Me.SplitContainer2.Size = New System.Drawing.Size(800, 25)
        Me.SplitContainer2.SplitterDistance = 266
        Me.SplitContainer2.TabIndex = 0
        '
        'NameBox1
        '
        Me.NameBox1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.NameBox1.Location = New System.Drawing.Point(0, 0)
        Me.NameBox1.MaxLength = 255
        Me.NameBox1.Name = "NameBox1"
        Me.NameBox1.Size = New System.Drawing.Size(266, 21)
        Me.NameBox1.TabIndex = 0
        'Attach NameBox1 to FpSpread1
        Me.NameBox1.Attach(Me.FpSpread1)
        '
        'Panel1
        '
        Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Panel1.Controls.Add(Me.FormulaTextBox1)
        Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.Panel1.Location = New System.Drawing.Point(0, 0)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(530, 25)
        Me.Panel1.TabIndex = 0
        'Attach FormulaTextBox1 to FpSpread1
        Me.FormulaTextBox1.Attach(Me.FpSpread1)
        '
        'FormulaTextBox1
        '
        Me.FormulaTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.FormulaTextBox1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.FormulaTextBox1.Location = New System.Drawing.Point(0, 0)
        Me.FormulaTextBox1.Name = "FormulaTextBox1"
        Me.FormulaTextBox1.Size = New System.Drawing.Size(528, 23)
        Me.FormulaTextBox1.TabIndex = 0
        '
        'FpSpread1
        '
        Me.FpSpread1.AccessibleDescription = "Book1, Sheet1, Row 0, Column 0"
        Me.FpSpread1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.FpSpread1.Font = New System.Drawing.Font("Calibri", 11.0!)
        Me.FpSpread1.Location = New System.Drawing.Point(0, 0)
        Me.FpSpread1.Name = "FpSpread1"
        Me.FpSpread1.Size = New System.Drawing.Size(800, 397)
        Me.FpSpread1.TabIndex = 0
        '
        'MenuStrip1
        '
        Me.MenuStrip1.ImageScalingSize = New System.Drawing.Size(32, 32)
        Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NameManagerToolStripMenuItem})
        Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
        Me.MenuStrip1.Name = "MenuStrip1"
        Me.MenuStrip1.Size = New System.Drawing.Size(800, 24)
        Me.MenuStrip1.TabIndex = 1
        Me.MenuStrip1.Text = "MenuStrip1"
        '
        'NameManagerToolStripMenuItem
        '
        Me.NameManagerToolStripMenuItem.Name = "NameManagerToolStripMenuItem"
        Me.NameManagerToolStripMenuItem.Size = New System.Drawing.Size(101, 20)
        Me.NameManagerToolStripMenuItem.Text = "Name Manager"
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(800, 450)
        Me.pnlMain.Controls.Add(Me.SplitContainer1)
        Me.Controls.Add(Me.MenuStrip1)
        Me.Name = "LAMBDA Helper Functions"
        Me.Text = "LAMBDA Helper Functions"
        Me.SplitContainer1.Panel1.ResumeLayout(False)
        Me.SplitContainer1.Panel2.ResumeLayout(False)
        CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.SplitContainer1.ResumeLayout(False)
        Me.SplitContainer2.Panel1.ResumeLayout(False)
        Me.SplitContainer2.Panel2.ResumeLayout(False)
        CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.SplitContainer2.ResumeLayout(False)
        Me.Panel1.ResumeLayout(False)
        CType(Me.FpSpread1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.MenuStrip1.ResumeLayout(False)
        Me.MenuStrip1.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

    Friend WithEvents SplitContainer1 As SplitContainer
    Friend WithEvents SplitContainer2 As SplitContainer
    Friend WithEvents NameBox1 As FarPoint.Win.Spread.NameBox
    Friend WithEvents Panel1 As Panel
    Friend WithEvents FormulaTextBox1 As FarPoint.Win.Spread.FormulaTextBox
    Friend WithEvents FpSpread1 As FarPoint.Win.Spread.FpSpread
    Friend WithEvents FpSpread1_Sheet1 As FarPoint.Win.Spread.SheetView
    Friend WithEvents MenuStrip1 As MenuStrip
    Friend WithEvents NameManagerToolStripMenuItem As ToolStripMenuItem
End Class
