Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14ba6fe

Browse files
committed
Remplaced != null by is not null in whole solution
1 parent53ed7fb commit14ba6fe

File tree

16 files changed

+42
-41
lines changed

16 files changed

+42
-41
lines changed

‎Sources/Samples/WPFHexEditor.Sample.CSharp/MainWindow.xaml.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private void SaveAsMenu_Click(object sender, RoutedEventArgs e)
151151
{
152152
varfileDialog=newSaveFileDialog();
153153

154-
if(fileDialog.ShowDialog()!=null)
154+
if(fileDialog.ShowDialog()is notnull)
155155
HexEdit.SubmitChanges(fileDialog.FileName,true);
156156
}
157157

‎Sources/WPFHexaEditor/BaseByte.cs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public IByte Byte
168168

169169
UpdateTextRenderFromByte();
170170

171-
if(value!=null)
171+
if(valueis notnull)
172172
_byte.del_ByteOnChange+=OnByteChange;
173173
}
174174
}
@@ -299,9 +299,9 @@ public virtual void UpdateVisual()
299299
{
300300
varcbb=_parent.GetCustomBackgroundBlock(BytePositionInStream);
301301

302-
Description=cbb!=null?cbb.Description:"";
302+
Description=cbbis notnull?cbb.Description:"";
303303

304-
Background=cbb!=null?cbb.Color:Brushes.Transparent;
304+
Background=cbbis notnull?cbb.Color:Brushes.Transparent;
305305

306306
Foreground=_parent.GetColumnNumber(BytePositionInStream)%2==0
307307
?_parent.Foreground
@@ -320,8 +320,8 @@ public virtual void UpdateVisual()
320320
/// </summary>
321321
protectedvoidUpdateAutoHighLiteSelectionByteVisual()
322322
{
323-
if(_parent.AllowAutoHighLightSelectionByte&&_parent.SelectionByte!=null&&
324-
Byte!=null&&Byte.IsEqual(newbyte[]{_parent.SelectionByte.Value})&&!IsSelected)
323+
if(_parent.AllowAutoHighLightSelectionByte&&_parent.SelectionByteis notnull&&
324+
Byteis notnull&&Byte.IsEqual(newbyte[]{_parent.SelectionByte.Value})&&!IsSelected)
325325
Background=_parent.AutoHighLiteSelectionByteBrush;
326326
}
327327

@@ -354,7 +354,7 @@ public virtual void Clear()
354354
protectedoverridevoidOnRender(DrawingContextdc)
355355
{
356356
//Draw background
357-
if(Background!=null)
357+
if(Backgroundis notnull)
358358
dc.DrawRectangle(Background,null,newRect(0,0,RenderSize.Width,RenderSize.Height));
359359

360360
//Draw text
@@ -371,7 +371,7 @@ protected override void OnRender(DrawingContext dc)
371371

372372
protectedoverridevoidOnMouseEnter(MouseEventArgse)
373373
{
374-
if(Byte!=null&&!IsSelected&&!IsHighLight&&
374+
if(Byteis notnull&&!IsSelected&&!IsHighLight&&
375375
Action!=ByteAction.Modified&&
376376
Action!=ByteAction.Deleted&&
377377
Action!=ByteAction.Added)
@@ -391,13 +391,13 @@ protected override void OnMouseLeave(MouseEventArgs e)
391391
{
392392
varcbb=_parent.GetCustomBackgroundBlock(BytePositionInStream);
393393

394-
if(Byte!=null&&!IsSelected&&!IsHighLight&&
394+
if(Byteis notnull&&!IsSelected&&!IsHighLight&&
395395
Action!=ByteAction.Modified&&
396396
Action!=ByteAction.Deleted&&
397397
Action!=ByteAction.Added)
398398
Background=Brushes.Transparent;
399399

400-
if(cbb!=null&&!IsSelected&&!IsHighLight&&
400+
if(cbbis notnull&&!IsSelected&&!IsHighLight&&
401401
Action!=ByteAction.Modified&&
402402
Action!=ByteAction.Deleted&&
403403
Action!=ByteAction.Added)

‎Sources/WPFHexaEditor/Core/Bytes/ByteModified.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public ByteModified(byte? val, ByteAction action, long bytePositionInStream, lon
5858
/// <summary>
5959
/// Check if the object is valid and data can be used for action
6060
/// </summary>
61-
publicboolIsValid=>BytePositionInStream>-1&&Action!=ByteAction.Nothing&&Byte!=null;
61+
publicboolIsValid=>BytePositionInStream>-1&&Action!=ByteAction.Nothing&&Byteis notnull;
6262

6363
/// <summary>
6464
/// String representation of byte
@@ -91,7 +91,7 @@ public void Clear()
9191
/// <summary>
9292
/// Get if bytemodified is valid
9393
/// </summary>
94-
publicstaticboolCheckIsValid(ByteModifiedbyteModified)=>byteModified!=null&&byteModified.IsValid;
94+
publicstaticboolCheckIsValid(ByteModifiedbyteModified)=>byteModifiedis notnull&&byteModified.IsValid;
9595

9696
#endregion Methods
9797
}

‎Sources/WPFHexaEditor/Core/Bytes/ByteProvider.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public long Position
285285
/// <summary>
286286
/// Get if file is open
287287
/// </summary>
288-
publicboolIsOpen=>_stream!=null;
288+
publicboolIsOpen=>_streamis notnull;
289289

290290
/// <summary>
291291
/// Get if the provider is open
@@ -879,7 +879,7 @@ public void CopyToClipboard(CopyPasteMode copypastemode,
879879
{
880880
caseCopyPasteMode.Byte:
881881
thrownewNotImplementedException();
882-
caseCopyPasteMode.TblStringwhentbl!=null:
882+
caseCopyPasteMode.TblStringwhentblis notnull:
883883
sBuffer=tbl.ToTblString(buffer);
884884
da.SetText(sBuffer,TextDataFormat.Text);
885885
break;
@@ -1363,17 +1363,17 @@ public bool CanCopy(long selectionStart, long selectionStop) =>
13631363
/// <summary>
13641364
/// Update a value indicating whether the current stream is supporting writing.
13651365
/// </summary>
1366-
publicboolCanWrite=>_stream!=null&&!ReadOnlyMode&&_stream.CanWrite;
1366+
publicboolCanWrite=>_streamis notnull&&!ReadOnlyMode&&_stream.CanWrite;
13671367

13681368
/// <summary>
13691369
/// Update a value indicating whether the current stream is supporting reading.
13701370
/// </summary>
1371-
publicboolCanRead=>_stream!=null&&_stream.CanRead;
1371+
publicboolCanRead=>_streamis notnull&&_stream.CanRead;
13721372

13731373
/// <summary>
13741374
/// Update a value indicating whether the current stream is supporting seeking.
13751375
/// </summary>
1376-
publicboolCanSeek=>_stream!=null&&_stream.CanSeek;
1376+
publicboolCanSeek=>_streamis notnull&&_stream.CanSeek;
13771377

13781378
#endregion Can do property...
13791379

‎Sources/WPFHexaEditor/Core/Bytes/Byte_32bit.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public void ChangeByte(int index, byte value, ByteOrderType byteOrder = ByteOrde
332332
break;
333333
}
334334

335-
if(_newByte!=null&&_newByte.Count==4)
335+
if(_newByteis notnull&&_newByte.Count==4)
336336
{
337337
for(inti=0;i<4;i++)
338338
{

‎Sources/WPFHexaEditor/Core/Caret.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public Caret(Brush brush)
6666
/// <summary>
6767
/// Get is caret is running
6868
/// </summary>
69-
publicboolIsEnable=>_timer!=null;
69+
publicboolIsEnable=>_timeris notnull;
7070

7171
/// <summary>
7272
/// Propertie used when caret is blinking

‎Sources/WPFHexaEditor/Core/CharacterTable/DTE.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public Dte(string entry, string value, DteType type)
6161
/// </summary>
6262
publicstringEntry
6363
{
64-
set=>_entry=value!=null
64+
set=>_entry=valueis notnull
6565
?value.ToUpperInvariant()
6666
:string.Empty;
6767
get=>_entry;

‎Sources/WPFHexaEditor/Core/Converters/BoolInverterConverter.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
2020

2121
try
2222
{
23-
val=value!=null&&(bool)value;
23+
val=valueis notnull&&(bool)value;
2424
}
2525
catch
2626
{

‎Sources/WPFHexaEditor/Core/Converters/ByteToHexStringConverter.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public sealed class ByteToHexStringConverter : IValueConverter
1717
publicboolShow0xTag{get;set;}=true;
1818

1919
publicobjectConvert(objectvalue,TypetargetType,objectparameter,CultureInfoculture)=>
20-
value!=null
20+
valueis notnull
2121
?(byte.TryParse(value.ToString(),outvarbyteValue)
2222
?(byteValue>=0
2323
?(Show0xTag?"0x":"")+byteValue

‎Sources/WPFHexaEditor/Core/Converters/LongToHexStringConverter.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace WpfHexaEditor.Core.Converters
1515
publicsealedclassLongToHexStringConverter:IValueConverter
1616
{
1717
publicobjectConvert(objectvalue,TypetargetType,objectparameter,CultureInfoculture)=>
18-
value!=null
18+
valueis notnull
1919
?(long.TryParse(value.ToString(),outvarlongValue)
2020
?(longValue>-1
2121
?"0x"+longValue

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp