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
|
# File 'lib/dragons_keep/account_dialog.rb', line 17
def initialize parent, id, title
super parent, id, title
self.set_size(Wx::Size.new(400, 300))
main_sizer = Wx::BoxSizer.new(Wx::VERTICAL)
grid_sizer = Wx::FlexGridSizer.new(4,2,5,5)
label = Wx::StaticText.new(self, :label=>"Name:")
grid_sizer.add label, 0, Wx::ALL |Wx::ALIGN_RIGHT
@name = Wx::TextCtrl.new self, ID_ACCOUNT_NAME
grid_sizer.add @name, 1, Wx::EXPAND
label = Wx::StaticText.new(self, :label=>"URL:")
grid_sizer.add label, 0,Wx::ALL |Wx::ALIGN_RIGHT
@url = Wx::TextCtrl.new self, ID_URL
grid_sizer.add @url, 1, Wx::EXPAND
label = Wx::StaticText.new(self, :label=>"User Name:")
grid_sizer.add label, 0, Wx::ALL |Wx::ALIGN_RIGHT
@user = Wx::TextCtrl.new self, ID_USER_NAME
grid_sizer.add @user, 1, Wx::EXPAND
label = Wx::StaticText.new(self, :label=>"Password:")
grid_sizer.add label, 0, Wx::ALL |Wx::ALIGN_RIGHT
@pass = Wx::TextCtrl.new self, ID_PASSWORD, :style=> Wx::TE_PASSWORD
grid_sizer.add @pass, 1, Wx::EXPAND
main_sizer.add grid_sizer, 0, Wx::GROW|Wx::ALIGN_CENTER_VERTICAL|Wx::ALL, 5
grid_sizer.add_growable_col(1)
grid_sizer.add(25, 25)
@gen_button = Wx::Button.new self, ID_GENERATE_PASSWORD, "Generate Password..."
grid_sizer.add @gen_button, 1, Wx::EXPAND
evt_button(ID_GENERATE_PASSWORD){|evt| self.gen_pass_click(evt)}
main_sizer.add self.create_separated_button_sizer(Wx::OK|Wx::CANCEL), 1, Wx::ALIGN_RIGHT
self.set_sizer main_sizer
end
|