This repository has been archived by the owner on Nov 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathForm3.vb
64 lines (58 loc) · 2.93 KB
/
Form3.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Imports MapEditor.Item.Game
Imports MapEditor.Item.Editor
Public Class Form3
Dim nowBlock As Block
Private Function GetSignString(ByVal Sign As Sign) As String
Dim waitToReturn As String = Nothing
waitToReturn += Sign.Name
waitToReturn += " [X:" & Sign.Position.X & " Y:" & Sign.Position.Y & "]"
Return (waitToReturn)
End Function
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
nowBlock = frmMain.nowBlock
ComboBox1.Items.Clear()
ComboBox2.Items.Clear()
For i = 0 To frmMain.nowMap.SignColl.Count - 1
ComboBox1.Items.Add(GetSignString(frmMain.nowMap.SignColl(i)))
ComboBox2.Items.Add(GetSignString(frmMain.nowMap.SignColl(i)))
Next
End Sub
'Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Call FillBlock(New Point(Val(TextBox1.Text), Val(TextBox2.Text)), New Point(Val(TextBox4.Text), Val(TextBox3.Text)), nowBlock, sender, e)
' Me.Close()
'End Sub
'Public Sub FillBlock(ByVal StartPosition As Point, ByVal EndPosition As Point, ByVal Block As Block)
' Dim waitToFill As Block
' With waitToFill
' .BlockRotate = Val(TextBox5.Text)
' .BlockImage = Block.BlockImage
' .BlockString = Block.BlockString
' .BlockSize.Width = Block.BlockSize.Width
' .BlockSize.Height = Block.BlockSize.Height
' For i = StartPosition.X To EndPosition.X - Block.BlockSize.Width Step Block.BlockSize.Width
' For j = StartPosition.Y To EndPosition.Y - Block.BlockSize.Height Step Block.BlockSize.Height
' Form2.nowImageCount += 1
' .BlockSize.X = i
' .BlockSize.Y = j
' Debug.Print(Form2.nowImageCount)
' Form2.Canv(Form2.nowImageCount) = waitToFill
' Form2.Canvas(i, j) = Form2.nowImageCount
' Next
' Next
' End With
' With Form2
' Call .SaveFile()
' .ComboBox1.Items.Clear()
' Call .OpenFile(Application.StartupPath & "\Temp.bme")
' .ComboBox1.SelectedIndex = .nowSelect - 1
' End With
'End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = frmMain.nowMap.SignColl(ComboBox1.SelectedIndex).Position.X
TextBox2.Text = frmMain.nowMap.SignColl(ComboBox1.SelectedIndex).Position.Y
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
TextBox4.Text = frmMain.nowMap.SignColl(ComboBox2.SelectedIndex).Position.X
TextBox3.Text = frmMain.nowMap.SignColl(ComboBox2.SelectedIndex).Position.Y
End Sub
End Class