ає» Then.Text=«Пропозіцій немає» IfSubSub Image () File.Exists («. « & MyPictMod) Then (». « & MyPictMod, 259, 168) (». Головна.jpg «, 259, 168) IfTxtInfo.Text =» Пропозіцій немає « Then (». Головна.jpg», 259, 168) IfSubSub ShowMyImage (ByVal fileToDisplay As String, ByVal xSize As Integer, _ySize As Integer)
Not (MyImage Is Nothing) Then.Dispose () IfSubSub BtnTypeOfMusicTools_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnTypeOfMusicTools.Click.Show () SubSub BtnMusicTools_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnMusicTools.Click.Show () SubSub CmbType_SelectedIndexChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbType.SelectedIndexChanged.Items.Clear () () () () SubSub CmbModel_TextChanged (ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbModel.TextChanged () () SubSub BtnRefresh_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRefresh.Click.CmbType.Items.Clear () _Load (sender, e) SubSub BtnExit_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click.Close () SubSub New () () SubOverrides Sub Finalize (). Finalize () SubClass
Форма Models.vb:
Imports System.IOSystem.Windows.FormsClass ModelsnMaxId As SinglearrModel As New ArrayListarrTypes As New ArrayListdataSource As IEnumerableCurrentModelNumber As Single, CurrentIndex, nPos As SinglecManager As CurrencyManagernAddEdit As ByteCostM As StringmShowSearch As BooleanM As New ModelS As New ToolTypebShowSearch As BooleanSub MusicTools_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load () ()=0_P () _objects () (True, True, True, False, False, True, True)=0= False.Select (nPos). GroupBoxForSerch.Enabled=False (False) SubSub ReadFromFile () BR As BinaryReaderFS As FileStream=New FileStream («. Oq.dat», FileMode.OpenOrCreate, FileAccess.ReadWrite)=New System.IO . BinaryReader (FS). BaseStream.Seek (0, SeekOrigin.Begin). Clear () FS.Position < FS.Length.Id=BR.ReadSingle.IdNmb=BR.ReadSingle.NameOfModel=BR.ReadString.TypeOfTool=BR.ReadString.Cost=BR.ReadString.Amount=BR.ReadSingle.Country=BR.ReadString.PictureM=BR. ReadString.Add (New Model (M.Id, M.IdNmb, M.NameOfModel, M.TypeOfTool, M.Cost, M.Amount, M.Country, M.PictureM)) WhileM.Id <= 0 Then.Id =1.IdNmb=1.NameOfModel=«». TypeOfTool=«». Cost=«». Amount=1.Country=«». PictureM=«». Add (New Model (MId, M.IdNmb, M.NameOfModel, M.TypeOfTool, M.Cost, M.Amount, M.Country, M.PictureM)) If.DataSource=arrModel.Parent=Me=M.Id=CType (DataGrid2.BindingContext (arrModel), CurrencyManager). Close (). Close () SubSub ReadFromFileTypes () i As IntegerBR As BinaryReaderFS As FileStream=New FileStream («. Types.dat», _.OpenOrCreate, _.ReadWrite)=New BinaryReader ( FS). BaseStream.Seek (0, SeekOrigin.Begin). Clear ()=1FS.Position < FS.Length.Id=BR.ReadSingle.TypeOfTool=BR.ReadString.Items.Add (S.TypeOfTool) +=1.Add (New ToolType (S.Id, S.TypeOfTool)) WhileS.Id <= 0 Then . Id=1.TypeOfTool=«». Add (New ToolType (S.Id, S.TypeOfTool)) If.Close (). Close () SubSub current_P (). Id=Convert.ToSingle (DataGrid2.Item ( DataGrid2.CurrentCell.RowNumber, 0)). IdNmb=Convert.ToSingle (DataGrid2.Item (DataGrid2.CurrentCell.RowNumber, 1)). NameOfModel=DataGrid2.Item (DataGrid2.CurrentCell.RowNumber, 2). TypeOfTool=DataGrid2.Item (DataGrid2.CurrentCell.RowNumber, 3)....