Inital Commit.
This commit is contained in:
commit
f5ee32631d
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
349
.gitignore
vendored
Normal file
349
.gitignore
vendored
Normal file
@ -0,0 +1,349 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
BIN
OCUploadDownloadServer/Icon2.ico
Normal file
BIN
OCUploadDownloadServer/Icon2.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
18
OCUploadDownloadServer/OCUploadDownloadServer.sln
Normal file
18
OCUploadDownloadServer/OCUploadDownloadServer.sln
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
# SharpDevelop 4.4
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OCUploadDownloadServer", "OCUploadDownloadServer\OCUploadDownloadServer.vbproj", "{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
200
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.Designer.vb
generated
Normal file
200
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.Designer.vb
generated
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class AboutBx
|
||||||
|
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
|
||||||
|
|
||||||
|
Friend WithEvents TableLayoutPanel As System.Windows.Forms.TableLayoutPanel
|
||||||
|
Friend WithEvents LabelProductName As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents LabelVersion As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents LabelCompanyName As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents LabelCopyright As System.Windows.Forms.Label
|
||||||
|
|
||||||
|
'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()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AboutBx))
|
||||||
|
Me.TableLayoutPanel = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.LabelProductName = New System.Windows.Forms.Label()
|
||||||
|
Me.LabelVersion = New System.Windows.Forms.Label()
|
||||||
|
Me.LabelCopyright = New System.Windows.Forms.Label()
|
||||||
|
Me.LabelCompanyName = New System.Windows.Forms.Label()
|
||||||
|
Me.OKButton = New System.Windows.Forms.Button()
|
||||||
|
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||||
|
Me.TextBoxDescription = New System.Windows.Forms.TextBox()
|
||||||
|
Me.TableLayoutPanel.SuspendLayout
|
||||||
|
Me.TableLayoutPanel1.SuspendLayout
|
||||||
|
Me.SuspendLayout
|
||||||
|
'
|
||||||
|
'TableLayoutPanel
|
||||||
|
'
|
||||||
|
Me.TableLayoutPanel.ColumnCount = 1
|
||||||
|
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20!))
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.LabelProductName, 0, 0)
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.LabelVersion, 0, 1)
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.LabelCopyright, 0, 2)
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.LabelCompanyName, 0, 3)
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.OKButton, 0, 5)
|
||||||
|
Me.TableLayoutPanel.Controls.Add(Me.TableLayoutPanel1, 0, 4)
|
||||||
|
Me.TableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.TableLayoutPanel.Location = New System.Drawing.Point(9, 9)
|
||||||
|
Me.TableLayoutPanel.Name = "TableLayoutPanel"
|
||||||
|
Me.TableLayoutPanel.RowCount = 6
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10!))
|
||||||
|
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20!))
|
||||||
|
Me.TableLayoutPanel.Size = New System.Drawing.Size(396, 258)
|
||||||
|
Me.TableLayoutPanel.TabIndex = 0
|
||||||
|
'
|
||||||
|
'LabelProductName
|
||||||
|
'
|
||||||
|
Me.LabelProductName.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.LabelProductName.Location = New System.Drawing.Point(6, 0)
|
||||||
|
Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||||
|
Me.LabelProductName.MaximumSize = New System.Drawing.Size(0, 17)
|
||||||
|
Me.LabelProductName.Name = "LabelProductName"
|
||||||
|
Me.LabelProductName.Size = New System.Drawing.Size(387, 17)
|
||||||
|
Me.LabelProductName.TabIndex = 0
|
||||||
|
Me.LabelProductName.Text = "Product Name"
|
||||||
|
Me.LabelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'LabelVersion
|
||||||
|
'
|
||||||
|
Me.LabelVersion.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.LabelVersion.Location = New System.Drawing.Point(6, 25)
|
||||||
|
Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||||
|
Me.LabelVersion.MaximumSize = New System.Drawing.Size(0, 17)
|
||||||
|
Me.LabelVersion.Name = "LabelVersion"
|
||||||
|
Me.LabelVersion.Size = New System.Drawing.Size(387, 17)
|
||||||
|
Me.LabelVersion.TabIndex = 0
|
||||||
|
Me.LabelVersion.Text = "Version"
|
||||||
|
Me.LabelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'LabelCopyright
|
||||||
|
'
|
||||||
|
Me.LabelCopyright.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.LabelCopyright.Location = New System.Drawing.Point(6, 50)
|
||||||
|
Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||||
|
Me.LabelCopyright.MaximumSize = New System.Drawing.Size(0, 17)
|
||||||
|
Me.LabelCopyright.Name = "LabelCopyright"
|
||||||
|
Me.LabelCopyright.Size = New System.Drawing.Size(387, 17)
|
||||||
|
Me.LabelCopyright.TabIndex = 0
|
||||||
|
Me.LabelCopyright.Text = "Copyright"
|
||||||
|
Me.LabelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'LabelCompanyName
|
||||||
|
'
|
||||||
|
Me.LabelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.LabelCompanyName.Location = New System.Drawing.Point(6, 75)
|
||||||
|
Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||||
|
Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(0, 17)
|
||||||
|
Me.LabelCompanyName.Name = "LabelCompanyName"
|
||||||
|
Me.LabelCompanyName.Size = New System.Drawing.Size(387, 17)
|
||||||
|
Me.LabelCompanyName.TabIndex = 0
|
||||||
|
Me.LabelCompanyName.Text = "Company Name"
|
||||||
|
Me.LabelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'OKButton
|
||||||
|
'
|
||||||
|
Me.OKButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
|
Me.OKButton.Location = New System.Drawing.Point(318, 232)
|
||||||
|
Me.OKButton.Name = "OKButton"
|
||||||
|
Me.OKButton.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.OKButton.TabIndex = 0
|
||||||
|
Me.OKButton.Text = "&OK"
|
||||||
|
'
|
||||||
|
'TableLayoutPanel1
|
||||||
|
'
|
||||||
|
Me.TableLayoutPanel1.ColumnCount = 2
|
||||||
|
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||||
|
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||||
|
Me.TableLayoutPanel1.Controls.Add(Me.TextBox1, 0, 0)
|
||||||
|
Me.TableLayoutPanel1.Controls.Add(Me.TextBoxDescription, 0, 0)
|
||||||
|
Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.TableLayoutPanel1.Location = New System.Drawing.Point(3, 103)
|
||||||
|
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||||
|
Me.TableLayoutPanel1.RowCount = 1
|
||||||
|
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 123!))
|
||||||
|
Me.TableLayoutPanel1.Size = New System.Drawing.Size(390, 123)
|
||||||
|
Me.TableLayoutPanel1.TabIndex = 1
|
||||||
|
'
|
||||||
|
'TextBox1
|
||||||
|
'
|
||||||
|
Me.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.TextBox1.Location = New System.Drawing.Point(201, 3)
|
||||||
|
Me.TextBox1.Margin = New System.Windows.Forms.Padding(6, 3, 3, 3)
|
||||||
|
Me.TextBox1.Multiline = true
|
||||||
|
Me.TextBox1.Name = "TextBox1"
|
||||||
|
Me.TextBox1.ReadOnly = true
|
||||||
|
Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||||
|
Me.TextBox1.Size = New System.Drawing.Size(186, 117)
|
||||||
|
Me.TextBox1.TabIndex = 2
|
||||||
|
Me.TextBox1.TabStop = false
|
||||||
|
Me.TextBox1.Text = "License :"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"(At runtime, the labels' text will be replaced with the application'"& _
|
||||||
|
"s assembly information."&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"Customize the application's assembly information in the"& _
|
||||||
|
" Application pane of Project Designer.)"
|
||||||
|
'
|
||||||
|
'TextBoxDescription
|
||||||
|
'
|
||||||
|
Me.TextBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.TextBoxDescription.Location = New System.Drawing.Point(6, 3)
|
||||||
|
Me.TextBoxDescription.Margin = New System.Windows.Forms.Padding(6, 3, 3, 3)
|
||||||
|
Me.TextBoxDescription.Multiline = true
|
||||||
|
Me.TextBoxDescription.Name = "TextBoxDescription"
|
||||||
|
Me.TextBoxDescription.ReadOnly = true
|
||||||
|
Me.TextBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||||
|
Me.TextBoxDescription.Size = New System.Drawing.Size(186, 117)
|
||||||
|
Me.TextBoxDescription.TabIndex = 1
|
||||||
|
Me.TextBoxDescription.TabStop = false
|
||||||
|
Me.TextBoxDescription.Text = resources.GetString("TextBoxDescription.Text")
|
||||||
|
'
|
||||||
|
'AboutBx
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.CancelButton = Me.OKButton
|
||||||
|
Me.ClientSize = New System.Drawing.Size(414, 276)
|
||||||
|
Me.Controls.Add(Me.TableLayoutPanel)
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||||
|
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
|
||||||
|
Me.MaximizeBox = false
|
||||||
|
Me.MinimizeBox = false
|
||||||
|
Me.Name = "AboutBx"
|
||||||
|
Me.Padding = New System.Windows.Forms.Padding(9)
|
||||||
|
Me.ShowInTaskbar = false
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||||
|
Me.Text = "AboutBx"
|
||||||
|
Me.TableLayoutPanel.ResumeLayout(false)
|
||||||
|
Me.TableLayoutPanel1.ResumeLayout(false)
|
||||||
|
Me.TableLayoutPanel1.PerformLayout
|
||||||
|
Me.ResumeLayout(false)
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
Friend WithEvents TextBoxDescription As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents OKButton As System.Windows.Forms.Button
|
||||||
|
|
||||||
|
End Class
|
203
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.resx
Normal file
203
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.resx
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<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>
|
||||||
|
<data name="TextBoxDescription.Text" xml:space="preserve">
|
||||||
|
<value>Description :
|
||||||
|
|
||||||
|
(At runtime, the labels' text will be replaced with the application's assembly information.
|
||||||
|
Customize the application's assembly information in the Application pane of Project Designer.)</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////
|
||||||
|
///hfQX73319+7+DfZu/u32bv7t9a7/XfWu/131r39d88+HvfPP/////////////////////////////
|
||||||
|
//////////////////////////////////8=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
36
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.vb
Normal file
36
OCUploadDownloadServer/OCUploadDownloadServer/AboutBx.vb
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
|
||||||
|
Public NotInheritable Class AboutBx
|
||||||
|
Private description As String = ""
|
||||||
|
Private license As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub setupdata(des As String, lic As String)
|
||||||
|
description = des
|
||||||
|
license = lic
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AboutBx_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||||
|
' Set the title of the form.
|
||||||
|
Dim ApplicationTitle As String
|
||||||
|
If My.Application.Info.Title <> "" Then
|
||||||
|
ApplicationTitle = My.Application.Info.Title
|
||||||
|
Else
|
||||||
|
ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
|
||||||
|
End If
|
||||||
|
Me.Text = String.Format("About {0}", ApplicationTitle)
|
||||||
|
' Initialize all of the text displayed on the About Box.
|
||||||
|
' TODO: Customize the application's assembly information in the "Application" pane of the project
|
||||||
|
' properties dialog (under the "Project" menu).
|
||||||
|
Me.LabelProductName.Text = My.Application.Info.ProductName
|
||||||
|
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
|
||||||
|
Me.LabelCopyright.Text = My.Application.Info.Copyright
|
||||||
|
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
|
||||||
|
Me.TextBoxDescription.Text = "Description: " & vbCrLf & My.Application.Info.Description & vbCrLf & vbCrLf & description
|
||||||
|
Me.TextBox1.Text = "License: " & vbCrLf & license
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
End Class
|
392
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.Designer.vb
generated
Normal file
392
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.Designer.vb
generated
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
'
|
||||||
|
' Created by SharpDevelop.
|
||||||
|
' User: Alfred
|
||||||
|
' Date: 15/07/2018
|
||||||
|
' Time: 10:01
|
||||||
|
'
|
||||||
|
' To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
|
'
|
||||||
|
Partial Class MainForm
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Designer variable used to keep track of non-visual components.
|
||||||
|
''' </summary>
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Disposes resources used by the form.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing Then
|
||||||
|
If components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' This method is required for Windows Forms designer support.
|
||||||
|
''' Do not change the method contents inside the source code editor. The Forms designer might
|
||||||
|
''' not be able to load this method if it was changed manually.
|
||||||
|
''' </summary>
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainForm))
|
||||||
|
Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.txtbx = New System.Windows.Forms.TextBox()
|
||||||
|
Me.tableLayoutPanel2 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.lblstat = New System.Windows.Forms.Label()
|
||||||
|
Me.pbstat = New System.Windows.Forms.ProgressBar()
|
||||||
|
Me.butcancel = New System.Windows.Forms.Button()
|
||||||
|
Me.groupBox1 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.tableLayoutPanel3 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.butss = New System.Windows.Forms.Button()
|
||||||
|
Me.dudsa = New System.Windows.Forms.DomainUpDown()
|
||||||
|
Me.label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.label2 = New System.Windows.Forms.Label()
|
||||||
|
Me.txtbxp = New System.Windows.Forms.TextBox()
|
||||||
|
Me.butrs = New System.Windows.Forms.Button()
|
||||||
|
Me.groupBox2 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.tableLayoutPanel4 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.buta = New System.Windows.Forms.Button()
|
||||||
|
Me.butcls = New System.Windows.Forms.Button()
|
||||||
|
Me.butsave = New System.Windows.Forms.Button()
|
||||||
|
Me.butopen = New System.Windows.Forms.Button()
|
||||||
|
Me.txtbxname = New System.Windows.Forms.TextBox()
|
||||||
|
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||||
|
Me.saveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
||||||
|
Me.tableLayoutPanel1.SuspendLayout
|
||||||
|
Me.tableLayoutPanel2.SuspendLayout
|
||||||
|
Me.groupBox1.SuspendLayout
|
||||||
|
Me.tableLayoutPanel3.SuspendLayout
|
||||||
|
Me.groupBox2.SuspendLayout
|
||||||
|
Me.tableLayoutPanel4.SuspendLayout
|
||||||
|
Me.SuspendLayout
|
||||||
|
'
|
||||||
|
'tableLayoutPanel1
|
||||||
|
'
|
||||||
|
Me.tableLayoutPanel1.ColumnCount = 1
|
||||||
|
Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.tableLayoutPanel1.Controls.Add(Me.txtbx, 0, 2)
|
||||||
|
Me.tableLayoutPanel1.Controls.Add(Me.tableLayoutPanel2, 0, 3)
|
||||||
|
Me.tableLayoutPanel1.Controls.Add(Me.groupBox1, 0, 0)
|
||||||
|
Me.tableLayoutPanel1.Controls.Add(Me.groupBox2, 0, 1)
|
||||||
|
Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
|
||||||
|
Me.tableLayoutPanel1.RowCount = 4
|
||||||
|
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15!))
|
||||||
|
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15!))
|
||||||
|
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70!))
|
||||||
|
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30!))
|
||||||
|
Me.tableLayoutPanel1.Size = New System.Drawing.Size(584, 361)
|
||||||
|
Me.tableLayoutPanel1.TabIndex = 0
|
||||||
|
'
|
||||||
|
'txtbx
|
||||||
|
'
|
||||||
|
Me.txtbx.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.txtbx.Font = New System.Drawing.Font("Consolas", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.txtbx.Location = New System.Drawing.Point(3, 101)
|
||||||
|
Me.txtbx.MaxLength = 65535
|
||||||
|
Me.txtbx.Multiline = true
|
||||||
|
Me.txtbx.Name = "txtbx"
|
||||||
|
Me.txtbx.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||||
|
Me.txtbx.Size = New System.Drawing.Size(578, 225)
|
||||||
|
Me.txtbx.TabIndex = 0
|
||||||
|
Me.txtbx.WordWrap = false
|
||||||
|
AddHandler Me.txtbx.KeyDown, AddressOf Me.Txtbx_KeyDown
|
||||||
|
'
|
||||||
|
'tableLayoutPanel2
|
||||||
|
'
|
||||||
|
Me.tableLayoutPanel2.ColumnCount = 3
|
||||||
|
Me.tableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||||
|
Me.tableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||||
|
Me.tableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40!))
|
||||||
|
Me.tableLayoutPanel2.Controls.Add(Me.lblstat, 0, 0)
|
||||||
|
Me.tableLayoutPanel2.Controls.Add(Me.pbstat, 1, 0)
|
||||||
|
Me.tableLayoutPanel2.Controls.Add(Me.butcancel, 2, 0)
|
||||||
|
Me.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.tableLayoutPanel2.Location = New System.Drawing.Point(3, 332)
|
||||||
|
Me.tableLayoutPanel2.Name = "tableLayoutPanel2"
|
||||||
|
Me.tableLayoutPanel2.RowCount = 1
|
||||||
|
Me.tableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.tableLayoutPanel2.Size = New System.Drawing.Size(578, 26)
|
||||||
|
Me.tableLayoutPanel2.TabIndex = 1
|
||||||
|
'
|
||||||
|
'lblstat
|
||||||
|
'
|
||||||
|
Me.lblstat.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.lblstat.Location = New System.Drawing.Point(3, 0)
|
||||||
|
Me.lblstat.Name = "lblstat"
|
||||||
|
Me.lblstat.Size = New System.Drawing.Size(263, 26)
|
||||||
|
Me.lblstat.TabIndex = 0
|
||||||
|
Me.lblstat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'pbstat
|
||||||
|
'
|
||||||
|
Me.pbstat.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.pbstat.Location = New System.Drawing.Point(272, 3)
|
||||||
|
Me.pbstat.Name = "pbstat"
|
||||||
|
Me.pbstat.Size = New System.Drawing.Size(263, 20)
|
||||||
|
Me.pbstat.Style = System.Windows.Forms.ProgressBarStyle.Continuous
|
||||||
|
Me.pbstat.TabIndex = 1
|
||||||
|
'
|
||||||
|
'butcancel
|
||||||
|
'
|
||||||
|
Me.butcancel.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butcancel.Enabled = false
|
||||||
|
Me.butcancel.Location = New System.Drawing.Point(541, 3)
|
||||||
|
Me.butcancel.Name = "butcancel"
|
||||||
|
Me.butcancel.Size = New System.Drawing.Size(34, 20)
|
||||||
|
Me.butcancel.TabIndex = 2
|
||||||
|
Me.butcancel.Text = "X"
|
||||||
|
Me.butcancel.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butcancel.Click, AddressOf Me.Butcancel_Click
|
||||||
|
'
|
||||||
|
'groupBox1
|
||||||
|
'
|
||||||
|
Me.groupBox1.Controls.Add(Me.tableLayoutPanel3)
|
||||||
|
Me.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.groupBox1.Location = New System.Drawing.Point(3, 3)
|
||||||
|
Me.groupBox1.Name = "groupBox1"
|
||||||
|
Me.groupBox1.Size = New System.Drawing.Size(578, 43)
|
||||||
|
Me.groupBox1.TabIndex = 2
|
||||||
|
Me.groupBox1.TabStop = false
|
||||||
|
Me.groupBox1.Text = "Server Stats"
|
||||||
|
'
|
||||||
|
'tableLayoutPanel3
|
||||||
|
'
|
||||||
|
Me.tableLayoutPanel3.ColumnCount = 6
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66528!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66695!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66695!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66695!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66695!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66695!))
|
||||||
|
Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20!))
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.butss, 5, 0)
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.dudsa, 1, 0)
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.label1, 0, 0)
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.label2, 2, 0)
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.txtbxp, 3, 0)
|
||||||
|
Me.tableLayoutPanel3.Controls.Add(Me.butrs, 4, 0)
|
||||||
|
Me.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.tableLayoutPanel3.Location = New System.Drawing.Point(3, 16)
|
||||||
|
Me.tableLayoutPanel3.Name = "tableLayoutPanel3"
|
||||||
|
Me.tableLayoutPanel3.RowCount = 1
|
||||||
|
Me.tableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.tableLayoutPanel3.Size = New System.Drawing.Size(572, 24)
|
||||||
|
Me.tableLayoutPanel3.TabIndex = 0
|
||||||
|
'
|
||||||
|
'butss
|
||||||
|
'
|
||||||
|
Me.butss.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butss.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.butss.Location = New System.Drawing.Point(478, 3)
|
||||||
|
Me.butss.Name = "butss"
|
||||||
|
Me.butss.Size = New System.Drawing.Size(91, 18)
|
||||||
|
Me.butss.TabIndex = 6
|
||||||
|
Me.butss.Text = "Stop Server"
|
||||||
|
Me.butss.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butss.Click, AddressOf Me.Butss_Click
|
||||||
|
'
|
||||||
|
'dudsa
|
||||||
|
'
|
||||||
|
Me.dudsa.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.dudsa.Location = New System.Drawing.Point(98, 3)
|
||||||
|
Me.dudsa.Name = "dudsa"
|
||||||
|
Me.dudsa.ReadOnly = true
|
||||||
|
Me.dudsa.Size = New System.Drawing.Size(89, 20)
|
||||||
|
Me.dudsa.TabIndex = 1
|
||||||
|
'
|
||||||
|
'label1
|
||||||
|
'
|
||||||
|
Me.label1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.label1.Location = New System.Drawing.Point(3, 0)
|
||||||
|
Me.label1.Name = "label1"
|
||||||
|
Me.label1.Size = New System.Drawing.Size(89, 24)
|
||||||
|
Me.label1.TabIndex = 2
|
||||||
|
Me.label1.Text = "Server Adress(es):"
|
||||||
|
Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'label2
|
||||||
|
'
|
||||||
|
Me.label2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.label2.Location = New System.Drawing.Point(193, 0)
|
||||||
|
Me.label2.Name = "label2"
|
||||||
|
Me.label2.Size = New System.Drawing.Size(89, 24)
|
||||||
|
Me.label2.TabIndex = 3
|
||||||
|
Me.label2.Text = "Server Port:"
|
||||||
|
Me.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'txtbxp
|
||||||
|
'
|
||||||
|
Me.txtbxp.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtbxp.Location = New System.Drawing.Point(288, 3)
|
||||||
|
Me.txtbxp.Name = "txtbxp"
|
||||||
|
Me.txtbxp.ReadOnly = true
|
||||||
|
Me.txtbxp.Size = New System.Drawing.Size(89, 20)
|
||||||
|
Me.txtbxp.TabIndex = 4
|
||||||
|
'
|
||||||
|
'butrs
|
||||||
|
'
|
||||||
|
Me.butrs.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butrs.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.butrs.Location = New System.Drawing.Point(383, 3)
|
||||||
|
Me.butrs.Name = "butrs"
|
||||||
|
Me.butrs.Size = New System.Drawing.Size(89, 18)
|
||||||
|
Me.butrs.TabIndex = 5
|
||||||
|
Me.butrs.Text = "Reset Server"
|
||||||
|
Me.butrs.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butrs.Click, AddressOf Me.Butrs_Click
|
||||||
|
'
|
||||||
|
'groupBox2
|
||||||
|
'
|
||||||
|
Me.groupBox2.Controls.Add(Me.tableLayoutPanel4)
|
||||||
|
Me.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.groupBox2.Location = New System.Drawing.Point(3, 52)
|
||||||
|
Me.groupBox2.Name = "groupBox2"
|
||||||
|
Me.groupBox2.Size = New System.Drawing.Size(578, 43)
|
||||||
|
Me.groupBox2.TabIndex = 3
|
||||||
|
Me.groupBox2.TabStop = false
|
||||||
|
Me.groupBox2.Text = "Program Management"
|
||||||
|
'
|
||||||
|
'tableLayoutPanel4
|
||||||
|
'
|
||||||
|
Me.tableLayoutPanel4.ColumnCount = 5
|
||||||
|
Me.tableLayoutPanel4.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45.09804!))
|
||||||
|
Me.tableLayoutPanel4.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.72549!))
|
||||||
|
Me.tableLayoutPanel4.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.72549!))
|
||||||
|
Me.tableLayoutPanel4.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.72549!))
|
||||||
|
Me.tableLayoutPanel4.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.72549!))
|
||||||
|
Me.tableLayoutPanel4.Controls.Add(Me.buta, 4, 0)
|
||||||
|
Me.tableLayoutPanel4.Controls.Add(Me.butcls, 3, 0)
|
||||||
|
Me.tableLayoutPanel4.Controls.Add(Me.butsave, 2, 0)
|
||||||
|
Me.tableLayoutPanel4.Controls.Add(Me.butopen, 1, 0)
|
||||||
|
Me.tableLayoutPanel4.Controls.Add(Me.txtbxname, 0, 0)
|
||||||
|
Me.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.tableLayoutPanel4.Location = New System.Drawing.Point(3, 16)
|
||||||
|
Me.tableLayoutPanel4.Name = "tableLayoutPanel4"
|
||||||
|
Me.tableLayoutPanel4.RowCount = 1
|
||||||
|
Me.tableLayoutPanel4.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100!))
|
||||||
|
Me.tableLayoutPanel4.Size = New System.Drawing.Size(572, 24)
|
||||||
|
Me.tableLayoutPanel4.TabIndex = 0
|
||||||
|
'
|
||||||
|
'buta
|
||||||
|
'
|
||||||
|
Me.buta.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.buta.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.buta.Location = New System.Drawing.Point(494, 3)
|
||||||
|
Me.buta.Name = "buta"
|
||||||
|
Me.buta.Size = New System.Drawing.Size(75, 18)
|
||||||
|
Me.buta.TabIndex = 9
|
||||||
|
Me.buta.Text = "About"
|
||||||
|
Me.buta.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.buta.Click, AddressOf Me.Buta_Click
|
||||||
|
'
|
||||||
|
'butcls
|
||||||
|
'
|
||||||
|
Me.butcls.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butcls.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.butcls.Location = New System.Drawing.Point(416, 3)
|
||||||
|
Me.butcls.Name = "butcls"
|
||||||
|
Me.butcls.Size = New System.Drawing.Size(72, 18)
|
||||||
|
Me.butcls.TabIndex = 8
|
||||||
|
Me.butcls.Text = "Clear"
|
||||||
|
Me.butcls.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butcls.Click, AddressOf Me.Butcls_Click
|
||||||
|
'
|
||||||
|
'butsave
|
||||||
|
'
|
||||||
|
Me.butsave.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butsave.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.butsave.Location = New System.Drawing.Point(338, 3)
|
||||||
|
Me.butsave.Name = "butsave"
|
||||||
|
Me.butsave.Size = New System.Drawing.Size(72, 18)
|
||||||
|
Me.butsave.TabIndex = 7
|
||||||
|
Me.butsave.Text = "Save"
|
||||||
|
Me.butsave.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butsave.Click, AddressOf Me.Butsave_Click
|
||||||
|
'
|
||||||
|
'butopen
|
||||||
|
'
|
||||||
|
Me.butopen.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.butopen.Font = New System.Drawing.Font("Microsoft Sans Serif", 6!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.butopen.Location = New System.Drawing.Point(260, 3)
|
||||||
|
Me.butopen.Name = "butopen"
|
||||||
|
Me.butopen.Size = New System.Drawing.Size(72, 18)
|
||||||
|
Me.butopen.TabIndex = 6
|
||||||
|
Me.butopen.Text = "Open"
|
||||||
|
Me.butopen.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butopen.Click, AddressOf Me.Butopen_Click
|
||||||
|
'
|
||||||
|
'txtbxname
|
||||||
|
'
|
||||||
|
Me.txtbxname.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.txtbxname.Font = New System.Drawing.Font("Consolas", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.txtbxname.Location = New System.Drawing.Point(3, 3)
|
||||||
|
Me.txtbxname.Name = "txtbxname"
|
||||||
|
Me.txtbxname.Size = New System.Drawing.Size(251, 20)
|
||||||
|
Me.txtbxname.TabIndex = 0
|
||||||
|
Me.txtbxname.WordWrap = false
|
||||||
|
'
|
||||||
|
'OpenFileDialog1
|
||||||
|
'
|
||||||
|
Me.OpenFileDialog1.Filter = "All Files (*.*)|*.*"
|
||||||
|
'
|
||||||
|
'saveFileDialog1
|
||||||
|
'
|
||||||
|
Me.saveFileDialog1.Filter = "All Files (*.*)|*.*"
|
||||||
|
'
|
||||||
|
'MainForm
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(584, 361)
|
||||||
|
Me.Controls.Add(Me.tableLayoutPanel1)
|
||||||
|
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
|
||||||
|
Me.MinimumSize = New System.Drawing.Size(600, 400)
|
||||||
|
Me.Name = "MainForm"
|
||||||
|
Me.Text = "OC Upload Download File Server"
|
||||||
|
AddHandler FormClosing, AddressOf Me.MainForm_FormClosing
|
||||||
|
AddHandler FormClosed, AddressOf Me.MainForm_FormClosed
|
||||||
|
AddHandler Load, AddressOf Me.MainForm_Load
|
||||||
|
AddHandler Shown, AddressOf Me.MainForm_Shown
|
||||||
|
Me.tableLayoutPanel1.ResumeLayout(false)
|
||||||
|
Me.tableLayoutPanel1.PerformLayout
|
||||||
|
Me.tableLayoutPanel2.ResumeLayout(false)
|
||||||
|
Me.groupBox1.ResumeLayout(false)
|
||||||
|
Me.tableLayoutPanel3.ResumeLayout(false)
|
||||||
|
Me.tableLayoutPanel3.PerformLayout
|
||||||
|
Me.groupBox2.ResumeLayout(false)
|
||||||
|
Me.tableLayoutPanel4.ResumeLayout(false)
|
||||||
|
Me.tableLayoutPanel4.PerformLayout
|
||||||
|
Me.ResumeLayout(false)
|
||||||
|
End Sub
|
||||||
|
Private buta As System.Windows.Forms.Button
|
||||||
|
Private saveFileDialog1 As System.Windows.Forms.SaveFileDialog
|
||||||
|
Private OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
|
||||||
|
Private butopen As System.Windows.Forms.Button
|
||||||
|
Private butsave As System.Windows.Forms.Button
|
||||||
|
Private butcls As System.Windows.Forms.Button
|
||||||
|
Private butrs As System.Windows.Forms.Button
|
||||||
|
Private butss As System.Windows.Forms.Button
|
||||||
|
Private txtbxp As System.Windows.Forms.TextBox
|
||||||
|
Private label2 As System.Windows.Forms.Label
|
||||||
|
Private dudsa As System.Windows.Forms.DomainUpDown
|
||||||
|
Private label1 As System.Windows.Forms.Label
|
||||||
|
Private txtbxname As System.Windows.Forms.TextBox
|
||||||
|
Private tableLayoutPanel4 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
Private tableLayoutPanel3 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
Private groupBox2 As System.Windows.Forms.GroupBox
|
||||||
|
Private groupBox1 As System.Windows.Forms.GroupBox
|
||||||
|
Private butcancel As System.Windows.Forms.Button
|
||||||
|
Private pbstat As System.Windows.Forms.ProgressBar
|
||||||
|
Private lblstat As System.Windows.Forms.Label
|
||||||
|
Private tableLayoutPanel2 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
Private txtbx As System.Windows.Forms.TextBox
|
||||||
|
Private tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
End Class
|
203
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.resx
Normal file
203
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.resx
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<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>
|
||||||
|
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>153, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////
|
||||||
|
///hfQX73319+7+DfZu/u32bv7t9a7/XfWu/131r39d88+HvfPP/////////////////////////////
|
||||||
|
//////////////////////////////////8=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
795
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.vb
Normal file
795
OCUploadDownloadServer/OCUploadDownloadServer/MainForm.vb
Normal file
@ -0,0 +1,795 @@
|
|||||||
|
Imports System.Net.Sockets
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Threading
|
||||||
|
Imports System.IO
|
||||||
|
Imports OCUploadDownloadServer
|
||||||
|
|
||||||
|
'
|
||||||
|
' Created by SharpDevelop.
|
||||||
|
' User: Alfred
|
||||||
|
' Date: 15/07/2018
|
||||||
|
' Time: 10:01
|
||||||
|
'
|
||||||
|
' To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
|
'
|
||||||
|
Public Partial Class MainForm
|
||||||
|
|
||||||
|
Public sock As socket = Nothing
|
||||||
|
Public client_sock As Socket = Nothing
|
||||||
|
Public l_thread As Thread = Nothing
|
||||||
|
Public s_thread As Thread = Nothing
|
||||||
|
Public r_thread As Thread = Nothing
|
||||||
|
Public c_thread As Thread = Nothing
|
||||||
|
Public u_thread As Thread = Nothing
|
||||||
|
Public r_q As New Queue(Of Byte())
|
||||||
|
Public s_q As New Queue(Of Byte())
|
||||||
|
Public u_q As New Queue(Of [Delegate])
|
||||||
|
Protected vupslockobj As New Object()
|
||||||
|
Public exec As Boolean = False
|
||||||
|
Public m As Mode = Mode.None
|
||||||
|
Public stage As Integer = 0
|
||||||
|
Public filepath As String = ""
|
||||||
|
Public canc As Boolean = False
|
||||||
|
Public safe As Boolean = True
|
||||||
|
Public runf As Boolean = False
|
||||||
|
Public lic As String = ""
|
||||||
|
Public dis As String = ""
|
||||||
|
Public dir As String = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)
|
||||||
|
Public Sub New()
|
||||||
|
' The Me.InitializeComponent call is required for Windows Forms designer support.
|
||||||
|
Me.InitializeComponent()
|
||||||
|
|
||||||
|
'
|
||||||
|
' TODO : Add constructor code after InitializeComponents
|
||||||
|
'
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub MainForm_Load(sender As Object, e As EventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
contrvis(False)
|
||||||
|
try
|
||||||
|
If File.Exists(dir & "\license.txt") Then
|
||||||
|
lic = File.ReadAllText(dir & "\license.txt")
|
||||||
|
End If
|
||||||
|
Catch ex As IOException
|
||||||
|
lic = ""
|
||||||
|
End Try
|
||||||
|
try
|
||||||
|
If File.Exists(dir & "\description.txt") Then
|
||||||
|
dis = File.ReadAllText(dir & "\description.txt")
|
||||||
|
End If
|
||||||
|
Catch ex As IOException
|
||||||
|
dis = ""
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub MainForm_Shown(sender As Object, e As EventArgs)
|
||||||
|
Dim f As New Setup()
|
||||||
|
f.ShowDialog(Me)
|
||||||
|
If f.DialogResult = DialogResult.Cancel Then
|
||||||
|
End
|
||||||
|
Else
|
||||||
|
exec = True
|
||||||
|
End If
|
||||||
|
sock = New Socket(f.selected_interface.AddressFamily,SocketType.Stream, ProtocolType.Tcp)
|
||||||
|
sock.NoDelay = Not f.delay
|
||||||
|
sock.ReceiveBufferSize = Int16.MaxValue
|
||||||
|
sock.SendBufferSize = Int16.MaxValue
|
||||||
|
sock.Bind(New IPEndPoint(f.selected_interface, f.port))
|
||||||
|
l_thread = New Thread(New ThreadStart(AddressOf Listener))
|
||||||
|
c_thread = New Thread(New ThreadStart(AddressOf Runner))
|
||||||
|
u_thread = New Thread(New ThreadStart(AddressOf visupdater))
|
||||||
|
l_thread.IsBackground = True
|
||||||
|
c_thread.IsBackground = True
|
||||||
|
u_thread.IsBackground = True
|
||||||
|
dudsa.Items.Add(f.selected_interface.ToString)
|
||||||
|
If f.selected_interface.ToString = IPAddress.Any.ToString Then
|
||||||
|
For Each ip As IPAddress In f.getNetworkAdapterIPsAndNames().Values
|
||||||
|
dudsa.Items.Add(ip.ToString)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
dudsa.SelectedIndex = 0
|
||||||
|
txtbxp.Text = f.port.ToString
|
||||||
|
If Not f.IsDisposed And Not f.Disposing Then
|
||||||
|
f.Dispose()
|
||||||
|
f = Nothing
|
||||||
|
End If
|
||||||
|
runf = True
|
||||||
|
u_thread.Start()
|
||||||
|
c_thread.Start()
|
||||||
|
l_thread.Start()
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Listener
|
||||||
|
sock.Listen(1)
|
||||||
|
While exec
|
||||||
|
Try
|
||||||
|
client_sock = sock.Accept()
|
||||||
|
client_sock.NoDelay = sock.NoDelay
|
||||||
|
client_sock.ReceiveBufferSize = sock.ReceiveBufferSize
|
||||||
|
client_sock.SendBufferSize = sock.SendBufferSize
|
||||||
|
client_sock.ReceiveTimeout = 5000
|
||||||
|
client_sock.SendTimeout = 5000
|
||||||
|
If SocketConnected(client_sock) Then
|
||||||
|
r_thread = New Thread(New ThreadStart(AddressOf Receiver))
|
||||||
|
s_thread = New Thread(New Threadstart(AddressOf Sender))
|
||||||
|
r_thread.IsBackground = True
|
||||||
|
s_thread.IsBackground = True
|
||||||
|
End If
|
||||||
|
If SocketConnected(client_sock) Then
|
||||||
|
r_thread.Start()
|
||||||
|
s_thread.Start()
|
||||||
|
Else
|
||||||
|
r_thread = Nothing
|
||||||
|
s_thread = Nothing
|
||||||
|
End If
|
||||||
|
While SocketConnected(client_sock)
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock.Close()
|
||||||
|
client_sock = Nothing
|
||||||
|
If Not r_thread Is Nothing Then
|
||||||
|
While r_thread.IsAlive
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
If Not s_thread Is Nothing Then
|
||||||
|
While s_thread.IsAlive
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
Catch ex As ThreadAbortException
|
||||||
|
Try
|
||||||
|
If Not client_sock Is Nothing Then
|
||||||
|
If SocketConnected(client_sock) Then
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
End If
|
||||||
|
client_sock.Close()
|
||||||
|
client_sock = Nothing
|
||||||
|
End If
|
||||||
|
Catch ex2 As SocketException
|
||||||
|
client_sock = Nothing
|
||||||
|
End Try
|
||||||
|
Catch ex As SocketException
|
||||||
|
client_sock = Nothing
|
||||||
|
End Try
|
||||||
|
End While
|
||||||
|
sock.Shutdown(SocketShutdown.Both)
|
||||||
|
sock.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Receiver
|
||||||
|
Try
|
||||||
|
While Not client_sock Is Nothing
|
||||||
|
Try
|
||||||
|
If client_sock.Available > 0 Then
|
||||||
|
Dim bound As Integer = client_sock.Available
|
||||||
|
Dim recbyte(bound - 1) As Byte
|
||||||
|
client_sock.Receive(recbyte, bound, SocketFlags.None)
|
||||||
|
r_q.Enqueue(recbyte)
|
||||||
|
End If
|
||||||
|
'Dim recbyte(client_sock.ReceiveBufferSize - 1) As Byte
|
||||||
|
'client_sock.Receive(recbyte)
|
||||||
|
'r_q.Enqueue(removetrailer(recbyte))
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function removetrailer(bts As Byte()) As Byte()
|
||||||
|
Dim ret As New List(Of Byte)
|
||||||
|
For i = 0 To bts.Length - 1 Step 1
|
||||||
|
If bts(i) <> 0 Then
|
||||||
|
ret.Add(bts(i))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return ret.ToArray
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub Sender
|
||||||
|
Try
|
||||||
|
While Not client_sock Is Nothing
|
||||||
|
Try
|
||||||
|
While s_q.Count > 0
|
||||||
|
client_sock.Send(s_q.Dequeue())
|
||||||
|
End While
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Runner
|
||||||
|
setSafe()
|
||||||
|
While exec And runf
|
||||||
|
If m = Mode.Open Then
|
||||||
|
contrvis(False)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Opening...")
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Marquee)
|
||||||
|
If File.Exists(filepath) Then
|
||||||
|
Me.Invoke(Sub() txtbxname.Text = Path.GetFileName(filepath))
|
||||||
|
Me.Invoke(Sub() txtbxname.DeselectAll())
|
||||||
|
unsetSafe()
|
||||||
|
setCancel()
|
||||||
|
Dim data As String = File.ReadAllText(filepath)
|
||||||
|
unsetCancel()
|
||||||
|
setSafe()
|
||||||
|
Me.Invoke(Sub() txtbx.Text = data)
|
||||||
|
Me.Invoke(Sub() txtbx.DeselectAll())
|
||||||
|
End If
|
||||||
|
filepath = ""
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Continuous)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "")
|
||||||
|
contrvis(True)
|
||||||
|
m = Mode.None
|
||||||
|
ElseIf m = Mode.Save Then
|
||||||
|
contrvis(False)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Saving...")
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Marquee)
|
||||||
|
unsetSafe()
|
||||||
|
setCancel()
|
||||||
|
File.WriteAllText(filepath, txtbx.Text)
|
||||||
|
unsetCancel()
|
||||||
|
setSafe()
|
||||||
|
filepath = ""
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Continuous)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "")
|
||||||
|
contrvis(True)
|
||||||
|
m = Mode.None
|
||||||
|
ElseIf m = Mode.Clear Then
|
||||||
|
contrvis(False)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Clearing...")
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Marquee)
|
||||||
|
Me.Invoke(Sub() txtbxname.Text = "")
|
||||||
|
Me.Invoke(Sub() txtbxname.DeselectAll())
|
||||||
|
Me.Invoke(Sub() txtbx.Text = "")
|
||||||
|
Me.Invoke(Sub() txtbx.DeselectAll())
|
||||||
|
Me.Invoke(Sub() pbstat.Style = ProgressBarStyle.Continuous)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "")
|
||||||
|
contrvis(True)
|
||||||
|
m = Mode.None
|
||||||
|
ElseIf m = Mode.Upload Then
|
||||||
|
contrvis(False)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Receiving...")
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Receiving : Sending Handshake...")
|
||||||
|
setCancel()
|
||||||
|
stage = 1
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
sendHandshake("0".ToCharArray()(0))
|
||||||
|
GoTo fu
|
||||||
|
Else
|
||||||
|
sendHandshake("1".ToCharArray()(0))
|
||||||
|
End If
|
||||||
|
Me.Invoke(Sub() pbstat.Value = CType(1*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Receiving : Waiting For Data...")
|
||||||
|
stage = 2
|
||||||
|
While r_q.Count = 0 And SocketConnected(client_sock) And Not canc
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fu
|
||||||
|
End If
|
||||||
|
If Not SocketConnected(client_sock) Then
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fu
|
||||||
|
End If
|
||||||
|
unsetCancel()
|
||||||
|
Me.Invoke(Sub() pbstat.Value = CType(2*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Receiving : Processing Data...")
|
||||||
|
stage = 3
|
||||||
|
Dim bts As Byte() = r_q.Dequeue()
|
||||||
|
Dim str As String = System.Text.Encoding.ASCII.GetString(bts)
|
||||||
|
If str.Contains(ControlChars.Cr) And Not str.Contains(ControlChars.Lf) Then
|
||||||
|
str = str.Replace(ControlChars.Cr, ControlChars.CrLf)
|
||||||
|
End If
|
||||||
|
If str.Contains(ControlChars.Lf) And Not str.Contains(ControlChars.Cr) Then
|
||||||
|
str = str.Replace(ControlChars.Lf, ControlChars.CrLf)
|
||||||
|
End If
|
||||||
|
Me.Invoke(Sub() txtbxname.Text = "")
|
||||||
|
Me.Invoke(Sub() txtbxname.DeselectAll())
|
||||||
|
Me.Invoke(Sub() txtbx.Text = str)
|
||||||
|
Me.Invoke(Sub() txtbx.DeselectAll())
|
||||||
|
Me.Invoke(Sub() pbstat.Value = CType(3*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Receiving : Sending Handshake...")
|
||||||
|
setCancel()
|
||||||
|
stage = 4
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
sendHandshake("0".ToCharArray()(0))
|
||||||
|
Else
|
||||||
|
sendHandshake("1".ToCharArray()(0))
|
||||||
|
End If
|
||||||
|
fu:
|
||||||
|
unsetCancel()
|
||||||
|
stage = 0
|
||||||
|
Me.Invoke(Sub() pbstat.Value = 0)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "")
|
||||||
|
contrvis(True)
|
||||||
|
m = Mode.None
|
||||||
|
ElseIf m = Mode.Download Then
|
||||||
|
contrvis(False)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Sending...")
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Sending : Sending Handshake...")
|
||||||
|
setCancel()
|
||||||
|
stage = 1
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
sendHandshake("0".ToCharArray()(0))
|
||||||
|
GoTo fd
|
||||||
|
Else
|
||||||
|
sendHandshake("1".ToCharArray()(0))
|
||||||
|
End If
|
||||||
|
Me.Invoke(Sub() pbstat.Value = ctype(1*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Sending : Waiting For Handshake...")
|
||||||
|
stage = 2
|
||||||
|
While r_q.Count = 0 And SocketConnected(client_sock) And Not canc
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
If Not SocketConnected(client_sock) Then
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
If getHandshake("0".ToCharArray()(0)) Then
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
Me.Invoke(Sub() pbstat.Value = ctype(2*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Sending : Sending Data...")
|
||||||
|
stage = 3
|
||||||
|
If Not canc Then
|
||||||
|
Dim bts As Byte() = System.Text.Encoding.ASCII.GetBytes(txtbx.Text)
|
||||||
|
s_q.Enqueue(bts)
|
||||||
|
End If
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
Me.Invoke(Sub() pbstat.Value = ctype(3*(100/3), integer))
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "Sending : Waiting For Handshake...")
|
||||||
|
stage = 4
|
||||||
|
While r_q.Count = 0 And SocketConnected(client_sock) And canc
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
If canc Then
|
||||||
|
canc = False
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
If Not SocketConnected(client_sock) Then
|
||||||
|
s_q.Clear()
|
||||||
|
r_q.Clear()
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
If getHandshake("0".ToCharArray()(0)) Then
|
||||||
|
GoTo fd
|
||||||
|
End If
|
||||||
|
fd:
|
||||||
|
unsetCancel()
|
||||||
|
stage = 0
|
||||||
|
Me.Invoke(Sub() pbstat.Value = 0)
|
||||||
|
Me.Invoke(Sub() lblstat.Text = "")
|
||||||
|
contrvis(True)
|
||||||
|
m = Mode.None
|
||||||
|
Else
|
||||||
|
While r_q.Count > 0
|
||||||
|
Dim cb As Byte() = r_q.Dequeue()
|
||||||
|
If cb.Length > 0 Then
|
||||||
|
If cb(0) = 0 Then
|
||||||
|
If Not client_sock Is Nothing Then
|
||||||
|
If Not SocketConnected(client_sock) Then
|
||||||
|
Try
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
client_sock.Close()
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
client_sock = Nothing
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf System.Text.Encoding.ASCII.GetString(cb) = "1" Then
|
||||||
|
If m = Mode.None Then m = Mode.Download
|
||||||
|
ElseIf System.Text.Encoding.ASCII.GetString(cb) = "2" Then
|
||||||
|
If m = Mode.None Then m = Mode.Upload
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butopen_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False)
|
||||||
|
OpenFileDialog1.FileName = txtbxname.Text
|
||||||
|
Dim res As DialogResult = OpenFileDialog1.ShowDialog()
|
||||||
|
If res = DialogResult.OK Then
|
||||||
|
If m = Mode.None Then
|
||||||
|
filepath = OpenFileDialog1.FileName
|
||||||
|
m = Mode.Open
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butsave_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False)
|
||||||
|
SaveFileDialog1.FileName = txtbxname.Text
|
||||||
|
Dim res As DialogResult = SaveFileDialog1.ShowDialog()
|
||||||
|
If res = DialogResult.OK Then
|
||||||
|
If m = Mode.None Then
|
||||||
|
filepath = SaveFileDialog1.FileName
|
||||||
|
txtbxname.Text = Path.GetFileName(SaveFileDialog1.FileName)
|
||||||
|
m = Mode.Save
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butcls_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False)
|
||||||
|
If m = Mode.None Then
|
||||||
|
m = Mode.Clear
|
||||||
|
End If
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub MainForm_FormClosing(sender As Object, e As FormClosingEventArgs)
|
||||||
|
contrvis(False, Vism.cancel or Vism.program_management or Vism.server_stats or Vism.state or Vism.textbox)
|
||||||
|
exec = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub MainForm_FormClosed(sender As Object, e As FormClosedEventArgs)
|
||||||
|
threadcls()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function SocketConnected(ByRef s As Socket) As Boolean
|
||||||
|
Dim ret As Boolean = True
|
||||||
|
Try
|
||||||
|
ret = Not (s.Poll(0, SelectMode.SelectRead) And s.Available = 0)
|
||||||
|
Catch ex As ObjectDisposedException
|
||||||
|
ret = False
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
ret = False
|
||||||
|
Catch ex As SocketException
|
||||||
|
ret = False
|
||||||
|
End Try
|
||||||
|
Return ret
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Sub Butss_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False, Vism.cancel or Vism.program_management or Vism.server_stats Or Vism.state or Vism.textbox)
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Txtbx_KeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If (e.KeyCode = Keys.A And e.Control) Then
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
txtbx.SelectAll()
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butrs_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False, Vism.cancel or Vism.program_management or Vism.server_stats or Vism.state Or Vism.textbox)
|
||||||
|
exec = False
|
||||||
|
threadcls()
|
||||||
|
stage = 0
|
||||||
|
pbstat.Value = 0
|
||||||
|
pbstat.Style = ProgressBarStyle.Continuous
|
||||||
|
lblstat.Text = ""
|
||||||
|
m = Mode.None
|
||||||
|
sock = Nothing
|
||||||
|
client_sock = Nothing
|
||||||
|
l_thread = Nothing
|
||||||
|
s_thread = Nothing
|
||||||
|
r_thread = Nothing
|
||||||
|
c_thread = Nothing
|
||||||
|
u_thread = Nothing
|
||||||
|
r_q.Clear()
|
||||||
|
s_q.Clear()
|
||||||
|
dudsa.SelectedIndex = -1
|
||||||
|
dudsa.Items.Clear()
|
||||||
|
txtbx.Text =""
|
||||||
|
txtbxname.Text = ""
|
||||||
|
txtbxp.Text = ""
|
||||||
|
filepath = ""
|
||||||
|
safe = True
|
||||||
|
canc = False
|
||||||
|
Dim f As New Setup()
|
||||||
|
f.ShowDialog()
|
||||||
|
If f.DialogResult = DialogResult.Cancel Then
|
||||||
|
End
|
||||||
|
Else
|
||||||
|
exec = True
|
||||||
|
End If
|
||||||
|
sock = New Socket(f.selected_interface.AddressFamily,SocketType.Stream, ProtocolType.Tcp)
|
||||||
|
sock.NoDelay = Not f.delay
|
||||||
|
sock.ReceiveBufferSize = Int16.MaxValue
|
||||||
|
sock.SendBufferSize = Int16.MaxValue
|
||||||
|
sock.Bind(New IPEndPoint(f.selected_interface, f.port))
|
||||||
|
l_thread = New Thread(New ThreadStart(AddressOf Listener))
|
||||||
|
c_thread = New Thread(New ThreadStart(AddressOf Runner))
|
||||||
|
u_thread = New Thread(New ThreadStart(AddressOf visupdater))
|
||||||
|
l_thread.IsBackground = True
|
||||||
|
c_thread.IsBackground = True
|
||||||
|
u_thread.IsBackground = True
|
||||||
|
dudsa.Items.Add(f.selected_interface.ToString)
|
||||||
|
If f.selected_interface.ToString = IPAddress.Any.ToString Then
|
||||||
|
For Each ip As IPAddress In f.getNetworkAdapterIPsAndNames().Values
|
||||||
|
dudsa.Items.Add(ip.ToString)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
dudsa.SelectedIndex = 0
|
||||||
|
txtbxp.Text = f.port.ToString
|
||||||
|
If Not f.IsDisposed And Not f.Disposing Then
|
||||||
|
f.Dispose()
|
||||||
|
f = Nothing
|
||||||
|
End If
|
||||||
|
runf = True
|
||||||
|
u_thread.Start()
|
||||||
|
c_thread.Start()
|
||||||
|
l_thread.Start()
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub threadcls()
|
||||||
|
If l_thread.IsAlive Then
|
||||||
|
Try
|
||||||
|
If Not client_sock Is Nothing Then
|
||||||
|
client_sock.Shutdown(SocketShutdown.Both)
|
||||||
|
client_sock.Close()
|
||||||
|
End If
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
sock.Close()
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
Catch ex As SocketException
|
||||||
|
End Try
|
||||||
|
l_thread.Abort()
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
If c_thread.IsAlive Then
|
||||||
|
c_thread.Abort()
|
||||||
|
End If
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
If r_thread.IsAlive Then
|
||||||
|
r_thread.Abort()
|
||||||
|
End If
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
End Try
|
||||||
|
try
|
||||||
|
If s_thread.IsAlive Then
|
||||||
|
s_thread.Abort()
|
||||||
|
End If
|
||||||
|
Catch ex As NullReferenceException
|
||||||
|
End Try
|
||||||
|
While l_thread.IsAlive Or c_thread.IsAlive Or u_thread.IsAlive
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub setCancel()
|
||||||
|
If Not butcancel.Enabled Then butcancel.Invoke(Sub() butcancel.Enabled = True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub unsetCancel()
|
||||||
|
If butcancel.Enabled Then butcancel.Invoke(Sub() butcancel.Enabled = False)
|
||||||
|
canc = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub setSafe()
|
||||||
|
safe = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub unsetSafe()
|
||||||
|
safe = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butcancel_Click(sender As Object, e As EventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
If safe Then
|
||||||
|
canc = True
|
||||||
|
Else
|
||||||
|
runf = False
|
||||||
|
If c_thread.IsAlive Then
|
||||||
|
c_thread.Join(2500)
|
||||||
|
End If
|
||||||
|
If c_thread.IsAlive Then
|
||||||
|
c_thread.Abort()
|
||||||
|
End If
|
||||||
|
m = Mode.None
|
||||||
|
stage = 0
|
||||||
|
filepath = ""
|
||||||
|
lblstat.Text = ""
|
||||||
|
pbstat.Value = 0
|
||||||
|
pbstat.Style = ProgressBarStyle.Continuous
|
||||||
|
c_thread = New Thread(New ThreadStart(AddressOf Runner))
|
||||||
|
c_thread.IsBackground = True
|
||||||
|
runf = True
|
||||||
|
c_thread.Start()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub sendHandshake(ch As Char)
|
||||||
|
Dim bts As Byte() = System.Text.Encoding.ASCII.GetBytes(ch)
|
||||||
|
s_q.Enqueue(bts)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function getHandshake(ch As Char) As Boolean
|
||||||
|
If r_q.Count = 0 Then Return False
|
||||||
|
Return System.Text.Encoding.ASCII.GetString(r_q.Dequeue()) = ch
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub contrvis(ByVal vis As Boolean, Optional ByVal vm As Vism = Vism.server_stats or Vism.program_management or Vism.textbox or Vism.state)
|
||||||
|
If Me.InvokeRequired Then
|
||||||
|
Me.Invoke(Sub() contrvis(vis,vm))
|
||||||
|
Else
|
||||||
|
If vm.HasFlag(Vism.server_stats) Then
|
||||||
|
dudsa.Enabled = vis
|
||||||
|
txtbxp.Enabled = vis
|
||||||
|
butrs.Enabled = vis
|
||||||
|
butss.Enabled = vis
|
||||||
|
End If
|
||||||
|
If vm.HasFlag(Vism.program_management) Then
|
||||||
|
txtbxname.Enabled = vis
|
||||||
|
butopen.Enabled = vis
|
||||||
|
butsave.Enabled = vis
|
||||||
|
butcls.Enabled = vis
|
||||||
|
buta.Enabled = vis
|
||||||
|
End If
|
||||||
|
If vm.HasFlag(Vism.textbox) Then
|
||||||
|
txtbx.Enabled = vis
|
||||||
|
End If
|
||||||
|
If vm.HasFlag(Vism.state) Then
|
||||||
|
lblstat.Enabled = vis
|
||||||
|
pbstat.Enabled = vis
|
||||||
|
End If
|
||||||
|
If vm.HasFlag(Vism.cancel) Then
|
||||||
|
butcancel.Enabled = vis
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Buta_Click(sender As Object, e As EventArgs)
|
||||||
|
contrvis(False)
|
||||||
|
Dim f As New AboutBx()
|
||||||
|
f.setupdata(dis,lic)
|
||||||
|
f.ShowDialog(Me)
|
||||||
|
If Not f.IsDisposed And Not f.Disposing Then
|
||||||
|
f.Dispose()
|
||||||
|
f = Nothing
|
||||||
|
End If
|
||||||
|
contrvis(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub visupdater()
|
||||||
|
While exec
|
||||||
|
If c_vd() > 0 Then
|
||||||
|
Me.Invoke(dq_vd())
|
||||||
|
Else
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub eq_vd(del As [Delegate])
|
||||||
|
SyncLock vupslockobj
|
||||||
|
u_q.Enqueue(del)
|
||||||
|
End SyncLock
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function dq_vd() As [Delegate]
|
||||||
|
Dim toret As [Delegate] = Nothing
|
||||||
|
SyncLock vupslockobj
|
||||||
|
toret = u_q.Dequeue()
|
||||||
|
End SyncLock
|
||||||
|
Return toret
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function c_vd() As Integer
|
||||||
|
Dim toret As Integer = 0
|
||||||
|
SyncLock vupslockobj
|
||||||
|
toret = u_q.Count
|
||||||
|
End SyncLock
|
||||||
|
Return toret
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Enum Mode As Integer
|
||||||
|
None = 0
|
||||||
|
Open = 1
|
||||||
|
Save = 2
|
||||||
|
Upload = 3
|
||||||
|
Download = 4
|
||||||
|
Clear = 5
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
<Flags()>
|
||||||
|
Public Enum Vism As Integer
|
||||||
|
none = 0
|
||||||
|
server_stats = 1
|
||||||
|
program_management = 2
|
||||||
|
textbox = 4
|
||||||
|
state = 8
|
||||||
|
cancel = 16
|
||||||
|
end Enum
|
@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<MyType>WindowsForms</MyType>
|
||||||
|
<RootNamespace>OCUploadDownloadServer</RootNamespace>
|
||||||
|
<AssemblyName>OCUploadDownloadServer</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
<ApplicationIcon>..\Icon2.ico</ApplicationIcon>
|
||||||
|
<NoWin32Manifest>False</NoWin32Manifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DebugSymbols>True</DebugSymbols>
|
||||||
|
<DebugType>Full</DebugType>
|
||||||
|
<Optimize>False</Optimize>
|
||||||
|
<DefineConstants>DEBUG=1,TRACE=1</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DebugSymbols>False</DebugSymbols>
|
||||||
|
<DebugType>None</DebugType>
|
||||||
|
<Optimize>True</Optimize>
|
||||||
|
<DefineConstants>TRACE=1</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Windows.Forms" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AboutBx.Designer.vb">
|
||||||
|
<DependentUpon>AboutBx.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AboutBx.vb" />
|
||||||
|
<Compile Include="MainForm.Designer.vb">
|
||||||
|
<DependentUpon>MainForm.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.vb" />
|
||||||
|
<Compile Include="Program.vb" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="Setup.Designer.vb">
|
||||||
|
<DependentUpon>Setup.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Setup.vb" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="AboutBx.resx">
|
||||||
|
<DependentUpon>AboutBx.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
|
<DependentUpon>MainForm.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Setup.resx">
|
||||||
|
<DependentUpon>Setup.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
</Project>
|
26
OCUploadDownloadServer/OCUploadDownloadServer/Program.vb
Normal file
26
OCUploadDownloadServer/OCUploadDownloadServer/Program.vb
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
'
|
||||||
|
' Created by SharpDevelop.
|
||||||
|
' User: Alfred
|
||||||
|
' Date: 15/07/2018
|
||||||
|
' Time: 10:01
|
||||||
|
'
|
||||||
|
' To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
|
'
|
||||||
|
Imports Microsoft.VisualBasic.ApplicationServices
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
' This file controls the behaviour of the application.
|
||||||
|
Partial Class MyApplication
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New(AuthenticationMode.Windows)
|
||||||
|
Me.IsSingleInstance = False
|
||||||
|
Me.EnableVisualStyles = True
|
||||||
|
Me.SaveMySettingsOnExit = True
|
||||||
|
Me.ShutDownStyle = ShutdownMode.AfterMainFormCloses
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub OnCreateMainForm()
|
||||||
|
Me.MainForm = My.Forms.MainForm
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
@ -0,0 +1,31 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.CompilerServices
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' Information about this assembly is defined by the following
|
||||||
|
' attributes.
|
||||||
|
'
|
||||||
|
' change them to the information which is associated with the assembly
|
||||||
|
' you compile.
|
||||||
|
|
||||||
|
<assembly: AssemblyTitle("OCUploadDownloadServer")>
|
||||||
|
<assembly: AssemblyDescription("Open Computers Upload Download Server")>
|
||||||
|
<assembly: AssemblyConfiguration("")>
|
||||||
|
<assembly: AssemblyCompany("Captain ALM")>
|
||||||
|
<assembly: AssemblyProduct("Open Computers Upload Download Server")>
|
||||||
|
<assembly: AssemblyCopyright("Copyright (C) Captain ALM 2018")>
|
||||||
|
<assembly: AssemblyTrademark("")>
|
||||||
|
<assembly: AssemblyCulture("")>
|
||||||
|
|
||||||
|
' This sets the default COM visibility of types in the assembly to invisible.
|
||||||
|
' If you need to expose a type to COM, use <ComVisible(true)> on that type.
|
||||||
|
<assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
' The assembly version has following format :
|
||||||
|
'
|
||||||
|
' Major.Minor.Build.Revision
|
||||||
|
'
|
||||||
|
' You can specify all values by your own or you can build default build and revision
|
||||||
|
' numbers with the '*' character (the default):
|
||||||
|
|
||||||
|
<assembly: AssemblyVersion("0.0.1.2")>
|
@ -0,0 +1,4 @@
|
|||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="True">
|
||||||
|
<Profiles />
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
175
OCUploadDownloadServer/OCUploadDownloadServer/Setup.Designer.vb
generated
Normal file
175
OCUploadDownloadServer/OCUploadDownloadServer/Setup.Designer.vb
generated
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
'
|
||||||
|
' Created by SharpDevelop.
|
||||||
|
' User: Alfred
|
||||||
|
' Date: 17/07/2018
|
||||||
|
' Time: 18:19
|
||||||
|
'
|
||||||
|
' To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
|
'
|
||||||
|
Partial Class Setup
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Designer variable used to keep track of non-visual components.
|
||||||
|
''' </summary>
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Disposes resources used by the form.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing Then
|
||||||
|
If components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' This method is required for Windows Forms designer support.
|
||||||
|
''' Do not change the method contents inside the source code editor. The Forms designer might
|
||||||
|
''' not be able to load this method if it was changed manually.
|
||||||
|
''' </summary>
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Setup))
|
||||||
|
Me.label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.label2 = New System.Windows.Forms.Label()
|
||||||
|
Me.butok = New System.Windows.Forms.Button()
|
||||||
|
Me.butcancel = New System.Windows.Forms.Button()
|
||||||
|
Me.label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.label4 = New System.Windows.Forms.Label()
|
||||||
|
Me.cbsli = New System.Windows.Forms.ComboBox()
|
||||||
|
Me.nudp = New System.Windows.Forms.NumericUpDown()
|
||||||
|
Me.chkbxdid = New System.Windows.Forms.CheckBox()
|
||||||
|
CType(Me.nudp,System.ComponentModel.ISupportInitialize).BeginInit
|
||||||
|
Me.SuspendLayout
|
||||||
|
'
|
||||||
|
'label1
|
||||||
|
'
|
||||||
|
Me.label1.Location = New System.Drawing.Point(16, 87)
|
||||||
|
Me.label1.Name = "label1"
|
||||||
|
Me.label1.Size = New System.Drawing.Size(137, 19)
|
||||||
|
Me.label1.TabIndex = 0
|
||||||
|
Me.label1.Text = "Server Listening Interface:"
|
||||||
|
Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'label2
|
||||||
|
'
|
||||||
|
Me.label2.Location = New System.Drawing.Point(16, 132)
|
||||||
|
Me.label2.Name = "label2"
|
||||||
|
Me.label2.Size = New System.Drawing.Size(70, 23)
|
||||||
|
Me.label2.TabIndex = 1
|
||||||
|
Me.label2.Text = "Server Port:"
|
||||||
|
Me.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'butok
|
||||||
|
'
|
||||||
|
Me.butok.Location = New System.Drawing.Point(16, 226)
|
||||||
|
Me.butok.Name = "butok"
|
||||||
|
Me.butok.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.butok.TabIndex = 2
|
||||||
|
Me.butok.Text = "Ok"
|
||||||
|
Me.butok.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butok.Click, AddressOf Me.Butok_Click
|
||||||
|
'
|
||||||
|
'butcancel
|
||||||
|
'
|
||||||
|
Me.butcancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
|
Me.butcancel.Location = New System.Drawing.Point(297, 226)
|
||||||
|
Me.butcancel.Name = "butcancel"
|
||||||
|
Me.butcancel.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.butcancel.TabIndex = 3
|
||||||
|
Me.butcancel.Text = "Cancel"
|
||||||
|
Me.butcancel.UseVisualStyleBackColor = true
|
||||||
|
AddHandler Me.butcancel.Click, AddressOf Me.Butcancel_Click
|
||||||
|
'
|
||||||
|
'label3
|
||||||
|
'
|
||||||
|
Me.label3.Font = New System.Drawing.Font("Consolas", 24!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||||
|
Me.label3.Location = New System.Drawing.Point(38, 9)
|
||||||
|
Me.label3.Name = "label3"
|
||||||
|
Me.label3.Size = New System.Drawing.Size(321, 57)
|
||||||
|
Me.label3.TabIndex = 4
|
||||||
|
Me.label3.Text = "Setup Server"
|
||||||
|
Me.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'label4
|
||||||
|
'
|
||||||
|
Me.label4.Location = New System.Drawing.Point(16, 173)
|
||||||
|
Me.label4.Name = "label4"
|
||||||
|
Me.label4.Size = New System.Drawing.Size(100, 23)
|
||||||
|
Me.label4.TabIndex = 5
|
||||||
|
Me.label4.Text = "Delay in Data:"
|
||||||
|
Me.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'cbsli
|
||||||
|
'
|
||||||
|
Me.cbsli.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.cbsli.FormattingEnabled = true
|
||||||
|
Me.cbsli.Location = New System.Drawing.Point(182, 87)
|
||||||
|
Me.cbsli.Name = "cbsli"
|
||||||
|
Me.cbsli.Size = New System.Drawing.Size(177, 21)
|
||||||
|
Me.cbsli.TabIndex = 6
|
||||||
|
'
|
||||||
|
'nudp
|
||||||
|
'
|
||||||
|
Me.nudp.Location = New System.Drawing.Point(182, 135)
|
||||||
|
Me.nudp.Maximum = New Decimal(New Integer() {65535, 0, 0, 0})
|
||||||
|
Me.nudp.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
|
||||||
|
Me.nudp.Name = "nudp"
|
||||||
|
Me.nudp.Size = New System.Drawing.Size(177, 20)
|
||||||
|
Me.nudp.TabIndex = 7
|
||||||
|
Me.nudp.Value = New Decimal(New Integer() {100, 0, 0, 0})
|
||||||
|
'
|
||||||
|
'chkbxdid
|
||||||
|
'
|
||||||
|
Me.chkbxdid.Location = New System.Drawing.Point(182, 173)
|
||||||
|
Me.chkbxdid.Name = "chkbxdid"
|
||||||
|
Me.chkbxdid.Size = New System.Drawing.Size(16, 24)
|
||||||
|
Me.chkbxdid.TabIndex = 8
|
||||||
|
Me.chkbxdid.UseVisualStyleBackColor = true
|
||||||
|
'
|
||||||
|
'Setup
|
||||||
|
'
|
||||||
|
Me.AcceptButton = Me.butok
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.CancelButton = Me.butcancel
|
||||||
|
Me.ClientSize = New System.Drawing.Size(384, 261)
|
||||||
|
Me.Controls.Add(Me.chkbxdid)
|
||||||
|
Me.Controls.Add(Me.nudp)
|
||||||
|
Me.Controls.Add(Me.cbsli)
|
||||||
|
Me.Controls.Add(Me.label4)
|
||||||
|
Me.Controls.Add(Me.label3)
|
||||||
|
Me.Controls.Add(Me.butcancel)
|
||||||
|
Me.Controls.Add(Me.butok)
|
||||||
|
Me.Controls.Add(Me.label2)
|
||||||
|
Me.Controls.Add(Me.label1)
|
||||||
|
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
|
||||||
|
Me.MaximizeBox = false
|
||||||
|
Me.MaximumSize = New System.Drawing.Size(400, 300)
|
||||||
|
Me.MinimizeBox = false
|
||||||
|
Me.MinimumSize = New System.Drawing.Size(400, 300)
|
||||||
|
Me.Name = "Setup"
|
||||||
|
Me.ShowIcon = false
|
||||||
|
Me.ShowInTaskbar = false
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||||
|
Me.Text = "Setup Server"
|
||||||
|
AddHandler FormClosing, AddressOf Me.Setup_FormClosing
|
||||||
|
AddHandler FormClosed, AddressOf Me.Setup_FormClosed
|
||||||
|
AddHandler Load, AddressOf Me.Setup_Load
|
||||||
|
CType(Me.nudp,System.ComponentModel.ISupportInitialize).EndInit
|
||||||
|
Me.ResumeLayout(false)
|
||||||
|
End Sub
|
||||||
|
Private chkbxdid As System.Windows.Forms.CheckBox
|
||||||
|
Private nudp As System.Windows.Forms.NumericUpDown
|
||||||
|
Private cbsli As System.Windows.Forms.ComboBox
|
||||||
|
Private label4 As System.Windows.Forms.Label
|
||||||
|
Private label3 As System.Windows.Forms.Label
|
||||||
|
Private butcancel As System.Windows.Forms.Button
|
||||||
|
Private butok As System.Windows.Forms.Button
|
||||||
|
Private label2 As System.Windows.Forms.Label
|
||||||
|
Private label1 As System.Windows.Forms.Label
|
||||||
|
End Class
|
197
OCUploadDownloadServer/OCUploadDownloadServer/Setup.resx
Normal file
197
OCUploadDownloadServer/OCUploadDownloadServer/Setup.resx
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<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>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAA/4AA//+AAP//gAD//4AA/wAA
|
||||||
|
AAAAgP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAgP//AAAAAACA//8AgP//AID//wCA//8AgP//AAAAAACA
|
||||||
|
//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgP//AAAAAAAAAAAAAAAAAAAAAP+AAP8AAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAACA//8AAAAAAAAAAAAAAAAAAAAAAAAAAACA//8AAAAAAID//wAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAID//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACA//8AAAAAAAAAAAAAAAD/gAD/AAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACA//8AgP//AID//wCA//8AgP//AAAAAAAAAAAAgP//AAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAgP//AAAAAAAAAAAAgP//AID//wAAAAAAAAAAAID//wAAAAAAAAAAAAAAAP+A
|
||||||
|
AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAID//wAAAAAAAAAAAAAAAACA//8AAAAAAAAAAACA
|
||||||
|
//8AAAAAAAAAAAAAAAAAAAAAAAAAAACA//8AAAAAAAAAAACA//8AgP//AAAAAAAAAAAAgP//AAAAAAAA
|
||||||
|
AAAAAAAA/4AA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgP//AAAAAAAAAAAAAAAAAID//wAA
|
||||||
|
AAAAAAAAAID//wAAAAAAAAAAAAAAAAAAAAAAAAAAAID//wAAAAAAgP//AAAAAAAAAAAAgP//AAAAAACA
|
||||||
|
//8AAAAAAAAAAAAAAAD/gAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgP//AAAAAACA
|
||||||
|
//8AAAAAAAAAAAAAAAAAgP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAgP//AAAAAACA//8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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////
|
||||||
|
///hfQX73319+7+DfZu/u32bv7t9a7/XfWu/131r39d88+HvfPP/////////////////////////////
|
||||||
|
//////////////////////////////////8=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
109
OCUploadDownloadServer/OCUploadDownloadServer/Setup.vb
Normal file
109
OCUploadDownloadServer/OCUploadDownloadServer/Setup.vb
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
'
|
||||||
|
' Created by SharpDevelop.
|
||||||
|
' User: Alfred
|
||||||
|
' Date: 17/07/2018
|
||||||
|
' Time: 18:19
|
||||||
|
'
|
||||||
|
' To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
|
'
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Net.NetworkInformation
|
||||||
|
Imports System.Net.Sockets
|
||||||
|
|
||||||
|
Public Partial Class Setup
|
||||||
|
Public selected_interface As IPAddress = IPAddress.Any
|
||||||
|
Public port As Integer = 100
|
||||||
|
Public delay As Boolean = False
|
||||||
|
Public interfaces As Dictionary(Of String, IPAddress)
|
||||||
|
Public ver As Boolean = False
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
' The Me.InitializeComponent call is required for Windows Forms designer support.
|
||||||
|
Me.InitializeComponent()
|
||||||
|
|
||||||
|
'
|
||||||
|
' TODO : Add constructor code after InitializeComponents
|
||||||
|
'
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Setup_Load(sender As Object, e As EventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
butok.Enabled = False
|
||||||
|
cbsli.Enabled = False
|
||||||
|
chkbxdid.Enabled = False
|
||||||
|
nudp.Enabled = False
|
||||||
|
interfaces = getNetworkAdapterIPsAndNames()
|
||||||
|
interfaces.Add("Listen on All Interfaces : 0.0.0.0", IPAddress.Any)
|
||||||
|
nudp.Value = 100
|
||||||
|
For Each current As String In interfaces.Keys
|
||||||
|
cbsli.Items.Add(current)
|
||||||
|
Next
|
||||||
|
cbsli.SelectedItem = "Listen on All Interfaces : 0.0.0.0"
|
||||||
|
butcancel.Enabled = True
|
||||||
|
butok.Enabled = True
|
||||||
|
cbsli.Enabled = True
|
||||||
|
chkbxdid.Enabled = True
|
||||||
|
nudp.Enabled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function getNetworkAdapterIPsAndNames() As Dictionary(Of String, IPAddress)
|
||||||
|
Dim list As New Dictionary(Of String, IPAddress)
|
||||||
|
Dim allNetworkInterfaces As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
|
||||||
|
For i As Integer = 0 To allNetworkInterfaces.Length - 1
|
||||||
|
Dim networkInterface As NetworkInterface = allNetworkInterfaces(i)
|
||||||
|
'If networkInterface.OperationalStatus = OperationalStatus.Up AndAlso networkInterface.NetworkInterfaceType <> NetworkInterfaceType.Loopback Then
|
||||||
|
'the above is if we want no loopback
|
||||||
|
If networkInterface.OperationalStatus = OperationalStatus.Up Then
|
||||||
|
For Each current As UnicastIPAddressInformation In networkInterface.GetIPProperties().UnicastAddresses
|
||||||
|
If current.Address.AddressFamily = AddressFamily.InterNetwork Then
|
||||||
|
list.Add(networkInterface.Name & " : " & current.Address.ToString, current.Address)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return list
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Sub Butok_Click(sender As Object, e As EventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
butok.Enabled = False
|
||||||
|
cbsli.Enabled = False
|
||||||
|
chkbxdid.Enabled = False
|
||||||
|
nudp.Enabled = False
|
||||||
|
selected_interface = interfaces(cbsli.SelectedItem.ToString)
|
||||||
|
port = CType(nudp.Value, Integer)
|
||||||
|
delay = chkbxdid.Checked
|
||||||
|
ver = True
|
||||||
|
Me.Close()
|
||||||
|
Me.DialogResult = DialogResult.OK
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Setup_FormClosed(sender As Object, e As FormClosedEventArgs)
|
||||||
|
If Not Me.DialogResult = DialogResult.OK Then
|
||||||
|
selected_interface = IPAddress.Any
|
||||||
|
port = 100
|
||||||
|
delay = False
|
||||||
|
ver = False
|
||||||
|
Me.DialogResult = DialogResult.Cancel
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Butcancel_Click(sender As Object, e As EventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
butok.Enabled = False
|
||||||
|
cbsli.Enabled = False
|
||||||
|
chkbxdid.Enabled = False
|
||||||
|
nudp.Enabled = False
|
||||||
|
ver = False
|
||||||
|
Me.Close()
|
||||||
|
Me.DialogResult = DialogResult.Cancel
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Setup_FormClosing(sender As Object, e As FormClosingEventArgs)
|
||||||
|
butcancel.Enabled = False
|
||||||
|
butok.Enabled = False
|
||||||
|
cbsli.Enabled = False
|
||||||
|
chkbxdid.Enabled = False
|
||||||
|
nudp.Enabled = False
|
||||||
|
End Sub
|
||||||
|
End Class
|
6
OCUploadDownloadServer/OCUploadDownloadServer/app.config
Normal file
6
OCUploadDownloadServer/OCUploadDownloadServer/app.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
184
download.lua
Normal file
184
download.lua
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
local ic = require("internet")
|
||||||
|
local c = require("component")
|
||||||
|
local shell = require("shell")
|
||||||
|
local fs = require("filesystem")
|
||||||
|
local os = require("os")
|
||||||
|
|
||||||
|
if not c.isAvailable("internet") then
|
||||||
|
return 2
|
||||||
|
end
|
||||||
|
|
||||||
|
local i = c.internet
|
||||||
|
|
||||||
|
if(i == nil or ic == nil) then
|
||||||
|
return 2
|
||||||
|
end
|
||||||
|
if(not i.isTcpEnabled()) then
|
||||||
|
return 2
|
||||||
|
end
|
||||||
|
local args, options = shell.parse(...)
|
||||||
|
local filename = ""
|
||||||
|
local file_parentpath = ""
|
||||||
|
local ipaddress = "127.0.0.1"
|
||||||
|
local port = 100
|
||||||
|
if #args == 0 then
|
||||||
|
io.write("Usage: download <filename> <ipaddress> <port>")
|
||||||
|
return
|
||||||
|
elseif #args == 1 then
|
||||||
|
ipaddress = "127.0.0.1"
|
||||||
|
port = 100
|
||||||
|
elseif #args == 2 then
|
||||||
|
ipaddress = args[2]
|
||||||
|
port = 100
|
||||||
|
elseif #args == 3 then
|
||||||
|
ipaddress = args[2]
|
||||||
|
port = args[3] + 0
|
||||||
|
end
|
||||||
|
|
||||||
|
filename = shell.resolve(args[1])
|
||||||
|
file_parentpath = fs.path(filename)
|
||||||
|
|
||||||
|
if fs.exists(file_parentpath) and not fs.isDirectory(file_parentpath) then
|
||||||
|
io.stderr:write("Invalid Folder Path!\n")
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if fs.isDirectory(filename) then
|
||||||
|
io.stderr:write("File is a directory!\n")
|
||||||
|
return 1
|
||||||
|
elseif not fs.exists(filename) and (fs.get(filename) == nil or fs.get(filename).isReadOnly()) then
|
||||||
|
io.stderr:write("File is read-only!\n")
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function catch(block)
|
||||||
|
return block[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
function try(block)
|
||||||
|
status, result = pcall(block[1])
|
||||||
|
if not status then
|
||||||
|
block[2](result)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
local function readc(con)
|
||||||
|
local herr = false
|
||||||
|
local data = ""
|
||||||
|
while not herr do
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
local tmp = ""
|
||||||
|
tmp = con:read(1)
|
||||||
|
if tmp ~= nil then
|
||||||
|
if tmp ~= "" then
|
||||||
|
data = data..tmp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
herr = true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if data == "" then
|
||||||
|
data = nil
|
||||||
|
end
|
||||||
|
return data
|
||||||
|
end
|
||||||
|
|
||||||
|
local function shandshake(con)
|
||||||
|
print("Sending Handshake...\n")
|
||||||
|
con:write("1")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rhandshake(con)
|
||||||
|
local ret = nil
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
ret = con:read(1)
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
ret = nil
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ret == nil then
|
||||||
|
print("Handshake Not Received!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
if ret == "" or ret == "0" then
|
||||||
|
print("Handshake Not Received!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
print("Handshake Received...\n")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rmsg(con)
|
||||||
|
local ret = readc(con)
|
||||||
|
if ret == nil then
|
||||||
|
print("Message Not Received!\n")
|
||||||
|
return nil
|
||||||
|
else
|
||||||
|
print("Message Received!\n")
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print("Opening Connection!\n")
|
||||||
|
local connection = ic.open(ipaddress, port)
|
||||||
|
|
||||||
|
if connection then
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
connection:setTimeout(5)
|
||||||
|
shandshake(connection)
|
||||||
|
if not rhandshake(connection) then
|
||||||
|
connection:close()
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
shandshake(connection)
|
||||||
|
print("Waiting For Data...\n")
|
||||||
|
local data = rmsg(connection)
|
||||||
|
if data == nil then
|
||||||
|
connection:close()
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
print("Writing File...\n")
|
||||||
|
if not fs.exists(file_parentpath) then
|
||||||
|
fs.makeDirectory(file_parentpath)
|
||||||
|
end
|
||||||
|
local f, reason = io.open(filename, "w")
|
||||||
|
if f then
|
||||||
|
f:write(data)
|
||||||
|
f:flush()
|
||||||
|
f:close()
|
||||||
|
else
|
||||||
|
print("File Write Failed!\n")
|
||||||
|
connection:close()
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
shandshake(connection)
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
io.stderr:write("Error Caught: "..ex..".\n")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::ci::
|
||||||
|
print("Terminating...\n")
|
||||||
|
connection:close()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
io.stderr:write("Connection Failed!\n")
|
||||||
|
return 1
|
||||||
|
end
|
188
upload.lua
Normal file
188
upload.lua
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
local ic = require("internet")
|
||||||
|
local c = require("component")
|
||||||
|
local shell = require("shell")
|
||||||
|
local fs = require("filesystem")
|
||||||
|
local os = require("os")
|
||||||
|
|
||||||
|
if not c.isAvailable("internet") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local i = c.internet
|
||||||
|
|
||||||
|
if(i == nil or ic == nil) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if(not i.isTcpEnabled()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local args, options = shell.parse(...)
|
||||||
|
local filename = ""
|
||||||
|
local file_parentpath = ""
|
||||||
|
local ipaddress = "127.0.0.1"
|
||||||
|
local port = 100
|
||||||
|
if #args == 0 then
|
||||||
|
io.write("Usage: upload <filename> <ipaddress> <port>")
|
||||||
|
return
|
||||||
|
elseif #args == 1 then
|
||||||
|
ipaddress = "127.0.0.1"
|
||||||
|
port = 100
|
||||||
|
elseif #args == 2 then
|
||||||
|
ipaddress = args[2]
|
||||||
|
port = 100
|
||||||
|
elseif #args == 3 then
|
||||||
|
ipaddress = args[2]
|
||||||
|
port = args[3] + 0
|
||||||
|
end
|
||||||
|
|
||||||
|
filename = shell.resolve(args[1])
|
||||||
|
file_parentpath = fs.path(filename)
|
||||||
|
|
||||||
|
if fs.exists(file_parentpath) and not fs.isDirectory(file_parentpath) then
|
||||||
|
io.stderr:write("Invalid Folder Path!\n")
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if fs.isDirectory(filename) then
|
||||||
|
io.stderr:write("File is a directory!\n")
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function catch(block)
|
||||||
|
return block[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
function try(block)
|
||||||
|
status, result = pcall(block[1])
|
||||||
|
if not status then
|
||||||
|
block[2](result)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
local function readc(con)
|
||||||
|
local herr = false
|
||||||
|
local data = ""
|
||||||
|
while not herr do
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
local tmp = ""
|
||||||
|
tmp = con:read(1)
|
||||||
|
if tmp ~= nil then
|
||||||
|
if tmp ~= "" then
|
||||||
|
data = data..tmp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
herr = true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if data == "" then
|
||||||
|
data = nil
|
||||||
|
end
|
||||||
|
return data
|
||||||
|
end
|
||||||
|
|
||||||
|
local function shandshake(con)
|
||||||
|
print("Sending Handshake...\n")
|
||||||
|
con:write("2")
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rhandshake(con)
|
||||||
|
local ret = nil
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
ret = con:read(1)
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
ret = nil
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ret == nil then
|
||||||
|
print("Handshake Not Received!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
if ret == "" or ret == "0" then
|
||||||
|
print("Handshake Not Received!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
print("Handshake Received...\n")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rmsgs(con)
|
||||||
|
local ret = nil
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
ret = con:read(1)
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
ret = nil
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ret == nil then
|
||||||
|
print("Message Failed!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
if ret == "" or ret == "0" then
|
||||||
|
print("Message Failed!\n")
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
print("Message Succeeded!\n")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print("Opening Connection!\n")
|
||||||
|
local connection = ic.open(ipaddress, port)
|
||||||
|
|
||||||
|
if connection then
|
||||||
|
try {
|
||||||
|
function()
|
||||||
|
connection:setTimeout(5)
|
||||||
|
shandshake(connection)
|
||||||
|
if not rhandshake(connection) then
|
||||||
|
connection:close()
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
print("Reading File...\n")
|
||||||
|
local f, reason = io.open(filename, "r")
|
||||||
|
local data = ""
|
||||||
|
if f then
|
||||||
|
data = f:read("*a")
|
||||||
|
f:close()
|
||||||
|
else
|
||||||
|
print("File Read Failed!\n")
|
||||||
|
connection:close()
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
print("Sending Data...\n")
|
||||||
|
connection:write(data)
|
||||||
|
rmsgs(connection)
|
||||||
|
end,
|
||||||
|
catch {
|
||||||
|
function(ex)
|
||||||
|
io.stderr:write("Error Caught: "..ex..".\n")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::ci::
|
||||||
|
print("Terminating...\n")
|
||||||
|
connection:close()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
io.stderr:write("Connection Failed!\n")
|
||||||
|
return 1
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user