Load On Demand Combobox for RadGridView

This commit is contained in:
Nadya Todorova 2024-05-21 16:26:14 +03:00
Родитель e134796c32
Коммит dcff87d477
45 изменённых файлов: 3581 добавлений и 0 удалений

Просмотреть файл

@ -13,4 +13,6 @@
## Description
#### ListViewColumn for RadGridView
This project demonstrates how to create a ListViewColumn for a cell on a RadGridView. The list view column is useful to display formatted information including an image and text in multiple rows in a single grid cell. It also demonstrates how to add a complex control to a grid view cell for special processing. A list of data objects is assigned to list to fill out each list item. It can be updated any time.

Просмотреть файл

@ -0,0 +1,22 @@
## Environment
<table>
<tr>
<td>Product Version</td>
<td>Q2 2011</td>
</tr>
<tr>
<td>Product</td>
<td>RadGridView for WinForms</td>
</tr>
</table>
## Description
#### Load On Demand Combobox for RadGridView
This project demonstrates "load on demand" functionality for a combobox in the grid. Although this is available with the controls for ASP.NET, this is not currently supported for the WinForms combobox.
The application consists of a single RadGridView control with one GridViewMultiComboBoxColumn named "Country". The load on demand functionality is encapsulated in the LoadOnDemandCellEditor class, which inherits from RadMultiColumnComboBoxElement. Once the cell is put into edit mode, the default cell editor is changed to the custom cell editor. This makes use of System.Timer object, which is used to buffer the requests to the web service (included with the project). Once the timer's interval has passed, it executes an asynchronous web service call to load the matching items.
When the application runs, a window form is loaded with a RadGridView. The grid contains a list of countries. Double click on a row to put it into edit mode and clear out the text. As you type, the combobox makes asynchronous web service calls to retrieve matching items. So for example if you type in "Mo" it will return all countries that match this (ex. "Morocco", "Monaco"). As you continue typing it will further refine the matching items.

Просмотреть файл

@ -0,0 +1,55 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebService1", "WebService1\", "{09E6812F-1685-4B6B-A01C-E14933263D8A}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv3.5"
Debug.AspNetCompiler.VirtualPath = "/WebService1"
Debug.AspNetCompiler.PhysicalPath = "WebService1\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\WebService1\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/WebService1"
Release.AspNetCompiler.PhysicalPath = "WebService1\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\WebService1\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "4384"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadOnDemandCS", "LoadOnDemandCS\LoadOnDemandCS.csproj", "{26129175-42DE-46AE-A44E-B406AA9D24EA}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LoadOnDemandVB", "LoadOnDemandVB\LoadOnDemandVB.vbproj", "{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{09E6812F-1685-4B6B-A01C-E14933263D8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09E6812F-1685-4B6B-A01C-E14933263D8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09E6812F-1685-4B6B-A01C-E14933263D8A}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{09E6812F-1685-4B6B-A01C-E14933263D8A}.Release|Any CPU.Build.0 = Debug|Any CPU
{26129175-42DE-46AE-A44E-B406AA9D24EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26129175-42DE-46AE-A44E-B406AA9D24EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26129175-42DE-46AE-A44E-B406AA9D24EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26129175-42DE-46AE-A44E-B406AA9D24EA}.Release|Any CPU.Build.0 = Release|Any CPU
{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AB75E12B-B3EB-48E7-A80A-45B04CF19481}
EndGlobalSection
EndGlobal

83
GridView/LoadOnDemandComboBoxInGrid/LoadOnDemandCS/Form1.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,83 @@
//INSTANT C# NOTE: Formerly VB project-level imports:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Linq;
using System.Xml.Linq;
using Telerik.WinControls.UI;
using Telerik.WinControls;
namespace SampleApp
{
[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
public partial class Form1 : System.Windows.Forms.Form
{
//Form overrides dispose to clean up the component list.
[System.Diagnostics.DebuggerNonUserCode()]
protected override void Dispose(bool disposing)
{
try
{
if (disposing && components != null)
{
components.Dispose();
}
}
finally
{
base.Dispose(disposing);
}
}
//Required by the Windows Form Designer
private System.ComponentModel.IContainer components;
//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 void InitializeComponent()
{
this.rgData = new Telerik.WinControls.UI.RadGridView();
((System.ComponentModel.ISupportInitialize)this.rgData).BeginInit();
((System.ComponentModel.ISupportInitialize)this.rgData.MasterTemplate).BeginInit();
this.SuspendLayout();
//
//rgData
//
this.rgData.Dock = System.Windows.Forms.DockStyle.Fill;
this.rgData.Location = new System.Drawing.Point(0, 0);
this.rgData.Name = "rgData";
this.rgData.Size = new System.Drawing.Size(852, 481);
this.rgData.TabIndex = 0;
//
//Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(852, 481);
this.Controls.Add(this.rgData);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)this.rgData.MasterTemplate).EndInit();
((System.ComponentModel.ISupportInitialize)this.rgData).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
//INSTANT C# NOTE: Converted event handler wireups:
rgData.CellEndEdit += new Telerik.WinControls.UI.GridViewCellEventHandler(rgData_CellEndEdit);
rgData.EditorRequired += new Telerik.WinControls.UI.EditorRequiredEventHandler(rgData_EditorRequired);
base.Load += new System.EventHandler(Form1_Load);
}
internal Telerik.WinControls.UI.RadGridView rgData;
}
}

Просмотреть файл

