Skip to content

Commit

Permalink
added an installer project to BarcodeGen
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimhuycn committed Jun 28, 2022
1 parent 33ace82 commit 10e09e5
Show file tree
Hide file tree
Showing 15 changed files with 1,222 additions and 181 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,5 @@ ModelManifest.xml

# FAKE - F# Make
.fake/
/BarcodeGenInstaller/BarcodeGenInstaller-cache
/BarcodeGenInstaller
33 changes: 31 additions & 2 deletions BarcodeGen.sln
Original file line number Diff line number Diff line change
@@ -1,22 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.32602.291
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BarcodeGen", "BarcodeGen\BarcodeGen.vbproj", "{6E28A038-7582-4674-A069-68B1C38B0881}"
EndProject
Project("{840C416C-B8F3-42BC-B0DD-F6BB14C9F8CB}") = "BarcodeGenInstaller", "BarcodeGenInstaller\BarcodeGenInstaller.aiproj", "{C9D631F5-13F8-4D12-9990-070EAC0C687A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Any CPU = All|Any CPU
All|x64 = All|x64
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6E28A038-7582-4674-A069-68B1C38B0881}.All|Any CPU.ActiveCfg = Release|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.All|Any CPU.Build.0 = Release|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.All|x64.ActiveCfg = Debug|x64
{6E28A038-7582-4674-A069-68B1C38B0881}.All|x64.Build.0 = Debug|x64
{6E28A038-7582-4674-A069-68B1C38B0881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.Debug|x64.ActiveCfg = Debug|x64
{6E28A038-7582-4674-A069-68B1C38B0881}.Debug|x64.Build.0 = Debug|x64
{6E28A038-7582-4674-A069-68B1C38B0881}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.Release|Any CPU.Build.0 = Release|Any CPU
{6E28A038-7582-4674-A069-68B1C38B0881}.Release|x64.ActiveCfg = Release|x64
{6E28A038-7582-4674-A069-68B1C38B0881}.Release|x64.Build.0 = Release|x64
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.All|Any CPU.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.All|Any CPU.Build.0 = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.All|x64.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.All|x64.Build.0 = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Debug|Any CPU.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Debug|Any CPU.Build.0 = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Debug|x64.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Debug|x64.Build.0 = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Release|Any CPU.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Release|Any CPU.Build.0 = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Release|x64.ActiveCfg = DefaultBuild
{C9D631F5-13F8-4D12-9990-070EAC0C687A}.Release|x64.Build.0 = DefaultBuild
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C23012C4-9EBF-4130-B6BF-4007D08923EE}
EndGlobalSection
EndGlobal
44 changes: 10 additions & 34 deletions BarcodeGen/BarcodeGen.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 21 additions & 10 deletions BarcodeGen/BarcodeGen.vb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ Public Class frmBarcodeGen
Dim DATE_TIME As Date
Dim SELECTED_BARCODE_PRINTER As String

Public Sub New()

' This call is required by the designer.
InitializeComponent()
OutputMachineName()
' Add any initialization after the InitializeComponent() call.

End Sub

Private Sub btnGeneratePrintBarcode_Click(sender As Object, e As EventArgs) Handles btnGeneratePrintBarcode.Click
USER_INPUT_BARCODE_DATA = Nothing
PATIENT_DATA = Nothing
Expand All @@ -26,6 +35,7 @@ Public Class frmBarcodeGen
MsgBox("User input is required to generate barcode!")
End If

ActiveControl = txtPateintInfo
End Sub
Private Sub GenerateAndPrintBarcode()
Dim XBarcode As XtraReport = New XtraReport()
Expand All @@ -42,9 +52,14 @@ Public Class frmBarcodeGen

XBarcode.PrinterName = PrinterSettings.InstalledPrinters.Item(1)

Dim AutoPrint As New ReportPrintTool(XBarcode)
AutoPrint.Print(comboInstalledPrinters.SelectedItem)
XBarcode.ShowPrintMarginsWarning = False

Dim AutoPrint As New ReportPrintTool(XBarcode)
Dim printerName As String = (comboInstalledPrinters.SelectedItem)?.ToString()
Try
AutoPrint.Print(printerName)
Catch ex As Exception
End Try
End Sub

Private Sub PopulateInstalledPrintersCombo()
Expand Down Expand Up @@ -73,17 +88,13 @@ Public Class frmBarcodeGen

End Sub

Private Sub CheckBoxAutoPrint_CheckStateChanged(sender As Object, e As EventArgs) Handles CheckBoxAutoPrint.CheckStateChanged
If CheckBoxAutoPrint.Checked Then
btnGeneratePrintBarcode.Text = "Generate | Print"
Else
btnGeneratePrintBarcode.Text = "Generate Barcode"
End If
End Sub

Private Sub comboInstalledPrinters_EditValueChanged(sender As Object, e As EventArgs) Handles comboInstalledPrinters.EditValueChanged
SELECTED_BARCODE_PRINTER = comboInstalledPrinters.SelectedItem
End Sub


Public Sub OutputMachineName()
Debug.WriteLine($"MachineName: {Environment.MachineName}")
End Sub

End Class
Loading

0 comments on commit 10e09e5

Please sign in to comment.