Skip to content

Commit 77d13d6

Browse files
committed
Merge branch 'master' of https://github.com/gammasoft71/xtd
2 parents ed3e086 + b9cbfb9 commit 77d13d6

File tree

16 files changed

+44
-49
lines changed

16 files changed

+44
-49
lines changed

examples/xtd.core.examples/environment/environment_stack_trace/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ xtdc run
2020
```
2121
environment::stack_trace:
2222
at xtd::environment::stack_trace() [0x00002C20] in !---OMITTED---!/environment.cpp:line 255
23-
at test3() [0x00002B40] in !---OMITTED---!/environment_stack_trace.cpp:line 7
24-
at test2() [0x00002CA0] in !---OMITTED---!/environment_stack_trace.cpp:line 11
25-
at test1() [0x00002CB0] in !---OMITTED---!/environment_stack_trace.cpp:line 15
26-
at main [0x00002CC0] in !---OMITTED---!/environment_stack_trace.cpp:line 20
23+
at test3() [0x00002B40] in !---OMITTED---!/environment_stack_trace.cpp:line 5
24+
at test2() [0x00002CA0] in !---OMITTED---!/environment_stack_trace.cpp:line 9
25+
at test1() [0x00002CB0] in !---OMITTED---!/environment_stack_trace.cpp:line 13
26+
at main [0x00002CC0] in !---OMITTED---!/environment_stack_trace.cpp:line 17
2727
```

examples/xtd.core.examples/environment/environment_stack_trace/src/environment_stack_trace.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void test1() {
1313
test2();
1414
}
1515

16-
1716
auto main() -> int {
1817
test1();
1918
}
@@ -22,7 +21,7 @@ auto main() -> int {
2221
//
2322
// environment::stack_trace:
2423
// at xtd::environment::stack_trace() [0x00002C20] in !---OMITTED---!/environment.cpp:line 255
25-
// at test3() [0x00002B40] in !---OMITTED---!/environment_stack_trace.cpp:line 7
26-
// at test2() [0x00002CA0] in !---OMITTED---!/environment_stack_trace.cpp:line 11
27-
// at test1() [0x00002CB0] in !---OMITTED---!/environment_stack_trace.cpp:line 15
28-
// at main [0x00002CC0] in !---OMITTED---!/environment_stack_trace.cpp:line 20
24+
// at test3() [0x00002B40] in !---OMITTED---!/environment_stack_trace.cpp:line 5
25+
// at test2() [0x00002CA0] in !---OMITTED---!/environment_stack_trace.cpp:line 9
26+
// at test1() [0x00002CB0] in !---OMITTED---!/environment_stack_trace.cpp:line 13
27+
// at main [0x00002CC0] in !---OMITTED---!/environment_stack_trace.cpp:line 17

examples/xtd.core.examples/time_span/time_span_from_days/src/time_span_from_days.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
#include <xtd/xtd>
22

3-
void gen_time_span_from_days (double days) {
4-
// Crée un objet TimeSpan et une chaîne TimeSpan à partir
5-
// d'un nombre de jours.
3+
auto gen_time_span_from_days (double days) -> void {
4+
// Creates a time_span object and a time_span string from a number of days.
65
auto interval = time_span::from_days(days);
76
auto time_interval = interval.to_string();
87

9-
// Remplit la fin de la chaîne TimeSpan avec des espaces si elle
10-
// ne contient pas de millisecondes.
11-
size_t index = time_interval.index_of( ':' );
12-
index = time_interval.index_of( '.', index );
8+
// Fills the end of the time_span string with spaces if it does not contain milliseconds.
9+
auto index = time_interval.index_of(':');
10+
index = time_interval.index_of('.', index);
1311
if (index == string::npos) time_interval += " ";
1412

1513
console::write_line("{0,21}{1,26}", days, time_interval);
1614
}
1715

18-
int main() {
16+
auto main() -> int {
1917
console::write_line("This example of time_span::from_days(double)\n"
20-
"generates the following output.\n" );
21-
console::write_line("{0,21}{1,19}",
22-
"from_days", "time_span" );
23-
console::write_line("{0,21}{1,19}",
24-
"---------", "---------" );
18+
"generates the following output.\n");
19+
console::write_line("{0,21}{1,19}", "from_days", "time_span");
20+
console::write_line("{0,21}{1,19}", "---------", "---------");
2521

2622
gen_time_span_from_days(0.000000006);
2723
gen_time_span_from_days(0.000000017);

examples/xtd.forms.examples/components/forms_timer/src/forms_timer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ namespace timer_example {
44
class form1 : public form {
55
public:
66
form1() {
7-
label1.parent(*this);
7+
label1.parent(self_);
88
label1.text("0.0");
99
label1.font(drawing::font("Arial", 48, font_style::italic));
1010
label1.location({10, 10});
1111
label1.auto_size(true);
1212
label1.fore_color(color::dodger_blue);
1313

14-
button1.parent(*this);
14+
button1.parent(self_);
1515
button1.text("Start");
1616
button1.location({10, 90});
1717
button1.click += delegate_(object & sender, const event_args & e) {

examples/xtd.forms.examples/containers/horizontal_layout_panel/src/horizontal_layout_panel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ class form_main : public form {
44
public:
55
form_main() {
66
text("Horizontal layout panel example");
7+
controls().add(layout_panel);
78

8-
layout_panel.parent(*this);
99
layout_panel.controls().add_range({light_pink_panel, light_green_panel, light_blue_panel, light_yellow_panel});
1010
layout_panel.control_layout_style(light_pink_panel, {30, size_type::absolute, true});
1111
layout_panel.control_layout_style(light_green_panel, {.70f, size_type::percent, true});

examples/xtd.forms.examples/containers/panel/src/panel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ class form1 : public form {
77
location({200, 200});
88
client_size({640, 480});
99

10-
panel1.parent(*this);
10+
panel1.parent(self_);
1111
panel1.border_style(forms::border_style::fixed_single);
1212
panel1.location({10, 10});
1313
panel1.size({305, 460});
1414
panel1.anchor(anchor_styles::top | anchor_styles::left | anchor_styles::bottom);
1515

16-
panel2.parent(*this);
16+
panel2.parent(self_);
1717
panel2.border_style(forms::border_style::fixed_3d);
1818
panel2.location({325, 10});
1919
panel2.size({305, 460});

examples/xtd.forms.examples/containers/split_container/src/split_container.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class form1 : public form {
66
text("Split container example");
77
client_size({300, 300});
88

9-
split_container_left.parent(*this);
9+
split_container_left.parent(self_);
1010
split_container_left.dock(dock_style::fill);
1111
split_container_left.panel1().back_color(color::light_blue);
1212
split_container_left.splitter_distance(70);

examples/xtd.forms.examples/dialogs/assert_dialog/src/assert_dialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class form1 : public form {
1212
button1.click += delegate_ {
1313
auto dialog = assert_dialog {};
1414
dialog.message("Index must be > 0");
15-
switch(dialog.show_sheet_dialog(*this)) {
15+
switch(dialog.show_sheet_dialog(self_)) {
1616
case forms::dialog_result::abort: application::exit(); break;
1717
case forms::dialog_result::retry: diagnostics::debugger::debug_break(); break;
1818
default: break;

examples/xtd.forms.examples/dialogs/busy_box/src/busy_box.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class form1 : public form {
77

88
button1.auto_size(true);
99
button1.location({10, 10});
10-
button1.parent(*this);
10+
button1.parent(self_);
1111
button1.text("Do something...");
1212
button1.click += delegate_ {
1313
busy_box::show("Please wait while do something...", "Application busy");

examples/xtd.forms.examples/dialogs/busy_dialog/busy_dialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class form1 : public form {
77

88
button1.auto_size(true);
99
button1.location({10, 10});
10-
button1.parent(*this);
10+
button1.parent(self_);
1111
button1.text("Do something...");
1212
button1.click += delegate_ {
1313
auto dialog = busy_dialog {};
@@ -17,7 +17,7 @@ class form1 : public form {
1717
dialog.back_color(xtd::drawing::color::red);
1818
dialog.fore_color(xtd::drawing::color::white);
1919
dialog.opacity(0.75);
20-
dialog.show(*this);
20+
dialog.show(self_);
2121
for (auto count = 0; count < 500; ++count) {
2222
application::do_events();
2323
thread::sleep(10);

0 commit comments

Comments
 (0)