@ -0,0 +1,148 @@
//INSTANT C# NOTE: Formerly VB project-level imports:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace SampleApp
{
public partial class Form1
{
internal Form1()
{
InitializeComponent();
}
private LoadOnDemandCellEditor _loadOnDemandCellEditor;
private void Form1_Load(object sender, System.EventArgs e)
{
InitializeLinesGrid();
LoadGrid();
}
//Load the grid columns, set grid properties, etc.
private void InitializeLinesGrid()
{
GridViewMultiComboBoxColumn gridMultiColumnComboColumn = null;
rgData.MasterTemplate.Columns.Clear();
rgData.MasterTemplate.AutoGenerateColumns = false;
gridMultiColumnComboColumn = CreateGridMultiComboBoxColumn("COUNTRY", "COUNTRY", "Country", null, "COUNTRY", "COUNTRY", 400);
rgData.MasterTemplate.Columns.Add(gridMultiColumnComboColumn);
//Set MasterGridViewTemplate properties
rgData.MasterTemplate.AllowEditRow = true;
rgData.MasterTemplate.AllowAddNewRow = false;
rgData.MasterTemplate.EnableGrouping = false;
rgData.MasterTemplate.AllowColumnChooser = false;
rgData.MasterTemplate.AllowColumnHeaderContextMenu = false;
rgData.MultiSelect = true;
rgData.SelectionMode = GridViewSelectionMode.FullRowSelect;
rgData.ShowGroupPanel = false;
}
//Create GridViewMultiComboBoxColumn with values passed in
private GridViewMultiComboBoxColumn CreateGridMultiComboBoxColumn(string Name, string fieldName, string headerText, BindingSource dataSource, string valueMember, string displayMember, int width)
{
GridViewMultiComboBoxColumn multiComboBoxColumn = new GridViewMultiComboBoxColumn();
multiComboBoxColumn.Name = Name;
multiComboBoxColumn.FieldName = fieldName;
multiComboBoxColumn.HeaderText = headerText;
multiComboBoxColumn.DataSource = dataSource;
multiComboBoxColumn.ValueMember = valueMember;
multiComboBoxColumn.DisplayMember = displayMember;
multiComboBoxColumn.Width = width;
//Set default values
multiComboBoxColumn.HeaderTextAlignment = ContentAlignment.BottomLeft;
multiComboBoxColumn.DropDownStyle = RadDropDownStyle.DropDown;
return multiComboBoxColumn;
}
//Load the grid
private void LoadGrid()
{
GridViewRowInfo rowInfo = null;
rowInfo = rgData.Rows.AddNew();
rowInfo.Cells["COUNTRY"].Value = "United States of America";
rowInfo = rgData.Rows.AddNew();
rowInfo.Cells["COUNTRY"].Value = "Malta";
rowInfo = rgData.Rows.AddNew();
rowInfo.Cells["COUNTRY"].Value = "Canada";
rowInfo = rgData.Rows.AddNew();
rowInfo.Cells["COUNTRY"].Value = "Spain";
rowInfo = rgData.Rows.AddNew();
rowInfo.Cells["COUNTRY"].Value = "Italy";
}
//This event fires when a field is put into edit mode.
private void rgData_EditorRequired(object sender, Telerik.WinControls.UI.EditorRequiredEventArgs e)
{
int currentColumnIndex = 0;
int currentRowIndex = 0;
object country = null;
int columnWidth = 0;
currentColumnIndex = rgData.Columns.IndexOf(rgData.CurrentColumn.Name);
//INSTANT C# NOTE: The following VB 'Select Case' included either a non-ordinal switch expression or non-ordinal,
//range-type, or non-constant 'Case' expressions and was converted to C# 'if-else' logic:
// Select Case currentColumnIndex
//ORIGINAL LINE: Case rgData.Columns("COUNTRY").Index
if (currentColumnIndex == rgData.Columns["COUNTRY"].Index)
{
currentRowIndex = rgData.Rows.IndexOf(rgData.CurrentRow);
country = rgData.Rows[currentRowIndex].Cells[currentColumnIndex].Value;
columnWidth = rgData.Columns[currentColumnIndex].Width;
_loadOnDemandCellEditor = new LoadOnDemandCellEditor(country, columnWidth, rgData);
e.Editor = _loadOnDemandCellEditor;
}
}
//Fires when a cell is taken out of edit mode
private void rgData_CellEndEdit(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if (e.ColumnIndex == rgData.Columns["COUNTRY"].Index)
{
//Set the editor text from editor element and update the cell value (sometimes the grid did not hold
//the updated value)
rgData.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = _loadOnDemandCellEditor.EditorElement.Text;
_loadOnDemandCellEditor.Dispose();
}
}
private static Form1 _DefaultInstance;
public static Form1 DefaultInstance
{
get
{
if (_DefaultInstance == null)
_DefaultInstance = new Form1();
return _DefaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{26129175-42DE-46AE-A44E-B406AA9D24EA}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>SampleApp.My.MyApplication</StartupObject>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleApp</RootNamespace>
<AssemblyName>SampleApp</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<OptionInfer>On</OptionInfer>
<IsWebBootstrapper>true</IsWebBootstrapper>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>http://localhost/SampleApp/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>SampleApp.xml</DocumentationFile>
<WarningLevel>1</WarningLevel>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>SampleApp.xml</DocumentationFile>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\Framework64\v2.0.50727\System.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.ServiceModel">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.WinControls">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.dll</HintPath>
</Reference>
<Reference Include="Telerik.WinControls.GridView">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.GridView.dll</HintPath>
</Reference>
<Reference Include="Telerik.WinControls.UI">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.UI.dll</HintPath>
</Reference>
<Reference Include="TelerikCommon">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\TelerikCommon.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="LoadOnDemandCellEditor.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Application.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Web References\localhost\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Properties\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.cs</LastGenOutput>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.SQL.Server.Compact.3.5">
<Visible>False</Visible>
<ProductName>SQL Server Compact 3.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Properties\DataSources\System.Data.DataSet.datasource" />
<None Include="Web References\localhost\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
<None Include="Web References\localhost\Service.disco" />
<None Include="Web References\localhost\Service.wsdl" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<WebReferenceUrl Include="http://localhost:4384/WebService1/Service.asmx">
<UrlBehavior>Dynamic</UrlBehavior>
<RelPath>Web References\localhost\</RelPath>
<UpdateFromURL>http://localhost:4384/WebService1/Service.asmx</UpdateFromURL>
<ServiceLocationURL>
</ServiceLocationURL>
<CachedDynamicPropName>
</CachedDynamicPropName>
<CachedAppSettingsObjectName>MySettings</CachedAppSettingsObjectName>
<CachedSettingsPropName>SampleApp_localhost_Service</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,294 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;
using Telerik.WinControls.UI;
namespace SampleApp
{
public class LoadOnDemandCellEditor : RadMultiColumnComboBoxElement
{
private const int MinDropDownWidth = 320;
private const int ShortNameWidth = 25;
private const int GridOffset = 70;
private const int TimerInterval = 425;
private const string ItemInfoTableName = "ITEMS";
private System.Timers.Timer _timer;
private bool _showDropDown;
private bool ShowDropDown
{
get
{
return _showDropDown;
}
set
{
//This property can be updated on a background thread, so we need to ensure thread-safety
lock (this)
{
_showDropDown = value;
}
}
}
private bool _newItemsLoaded;
private bool NewItemsLoaded
{
get
{
return _newItemsLoaded;
}
set
{
//This property can be updated on a background thread, so we need to ensure thread-safety
lock (this)
{
_newItemsLoaded = value;
}
}
}
private string _currentText = null;
private string CurrentText
{
get
{
return _currentText;
}
set
{
_currentText = value;
}
}
public LoadOnDemandCellEditor(object text, int columnWidth, RadGridView ownerGrid)
: base()
{
InitializeCellEditor(text, columnWidth, ownerGrid);
}
//Initialize the cell editor (set properties and load matching data)
private void InitializeCellEditor(object text, int columnWidth, RadGridView ownerGrid)
{
RadGridView grid = null;
if (!(text is DBNull) && !(string.IsNullOrEmpty(text.ToString())))
{
CurrentText = text.ToString();
}
this.DisplayMember = "COUNTRY";
this.ValueMember = "COUNTRY";
this.Virtualized = false;
//Make sure the drop down is at least minDropDownWidth
if (columnWidth > MinDropDownWidth)
{
this.DropDownWidth = columnWidth;
}
else
{
this.DropDownWidth = MinDropDownWidth;
}
grid = this.EditorControl;
//Setup the grid that is displayed in the drop down list
InitializeGrid(ref grid, this.DropDownWidth);
//Only load data if we have at least 3 characters
if (CurrentText != null && CurrentText.Length >= 3)
{
GetMatchingItems_AsyncBegin(CurrentText, false);
//Text of the combo gets cleared when the items are loaded, so make sure to set it here
this.TextBoxElement.Text = CurrentText;
}
//KeyUp and KeyDown events will allow us to load matching data on-demand
this.KeyDown += DropDown_KeyDown;
this.KeyUp += DropDown_KeyUp;
InitializeTimer(ownerGrid);
}
//Configure the grid that is displayed within the drop down list.
private void InitializeGrid(ref RadGridView grid, int gridWidth)
{
GridViewTextBoxColumn gridTextBoxColumn = null;
//Set the grid to fill the drop down list
grid.Width = gridWidth;
grid.AutoSizeRows = true;
grid.VirtualMode = false;
grid.MasterTemplate.AutoGenerateColumns = false;
grid.MasterTemplate.ShowColumnHeaders = false;
grid.MasterTemplate.AllowColumnResize = false;
grid.MasterTemplate.AllowRowResize = false;
grid.MasterTemplate.Columns.Clear();
gridTextBoxColumn = CreateGridTextBoxColumn("SHORTNAME", "SHORTNAME", "SHORTNAME");
gridTextBoxColumn.Width = ShortNameWidth;
grid.MasterTemplate.Columns.Add(gridTextBoxColumn);
gridTextBoxColumn = CreateGridTextBoxColumn("COUNTRY", "COUNTRY", "COUNTRY");
//Set the column to fill the remaining space in the drop down
gridTextBoxColumn.Width = gridWidth - ShortNameWidth - GridOffset;
gridTextBoxColumn.WrapText = true;
grid.MasterTemplate.Columns.Add(gridTextBoxColumn);
}
//Initialize the Timer that is used to buffer the requests to the web service. So instead of firing
//off a request on every keystroke, we will build in a short wait to make sure the user is done typing.
private void InitializeTimer(RadGridView ownerGrid)
{
_timer = new System.Timers.Timer();
_timer.Interval = TimerInterval;
//The GridViewMultiComboBoxElement does not implement the InvokeRequired property or Invoke() method.
//These are needed to update a control that was created on another thread. So we will need to
//synchronize the timer with the another control so that we can update the UI in the timers Elasped
//event handler, since the timer runs on a background thread. We can't access the grid that hosts this
//control from the control itself, so we us a reference to the grid that is passed in the constructor.
_timer.SynchronizingObject = ownerGrid;
_timer.Elapsed += Timer_Elapsed;
}
//Make an asynchronous call into the web service to get items that match the text that is passed in
private void GetMatchingItems_AsyncBegin(string text, bool showDropDownFlag)
{
using (localhost.Service ws = new localhost.Service())
{
ShowDropDown = showDropDownFlag;
ws.GetMatchingItemsCompleted += GetMatchingItems_AsyncCompleted;
ws.GetMatchingItemsAsync(text);
}
}
//Asynchronous callback event handler for the GetMatchingItemsAsync call to the web service
private void GetMatchingItems_AsyncCompleted(object sender, localhost.GetMatchingItemsCompletedEventArgs e)
{
RadGridView grid = null;
DataSet returnDataSet = null;
DataTable itemInfo = null;
if (e.Error != null || e.Result == null)
{
//WS call errored out, or nothing was returned
return;
}
returnDataSet = (DataSet)e.Result;
itemInfo = returnDataSet.Tables[ItemInfoTableName];
grid = this.EditorControl;
grid.DataSource = itemInfo;
if (ShowDropDown)
{
this.ShowPopup();
}
NewItemsLoaded = true;
}
//Handles the KeyDown event for the drop down editor.
private void DropDown_KeyDown(object sender, KeyEventArgs e)
{
//Store the current text so that we can tell if it has changed in the KeyUp event.
CurrentText = this.Text;
//If the down key was pressed, there are items loaded in the drop down and an item has not already
//been selected, then force the selection. This is to workaround an issue where pressing the down
//key would not force focus to the grid (allowing the user to scroll through the items).
if (e.KeyCode == Keys.Down)
{
if (this.EditorControl.Rows.Count > 0 && NewItemsLoaded == true)
{
this.SelectedIndex = 0;
this.ShowPopup();
}
//Reset NewItemsLoaded for next iteration
NewItemsLoaded = false;
}
}
//Handles the KeyUp event for the drop down editor. We load any matching items.
private void DropDown_KeyUp(object sender, KeyEventArgs e)
{
//Force the timer to stop. We will only start the timer if the text is valid
_timer.Stop();
//Escape navigation keys (ex. up/down arrow) so we don't reload the drop down when the
//user scrolls through the items in the grid.
switch (e.KeyCode)
{
case Keys.Up:
case Keys.Down:
return;
}
//Just exit if the text has not changed (user could have pressed F1, CTRL, SHIFT, etc.)
if (CurrentText == this.Text)
{
return;
}
if (!(string.IsNullOrEmpty(this.Text)))
{
//Restart timer
_timer.Start();
}
else
{
//Not text, close drop down
this.ClosePopup();
}
}
//This event fires after the specified Timer.Interval has passed.
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
_timer.Stop();
GetMatchingItems_AsyncBegin(this.Text, true);
}
//Generic function to create a gridViewTextBoxColumn with common attributes set
private GridViewTextBoxColumn CreateGridTextBoxColumn(string Name, string fieldName, string headerText)
{
GridViewTextBoxColumn gridViewTextBoxColumn = new GridViewTextBoxColumn();
gridViewTextBoxColumn.Name = Name;
gridViewTextBoxColumn.FieldName = fieldName;
gridViewTextBoxColumn.HeaderText = headerText;
gridViewTextBoxColumn.ReadOnly = true;
gridViewTextBoxColumn.HeaderTextAlignment = ContentAlignment.BottomLeft;
return gridViewTextBoxColumn;
}
//Fires when the cell is moved out of edit mode. Perform cleanup.
public override bool EndEdit()
{
_timer.Stop();
_timer.Dispose();
return base.EndEdit();
}
}
}

Просмотреть файл

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//INSTANT C# NOTE: Formerly VB project-level imports:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Linq;
using System.Xml.Linq;
namespace SampleApp
{
namespace My
{
//NOTE: This file is auto-generated; do not modify it directly. To make changes,
// or if you encounter build errors in this file, go to the Project Designer
// (go to Project Properties or double-click the My Project node in
// Solution Explorer), and make changes on the Application tab.
//
internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
{
[global::System.Diagnostics.DebuggerStepThroughAttribute()]
public MyApplication() : base(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
{
this.IsSingleInstance = false;
this.EnableVisualStyles = true;
this.SaveMySettingsOnExit = true;
this.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses;
}
[global::System.Diagnostics.DebuggerStepThroughAttribute()]
protected override void OnCreateMainForm()
{
this.MainForm = global::SampleApp.Form1.DefaultInstance;
}
private static MyApplication MyApp;
internal static MyApplication Application
{
get
{
return MyApp;
}
}
[STAThread]
static void Main(string[] args)
{
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
MyApp = new MyApplication();
MyApp.Run(args);
}
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

Просмотреть файл

@ -0,0 +1,51 @@
//INSTANT C# NOTE: Formerly VB project-level imports:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Linq;
using System.Xml.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
// Review the values of the assembly attributes
[assembly: AssemblyTitle("SampleApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("Acuity Brands Lighting")]
[assembly: AssemblyProduct("SampleApp")]
[assembly: AssemblyCopyright("Copyright © Acuity Brands Lighting 2009")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
//The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5ae2a86c-2bdc-4ad0-89f5-d1d2e0d170fa")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// <Assembly: AssemblyVersion("1.0.*")>
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DataSet" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>System.Data.DataSet, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</TypeInfo>
</GenericObjectDataSource>

Просмотреть файл

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SampleApp.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SampleApp.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace My {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\\Database1.sdf")]
public string Database1ConnectionString {
get {
return ((string)(this["Database1ConnectionString"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\\TestDb1.sdf")]
public string TestDb1ConnectionString {
get {
return ((string)(this["TestDb1ConnectionString"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://localhost:4384/WebService1/Service.asmx")]
public string SampleApp_localhost_Service {
get {
return ((string)(this["SampleApp_localhost_Service"]));
}
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="Database1ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=|DataDirectory|\Database1.sdf&lt;/ConnectionString&gt;
&lt;ProviderName&gt;Microsoft.SqlServerCe.Client.3.5&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=|DataDirectory|\Database1.sdf</Value>
</Setting>
<Setting Name="TestDb1ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=|DataDirectory|\TestDb1.sdf&lt;/ConnectionString&gt;
&lt;ProviderName&gt;Microsoft.SqlServerCe.Client.3.5&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=|DataDirectory|\TestDb1.sdf</Value>
</Setting>
<Setting Name="SampleApp_localhost_Service" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://localhost:4384/WebService1/Service.asmx</Value>
</Setting>
</Settings>
</SettingsFile>

Просмотреть файл

@ -0,0 +1,54 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>SampleApp</name>
</assembly>
<members>
<member name="T:SampleApp.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:SampleApp.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:SampleApp.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="T:SampleApp.localhost.Service">
<remarks/>
</member>
<member name="M:SampleApp.localhost.Service.#ctor">
<remarks/>
</member>
<member name="E:SampleApp.localhost.Service.GetMatchingItemsCompleted">
<remarks/>
</member>
<member name="M:SampleApp.localhost.Service.GetMatchingItems(System.String)">
<remarks/>
</member>
<member name="M:SampleApp.localhost.Service.GetMatchingItemsAsync(System.String)">
<remarks/>
</member>
<member name="M:SampleApp.localhost.Service.GetMatchingItemsAsync(System.String,System.Object)">
<remarks/>
</member>
<member name="M:SampleApp.localhost.Service.CancelAsync(System.Object)">
<remarks/>
</member>
<member name="T:SampleApp.localhost.GetMatchingItemsCompletedEventHandler">
<remarks/>
</member>
<member name="T:SampleApp.localhost.GetMatchingItemsCompletedEventArgs">
<remarks/>
</member>
<member name="P:SampleApp.localhost.GetMatchingItemsCompletedEventArgs.Result">
<remarks/>
</member>
</members>
</doc>

Просмотреть файл

@ -0,0 +1,151 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000.
//
#pragma warning disable 1591
namespace SampleApp.localhost {
using System.Diagnostics;
using System;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System.Web.Services;
using System.Data;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://tempuri.org/")]
public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback GetMatchingItemsOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public Service() {
this.Url = "http://localhost:4384/WebService1/Service.asmx";
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
/// <remarks/>
public event GetMatchingItemsCompletedEventHandler GetMatchingItemsCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetMatchingItems", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet GetMatchingItems(string startOfText) {
object[] results = this.Invoke("GetMatchingItems", new object[] {
startOfText});
return ((System.Data.DataSet)(results[0]));
}
/// <remarks/>
public void GetMatchingItemsAsync(string startOfText) {
this.GetMatchingItemsAsync(startOfText, null);
}
/// <remarks/>
public void GetMatchingItemsAsync(string startOfText, object userState) {
if ((this.GetMatchingItemsOperationCompleted == null)) {
this.GetMatchingItemsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMatchingItemsOperationCompleted);
}
this.InvokeAsync("GetMatchingItems", new object[] {
startOfText}, this.GetMatchingItemsOperationCompleted, userState);
}
private void OnGetMatchingItemsOperationCompleted(object arg) {
if ((this.GetMatchingItemsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetMatchingItemsCompleted(this, new GetMatchingItemsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0")]
public delegate void GetMatchingItemsCompletedEventHandler(object sender, GetMatchingItemsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMatchingItemsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetMatchingItemsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public System.Data.DataSet Result {
get {
this.RaiseExceptionIfNecessary();
return ((System.Data.DataSet)(this.results[0]));
}
}
}
}
#pragma warning restore 1591

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:4384/WebService1/Service.asmx?wsdl" filename="Service.wsdl" />
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:4384/WebService1/Service.asmx?disco" filename="Service.disco" />
</Results>
</DiscoveryClientResultsFile>

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:4384/WebService1/Service.asmx?wsdl" docRef="http://localhost:4384/WebService1/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://localhost:4384/WebService1/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://localhost:4384/WebService1/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

Просмотреть файл

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="GetMatchingItems">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="startOfText" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetMatchingItemsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetMatchingItemsResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="GetMatchingItemsSoapIn">
<wsdl:part name="parameters" element="tns:GetMatchingItems" />
</wsdl:message>
<wsdl:message name="GetMatchingItemsSoapOut">
<wsdl:part name="parameters" element="tns:GetMatchingItemsResponse" />
</wsdl:message>
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="GetMatchingItems">
<wsdl:input message="tns:GetMatchingItemsSoapIn" />
<wsdl:output message="tns:GetMatchingItemsSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetMatchingItems">
<soap:operation soapAction="http://tempuri.org/GetMatchingItems" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetMatchingItems">
<soap12:operation soapAction="http://tempuri.org/GetMatchingItems" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service">
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://localhost:4384/WebService1/Service.asmx" />
</wsdl:port>
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://localhost:4384/WebService1/Service.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="SampleApp.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<connectionStrings>
<add name="SampleApp.My.MySettings.Database1ConnectionString" connectionString="Data Source=|DataDirectory|\Database1.sdf" providerName="Microsoft.SqlServerCe.Client.3.5"/>
<add name="SampleApp.My.MySettings.TestDb1ConnectionString" connectionString="Data Source=|DataDirectory|\TestDb1.sdf" providerName="Microsoft.SqlServerCe.Client.3.5"/>
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information"/>
</switches>
<sharedListeners>
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<bindings/>
<client/>
</system.serviceModel>
<applicationSettings>
<SampleApp.My.MySettings>
<setting name="SampleApp_localhost_Service" serializeAs="String">
<value>http://localhost:4384/WebService1/Service.asmx</value>
</setting>
</SampleApp.My.MySettings>
</applicationSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

54
GridView/LoadOnDemandComboBoxInGrid/LoadOnDemandVB/Form1.Designer.vb сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,54 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
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()
Me.rgData = New Telerik.WinControls.UI.RadGridView
CType(Me.rgData, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.rgData.MasterTemplate, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'rgData
'
Me.rgData.Dock = System.Windows.Forms.DockStyle.Fill
Me.rgData.Location = New System.Drawing.Point(0, 0)
Me.rgData.Name = "rgData"
Me.rgData.Size = New System.Drawing.Size(852, 481)
Me.rgData.TabIndex = 0
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(852, 481)
Me.Controls.Add(Me.rgData)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.rgData.MasterTemplate, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.rgData, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents rgData As Telerik.WinControls.UI.RadGridView
End Class

Просмотреть файл

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,127 @@
Imports Telerik.WinControls.UI
Imports Telerik.WinControls
Public Class Form1
Private _loadOnDemandCellEditor As LoadOnDemandCellEditor
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitializeLinesGrid()
LoadGrid()
End Sub
'Load the grid columns, set grid properties, etc.
Private Sub InitializeLinesGrid()
Dim gridMultiColumnComboColumn As GridViewMultiComboBoxColumn
With rgData.MasterTemplate
.Columns.Clear()
.AutoGenerateColumns = False
gridMultiColumnComboColumn = CreateGridMultiComboBoxColumn("COUNTRY", "COUNTRY", "Country", Nothing, "COUNTRY", "COUNTRY", 400)
.Columns.Add(gridMultiColumnComboColumn)
'Set MasterGridViewTemplate properties
.AllowEditRow = True
.AllowAddNewRow = False
.EnableGrouping = False
.AllowColumnChooser = False
.AllowColumnHeaderContextMenu = False
End With
rgData.MultiSelect = True
rgData.SelectionMode = GridViewSelectionMode.FullRowSelect
rgData.ShowGroupPanel = False
End Sub
'Create GridViewMultiComboBoxColumn with values passed in
Private Function CreateGridMultiComboBoxColumn(ByVal Name As String, ByVal fieldName As String, ByVal headerText As String, ByVal dataSource As BindingSource, ByVal valueMember As String, ByVal displayMember As String, ByVal width As Integer) As GridViewMultiComboBoxColumn
Dim multiComboBoxColumn As New GridViewMultiComboBoxColumn
With multiComboBoxColumn
.Name = Name
.FieldName = fieldName
.HeaderText = headerText
.DataSource = dataSource
.ValueMember = valueMember
.DisplayMember = displayMember
.Width = width
'Set default values
.HeaderTextAlignment = ContentAlignment.BottomLeft
.DropDownStyle = RadDropDownStyle.DropDown
End With
Return multiComboBoxColumn
End Function
'Load the grid
Private Sub LoadGrid()
Dim rowInfo As GridViewRowInfo
rowInfo = rgData.Rows.AddNew
rowInfo.Cells("COUNTRY").Value = "United States of America"
rowInfo = rgData.Rows.AddNew
rowInfo.Cells("COUNTRY").Value = "Malta"
rowInfo = rgData.Rows.AddNew
rowInfo.Cells("COUNTRY").Value = "Canada"
rowInfo = rgData.Rows.AddNew
rowInfo.Cells("COUNTRY").Value = "Spain"
rowInfo = rgData.Rows.AddNew
rowInfo.Cells("COUNTRY").Value = "Italy"
End Sub
'This event fires when a field is put into edit mode.
Private Sub rgData_EditorRequired(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.EditorRequiredEventArgs) Handles rgData.EditorRequired
Dim currentColumnIndex As Integer
Dim currentRowIndex As Integer
Dim country As Object
Dim columnWidth As Integer
currentColumnIndex = rgData.Columns.IndexOf(rgData.CurrentColumn)
Select Case currentColumnIndex
Case rgData.Columns("COUNTRY").Index
currentRowIndex = rgData.Rows.IndexOf(rgData.CurrentRow)
country = rgData.Rows(currentRowIndex).Cells(currentColumnIndex).Value
columnWidth = rgData.Columns(currentColumnIndex).Width
_loadOnDemandCellEditor = New LoadOnDemandCellEditor(country, columnWidth, rgData)
e.Editor = _loadOnDemandCellEditor
End Select
End Sub
'Fires when a cell is taken out of edit mode
Private Sub rgData_CellEndEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles rgData.CellEndEdit
If e.ColumnIndex = rgData.Columns("COUNTRY").Index Then
'Set the editor text from editor element and update the cell value (sometimes the grid did not hold
'the updated value)
rgData.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = _loadOnDemandCellEditor.EditorElement.Text
_loadOnDemandCellEditor.Dispose()
End If
End Sub
End Class

Просмотреть файл

@ -0,0 +1,272 @@
Imports Telerik.WinControls.UI
Public Class LoadOnDemandCellEditor
Inherits RadMultiColumnComboBoxElement
Private Const MinDropDownWidth As Integer = 320
Private Const ShortNameWidth As Integer = 25
Private Const GridOffset As Integer = 70
Private Const TimerInterval = 425
Private Const ItemInfoTableName As String = "ITEMS"
Private _timer As System.Timers.Timer
Private _showDropDown As Boolean
Private Property ShowDropDown() As Boolean
Get
Return _showDropDown
End Get
Set(ByVal value As Boolean)
'This property can be updated on a background thread, so we need to ensure thread-safety
SyncLock Me
_showDropDown = value
End SyncLock
End Set
End Property
Private _newItemsLoaded As Boolean
Private Property NewItemsLoaded() As Boolean
Get
Return _newItemsLoaded
End Get
Set(ByVal value As Boolean)
'This property can be updated on a background thread, so we need to ensure thread-safety
SyncLock Me
_newItemsLoaded = value
End SyncLock
End Set
End Property
Private _currentText As String = Nothing
Private Property CurrentText() As String
Get
Return _currentText
End Get
Set(ByVal value As String)
_currentText = value
End Set
End Property
Public Sub New(ByVal text As Object, ByVal columnWidth As Integer, ByVal ownerGrid As RadGridView)
MyBase.New()
InitializeCellEditor(text, columnWidth, ownerGrid)
End Sub
'Initialize the cell editor (set properties and load matching data)
Private Sub InitializeCellEditor(ByVal text As Object, ByVal columnWidth As Integer, ByVal ownerGrid As RadGridView)
Dim grid As RadGridView
If Not (TypeOf text Is DBNull) AndAlso Not String.IsNullOrEmpty(text) Then
CurrentText = text.ToString
End If
With Me
.DisplayMember = "COUNTRY"
.ValueMember = "COUNTRY"
.Virtualized = False
'Make sure the drop down is at least minDropDownWidth
If columnWidth > MinDropDownWidth Then
.DropDownWidth = columnWidth
Else
.DropDownWidth = MinDropDownWidth
End If
grid = .EditorControl
'Setup the grid that is displayed in the drop down list
InitializeGrid(grid, Me.DropDownWidth)
'Only load data if we have at least 3 characters
If CurrentText IsNot Nothing AndAlso CurrentText.Length >= 3 Then
GetMatchingItems_AsyncBegin(CurrentText, False)
'Text of the combo gets cleared when the items are loaded, so make sure to set it here
Me.TextBoxElement.Text = CurrentText
End If
'KeyUp and KeyDown events will allow us to load matching data on-demand
AddHandler Me.KeyDown, AddressOf DropDown_KeyDown
AddHandler Me.KeyUp, AddressOf DropDown_KeyUp
End With
InitializeTimer(ownerGrid)
End Sub
'Configure the grid that is displayed within the drop down list.
Private Sub InitializeGrid(ByRef grid As RadGridView, ByVal gridWidth As Integer)
Dim gridTextBoxColumn As GridViewTextBoxColumn
'Set the grid to fill the drop down list
grid.Width = gridWidth
grid.AutoSizeRows = True
grid.VirtualMode = False
With grid.MasterTemplate
.AutoGenerateColumns = False
.ShowColumnHeaders = False
.AllowColumnResize = False
.AllowRowResize = False
.Columns.Clear()
gridTextBoxColumn = CreateGridTextBoxColumn("SHORTNAME", "SHORTNAME", "SHORTNAME")
gridTextBoxColumn.Width = ShortNameWidth
.Columns.Add(gridTextBoxColumn)
gridTextBoxColumn = CreateGridTextBoxColumn("COUNTRY", "COUNTRY", "COUNTRY")
'Set the column to fill the remaining space in the drop down
gridTextBoxColumn.Width = gridWidth - ShortNameWidth - GridOffset
gridTextBoxColumn.WrapText = True
.Columns.Add(gridTextBoxColumn)
End With
End Sub
'Initialize the Timer that is used to buffer the requests to the web service. So instead of firing
'off a request on every keystroke, we will build in a short wait to make sure the user is done typing.
Private Sub InitializeTimer(ByVal ownerGrid As RadGridView)
_timer = New System.Timers.Timer
_timer.Interval = TimerInterval
'The GridViewMultiComboBoxElement does not implement the InvokeRequired property or Invoke() method.
'These are needed to update a control that was created on another thread. So we will need to
'synchronize the timer with the another control so that we can update the UI in the timers Elasped
'event handler, since the timer runs on a background thread. We can't access the grid that hosts this
'control from the control itself, so we us a reference to the grid that is passed in the constructor.
_timer.SynchronizingObject() = ownerGrid
AddHandler _timer.Elapsed, AddressOf Timer_Elapsed
End Sub
'Make an asynchronous call into the web service to get items that match the text that is passed in
Private Sub GetMatchingItems_AsyncBegin(ByVal text As String, ByVal showDropDownFlag As Boolean)
Using ws As New localhost.Service
ShowDropDown = showDropDownFlag
AddHandler ws.GetMatchingItemsCompleted, AddressOf GetMatchingItems_AsyncCompleted
ws.GetMatchingItemsAsync(text)
End Using
End Sub
'Asynchronous callback event handler for the GetMatchingItemsAsync call to the web service
Private Sub GetMatchingItems_AsyncCompleted(ByVal sender As Object, ByVal e As localhost.GetMatchingItemsCompletedEventArgs)
Dim grid As RadGridView
Dim returnDataSet As DataSet
Dim itemInfo As DataTable
If e.Error IsNot Nothing OrElse e.Result Is Nothing Then
'WS call errored out, or nothing was returned
Exit Sub
End If
returnDataSet = CType(e.Result, DataSet)
itemInfo = returnDataSet.Tables(ItemInfoTableName)
grid = Me.EditorControl
grid.DataSource = itemInfo
If ShowDropDown Then
Me.ShowPopup()
End If
NewItemsLoaded = True
End Sub
'Handles the KeyDown event for the drop down editor.
Private Sub DropDown_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs)
'Store the current text so that we can tell if it has changed in the KeyUp event.
CurrentText = Me.Text
'If the down key was pressed, there are items loaded in the drop down and an item has not already
'been selected, then force the selection. This is to workaround an issue where pressing the down
'key would not force focus to the grid (allowing the user to scroll through the items).
If e.KeyCode = Keys.Down Then
If Me.EditorControl.Rows.Count > 0 AndAlso _
NewItemsLoaded = True Then
Me.SelectedIndex = 0
Me.ShowPopup()
End If
'Reset NewItemsLoaded for next iteration
NewItemsLoaded = False
End If
End Sub
'Handles the KeyUp event for the drop down editor. We load any matching items.
Private Sub DropDown_KeyUp(ByVal sender As System.Object, ByVal e As KeyEventArgs)
'Force the timer to stop. We will only start the timer if the text is valid
_timer.Stop()
'Escape navigation keys (ex. up/down arrow) so we don't reload the drop down when the
'user scrolls through the items in the grid.
Select Case e.KeyCode
Case Keys.Up, Keys.Down
Exit Sub
End Select
'Just exit if the text has not changed (user could have pressed F1, CTRL, SHIFT, etc.)
If CurrentText = Me.Text Then
Exit Sub
End If
If Not String.IsNullOrEmpty(Me.Text) Then
'Restart timer
_timer.Start()
Else
'Not text, close drop down
Me.ClosePopup()
End If
End Sub
'This event fires after the specified Timer.Interval has passed.
Private Sub Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs)
_timer.Stop()
GetMatchingItems_AsyncBegin(Me.Text, True)
End Sub
'Generic function to create a gridViewTextBoxColumn with common attributes set
Private Function CreateGridTextBoxColumn(ByVal Name As String, ByVal fieldName As String, ByVal headerText As String) As GridViewTextBoxColumn
Dim gridViewTextBoxColumn As New GridViewTextBoxColumn
With gridViewTextBoxColumn
.Name = Name
.FieldName = fieldName
.HeaderText = headerText
.ReadOnly = True
.HeaderTextAlignment = ContentAlignment.BottomLeft
End With
Return gridViewTextBoxColumn
End Function
'Fires when the cell is moved out of edit mode. Perform cleanup.
Public Overrides Function EndEdit() As Boolean
_timer.Stop()
_timer.Dispose()
MyBase.EndEdit()
End Function
End Class

Просмотреть файл

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C86FFBA3-2E62-4025-80EB-7F0AC9581EF1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>SampleApp.My.MyApplication</StartupObject>
<RootNamespace>SampleApp</RootNamespace>
<AssemblyName>SampleApp</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<OptionExplicit>On</OptionExplicit>
<OptionCompare>Binary</OptionCompare>
<OptionStrict>Off</OptionStrict>
<OptionInfer>On</OptionInfer>
<IsWebBootstrapper>true</IsWebBootstrapper>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>http://localhost/SampleApp/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>SampleApp.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>SampleApp.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\Framework64\v2.0.50727\System.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.ServiceModel">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.WinControls">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.dll</HintPath>
</Reference>
<Reference Include="Telerik.WinControls.GridView">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.GridView.dll</HintPath>
</Reference>
<Reference Include="Telerik.WinControls.UI">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\Telerik.WinControls.UI.dll</HintPath>
</Reference>
<Reference Include="TelerikCommon">
<HintPath>..\..\..\..\..\Program Files (x86)\Progress\Telerik UI for WinForms 2024 Q1\Bin40\TelerikCommon.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="LoadOnDemandCellEditor.vb" />
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Web References\localhost\Reference.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.SQL.Server.Compact.3.5">
<Visible>False</Visible>
<ProductName>SQL Server Compact 3.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="My Project\DataSources\System.Data.DataSet.datasource" />
<None Include="Web References\localhost\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.vb</LastGenOutput>
</None>
<None Include="Web References\localhost\Service.disco" />
<None Include="Web References\localhost\Service.wsdl" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<WebReferenceUrl Include="http://localhost:4384/WebService1/Service.asmx">
<UrlBehavior>Dynamic</UrlBehavior>
<RelPath>Web References\localhost\</RelPath>
<UpdateFromURL>http://localhost:4384/WebService1/Service.asmx</UpdateFromURL>
<ServiceLocationURL>
</ServiceLocationURL>
<CachedDynamicPropName>
</CachedDynamicPropName>
<CachedAppSettingsObjectName>MySettings</CachedAppSettingsObjectName>
<CachedSettingsPropName>SampleApp_localhost_Service</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,44 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.SampleApp.Form1
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Me.MinimumSplashScreenDisplayTime = 0
Return MyBase.OnInitialize(commandLineArgs)
End Function
End Class
End Namespace

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

Просмотреть файл

@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("SampleApp")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Acuity Brands Lighting")>
<Assembly: AssemblyProduct("SampleApp")>
<Assembly: AssemblyCopyright("Copyright © Acuity Brands Lighting 2009")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("5ae2a86c-2bdc-4ad0-89f5-d1d2e0d170fa")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

Просмотреть файл

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DataSet" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>System.Data.DataSet, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</TypeInfo>
</GenericObjectDataSource>

Просмотреть файл

@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SampleApp.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,103 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\Database1.sdf")> _
Public ReadOnly Property Database1ConnectionString() As String
Get
Return CType(Me("Database1ConnectionString"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\TestDb1.sdf")> _
Public ReadOnly Property TestDb1ConnectionString() As String
Get
Return CType(Me("TestDb1ConnectionString"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.WebServiceUrl), _
Global.System.Configuration.DefaultSettingValueAttribute("http://localhost:4384/WebService1/Service.asmx")> _
Public ReadOnly Property SampleApp_localhost_Service() As String
Get
Return CType(Me("SampleApp_localhost_Service"),String)
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.SampleApp.My.MySettings
Get
Return Global.SampleApp.My.MySettings.Default
End Get
End Property
End Module
End Namespace

Просмотреть файл

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="Database1ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=|DataDirectory|\Database1.sdf&lt;/ConnectionString&gt;
&lt;ProviderName&gt;Microsoft.SqlServerCe.Client.3.5&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=|DataDirectory|\Database1.sdf</Value>
</Setting>
<Setting Name="TestDb1ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=|DataDirectory|\TestDb1.sdf&lt;/ConnectionString&gt;
&lt;ProviderName&gt;Microsoft.SqlServerCe.Client.3.5&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=|DataDirectory|\TestDb1.sdf</Value>
</Setting>
<Setting Name="SampleApp_localhost_Service" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://localhost:4384/WebService1/Service.asmx</Value>
</Setting>
</Settings>
</SettingsFile>

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:4384/WebService1/Service.asmx?wsdl" filename="Service.wsdl" />
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:4384/WebService1/Service.asmx?disco" filename="Service.disco" />
</Results>
</DiscoveryClientResultsFile>

Просмотреть файл

@ -0,0 +1,150 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Data
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization
'
'This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000.
'
Namespace localhost
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="ServiceSoap", [Namespace]:="http://tempuri.org/")> _
Partial Public Class Service
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
Private GetMatchingItemsOperationCompleted As System.Threading.SendOrPostCallback
Private useDefaultCredentialsSetExplicitly As Boolean
'''<remarks/>
Public Sub New()
MyBase.New
Me.Url = Global.SampleApp.My.MySettings.Default.SampleApp_localhost_Service
If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then
Me.UseDefaultCredentials = true
Me.useDefaultCredentialsSetExplicitly = false
Else
Me.useDefaultCredentialsSetExplicitly = true
End If
End Sub
Public Shadows Property Url() As String
Get
Return MyBase.Url
End Get
Set
If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true) _
AndAlso (Me.useDefaultCredentialsSetExplicitly = false)) _
AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then
MyBase.UseDefaultCredentials = false
End If
MyBase.Url = value
End Set
End Property
Public Shadows Property UseDefaultCredentials() As Boolean
Get
Return MyBase.UseDefaultCredentials
End Get
Set
MyBase.UseDefaultCredentials = value
Me.useDefaultCredentialsSetExplicitly = true
End Set
End Property
'''<remarks/>
Public Event GetMatchingItemsCompleted As GetMatchingItemsCompletedEventHandler
'''<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetMatchingItems", RequestNamespace:="http://tempuri.org/", ResponseNamespace:="http://tempuri.org/", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetMatchingItems(ByVal startOfText As String) As System.Data.DataSet
Dim results() As Object = Me.Invoke("GetMatchingItems", New Object() {startOfText})
Return CType(results(0),System.Data.DataSet)
End Function
'''<remarks/>
Public Overloads Sub GetMatchingItemsAsync(ByVal startOfText As String)
Me.GetMatchingItemsAsync(startOfText, Nothing)
End Sub
'''<remarks/>
Public Overloads Sub GetMatchingItemsAsync(ByVal startOfText As String, ByVal userState As Object)
If (Me.GetMatchingItemsOperationCompleted Is Nothing) Then
Me.GetMatchingItemsOperationCompleted = AddressOf Me.OnGetMatchingItemsOperationCompleted
End If
Me.InvokeAsync("GetMatchingItems", New Object() {startOfText}, Me.GetMatchingItemsOperationCompleted, userState)
End Sub
Private Sub OnGetMatchingItemsOperationCompleted(ByVal arg As Object)
If (Not (Me.GetMatchingItemsCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent GetMatchingItemsCompleted(Me, New GetMatchingItemsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
'''<remarks/>
Public Shadows Sub CancelAsync(ByVal userState As Object)
MyBase.CancelAsync(userState)
End Sub
Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean
If ((url Is Nothing) _
OrElse (url Is String.Empty)) Then
Return false
End If
Dim wsUri As System.Uri = New System.Uri(url)
If ((wsUri.Port >= 1024) _
AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then
Return true
End If
Return false
End Function
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0")> _
Public Delegate Sub GetMatchingItemsCompletedEventHandler(ByVal sender As Object, ByVal e As GetMatchingItemsCompletedEventArgs)
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.9032.0"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code")> _
Partial Public Class GetMatchingItemsCompletedEventArgs
Inherits System.ComponentModel.AsyncCompletedEventArgs
Private results() As Object
Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
MyBase.New(exception, cancelled, userState)
Me.results = results
End Sub
'''<remarks/>
Public ReadOnly Property Result() As System.Data.DataSet
Get
Me.RaiseExceptionIfNecessary
Return CType(Me.results(0),System.Data.DataSet)
End Get
End Property
End Class
End Namespace

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:4384/WebService1/Service.asmx?wsdl" docRef="http://localhost:4384/WebService1/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://localhost:4384/WebService1/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://localhost:4384/WebService1/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

Просмотреть файл

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="GetMatchingItems">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="startOfText" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetMatchingItemsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetMatchingItemsResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="GetMatchingItemsSoapIn">
<wsdl:part name="parameters" element="tns:GetMatchingItems" />
</wsdl:message>
<wsdl:message name="GetMatchingItemsSoapOut">
<wsdl:part name="parameters" element="tns:GetMatchingItemsResponse" />
</wsdl:message>
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="GetMatchingItems">
<wsdl:input message="tns:GetMatchingItemsSoapIn" />
<wsdl:output message="tns:GetMatchingItemsSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetMatchingItems">
<soap:operation soapAction="http://tempuri.org/GetMatchingItems" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetMatchingItems">
<soap12:operation soapAction="http://tempuri.org/GetMatchingItems" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service">
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://localhost:4384/WebService1/Service.asmx" />
</wsdl:port>
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://localhost:4384/WebService1/Service.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="SampleApp.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<connectionStrings>
<add name="SampleApp.My.MySettings.Database1ConnectionString" connectionString="Data Source=|DataDirectory|\Database1.sdf" providerName="Microsoft.SqlServerCe.Client.3.5"/>
<add name="SampleApp.My.MySettings.TestDb1ConnectionString" connectionString="Data Source=|DataDirectory|\TestDb1.sdf" providerName="Microsoft.SqlServerCe.Client.3.5"/>
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information"/>
</switches>
<sharedListeners>
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<bindings/>
<client/>
</system.serviceModel>
<applicationSettings>
<SampleApp.My.MySettings>
<setting name="SampleApp_localhost_Service" serializeAs="String">
<value>http://localhost:4384/WebService1/Service.asmx</value>
</setting>
</SampleApp.My.MySettings>
</applicationSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

Просмотреть файл

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSet1" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="ItemsDbConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="ItemsDbConnectionString (Web.config)" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.ItemsDbConnectionString.ConnectionString" Provider="System.Data.OleDb" />
</Connections>
<Tables />
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DataSet1" msprop:Generator_DataSetName="DataSet1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Items" msprop:Generator_UserTableName="Items" msprop:Generator_RowDeletedName="ItemsRowDeleted" msprop:Generator_RowChangedName="ItemsRowChanged" msprop:Generator_RowClassName="ItemsRow" msprop:Generator_RowChangingName="ItemsRowChanging" msprop:Generator_RowEvArgName="ItemsRowChangeEvent" msprop:Generator_RowEvHandlerName="ItemsRowChangeEventHandler" msprop:Generator_TableClassName="ItemsDataTable" msprop:Generator_TableVarName="tableItems" msprop:Generator_RowDeletingName="ItemsRowDeleting" msprop:Generator_TablePropName="Items">
<xs:complexType>
<xs:sequence>
<xs:element name="COUNTRY" msprop:Generator_UserColumnName="COUNTRY" msprop:Generator_ColumnVarNameInTable="columnCOUNTRY" msprop:Generator_ColumnPropNameInRow="COUNTRY" msprop:Generator_ColumnPropNameInTable="COUNTRYColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

Просмотреть файл

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool to store the dataset designer's layout information.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:Items" ZOrder="1" X="70" Y="70" Height="44" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="40" />
</Shapes>
<Connectors />
</DiagramLayout>

Просмотреть файл

@ -0,0 +1,187 @@
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports System.Data
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class Service
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function GetMatchingItems(ByVal startOfText As String) As DataSet
Dim dr As DataRow
Dim dt As New DataTable
Dim dv As DataView
Dim ds As New DataSet
'Load data
dt.CaseSensitive = False
dt.Columns.Add("COUNTRY")
dt.Columns.Add("SHORTNAME")
dr = dt.NewRow
dr("COUNTRY") = "United States of America"
dr("SHORTNAME") = "US"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "United Kingdom"
dr("SHORTNAME") = "UK"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Ukraine"
dr("SHORTNAME") = "UA"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Uruguay"
dr("SHORTNAME") = "UY"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Malta"
dr("SHORTNAME") = "MT"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Mali"
dr("SHORTNAME") = "ML"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Madagasgar"
dr("SHORTNAME") = "UA"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Morocco"
dr("SHORTNAME") = "MA"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Monaco"
dr("SHORTNAME") = "MC"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Mexico"
dr("SHORTNAME") = "MX"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Maldives"
dr("SHORTNAME") = "MV"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Malawi"
dr("SHORTNAME") = "MW"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Malaysia"
dr("SHORTNAME") = "MY"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Canada"
dr("SHORTNAME") = "CA"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Cambodia"
dr("SHORTNAME") = "KH"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Congo"
dr("SHORTNAME") = "CG"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Chile"
dr("SHORTNAME") = "CL"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Cameroon"
dr("SHORTNAME") = "CM"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Cuba"
dr("SHORTNAME") = "CU"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Spain"
dr("SHORTNAME") = "EP"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Sri Lanka"
dr("SHORTNAME") = "LK"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Sudan"
dr("SHORTNAME") = "SD"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Sweden"
dr("SHORTNAME") = "SE"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Italy"
dr("SHORTNAME") = "IT"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Ireland"
dr("SHORTNAME") = "IE"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "India"
dr("SHORTNAME") = "IN"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Israel"
dr("SHORTNAME") = "IL"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Iceland"
dr("SHORTNAME") = "IS"
dt.Rows.Add(dr)
dr = dt.NewRow
dr("COUNTRY") = "Indonesia"
dr("SHORTNAME") = "ID"
dt.Rows.Add(dr)
'Filter the result set to find the matching rows
dv = dt.DefaultView
dv.RowFilter = "COUNTRY LIKE '" & startOfText.ToLower & "%'"
'Convert the dataView back to a dataTable
dt = dv.ToTable()
dt.TableName = "ITEMS"
'Add the dataTable to the dataSet
ds.Tables.Add(dt)
Return ds
End Function
End Class

Просмотреть файл

@ -0,0 +1 @@
<%@ WebService Language="vb" CodeBehind="~/App_Code/Service.vb" Class="Service" %>

Просмотреть файл

@ -0,0 +1,148 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="ItemsDbConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\ItemsDb.mdb;Persist Security Info=True" providerName="System.Data.OleDb"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Generic"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Linq"/>
<add namespace="System.Xml.Linq"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>