Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vananiev committed Aug 29, 2019
0 parents commit 9c450b5
Show file tree
Hide file tree
Showing 67 changed files with 2,340 additions and 0 deletions.
71 changes: 71 additions & 0 deletions Blunder.frm
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
VERSION 5.00
Begin VB.Form Blunder
BorderStyle = 0 'None
Caption = "Mistake"
ClientHeight = 2025
ClientLeft = 4995
ClientTop = 4530
ClientWidth = 4725
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2025
ScaleWidth = 4725
ShowInTaskbar = 0 'False
Begin VB.CommandButton CancelButton
Caption = "Cancel"
Height = 375
Left = 1680
TabIndex = 1
Top = 1320
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "OK"
Height = 375
Left = 3240
TabIndex = 0
Top = 1320
Width = 1215
End
Begin VB.Image Image1
Height = 600
Left = 480
Picture = "Blunder.frx":0000
Stretch = -1 'True
Top = 360
Width = 600
End
Begin VB.Label Label1
Caption = "Blunder of Explorer.exe"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 204
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 2
Top = 600
Width = 2295
End
End
Attribute VB_Name = "Blunder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CancelButton_Click()
Unload Blunder
End Sub

Private Sub OKButton_Click()
Unload Blunder
End Sub
Binary file added Blunder.frx
Binary file not shown.
119 changes: 119 additions & 0 deletions Cipher.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Cipher"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private mstrKey As String
Private mstrText As String
' .KeyString (ñâîéñòâî)
' ñòðîêà (êëþ÷), èñïîëüçóåìàÿ â øèôðîâàíèè è äåøèôðîâàíèè
Public Property Let KeyString(strKey As String)
mstrKey = strKey
initialize
End Property
' .Text (ñâîéñòâî)
' ïðèíèìàåò øèôðóåìûé è äåøèôðóåìûé òåêñò
Public Property Let Text(strText As String)
mstrText = strText
End Property
' âîçâðàùàåò çàøèôðîâàííûé èëè äåøèôðîâàííûé òåêñò
Public Property Get Text() As String
Text = mstrText
End Property
' *""".DoXor (ìåòîä)
' øèôðîâàíèå/äåøèôðîâàíèå íà îñíîâå ïîáàéòîâîé îïåðàöèè Õîr
Public Sub DoXor()
Dim lngC As Long
Dim intB As Long
Dim lngN As Long
For lngN = 1 To Len(mstrText)
lngC = Asc(Mid(mstrText, lngN, 1))
intB = Int(Rnd * 256)
Mid(mstrText, lngN, 1) = Chr(lngC Xor intB)
Next lngN
End Sub
' .Stretch (ìåòîä)
' ïðåîáðàçóåò ëþáóþ ñòðîêó â ïîëíîñòüþ îòîáðàæàåìóþ
Public Sub Stretch()
Dim lngC As Long
Dim lngN As Long
Dim lngJ As Long
Dim lngK As Long
Dim lngA As Long
Dim strB As String
lngA = Len(mstrText)
strB = Space(lngA + (lngA + 2) \ 3)
For lngN = 1 To lngA
lngC = Asc(Mid(mstrText, lngN, 1))
lngJ = lngJ + 1
Mid(strB, lngJ, 1) = Chr((lngC And 63) + 59)
Select Case lngN Mod 3
Case 1
lngK = lngK Or ((lngC \ 64) * 16)
Case 2
lngK = lngK Or ((lngC \ 64) * 4)
Case 0
lngK = lngK Or (lngC \ 64)
lngJ = lngJ + 1
Mid(strB, lngJ, 1) = Chr(lngK + 59)
lngK = 0
End Select
Next lngN
If lngA Mod 3 Then
lngJ = lngJ + 1
Mid(strB, lngJ, 1) = Chr(lngK + 59)
End If
mstrText = strB
End Sub
' """.Shrink (ìåòîä)
' âûïîëíÿåò äåéñòâèÿ, îáðàòíûå òîìó, ÷òî äåëàåò ìåòîä Stretch
Public Sub Shrink()
Dim lngC As Long
Dim lngD As Long
Dim lngE As Long
Dim lngA As Long
Dim lngB As Long
Dim lngN As Long
Dim lngJ As Long
Dim lngK As Long
Dim strB As String
lngA = Len(mstrText)
lngB = lngA - 1 - (lngA - 1) \ 4
strB = Space(lngB)
For lngN = 1 To lngB
lngJ = lngJ + 1
lngC = Asc(Mid(mstrText, lngJ, 1) - 59)
Select Case lngN Mod 3
Case 1
lngK = lngK + 4
If lngK > lngA Then lngK = lngA
lngE = Asc(Mid(mstrText, lngK, 1)) - 59
lngD = ((lngE \ 16) And 3) * 64
Case 2
lngD = ((lngE \ 4) And 3) * 64
Case 0
lngD = (lngE And 3) * 64
lngJ = lngJ + 1
End Select
Mid(strB, lngN, 1) = Chr(lngC Or lngD)
Next lngN
mstrText = strB
End Sub
' èíèöèàëèçàöèÿ ãåíåðàòîðà ñëó÷àéíûõ ÷èñåë ïî êëþ÷ó
Private Sub initialize()
Dim lngN As Long
Randomize Rnd(-1)
For lngN = 1 To Len(mstrKey)
Randomize Rnd(-Rnd * Asc(Mid(mstrKey, lngN, 1)))
Next lngN
End Sub

