Advertisement
penright

Untitled

Oct 3rd, 2023
1,640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.16 KB | None | 0 0
  1.    Sub FixAppIni()
  2.         Dim AppIni As New PrivateIniFile("c:\iris\ini\appini.ini")
  3.  
  4.         AppIni.WriteString("Pos", "RegNum", CStrNull(99))
  5.         AppIni.DeleteKey("Pos", "CfgConcept")
  6.         AppIni.DeleteSection("KITCHEN_SCHEMES")
  7.         AppIni.DeleteSection("Printer_SCHEMES")
  8.         AppIni.WriteString("Printer_SCHEMES", "1", "Default")
  9.         If PosMaint.IsHVMonitors Then
  10.             AppIni.WriteString("KITCHEN_SCHEMES", "1", "Low Volume")
  11.             AppIni.WriteString("KITCHEN_SCHEMES", "2", "High Volume")
  12.             If PosMaint.MonitorsDefinedList.Contains("Grill3") Then
  13.                 AppIni.WriteString("KITCHEN_SCHEMES", "3", "OverDrive")
  14.             End If
  15.             'AppIni.WriteString("KITCHEN_SCHEMES", "3", "Backup")
  16.         Else
  17.             AppIni.WriteString("KITCHEN_SCHEMES", "1", "Default")
  18.         End If
  19.         For xLoop As Integer = 0 To PosMaint.RegisterInformations.Count - 1
  20.             Dim RegInfo As RegInfo = PosMaint.RegisterInformations(xLoop)
  21.             AppIni.SetFileName("c:\iris\reginfo\Reg" & RegInfo.RegisterNumber & "\ini\appini.ini")
  22.             AppIni.DeleteSection("KITCHEN_SCHEMES")
  23.             AppIni.DeleteSection("Printer_SCHEMES")
  24.             AppIni.WriteString("Printer_SCHEMES", "1", "Default")
  25.             If PosMaint.IsHVMonitors Then
  26.                 AppIni.WriteString("KITCHEN_SCHEMES", "1", "Low Volume")
  27.                 AppIni.WriteString("KITCHEN_SCHEMES", "2", "High Volume")
  28.                 If PosMaint.HasGrill3Monitor Then
  29.                     AppIni.WriteString("KITCHEN_SCHEMES", "3", "Overdrive")
  30.                 End If
  31.                 'AppIni.WriteString("KITCHEN_SCHEMES", "3", "Backup")
  32.             Else
  33.                 AppIni.WriteString("KITCHEN_SCHEMES", "1", "Default")
  34.             End If
  35.             AppIni.WriteInteger("Pos", "RegNum", RegInfo.RegisterNumber)
  36.             AppIni.WriteString("Pos", "BRRegType", RegInfo.DefaultConcept.ToString)
  37.             If RegInfo.DefaultConcept = eDefaultConcept.Fountain Then
  38.                 AppIni.WriteString("Pos", "QuickOrder", "1")
  39.             Else
  40.                 AppIni.WriteString("Pos", "QuickOrder", "0")
  41.             End If
  42.         Next
  43.         AppIni = Nothing
  44.     End Sub
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement