Skip to content

Commit bf193a0

Browse files
author
tznind
committed
Update to 4424 (Cancel is now called Handled)
1 parent df4cbf1 commit bf193a0

15 files changed

Lines changed: 39 additions & 39 deletions

src/TerminalGuiDesigner.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageOutputPath>./nupkg</PackageOutputPath>
2121
<ImplicitUsings>enable</ImplicitUsings>
2222
<PackageId>TerminalGuiDesigner</PackageId>
23-
<Version>2.0.0-develop.4405</Version>
23+
<Version>2.0.0-develop.4424</Version>
2424
<Authors>Thomas Nind</Authors>
2525
<Nullable>enable</Nullable>
2626
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -155,7 +155,7 @@
155155
<PackageReference Include="Serilog" Version="4.2.0" />
156156
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
157157
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
158-
<PackageReference Include="Terminal.Gui" Version="2.0.0-develop.4405" />
158+
<PackageReference Include="Terminal.Gui" Version="2.0.0-develop.4424" />
159159
<PackageReference Include="nlog" Version="5.3.3" />
160160
<PackageReference Include="Basic.Reference.Assemblies.Net80" Version="1.7.7" />
161161
<PackageReference Include="System.CodeDom" Version="8.0.0" />

src/UI/Windows/ArrayEditor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private void BtnMoveUp_Clicked(object sender, CommandEventArgs e)
8989
lvElements.SetNeedsDraw();
9090
}
9191

92-
e.Cancel = true;
92+
e.Handled = true;
9393
}
9494

9595
private void BtnMoveDown_Clicked(object sender, CommandEventArgs e)
@@ -109,7 +109,7 @@ private void BtnMoveDown_Clicked(object sender, CommandEventArgs e)
109109
lvElements.SetNeedsDraw();
110110
}
111111

112-
e.Cancel = true;
112+
e.Handled = true;
113113
}
114114

115115
private void LvElements_KeyDown(object sender, Key e)
@@ -145,7 +145,7 @@ private void BtnAddElement_Clicked(object sender, CommandEventArgs e)
145145
lvElements.Source = ResultAsList.ToListDataSource();
146146
lvElements.SelectedItem = ResultAsList.Count - 1;
147147
lvElements.SetNeedsDraw();
148-
e.Cancel = true;
148+
e.Handled = true;
149149
}
150150
private void BtnEdit_Clicked(object sender, CommandEventArgs e)
151151
{
@@ -167,19 +167,19 @@ private void BtnEdit_Clicked(object sender, CommandEventArgs e)
167167
lvElements.SetNeedsDraw();
168168
}
169169

170-
e.Cancel = true;
170+
e.Handled = true;
171171
}
172172

173173
private void BtnCancel_Clicked(object sender, CommandEventArgs e)
174174
{
175-
e.Cancel = true;
175+
e.Handled = true;
176176
Cancelled = true;
177177
Application.RequestStop();
178178
}
179179

180180
private void BtnOk_Clicked(object sender, CommandEventArgs e)
181181
{
182-
e.Cancel = true;
182+
e.Handled = true;
183183
Cancelled = false;
184184
Application.RequestStop();
185185
}

src/UI/Windows/BigListBox.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public BigListBox(string prompt,
106106
};
107107
btnOk.Accepting += (s, e) =>
108108
{
109-
e.Cancel = true;
109+
e.Handled = true;
110110
this.Accept();
111111
};
112112

@@ -117,7 +117,7 @@ public BigListBox(string prompt,
117117
};
118118
btnCancel.Accepting += (s, e) =>
119119
{
120-
e.Cancel = true;
120+
e.Handled = true;
121121
Application.RequestStop();
122122
};
123123

src/UI/Windows/ChoicesDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ChoicesDialog(string title, string message, params string[] options) {
5757

5858
buttons[i].Accepting += (s,e) => {
5959
Result = i2;
60-
e.Cancel = true;
60+
e.Handled = true;
6161
Application.RequestStop();
6262

6363
};

src/UI/Windows/ColorPicker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public ColorPicker(Attribute? currentValue)
4949

5050
btnOk.Accepting += (s, e) =>
5151
{
52-
e.Cancel = true;
52+
e.Handled = true;
5353
Ok();
5454
};
55-
btnCancel.Accepting += (s, e) => { e.Cancel = true; Cancel(); };
55+
btnCancel.Accepting += (s, e) => { e.Handled = true; Cancel(); };
5656
}
5757

5858
private void Ok()

