aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-03-23 12:26:51 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-03-23 12:26:51 +0200
commit1d36ce5429cec1dab418203ad34fca4baa75e5a3 (patch)
tree9bc2138ba1676c53fb746c6c3ab83fc227aa5dae
parentf0f2751adc6726045de550aafe0c90eb14fae877 (diff)
downloadSchool-Projects-1d36ce5429cec1dab418203ad34fca4baa75e5a3.tar
School-Projects-1d36ce5429cec1dab418203ad34fca4baa75e5a3.tar.gz
School-Projects-1d36ce5429cec1dab418203ad34fca4baa75e5a3.zip
Added the EnglishNumbers VB.Net project
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers.sln25
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/ApplicationEvents.vb22
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj33
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj.user8
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.Designer.vb112
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.resx60
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.vb34
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.HighDpi.vb69
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.vb38
-rw-r--r--VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.myapp10
10 files changed, 411 insertions, 0 deletions
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers.sln b/VB.Net Projects/EnglishNumbers/EnglishNumbers.sln
new file mode 100644
index 0000000..bef9ff4
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31105.61
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnglishNumbers", "EnglishNumbers\EnglishNumbers.vbproj", "{C4F451BC-0479-4B62-917A-46C2A7A8CC0A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C4F451BC-0479-4B62-917A-46C2A7A8CC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C4F451BC-0479-4B62-917A-46C2A7A8CC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C4F451BC-0479-4B62-917A-46C2A7A8CC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C4F451BC-0479-4B62-917A-46C2A7A8CC0A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BC575B04-D155-4F38-9746-3BAA4C1FD2D3}
+ EndGlobalSection
+EndGlobal
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/ApplicationEvents.vb b/VB.Net Projects/EnglishNumbers/EnglishNumbers/ApplicationEvents.vb
new file mode 100644
index 0000000..b892537
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/ApplicationEvents.vb
@@ -0,0 +1,22 @@
+Imports Microsoft.VisualBasic.ApplicationServices
+
+Namespace My
+ ' The following events are available for MyApplication:
+ ' Startup: Raised when the application starts, before the startup form is created.
+ ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
+ ' UnhandledException: Raised if the application encounters an unhandled exception.
+ ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
+ ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
+
+ ' **NEW** ApplyHighDpiMode: Raised when the application queries the HighDpiMode to set it for the application.
+
+ ' Example:
+
+ ' Private Sub MyApplication_ApplyHighDpiMode(sender As Object, e As ApplyHighDpiModeEventArgs) Handles Me.ApplyHighDpiMode
+ ' e.HighDpiMode = HighDpiMode.PerMonitorV2
+ ' End Sub
+
+ Partial Friend Class MyApplication
+
+ End Class
+End Namespace
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj b/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj
new file mode 100644
index 0000000..68335de
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj
@@ -0,0 +1,33 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>WinExe</OutputType>
+ <TargetFramework>net5.0-windows</TargetFramework>
+ <RootNamespace>EnglishNumbers</RootNamespace>
+ <StartupObject>Sub Main</StartupObject>
+ <UseWindowsForms>true</UseWindowsForms>
+ <MyType>WindowsForms</MyType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Import Include="System.Data" />
+ <Import Include="System.Drawing" />
+ <Import Include="System.Windows.Forms" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Update="My Project\Application.Designer.vb">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Application.myapp</DependentUpon>
+ </Compile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <None Update="My Project\Application.myapp">
+ <Generator>MyApplicationCodeGenerator</Generator>
+ <LastGenOutput>Application.Designer.vb</LastGenOutput>
+ </None>
+ </ItemGroup>
+
+</Project> \ No newline at end of file
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj.user b/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj.user
new file mode 100644
index 0000000..c392cf0
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/EnglishNumbers.vbproj.user
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Compile Update="Form1.vb">
+ <SubType>Form</SubType>
+ </Compile>
+ </ItemGroup>
+</Project>
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.Designer.vb b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.Designer.vb
new file mode 100644
index 0000000..d4d0c8e
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.Designer.vb
@@ -0,0 +1,112 @@
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
+Partial Class Form1
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+ <System.Diagnostics.DebuggerNonUserCode()> _
+ 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
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+ <System.Diagnostics.DebuggerStepThrough()> _
+ Private Sub InitializeComponent()
+ Me.Label1 = New System.Windows.Forms.Label()
+ Me.Label2 = New System.Windows.Forms.Label()
+ Me.lblResult = New System.Windows.Forms.Label()
+ Me.cbNumberNames = New System.Windows.Forms.ComboBox()
+ Me.txtNumberGuess = New System.Windows.Forms.TextBox()
+ Me.btnCheck = New System.Windows.Forms.Button()
+ Me.SuspendLayout()
+ '
+ 'Label1
+ '
+ Me.Label1.AutoSize = True
+ Me.Label1.Location = New System.Drawing.Point(12, 32)
+ Me.Label1.Name = "Label1"
+ Me.Label1.Size = New System.Drawing.Size(146, 15)
+ Me.Label1.TabIndex = 0
+ Me.Label1.Text = "Наименование на число:"
+ '
+ 'Label2
+ '
+ Me.Label2.AutoSize = True
+ Me.Label2.Location = New System.Drawing.Point(12, 64)
+ Me.Label2.Name = "Label2"
+ Me.Label2.Size = New System.Drawing.Size(99, 15)
+ Me.Label2.TabIndex = 1
+ Me.Label2.Text = "Въведено число:"
+ '
+ 'lblResult
+ '
+ Me.lblResult.AutoSize = True
+ Me.lblResult.Location = New System.Drawing.Point(258, 114)
+ Me.lblResult.Name = "lblResult"
+ Me.lblResult.Size = New System.Drawing.Size(27, 15)
+ Me.lblResult.TabIndex = 2
+ Me.lblResult.Text = "ERR"
+ '
+ 'cbNumberNames
+ '
+ Me.cbNumberNames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
+ Me.cbNumberNames.FormattingEnabled = True
+ Me.cbNumberNames.Location = New System.Drawing.Point(172, 29)
+ Me.cbNumberNames.Name = "cbNumberNames"
+ Me.cbNumberNames.Size = New System.Drawing.Size(213, 23)
+ Me.cbNumberNames.TabIndex = 3
+ '
+ 'txtNumberGuess
+ '
+ Me.txtNumberGuess.Location = New System.Drawing.Point(172, 61)
+ Me.txtNumberGuess.Name = "txtNumberGuess"
+ Me.txtNumberGuess.Size = New System.Drawing.Size(213, 23)
+ Me.txtNumberGuess.TabIndex = 4
+ '
+ 'btnCheck
+ '
+ Me.btnCheck.Location = New System.Drawing.Point(12, 110)
+ Me.btnCheck.Name = "btnCheck"
+ Me.btnCheck.Size = New System.Drawing.Size(146, 23)
+ Me.btnCheck.TabIndex = 5
+ Me.btnCheck.Text = "Провери"
+ Me.btnCheck.UseVisualStyleBackColor = True
+ '
+ 'Form1
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(401, 160)
+ Me.Controls.Add(Me.btnCheck)
+ Me.Controls.Add(Me.txtNumberGuess)
+ Me.Controls.Add(Me.cbNumberNames)
+ Me.Controls.Add(Me.lblResult)
+ Me.Controls.Add(Me.Label2)
+ Me.Controls.Add(Me.Label1)
+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "Form1"
+ Me.Text = "English Numbers"
+ Me.ResumeLayout(False)
+ Me.PerformLayout()
+
+ End Sub
+
+ Friend WithEvents Label1 As Label
+ Friend WithEvents Label2 As Label
+ Friend WithEvents lblResult As Label
+ Friend WithEvents cbNumberNames As ComboBox
+ Friend WithEvents txtNumberGuess As TextBox
+ Friend WithEvents btnCheck As Button
+End Class
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.resx b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.resx
new file mode 100644
index 0000000..b5ae26c
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.resx
@@ -0,0 +1,60 @@
+<root>
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.vb b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.vb
new file mode 100644
index 0000000..c967b53
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/Form1.vb
@@ -0,0 +1,34 @@
+Imports System.ComponentModel
+
+Public Class Form1
+ Private ReadOnly numberNames = New BindingList(Of String) From {
+ "Zero",
+ "One",
+ "Two",
+ "Three",
+ "Four",
+ "Five",
+ "Six",
+ "Seven",
+ "Eight",
+ "Nine",
+ "Ten"
+ }
+
+ Private Sub Init() Handles Me.Load
+ cbNumberNames.DataSource = numberNames
+ lblResult.Text = String.Empty
+ End Sub
+
+ Private Sub CheckGuess() Handles btnCheck.Click
+ ' Val makes the String a number by removing all non-number characters,
+ ' but if there are no numbers, it returns 0, which mustn't happen
+ If cbNumberNames.SelectedIndex = Val(txtNumberGuess.Text) And txtNumberGuess.Text.Any(Function(x) Char.IsDigit(x)) Then
+ lblResult.Text = "Вярно!"
+ lblResult.ForeColor = Color.Green
+ Else
+ lblResult.Text = "Грешно!"
+ lblResult.ForeColor = Color.Red
+ End If
+ End Sub
+End Class \ No newline at end of file
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.HighDpi.vb b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.HighDpi.vb
new file mode 100644
index 0000000..a3576c4
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.HighDpi.vb
@@ -0,0 +1,69 @@
+Option Strict On
+Option Explicit On
+
+'This constant indicates whether the Application Framework is in use.
+#Const APPLICATION_FRAMEWORK = True
+
+#If APPLICATION_FRAMEWORK Then
+
+#If NET5_0 And Not NET6_0 Then
+
+Imports System.Collections.ObjectModel
+
+Namespace My
+
+ Partial Friend Class MyApplication
+
+ Public Event ApplyHighDpiMode(sender As Object, e As ApplyHighDpiModeEventArgs)
+
+ Private _highDpiMode As HighDpiMode?
+
+ Friend Shadows Property HighDpiMode As HighDpiMode
+ Get
+ Return If(
+ _highDpiMode Is Nothing,
+ Application.HighDpiMode,
+ _highDpiMode.Value)
+ End Get
+ Set(value As HighDpiMode)
+ _highDpiMode = value
+ End Set
+ End Property
+
+ ' IMPORTANT:
+ ' If this method causes an compilation error after you've unchecked 'Application Framework'
+ ' in the project properties, go to the top of this file and change the value to 'False' in this line:
+ ' #Const APPLICATION_FRAMEWORK = False
+
+ ' For more about using WinForms without the Application Framework
+ ' see: https://aka.ms/visualbasic-appframework-net5
+ Protected Overrides Function OnInitialize(commandLineArgs As ReadOnlyCollection(Of String)) As Boolean
+ Dim eventArgs = New ApplyHighDpiModeEventArgs(
+ If(
+ _highDpiMode Is Nothing,
+ HighDpiMode.SystemAware,
+ _highDpiMode.Value))
+
+ RaiseEvent ApplyHighDpiMode(Me, eventArgs)
+
+ Windows.Forms.Application.SetHighDpiMode(eventArgs.HighDpiMode)
+
+ Return MyBase.OnInitialize(commandLineArgs)
+ End Function
+ End Class
+
+ Public Class ApplyHighDpiModeEventArgs
+ Inherits EventArgs
+
+ Public Sub New(highDpiMode As HighDpiMode)
+ Me.HighDpiMode = highDpiMode
+ End Sub
+
+ Public Property HighDpiMode As HighDpiMode
+
+ End Class
+
+End Namespace
+
+#End If ' #If NET5_0 And Not NET6_0
+#End If ' #If APPLICATION_FRAMEWORK
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.vb b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.vb
new file mode 100644
index 0000000..8b8d4fc
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.Designer.vb
@@ -0,0 +1,38 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' 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.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+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
+
+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()>
+ 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
+
+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()>
+ Protected Overrides Sub OnCreateMainForm()
+ Me.MainForm = Form1
+ End Sub
+ End Class
+End Namespace
diff --git a/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.myapp b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.myapp
new file mode 100644
index 0000000..fbb5858
--- /dev/null
+++ b/VB.Net Projects/EnglishNumbers/EnglishNumbers/My Project/Application.myapp
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <MySubMain>true</MySubMain>
+ <MainForm>Form1</MainForm>
+ <SingleInstance>false</SingleInstance>
+ <ShutdownMode>0</ShutdownMode>
+ <EnableVisualStyles>true</EnableVisualStyles>
+ <AuthenticationMode>0</AuthenticationMode>
+ <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData> \ No newline at end of file