Binary file added Disks.exe
Binary file not shown.
73 changes: 73 additions & 0 deletions Disks.frm
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form Disks
BorderStyle = 1 'Fixed Single
Caption = "Ñîñòîÿíèå äèñêîâ"
ClientHeight = 3960
ClientLeft = 2760
ClientTop = 2325
ClientWidth = 7755
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3960
ScaleWidth = 7755
Begin RichTextLib.RichTextBox txtData
Height = 3975
Left = 0
TabIndex = 0
Top = 0
Width = 7815
_ExtentX = 13785
_ExtentY = 7011
_Version = 393217
ScrollBars = 2
TextRTF = $"Disks.frx":0000
End
End
Attribute VB_Name = "Disks"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' ñîçäàåì ýêçåìïëÿð îáúåêòà FileSystemObject
Dim mfsysObject As New Scripting.FileSystemObject
' îáúÿâëÿåì îáúåêò Drive
Dim drvItem As Drive
Private Sub Form_Load()
' äîáàâëÿåì çàãîëîâêè â òåêñòîâîå ïîëå
txtData.Text = "Drives " & "Free space" & vbCrLf & vbCrLf
' èçìåíÿåì ôîðìó êóðñîðà ìûøè íà ïåñî÷íûå ÷àñû
MousePointer = vbHourglass
' ïðîâåðÿåì êàæäîå äèñêîâîå óñòðîéñòâî
'Äëÿ ñèñòåìíûõ äèñêîâ
'If drvltem.DriveType = Fixed Then
' çäåñü ïðîâåðÿåì ðàçìåð ñâîáîäíîãî ïðîñòðàíñòâà...
'End If
For Each drvItem In mfsysObject.Drives
' îáíîâëÿåì òåêñòîâîå ïîëå
DoEvents
' åñëè äèñê ãîòîâ ê ðàáîòå, ìîæíî âûÿñíèòü
' ðàçìåð ñâîáîäíîãî ìåñòà íà íåì
If drvItem.IsReady Then
txtData.Text = txtData.Text & drvItem.DriveLetter & ":\ " & Round(drvItem.FreeSpace / 10 ^ 6, 2) & " Mb" & vbCrLf
' èíà÷å ñîîáùàåì, ÷òî äèñê íå ãîòîâ
Else
txtData.Text = txtData.Text & drvItem.DriveLetter & ":\ " & "Not Ready." & vbCrLf
End If
Next drvItem
' âîññòàíàâëèâàåì èñõîäíóþ ôîðìó êóðñîðà ìûøè
MousePointer = vbDefault
Folder
End Sub
Sub Folder()
Dim fldObject As Folder
' âûâîäèì èíôîðìàöèþ î ïàïêàõ
txtData.Text = txtData.Text & vbCrLf & "Windows folder: " & mfsysObject.GetSpecialFolder(WindowsFolder) & vbCrLf & "System folder: " & mfsysObject.GetSpecialFolder(SystemFolder) & vbCrLf & "Temporary folder: " & mfsysObject.GetSpecialFolder(TemporaryFolder) & vbCrLf & "Current folder: " & CurDir & vbCrLf
' ïîëó÷àåì îáúåêò òåêóùåé ïàïêè...
Set fldObject = mfsysObject.GetFolder(CurDir)
' è âûâîäèì êîå-êàêóþ èíôîðìàöèþ î íåì
txtData.Text = txtData.Text & "Current directory contains: " & fldObject.Size & " bytes."
End Sub

Binary file added Disks.frx
Binary file not shown.
37 changes: 37 additions & 0 deletions Disks.vbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\WINDOWS\System32\stdole2.tlb#OLE Automation
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\..\..\..\WINDOWS\System32\scrrun.dll#Microsoft Scripting Runtime
Form=DskMgr.frm
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Form=TextMgr.frm
Startup="DskMgr"
HelpFile=""
ExeName32="Disks.exe"
Command32=""
Name="Disks"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Softway"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1

[MS Transaction Server]
AutoRefresh=1
2 changes: 2 additions & 0 deletions Disks.vbw
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DskMgr = 44, 58, 573, 506, Z, 66, 87, 595, 535, C
TextMgr = 66, 87, 616, 535, , 70, 34, 573, 482, C
Loading

0 comments on commit 9c450b5

Please sign in to comment.