Initial revision
[citadel.git] / wincit / entroom.frm
1 VERSION 4.00
2 Begin VB.Form EnterRoom 
3    Appearance      =   0  'Flat
4    BackColor       =   &H00C0C0C0&
5    BorderStyle     =   3  'Fixed Dialog
6    Caption         =   "Enter a new room..."
7    ClientHeight    =   3840
8    ClientLeft      =   1980
9    ClientTop       =   3390
10    ClientWidth     =   5640
11    ControlBox      =   0   'False
12    BeginProperty Font 
13       name            =   "MS Sans Serif"
14       charset         =   0
15       weight          =   700
16       size            =   8.25
17       underline       =   0   'False
18       italic          =   0   'False
19       strikethrough   =   0   'False
20    EndProperty
21    ForeColor       =   &H80000008&
22    Height          =   4245
23    Left            =   1920
24    LinkTopic       =   "Form1"
25    MaxButton       =   0   'False
26    MDIChild        =   -1  'True
27    MinButton       =   0   'False
28    ScaleHeight     =   3840
29    ScaleWidth      =   5640
30    Top             =   3045
31    Width           =   5760
32    Begin VB.OptionButton NewRoomType 
33       Appearance      =   0  'Flat
34       BackColor       =   &H00C0C0C0&
35       Caption         =   "Invitation-only (explicit invitation by Aide or Room Aide)"
36       ForeColor       =   &H80000008&
37       Height          =   255
38       Index           =   3
39       Left            =   240
40       TabIndex        =   10
41       Top             =   1920
42       Width           =   5175
43    End
44    Begin VB.OptionButton NewRoomType 
45       Appearance      =   0  'Flat
46       BackColor       =   &H00C0C0C0&
47       Caption         =   "Passworded (hidden plus password required for access)"
48       ForeColor       =   &H80000008&
49       Height          =   255
50       Index           =   2
51       Left            =   240
52       TabIndex        =   9
53       Top             =   1680
54       Width           =   5175
55    End
56    Begin VB.OptionButton NewRoomType 
57       Appearance      =   0  'Flat
58       BackColor       =   &H00C0C0C0&
59       Caption         =   "GuessName (hidden until user explicitly types room name)"
60       ForeColor       =   &H80000008&
61       Height          =   255
62       Index           =   1
63       Left            =   240
64       TabIndex        =   8
65       Top             =   1440
66       Width           =   5175
67    End
68    Begin VB.OptionButton NewRoomType 
69       Appearance      =   0  'Flat
70       BackColor       =   &H00C0C0C0&
71       Caption         =   "Public (all users can access this room by default)"
72       ForeColor       =   &H80000008&
73       Height          =   255
74       Index           =   0
75       Left            =   240
76       TabIndex        =   7
77       Top             =   1200
78       Width           =   5175
79    End
80    Begin VB.TextBox NewRoomPass 
81       Alignment       =   2  'Center
82       Appearance      =   0  'Flat
83       BackColor       =   &H00C0C0C0&
84       BorderStyle     =   0  'None
85       BeginProperty Font 
86          name            =   "MS Sans Serif"
87          charset         =   0
88          weight          =   400
89          size            =   13.5
90          underline       =   0   'False
91          italic          =   0   'False
92          strikethrough   =   0   'False
93       EndProperty
94       Height          =   375
95       Left            =   240
96       TabIndex        =   6
97       Top             =   2640
98       Width           =   5175
99    End
100    Begin Threed.SSFrame Frame3D3 
101       Height          =   735
102       Left            =   120
103       TabIndex        =   5
104       Top             =   2400
105       Width           =   5415
106       _Version        =   65536
107       _ExtentX        =   9551
108       _ExtentY        =   1296
109       _StockProps     =   14
110       Caption         =   "Room Password"
111       ForeColor       =   0
112    End
113    Begin Threed.SSFrame Frame3D2 
114       Height          =   1455
115       Left            =   120
116       TabIndex        =   4
117       Top             =   840
118       Width           =   5415
119       _Version        =   65536
120       _ExtentX        =   9551
121       _ExtentY        =   2566
122       _StockProps     =   14
123       Caption         =   "Type of room"
124       ForeColor       =   0
125    End
126    Begin Threed.SSFrame Frame3D1 
127       Height          =   735
128       Left            =   120
129       TabIndex        =   2
130       Top             =   0
131       Width           =   5415
132       _Version        =   65536
133       _ExtentX        =   9551
134       _ExtentY        =   1296
135       _StockProps     =   14
136       Caption         =   "Name for new room"
137       ForeColor       =   0
138       Begin VB.TextBox NewRoomName 
139          Alignment       =   2  'Center
140          Appearance      =   0  'Flat
141          BackColor       =   &H00C0C0C0&
142          BorderStyle     =   0  'None
143          BeginProperty Font 
144             name            =   "MS Sans Serif"
145             charset         =   0
146             weight          =   400
147             size            =   13.5
148             underline       =   0   'False
149             italic          =   0   'False
150             strikethrough   =   0   'False
151          EndProperty
152          Height          =   375
153          Left            =   120
154          TabIndex        =   3
155          Top             =   240
156          Width           =   5175
157       End
158    End
159    Begin VB.CommandButton cancel_button 
160       Appearance      =   0  'Flat
161       BackColor       =   &H80000005&
162       Caption         =   "&Cancel"
163       Height          =   492
164       Left            =   4200
165       TabIndex        =   1
166       Top             =   3240
167       Width           =   1332
168    End
169    Begin VB.CommandButton ok_button 
170       Appearance      =   0  'Flat
171       BackColor       =   &H80000005&
172       Caption         =   "&OK (create)"
173       Height          =   492
174       Left            =   2760
175       TabIndex        =   0
176       Top             =   3240
177       Width           =   1332
178    End
179 End
180 Attribute VB_Name = "EnterRoom"
181 Attribute VB_Creatable = False
182 Attribute VB_Exposed = False
183
184 Private Sub cancel_button_Click()
185     
186     Unload EnterRoom
187     Load RoomPrompt
188
189 End Sub
190
191 Private Sub Form_Load()
192
193
194     Show
195     EnterRoom.WindowState = 0
196     EnterRoom.Top = Int((MainWin.Height - EnterRoom.Height) / 3)
197     EnterRoom.Left = Int((MainWin.Width - EnterRoom.Width) / 2)
198     
199     NewRoomType(0).Value = True
200     NewRoomType(1).Value = False
201     NewRoomType(2).Value = False
202     NewRoomType(3).Value = False
203     NewRoomPass.Enabled = NewRoomType(2).Value
204     ok_button.Enabled = False
205
206 End Sub
207
208 Private Sub NewRoomName_Change()
209
210     If Len(NewRoomName.Text) > 0 Then
211         ok_button.Enabled = True
212     Else
213         ok_button.Enabled = False
214         End If
215
216 End Sub
217
218 Private Sub NewRoomType_Click(Index As Integer)
219
220     NewRoomPass.Enabled = NewRoomType(2).Value
221
222 End Sub
223
224 Private Sub ok_button_Click()
225
226     b% = 0
227     For c% = 0 To 3
228         If NewRoomType(c%).Value = True Then b% = c%
229         Next c%
230
231     If begin_trans() = True Then
232         serv_puts ("CRE8 1|" + NewRoomName.Text + "|" + Str$(b%) + "|" + NewRoomPass.Text)
233         a$ = serv_gets()
234         Call end_trans
235         End If
236
237     If Left$(a$, 1) <> "2" Then
238         MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
239     Else
240         CurrRoomName$ = NewRoomName.Text
241         SaveOldCount = 0
242         SaveNewCount = 0
243         Unload EnterRoom
244         Load RoomPrompt
245         End If
246
247 End Sub
248