src/UI/Windows/ColorSchemeEditor.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,51 +43,51 @@ public ColorSchemeEditor(ColorScheme scheme) {
4343

4444
btnEditNormal.Accepting += (s, e)=>
4545
{
46-
e.Cancel = true;
46+
e.Handled = true;
4747
_result.Normal = PickNewColorsFor(Result.Normal);
4848
SetColorPatches();
4949
};
5050

5151

5252
btnEditHotNormal.Accepting += (s, e)=>
5353
{
54-
e.Cancel = true;
54+
e.Handled = true;
5555
_result.HotNormal = PickNewColorsFor(Result.HotNormal);
5656
SetColorPatches();
5757
};
5858

5959

6060
btnEditFocus.Accepting += (s, e)=>{
61-
e.Cancel = true;
61+
e.Handled = true;
6262
_result.Focus = PickNewColorsFor(Result.Focus);
6363
SetColorPatches();
6464
};
6565

6666

6767
btnEditHotFocus.Accepting += (s, e)=>
6868
{
69-
e.Cancel = true;
69+
e.Handled = true;
7070
_result.HotFocus = PickNewColorsFor(Result.HotFocus);
7171
SetColorPatches();
7272
};
7373

7474

7575
btnEditDisabled.Accepting += (s, e)=>{
76-
e.Cancel = true;
76+
e.Handled = true;
7777
_result.Disabled = PickNewColorsFor(Result.Disabled);
7878
SetColorPatches();
7979
};
8080

8181
btnCancel.Accepting += (s, e)=>
8282
{
83-
e.Cancel = true;
83+
e.Handled = true;
8484
Cancelled = true;
8585
Application.RequestStop();
8686
};
8787

8888
btnOk.Accepting += (s, e)=>
8989
{
90-
e.Cancel = true;
90+
e.Handled = true;
9191
Cancelled = false;
9292
Application.RequestStop();
9393
};

src/UI/Windows/DimEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ private void SetupForCurrentDimType()
145145

146146
private void BtnCancel_Clicked(object sender, CommandEventArgs e)
147147
{
148-
e.Cancel = true;
148+
e.Handled = true;
149149
Cancelled = true;
150150
Application.RequestStop();
151151
}
152152

153153
private void BtnOk_Clicked(object sender, CommandEventArgs e)
154154
{
155-
e.Cancel = true;
155+
e.Handled = true;
156156
Cancelled = false;
157157
Result = BuildResult();
158158
Application.RequestStop();

src/UI/Windows/EditDialog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public EditDialog(Design design)
5858

5959
btnSet.Accepting += (s, e) =>
6060
{
61-
e.Cancel = true;
61+
e.Handled = true;
6262
this.SetProperty(false);
6363
};
6464

@@ -70,7 +70,7 @@ public EditDialog(Design design)
7070
};
7171
btnClose.Accepting += (s, e) =>
7272
{
73-
e.Cancel = true;
73+
e.Handled = true;
7474
Application.RequestStop();
7575
};
7676

src/UI/Windows/ExceptionViewer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void ShowException(string errorText, Exception exception)
4040

4141
btnOk.Accepting += (s, e) =>
4242
{
43-
e.Cancel = true;
43+
e.Handled = true;
4444
Application.RequestStop();
4545
};
4646
var btnStack = new Button()
@@ -49,7 +49,7 @@ public static void ShowException(string errorText, Exception exception)
4949
};
5050
btnStack.Accepting += (s, e) =>
5151
{
52-
e.Cancel = true;
52+
e.Handled = true;
5353
// flip between stack / no stack
5454
textView.Text = GetExceptionText(errorText, exception, toggleStack);
5555
textView.SetNeedsDraw();

src/UI/Windows/GetTextDialog.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public GetTextDialog(DialogArgs args, string? initialValue)
8383
};
8484
btnOk.Accepting += (s, e) =>
8585
{
86-
e.Cancel = true;
86+
e.Handled = true;
8787
this.Accept();
8888
};
8989

@@ -96,7 +96,7 @@ public GetTextDialog(DialogArgs args, string? initialValue)
9696
};
9797
btnCancel.Accepting += (s, e) =>
9898
{
99-
e.Cancel = true;
99+
e.Handled = true;
100100
this.okClicked = false;
101101
Application.RequestStop();
102102
};
@@ -109,7 +109,7 @@ public GetTextDialog(DialogArgs args, string? initialValue)
109109
};
110110
btnClear.Accepting += (s, e) =>
111111
{
112-
e.Cancel = true;
112+
e.Handled = true;
113113
this.textView.Text = string.Empty;
114114
};
115115

0 commit comments

Comments
 (0)