4
4
#include < xtd/forms/color_picker>
5
5
#include < xtd/forms/form>
6
6
7
- using namespace xtd ::drawing ;
7
+ using namespace application_settings ::properties ;
8
8
using namespace xtd ::forms;
9
9
10
10
auto main () -> int {
11
- auto main_form = form::create (application_settings::properties:: settings::default_settings ().text (), form_start_position::manual);
11
+ auto main_form = form::create (settings::default_settings ().text (), form_start_position::manual);
12
12
13
13
auto back_color_picker = color_picker::create (main_form, main_form.back_color (), {10 , 10 }, {75 , 25 });
14
14
back_color_picker.color_picker_changed += [&] {
@@ -17,23 +17,23 @@ auto main() -> int {
17
17
18
18
auto save_button = button::create (main_form, " &Save" , {90 , 10 });
19
19
save_button.click += [&] {
20
- application_settings::properties:: settings::default_settings ().size (main_form.client_size ());
21
- application_settings::properties:: settings::default_settings ().location (main_form.location ());
22
- application_settings::properties:: settings::default_settings ().back_color (main_form.back_color ());
23
- application_settings::properties:: settings::default_settings ().save ();
20
+ settings::default_settings ().size (main_form.client_size ());
21
+ settings::default_settings ().location (main_form.location ());
22
+ settings::default_settings ().back_color (main_form.back_color ());
23
+ settings::default_settings ().save ();
24
24
};
25
25
26
26
auto reload_button = button::create (main_form, " &Reload" , {170 , 10 });
27
27
reload_button.click += [&] {
28
- main_form.client_size (application_settings::properties:: settings::default_settings ().size ());
29
- main_form.location (application_settings::properties:: settings::default_settings ().location ());
30
- main_form.back_color (application_settings::properties:: settings::default_settings ().back_color ());
31
- back_color_picker.color (application_settings::properties:: settings::default_settings ().back_color ());
28
+ main_form.client_size (settings::default_settings ().size ());
29
+ main_form.location (settings::default_settings ().location ());
30
+ main_form.back_color (settings::default_settings ().back_color ());
31
+ back_color_picker.color (settings::default_settings ().back_color ());
32
32
};
33
33
34
34
auto reset_button = button::create (main_form, " R&eset" , {250 , 10 });
35
35
reset_button.click += [&] {
36
- application_settings::properties:: settings::default_settings ().reset ();
36
+ settings::default_settings ().reset ();
37
37
reload_button.perform_click ();
38
38
};
39
39
0 commit comments