From 397e634fbb7ffd8ae5f94f99c1cc3ad22cddbd39 Mon Sep 17 00:00:00 2001 From: s452652 Date: Mon, 11 Oct 2021 08:42:17 +0200 Subject: [PATCH] =?UTF-8?q?Dodaj=20pliki=20projekt=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WindowsApp1.sln | 25 ++ WindowsApp1/App.config | 6 + WindowsApp1/Form1.Designer.vb | 95 +++++++ WindowsApp1/Form1.resx | 120 +++++++++ WindowsApp1/Form1.vb | 51 ++++ WindowsApp1/Form2.Designer.vb | 233 ++++++++++++++++++ WindowsApp1/Form2.resx | 120 +++++++++ WindowsApp1/Form2.vb | 86 +++++++ .../My Project/Application.Designer.vb | 38 +++ WindowsApp1/My Project/Application.myapp | 11 + WindowsApp1/My Project/AssemblyInfo.vb | 35 +++ WindowsApp1/My Project/Resources.Designer.vb | 62 +++++ WindowsApp1/My Project/Resources.resx | 117 +++++++++ WindowsApp1/My Project/Settings.Designer.vb | 73 ++++++ WindowsApp1/My Project/Settings.settings | 7 + WindowsApp1/WindowsApp1.vbproj | 133 ++++++++++ WindowsApp1/card.vb | 5 + 17 files changed, 1217 insertions(+) create mode 100644 WindowsApp1.sln create mode 100644 WindowsApp1/App.config create mode 100644 WindowsApp1/Form1.Designer.vb create mode 100644 WindowsApp1/Form1.resx create mode 100644 WindowsApp1/Form1.vb create mode 100644 WindowsApp1/Form2.Designer.vb create mode 100644 WindowsApp1/Form2.resx create mode 100644 WindowsApp1/Form2.vb create mode 100644 WindowsApp1/My Project/Application.Designer.vb create mode 100644 WindowsApp1/My Project/Application.myapp create mode 100644 WindowsApp1/My Project/AssemblyInfo.vb create mode 100644 WindowsApp1/My Project/Resources.Designer.vb create mode 100644 WindowsApp1/My Project/Resources.resx create mode 100644 WindowsApp1/My Project/Settings.Designer.vb create mode 100644 WindowsApp1/My Project/Settings.settings create mode 100644 WindowsApp1/WindowsApp1.vbproj create mode 100644 WindowsApp1/card.vb diff --git a/WindowsApp1.sln b/WindowsApp1.sln new file mode 100644 index 0000000..44a6982 --- /dev/null +++ b/WindowsApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31613.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsApp1", "WindowsApp1\WindowsApp1.vbproj", "{9D06FF80-7436-457D-ACA2-1FA428F0AE68}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D06FF80-7436-457D-ACA2-1FA428F0AE68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D06FF80-7436-457D-ACA2-1FA428F0AE68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D06FF80-7436-457D-ACA2-1FA428F0AE68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D06FF80-7436-457D-ACA2-1FA428F0AE68}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3D3B619D-0B37-4865-A370-6FB7AE3C0640} + EndGlobalSection +EndGlobal diff --git a/WindowsApp1/App.config b/WindowsApp1/App.config new file mode 100644 index 0000000..ffaf540 --- /dev/null +++ b/WindowsApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/WindowsApp1/Form1.Designer.vb b/WindowsApp1/Form1.Designer.vb new file mode 100644 index 0000000..5a20071 --- /dev/null +++ b/WindowsApp1/Form1.Designer.vb @@ -0,0 +1,95 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Formularz przesłania metodę dispose, aby wyczyścić listę składników. + _ + 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 + + 'Wymagane przez Projektanta formularzy systemu Windows + Private components As System.ComponentModel.IContainer + + 'UWAGA: następująca procedura jest wymagana przez Projektanta formularzy systemu Windows + 'Możesz to modyfikować, używając Projektanta formularzy systemu Windows. + 'Nie należy modyfikować za pomocą edytora kodu. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(378, 168) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "ok" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(308, 59) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(31, 13) + Me.Label1.TabIndex = 1 + Me.Label1.Text = "karta" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(308, 107) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(21, 13) + Me.Label2.TabIndex = 2 + Me.Label2.Text = "pin" + ' + 'TextBox1 + ' + Me.TextBox1.Location = New System.Drawing.Point(378, 59) + Me.TextBox1.Name = "TextBox1" + Me.TextBox1.Size = New System.Drawing.Size(100, 20) + Me.TextBox1.TabIndex = 3 + ' + 'TextBox2 + ' + Me.TextBox2.Location = New System.Drawing.Point(378, 107) + Me.TextBox2.Name = "TextBox2" + Me.TextBox2.Size = New System.Drawing.Size(100, 20) + Me.TextBox2.TabIndex = 4 + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.TextBox2) + Me.Controls.Add(Me.TextBox1) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.Button1) + Me.Name = "Form1" + Me.Text = "Form1" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents Label1 As Label + Friend WithEvents Label2 As Label + Friend WithEvents TextBox1 As TextBox + Friend WithEvents TextBox2 As TextBox +End Class diff --git a/WindowsApp1/Form1.resx b/WindowsApp1/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WindowsApp1/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WindowsApp1/Form1.vb b/WindowsApp1/Form1.vb new file mode 100644 index 0000000..3f90df6 --- /dev/null +++ b/WindowsApp1/Form1.vb @@ -0,0 +1,51 @@ +Imports System.ComponentModel +Imports System.IO + +Public Class Form1 + Public karty() As card + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Dim plik = File.ReadAllText("karty.csv") + Dim rows = plik.Split(vbCrLf) + ReDim karty(rows.Length - 1) + For i = 0 To rows.Length - 1 + karty(i) = New card + karty(i).numer = rows(i).Split(",")(0).Trim + karty(i).ammound = Int(rows(i).Split(",")(1)) + karty(i).pin = rows(i).Split(",")(2) + Next + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Dim karta = TextBox1.Text + Dim pin = TextBox2.Text + For i = 0 To karty.Length - 1 + If karty(i).numer = karta Then + If pin = karty(i).pin Then + Dim f2 = New Form2(karty(i), Me) + f2.ShowDialog() + karty(i) = f2.card + TextBox1.Text = "" + TextBox2.Text = "" + Return + Else + TextBox1.Text = "" + TextBox2.Text = "" + MsgBox("not found or wrong pin") + Return + End If + End If + Next + TextBox1.Text = "" + TextBox2.Text = "" + MsgBox("not found or wrong pin") + End Sub + + Private Sub Form1_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing + Dim result = "" + For i = 0 To karty.Length - 1 + result += karty(i).numer + "," + karty(i).ammound.ToString + "," + karty(i).pin + vbNewLine + Next + result = Mid(result, 1, result.Length - 2) + File.WriteAllText("karty.csv", result) + End Sub +End Class diff --git a/WindowsApp1/Form2.Designer.vb b/WindowsApp1/Form2.Designer.vb new file mode 100644 index 0000000..fd7f5d1 --- /dev/null +++ b/WindowsApp1/Form2.Designer.vb @@ -0,0 +1,233 @@ + _ +Partial Class Form2 + Inherits System.Windows.Forms.Form + + 'Formularz przesłania metodę dispose, aby wyczyścić listę składników. + _ + 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 + + 'Wymagane przez Projektanta formularzy systemu Windows + Private components As System.ComponentModel.IContainer + + 'UWAGA: następująca procedura jest wymagana przez Projektanta formularzy systemu Windows + 'Możesz to modyfikować, używając Projektanta formularzy systemu Windows. + 'Nie należy modyfikować za pomocą edytora kodu. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.TextBox3 = New System.Windows.Forms.TextBox() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.ComboBox1 = New System.Windows.Forms.ComboBox() + Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() + Me.Button4 = New System.Windows.Forms.Button() + Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.Button5 = New System.Windows.Forms.Button() + Me.Label5 = New System.Windows.Forms.Label() + Me.Label6 = New System.Windows.Forms.Label() + Me.TextBox4 = New System.Windows.Forms.TextBox() + Me.TextBox5 = New System.Windows.Forms.TextBox() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(116, 128) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "withdraw" + Me.Button1.UseVisualStyleBackColor = True + ' + 'TextBox1 + ' + Me.TextBox1.Location = New System.Drawing.Point(103, 90) + Me.TextBox1.Name = "TextBox1" + Me.TextBox1.Size = New System.Drawing.Size(100, 20) + Me.TextBox1.TabIndex = 1 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(28, 96) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(53, 13) + Me.Label1.TabIndex = 2 + Me.Label1.Text = "ammound" + ' + 'TextBox3 + ' + Me.TextBox3.Location = New System.Drawing.Point(346, 131) + Me.TextBox3.Name = "TextBox3" + Me.TextBox3.Size = New System.Drawing.Size(100, 20) + Me.TextBox3.TabIndex = 4 + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(269, 96) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(49, 13) + Me.Label2.TabIndex = 5 + Me.Label2.Text = "topup for" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(272, 131) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(47, 13) + Me.Label3.TabIndex = 6 + Me.Label3.Text = "ammoud" + ' + 'ComboBox1 + ' + Me.ComboBox1.FormattingEnabled = True + Me.ComboBox1.Items.AddRange(New Object() {"t-mobile", "play", "orange", "plus"}) + Me.ComboBox1.Location = New System.Drawing.Point(346, 87) + Me.ComboBox1.Name = "ComboBox1" + Me.ComboBox1.Size = New System.Drawing.Size(121, 21) + Me.ComboBox1.TabIndex = 7 + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(355, 174) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(75, 23) + Me.Button2.TabIndex = 8 + Me.Button2.Text = "buy top up" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(74, 214) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(129, 23) + Me.Button3.TabIndex = 9 + Me.Button3.Text = "show card balance" + Me.Button3.UseVisualStyleBackColor = True + ' + 'Button4 + ' + Me.Button4.Location = New System.Drawing.Point(572, 127) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(75, 23) + Me.Button4.TabIndex = 10 + Me.Button4.Text = "deposit" + Me.Button4.UseVisualStyleBackColor = True + ' + 'TextBox2 + ' + Me.TextBox2.Location = New System.Drawing.Point(572, 77) + Me.TextBox2.Name = "TextBox2" + Me.TextBox2.Size = New System.Drawing.Size(100, 20) + Me.TextBox2.TabIndex = 11 + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(501, 77) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(45, 13) + Me.Label4.TabIndex = 12 + Me.Label4.Text = "amound" + ' + 'Button5 + ' + Me.Button5.Location = New System.Drawing.Point(585, 384) + Me.Button5.Name = "Button5" + Me.Button5.Size = New System.Drawing.Size(75, 23) + Me.Button5.TabIndex = 13 + Me.Button5.Text = "c2c transfer" + Me.Button5.UseVisualStyleBackColor = True + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Location = New System.Drawing.Point(465, 290) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(101, 13) + Me.Label5.TabIndex = 14 + Me.Label5.Text = "reciver card number" + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(504, 334) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(53, 13) + Me.Label6.TabIndex = 15 + Me.Label6.Text = "ammound" + ' + 'TextBox4 + ' + Me.TextBox4.Location = New System.Drawing.Point(572, 283) + Me.TextBox4.Name = "TextBox4" + Me.TextBox4.Size = New System.Drawing.Size(100, 20) + Me.TextBox4.TabIndex = 16 + ' + 'TextBox5 + ' + Me.TextBox5.Location = New System.Drawing.Point(572, 334) + Me.TextBox5.Name = "TextBox5" + Me.TextBox5.Size = New System.Drawing.Size(100, 20) + Me.TextBox5.TabIndex = 17 + ' + 'Form2 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.TextBox5) + Me.Controls.Add(Me.TextBox4) + Me.Controls.Add(Me.Label6) + Me.Controls.Add(Me.Label5) + Me.Controls.Add(Me.Button5) + Me.Controls.Add(Me.Label4) + Me.Controls.Add(Me.TextBox2) + Me.Controls.Add(Me.Button4) + Me.Controls.Add(Me.Button3) + Me.Controls.Add(Me.Button2) + Me.Controls.Add(Me.ComboBox1) + Me.Controls.Add(Me.Label3) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.TextBox3) + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.TextBox1) + Me.Controls.Add(Me.Button1) + Me.Name = "Form2" + Me.Text = "buy topup" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents TextBox1 As TextBox + Friend WithEvents Label1 As Label + Friend WithEvents TextBox3 As TextBox + Friend WithEvents Label2 As Label + Friend WithEvents Label3 As Label + Friend WithEvents ComboBox1 As ComboBox + Friend WithEvents Button2 As Button + Friend WithEvents Button3 As Button + Friend WithEvents Button4 As Button + Friend WithEvents TextBox2 As TextBox + Friend WithEvents Label4 As Label + Friend WithEvents Button5 As Button + Friend WithEvents Label5 As Label + Friend WithEvents Label6 As Label + Friend WithEvents TextBox4 As TextBox + Friend WithEvents TextBox5 As TextBox +End Class diff --git a/WindowsApp1/Form2.resx b/WindowsApp1/Form2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WindowsApp1/Form2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WindowsApp1/Form2.vb b/WindowsApp1/Form2.vb new file mode 100644 index 0000000..f81da83 --- /dev/null +++ b/WindowsApp1/Form2.vb @@ -0,0 +1,86 @@ +Public Class Form2 + Public card As card + Public parent As Form1 + Public Sub New(karta As card, form As Form1) + + ' To wywołanie jest wymagane przez projektanta. + InitializeComponent() + + ' Dodaj inicjowanie po wywołaniu funkcji InitializeComponent(). + card = karta + parent = form + End Sub + Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + MsgBox("your card balance is:" + vbNewLine + card.ammound.ToString) + Me.Close() + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + If card.ammound >= Int(TextBox1.Text) Then + card.ammound = card.ammound - Int(TextBox1.Text) + MsgBox("succesfully withdrawed: " + TextBox1.Text) + Me.Close() + Else + MsgBox("not sufficient balanse") + Me.Close() + End If + End Sub + + Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click + card.ammound = card.ammound + Int(TextBox2.Text) + MsgBox("succesfully deposited: " + TextBox2.Text) + Me.Close() + End Sub + + Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click + Dim cardl = TextBox4.Text + Dim ammound = Int(TextBox5.Text) + If card.ammound >= ammound Then + Dim found As Integer = -1 + For i = 0 To parent.karty.Length - 1 + If cardl = parent.karty(i).numer Then + found = i + End If + Next + If found = -1 Then + MsgBox("target card not exists") + Me.Close() + Return + End If + card.ammound = card.ammound - ammound + parent.karty(found).ammound = parent.karty(found).ammound + ammound + MsgBox("succesfully transfered to card: " + cardl + vbNewLine + "amound: " + ammound.ToString) + + Me.Close() + Else + MsgBox("not sufficient balanse") + Me.Close() + End If + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + If card.ammound >= Int(TextBox3.Text) Then + card.ammound = card.ammound - Int(TextBox3.Text) + MsgBox("succesfully topupped: " + TextBox3.Text + vbNewLine + "your code: " + GenerateRandomString(8, False)) + Me.Close() + Else + MsgBox("not sufficient balanse") + Me.Close() + End If + End Sub + + Public Function GenerateRandomString(ByRef len As Integer, ByRef upper As Boolean) As String + Dim rand As New Random() + Dim allowableChars() As Char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ0123456789".ToCharArray() + Dim final As String = String.Empty + For i As Integer = 0 To len - 1 + final += allowableChars(rand.Next(allowableChars.Length - 1)) + Next + + Return IIf(upper, final.ToUpper(), final) + End Function +End Class \ No newline at end of file diff --git a/WindowsApp1/My Project/Application.Designer.vb b/WindowsApp1/My Project/Application.Designer.vb new file mode 100644 index 0000000..9c4a411 --- /dev/null +++ b/WindowsApp1/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +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 + + _ + 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 + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.WindowsApp1.Form1 + End Sub + End Class +End Namespace diff --git a/WindowsApp1/My Project/Application.myapp b/WindowsApp1/My Project/Application.myapp new file mode 100644 index 0000000..1243847 --- /dev/null +++ b/WindowsApp1/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/WindowsApp1/My Project/AssemblyInfo.vb b/WindowsApp1/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..803952f --- /dev/null +++ b/WindowsApp1/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Ogólne informacje o zestawie są kontrolowane poprzez następujący +' zestaw atrybutów. Zmień wartości tych atrybutów, aby zmodyfikować informacje +' powiązane z zestawem. + +' Sprawdź wartości atrybutów zestawu + + + + + + + + + + +'Następujący identyfikator GUID jest identyfikatorem elementu typelib w przypadku udostępnienia tego projektu w modelu COM + + +' Informacje o wersji zestawu zawierają następujące cztery wartości: +' +' Wersja główna +' Wersja pomocnicza +' Numer kompilacji +' Poprawka +' +' Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki +' przy użyciu symbolu „*”, tak jak pokazano poniżej: +' + + + diff --git a/WindowsApp1/My Project/Resources.Designer.vb b/WindowsApp1/My Project/Resources.Designer.vb new file mode 100644 index 0000000..46a9dd1 --- /dev/null +++ b/WindowsApp1/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +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. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + 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("WindowsApp1.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/WindowsApp1/My Project/Resources.resx b/WindowsApp1/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/WindowsApp1/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WindowsApp1/My Project/Settings.Designer.vb b/WindowsApp1/My Project/Settings.Designer.vb new file mode 100644 index 0000000..5a65e0e --- /dev/null +++ b/WindowsApp1/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + 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 + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal 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 + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.WindowsApp1.My.MySettings + Get + Return Global.WindowsApp1.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/WindowsApp1/My Project/Settings.settings b/WindowsApp1/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/WindowsApp1/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/WindowsApp1/WindowsApp1.vbproj b/WindowsApp1/WindowsApp1.vbproj new file mode 100644 index 0000000..3c8fa4c --- /dev/null +++ b/WindowsApp1/WindowsApp1.vbproj @@ -0,0 +1,133 @@ + + + + + Debug + AnyCPU + {9D06FF80-7436-457D-ACA2-1FA428F0AE68} + WinExe + WindowsApp1.My.MyApplication + WindowsApp1 + WindowsApp1 + 512 + WindowsForms + v4.7.2 + true + true + + + AnyCPU + true + full + true + true + bin\Debug\ + WindowsApp1.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + WindowsApp1.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.vb + Form + + + Form2.vb + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + Form1.vb + + + Form2.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/WindowsApp1/card.vb b/WindowsApp1/card.vb new file mode 100644 index 0000000..c5ef6d0 --- /dev/null +++ b/WindowsApp1/card.vb @@ -0,0 +1,5 @@ +Public Class card + Public numer As String + Public pin As String + Public ammound As Integer +End Class