Initial commit

This commit is contained in:
shu
2020-10-21 10:43:18 +02:00
commit 56bd02798f
5848 changed files with 2659025 additions and 0 deletions
@@ -0,0 +1,180 @@
Imports System.IO
Imports System.Security.Principal
Imports PluginContracts
Imports System.Reflection
Public Class frmMain1
Dim plugins As ICollection(Of IPlugin) = New List(Of IPlugin)
Private _Plugins As Dictionary(Of String, IPlugin)
Dim users As New DataSet
Dim userrechte As Integer
Dim onload As Boolean = True
Public Function LoadPlugins(path As String) As ICollection(Of IPlugin)
Dim dllFileNames As String()
If Directory.Exists(path) Then
dllFileNames = Directory.GetFiles(path, "*.dll")
Dim assemblies As ICollection(Of Assembly) = New List(Of Assembly)(dllFileNames.Length)
For Each dllFile As String In dllFileNames
Try
Dim an As AssemblyName = AssemblyName.GetAssemblyName(dllFile)
Dim assembly As Assembly = Assembly.Load(an)
assemblies.Add(assembly)
Catch
End Try
Next
Dim pluginType As Type = GetType(IPlugin)
Dim pluginTypes As ICollection(Of Type) = New List(Of Type)
For Each assembly As Assembly In assemblies
If assembly <> Nothing Then
Dim types As Type() = assembly.GetTypes()
For Each type As Type In types
If type.IsInterface Or type.IsAbstract Then
Continue For
Else
If type.GetInterface(pluginType.FullName) <> Nothing Then
pluginTypes.Add(type)
End If
End If
Next
End If
Next
Dim plugins As ICollection(Of IPlugin) = New List(Of IPlugin)(pluginTypes.Count)
For Each type As Type In pluginTypes
Dim plugin As IPlugin = Activator.CreateInstance(type)
plugins.Add(plugin)
Next
Return plugins
End If
Return Nothing
End Function
Private Sub PopulatePluginList()
_Plugins = New Dictionary(Of String, IPlugin)
For Each item In plugins
_Plugins.Add(item.Name, item)
lstPlugins.Items.Add(item.Name)
Dim tmisub As New ToolStripMenuItem
tmisub = tmi.DropDown.Items.Add(item.Name)
AddHandler tmisub.Click, AddressOf Erweiterungen_Click
Next
lstPlugins.SelectedIndex = 0
End Sub
Public Function Erweiterungen_Click(ByVal sender As Object, ByVal e As EventArgs)
Cursor = Cursors.WaitCursor
Dim tmi As ToolStripMenuItem = sender
If _Plugins.ContainsKey(tmi.Text) Then
Dim plugin As IPlugin = _Plugins(tmi.Text)
plugin.Show(Globals.Mitarbeiternr, "", Me)
End If
Cursor = Cursors.Default
End Function
Private Sub BeendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BeendenToolStripMenuItem.Click
Me.Close()
End Sub
Dim tmi As New ToolStripMenuItem
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If check_user() = False Then End
If userrechte = 1 Then BeendenToolStripMenuItem.Visible = True Else BenutzerverwaltungToolStripMenuItem.Visible = False
onload = True
'plugins = LoadPlugins("k:\plugins")
plugins = LoadPlugins(Application.StartupPath)
If plugins.Count > 0 Then
tmi = Me.MenuStrip1.Items.Add("Erweiterungen")
End If
PopulatePluginList()
onload = False
End Sub
Dim ouser As New WindowsPrincipal(WindowsIdentity.GetCurrent)
''' <summary>
''' Windows-User auslesen
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Private Function Get_Username() As String
With ouser.Identity.Name
Return (.Substring(.IndexOf("\") + 1))
End With
End Function
#Region "Tools"
Sub create_usertable(ByVal username As String)
Dim ds As New DataSet
ds.Tables.Add("Users")
ds.Tables(0).Columns.Add("TGNummer")
ds.Tables(0).Columns.Add("Rolle")
ds.Tables(0).Columns.Add("EDOKA_MA_Nr")
Dim dr As DataRow = ds.Tables(0).NewRow
dr.Item(0) = Crypto.EncryptText(username, "Selbstanzeigen")
dr.Item(1) = 1
dr.Item(2) = 0
ds.Tables(0).Rows.Add(dr)
ds.WriteXml(Application.StartupPath + "\users.xml")
End Sub
Function check_user() As Boolean
Dim user As String = Get_Username()
If Not System.IO.File.Exists(Application.StartupPath + "\users.xml") Then
MsgBox("User-Datenbank ist nicht vorhanden und wird neu erstellt", MsgBoxStyle.Critical)
Dim s As String = InputBox("Geben Sie das Passwort ein:")
If s <> "edokatools" Then
Return False
End If
create_usertable(user)
Return False
End If
Globals.Userdata.ReadXml(Application.StartupPath + "\users.xml")
For Each dr As DataRow In Globals.Userdata.Tables(0).Rows
dr.Item(0) = Crypto.DecryptText(dr.Item(0).ToString, "Selbstanzeigen")
Next
userrechte = -1
For Each dr As DataRow In Globals.Userdata.Tables(0).Rows
If UCase(user) = UCase(dr.Item(0)) Then
If dr.Item(1) = 1 Then userrechte = 1 Else userrechte = 0
Globals.Mitarbeiternr = dr.Item(2)
Globals.tgnummer = user
Exit For
End If
Next
If userrechte = -1 Then
MsgBox("Sie sind nicht berechtig, die Applikation zu verwenden.", MsgBoxStyle.Exclamation)
Return False
End If
Return True
End Function
#End Region
Private Sub BenutzerverwaltungToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BenutzerverwaltungToolStripMenuItem.Click
Dim f As New frmBenutzer
f.MdiParent = Me
f.Show()
End Sub
Private Sub lstPlugins_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstPlugins.SelectedIndexChanged
If onload Then Exit Sub
If _Plugins.ContainsKey(lstPlugins.SelectedItem) Then
Dim plugin As IPlugin = _Plugins(lstPlugins.SelectedItem)
plugin.Show(Globals.Mitarbeiternr, "", Me)
End If
End Sub
End Class
@@ -0,0 +1,921 @@
a
absurdum
ac
acres
actions
adaption
adjustments
aerobes
affairs
agents
Alan
Albert
Alberta
Alfred
Alice
Alicia
alliances
americas
analysts
announcements
anouncements
apples
applications
apricots
architectures
areas
arguments
arrangements
Arthur
artists
arts
aspects
attitudes
attractions
auctions
aug
az
baccalaureat
backlit
bags
Barbara
Barnabas
Barry
beliefs
benchmarks
Betty
bi
bits
blades
bonaventure
brad
broadminded
broadway
broking
brows
Bruce
bs
buddha
buddhism
buddhist
buddhists
buffers
ca
caffein
calculational
calif
California
cam
cams
Canadian
cancelling
capitulated
caps
Carmel
Carolyn
Carroll
cars
cartridges
cassette
casuality
Catherine
centre
centres
chambermaid
chapters
characteristics
characters
Charles
cheesy
cherokee
Chicago
chloride
Christopher
Chrysler
Churchill
Cicero
cinema
cinemas
Claire
Clara
clark
cleaners
clients
cliffs
clubs
co
codirector
coinsurance
Columbus
combinations
combust
combustor
comparisons
components
computerised
computers
con
concepts
conclusions
connections
connectors
consequences
contemporizing
continued
contra
contractors
controls
coprocessor
corequisite
corp
corridors
corrosive
costmetology
counterparts
cpu
crops
cueing
culturess
curtis
customers
cuts
cutout
cyanide
Czechoslovakia
dan
databases
David
Davis
days
dealership
Deborah
debut
decibles
declarations
deductible
defrayed
degrees
deionized
demobilisation
densily
departments
descriptions
desensitization
desktop
developers
developments
devices
dharma
diameters
Dianne
dicators
differences
digitising
directions
directorate
disadvantages
disassembly
disclosures
discos
discs
discusing
disks
districts
doe
dogs
dominican
dominicans
Donald
dos
dots
Douglas
Douglass
downsize
downsized
drugs
dumplings
duns
eastside
ecconomic
ecconomics
ed
Edward
efforts
Egypt
eh
Einstein
Einsteins
Elaine
electrophotography
elements
Elizabeth
Elliot
emory
emulsion
energized
enquiry
ent
enthusiasts
entrylevel
environments
epilepsy
epistemic
er
eric
erosion
errors
estuary
et
events
everyone's
exactions
exegesis
exhilarating
expenditures
explanations
explicably
expo
ext
extensions
eyelevel
facts
fastidious
fathers
favourably
fax
feb
feint
ferneries
files
filters
Finland
fireplaces
flavours
flights
fluency
fluidized
fluorescent
fm
forceps
forces
forefront
foreknowledge
forman
formfeed
formletters
Francisco
Frankfurt
friends
frond
fronds
frontage
frontseat
ft
functions
funds
futures
futuristic
ga
Galileo
Garfield
Gary
gaskets
geiger
geist
gentiles
Georgia
georgian
giants
gigabytes
glitches
Gloria
gm
gods
gordon
governments
gravitated
gremlins
greyhound
Griffith
groups
guages
Gwen
Hague
halftone
halftones
handfull
hans
hardcopy
harkness
Harold
Harris
haven't
Hawaii
hazards
headlights
headquartered
Helen
helicopter
helicopters
Henderson
herbalists
hermeneutical
hills
hindu
historians
ho
hoc
homeowners
honduras
hong
hours
houses
Howard
hr
hrs
humours
hwy
hyper
hypercard
hypertalk
hz
i
I'd
i.e.
i/o
IBM
iceskating
id
Idaho
ideas
identification
identify
ie
ii
iii
imaged
implementations
inc
individuals
inferences
infrastructure
inoculation
inspectors
instructions
inter
interpretative
intro
intrusive
intrusives
irs
isaac
iso
Italy
its
iv
ix
Jackson
jaguar
Jan
Jane
Jeanne
Jed
Jennie
Jennings
jets
jew
jewish
Joe
John
Jonathan
Joseph
Joyce
jr
jurist
ka
Kansas
Karl
kbytes
Kenneth
Kepler
keyboards
kg
kids
Kirk
kits
knockout
Kong
la
labels
lakeshore
lama
lamps
lan
laptop
Larry
laserjet
laserwriter
latin
Lawrence
laws
layouts
lb
lbs
lcd
le
leaching
Lebanon
leo
leon
Lewis
licensee
licensees
limitations
limpid
Lincoln
Linda
lines
listings
literatures
lithographic
lithography
logo
London
Louis
Lynda
ma
mac
mach
machines
macintosh
macintoshes
maddened
magnetically
manmade
manufacturers
Margaret
Maria
marriages
Martha
Martin
Marvin
Mary
mbyte
mbytes
MD
meads
meals
measurements
mechanics
med
megabit
megabyte
megabytes
members
menus
mesa
methods
Mexico
Meyer
mg
MHz
Michael
micro
microbes
microbial
microbiological
microbiology
microorganism
microorganisms
microsoft
midrange
miles
mils
min
ming
mini
minors
mips
mirages
misnamed
missioned
Missouri
ml
mm
mobilisation
modules
monarchic
monastary
monochrome
month's
Moscow
motorways
msg
mt
multi
multimedia
multiuser
Nurray
museums
nasa
Nathan
nations
nd
ne
Nelson
neoprene
networks
newsletter
Newton
nicholas
nitrate
NJ
nonessential
nonimpact
noninfectious
normative
northside
nov
ns
nuns
nutrients
NY
o
odometer
oem
offcampus
offchip
offsets
offshore
ohm
Olsen
omni
onchip
ondemand
ones
opinions
optimised
options
orchards
oregon
organisations
organise
organises
organising
orginal
os
ot
Otto
outlets
outmoded
overdrive
overdrives
Owens
pages
paperless
papers
Paris
parkway
passages
passengers
passengerside
patio
Paul
payload
pb
pc
pcs
pedal
pedals
penicillin
peoples
perambulate
perils
periods
persons
pesticides
petri
pharmacological
phd
phenomenalists
pheobe
Phil
Philip
philosophers
phlegm
photolithography
photometer
photometrically
photosensitive
phototypsetter
Pierre
plainpaper
plans
platonic
platonism
plc
plots
pluralism
pm
pocketsized
Polly
poly
polygons
polypropylene
popup
potency
pre
precautions
precepts
premises
prep
prerecorded
presswork
pretested
primal
primo
problems
procedures
processors
prod
profits
programme
programs
promissory
propane
protestant
proto
protocols
prudential
ps
pubs
racism
racist
rad
radioactive
rads
Ralph
ramirez
rashers
raster
rd
reactions
realists
realtor
realty
reardeck
rearview
recalibration
recipients
recommendations
recut
redskins
reductions
ref
reflections
refund
reimburse
rel
requirements
resettable
residues
resources
restaurants
rev
revue
rh
rhizomes
rhodes
richard
rickey
risc
rn
Robert
Roberts
rom
roots
Rosemary
rotor
rotors
rovers
rpm
rt
rugby
rumania
rumohra
rumours
Ryan
ryhthm
s
sacrament
sales
samaritan
San
Sandra
santa
Sarah
savagery
schemes
scholasticism
schuler
sciencefiction
sciencehistory
scientists
scripts
scsi
sculptors
se
Sean
Seattle
sec
sel
selectable
selectivity
selfpaced
semesters
sensors
Sept
sets
shareholders
sheerest
Shelley
Sheridan
ships
Shirley
shortcomings
Sidney
sig
sinch
Sinclair
singlesheet
singleuser
sinkhole
sists
skiers
slots
socalled
solidstate
souls
sources
southeast
soy
spa
spans
spilt
splines
spots
sq
squelched
sr
st
Stacey
stacks
standalone
states
steps
sterility
Stevens
stoics
stoves
streakings
stucco
students
stylus
sulfuric
summa
summarise
summers
sums
surveyors
susceptibility
swab
swabs
Swiss
Switzerland
sys
systems
t
Taylor
teaparty
tech
techniques
tel
temperatures
Terry
tests
th
theatre
theatres
thinning
thirdparty
Thomas
tickets
timeout
Timothy
tm
Tokyo
tollfree
tom
topics
torah
touted
towels
toxin
toxins
trademarks
traditions
trans
transfers
treatments
trees
trenchant
tribes
trinity
turbidity
turnaround
tx
types
typeset
typesetter
typestyles
typology
U.S.
UK
ultrafine
unassisted
undercut
units
unix
upchucking
upriver
ups
urea
USA
userfriendly
users
utilise
utilised
v
va
vacillated
vehicles
vendors
veneer
vernal
vi
victorian
videotex
Vienna
vii
viii
visitors
vitro
viva
vol
vols
volumes
vt
Wallace
Walter
walz
Wang
warmup
wastebasket
Wayne
ways
weatherproof
well
wellknown
welt
Wesley
westminster
weston
Williams
winchester
windows
Winston
wireframe
Wisconsin
wittmann
words
workstation
workstations
worlds
wows
wraps
x
xerographic
xi
xii
xiii
xiv
xix
xv
xvi
xvii
xviii
xx
years
Yugoslavian
zealots
zion