rModel +=1=itmString.Compare (sStr, 0, (CurA . NameOfModel). ToUpper, 0, Len (sStr), False)=0 Then=iFunctionIfbField=2 ThenEach itm In arrModel +=1=itmString.Compare (sStr, 0, (CurA.Cost). ToUpper, 0, Len (sStr ), False)=0 Then=iFunctionIfbField=3 ThenEach itm In arrModel +=1=itmString.Compare (sStr, 0, (CurA.Country). ToUpper, 0, Len (sStr), False)=0 Then=iFunctionIf (« ; Запис | Полтава! », MsgBoxStyle.Information,« УВАГА! ») IfFunctionSub BtnExit_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click.Close () SubSub RadioButton1_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged.Enabled=True.Focus (). Enabled=False.Enabled=False.Text=«». Text=«» SubSub RadioButton2_CheckedChanged ( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged.Enabled=True.Focus (). Enabled=False.Enabled=False.Text=«». Text=«» SubSub RadioButton3_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged.Enabled=True.Focus (). Enabled=False.Enabled=False.Text=«». Text=«» SubSub TxtAmount_Validating (ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TxtAmount.ValidatingNot IsNumeric (TxtAmount.Text) Then («У це поле слід вводіті число!"). Text=«1» IfSubSub DataGrid2_Navigate ( ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles DataGrid2.NavigateSubSub CmbType_ChangeUICues (ByVal sender As Object, ByVal e As System.Windows.Forms.UICuesEventArgs) Handles CmbType.ChangeUICuesSubSub CmbType_ControlAdded (ByVal sender As Object , ByVal e As System.Windows.Forms.ControlEventArgs) Handles CmbType.ControlAddedSubSub CmbType_DataSourceChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbType.DataSourceChangedSubSub CmbType_EnabledChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbType . EnabledChangedSubSub CmbType_KeyUp (ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CmbType.KeyUpSubSub CmbType_RegionChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbType.RegionChangedSubClass
Форма Types.vb:
Imports System.IOSystem.Windows.FormsClass TypesnMaxId As SinglearrTypes As New ArrayListdataSource As IEnumerableCurrentTypeNumber As Single, CurrentIndex, nPos, nOldPos As SinglecManager As CurrencyManagernAddEdit As BytebShowSearch As BooleanS As New ToolTypeSub Types_Load (ByVal sender As System. Object, ByVal e As System.EventArgs) Handles MyBase.Load ()=0_P () _objects () (True, True, True, True, False, False)=0=False.Select (nPos). Enabled=False (False ) SubSub ReadFromFile () BR As BinaryReaderFS As FileStream=New System.IO.FileStream («. Types.dat», FileMode.OpenOrCreate, FileAccess.ReadWrite)=New System.IO.BinaryReader (FS). BaseStream.Seek ( 0, SeekOrigin.Begin). Clear () FS.Position < FS.Length.Id=BR.ReadSingle.TypeOfTool=BR.ReadString.Add (New ToolType (S.Id, S.TypeOfTool)) WhileS.Id <= 0 Then.Id=1.TypeOfTool=«». Add (New ToolType (S.Id, S.TypeOfTool)) If.DataSource=arrTypes=S.Id=CType (DataGrid1.BindingContext (arrTypes), CurrencyManager). Close (). Close () SubSub current_P (). Id= Convert.ToSingle (DataGrid1.Item (DataGrid1.CurrentCell.RowNumber, 0)). TypeOfTool=DataGrid1.Item (DataGrid1.CurrentCell.RowNumber, 1) Ab As New ToolType (S.Id, S.TypeO...