| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4140542 commit e6485cf
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,7 +76,7 @@ private void RefreshTree() | |||
| 76 | 76 | { | |
| 77 | 77 | foreach (string item in Directory.GetDirectories(cp)) | |
| 78 | 78 | { | |
| 79 | - if (IsDirectoryExcluded(item) == false) | ||
| 79 | + if (!IsDirectoryExcluded(item)) | ||
| 80 | 80 | { | |
| 81 | 81 | node = new SimpleDirectoryNode(item, Path.Combine(cp, item)); | |
| 82 | 82 | node.ImageIndex = Icons.Folder.Index; | |
@@ -110,7 +110,7 @@ private void onBeforeExpandNode(Object sender, TreeViewCancelEventArgs e) | |||
| 110 | 110 | ||
| 111 | 111 | foreach (string item in Directory.GetDirectories(node.directoryPath)) | |
| 112 | 112 | { | |
| 113 | - if (IsDirectoryExcluded(item) == false) | ||
| 113 | + if (!IsDirectoryExcluded(item)) | ||
| 114 | 114 | { | |
| 115 | 115 | newNode = new SimpleDirectoryNode(item, Path.Combine(node.directoryPath, item)); | |
| 116 | 116 | newNode.ImageIndex = Icons.Folder.Index; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -785,7 +785,7 @@ private void AddToGroup(ListViewItem item, String path) | |||
| 785 | 785 | } | |
| 786 | 786 | if (found) | |
| 787 | 787 | { | |
| 788 | - if (gp.Items.Contains(item) == false) | ||
| 788 | + if (!gp.Items.Contains(item)) | ||
| 789 | 789 | { | |
| 790 | 790 | gp.Items.Add(item); | |
| 791 | 791 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -325,7 +325,7 @@ protected override void OnMouseDown(MouseEventArgs e) | |||
| 325 | 325 | if (e.Button != MouseButtons.Left) | |
| 326 | 326 | return; | |
| 327 | 327 | ||
| 328 | - if (m_mouseCapture == false || m_mouseOver == false) | ||
| 328 | + if (!m_mouseCapture || !m_mouseOver) | ||
| 329 | 329 | { | |
| 330 | 330 | m_mouseCapture = true; | |
| 331 | 331 | m_mouseOver = true; | |
@@ -358,7 +358,7 @@ protected override void OnMouseUp(MouseEventArgs e) | |||
| 358 | 358 | if (e.Button != MouseButtons.Left) | |
| 359 | 359 | return; | |
| 360 | 360 | ||
| 361 | - if (m_mouseOver == true || m_mouseCapture == true) | ||
| 361 | + if (m_mouseOver || m_mouseCapture) | ||
| 362 | 362 | { | |
| 363 | 363 | m_mouseOver = false; | |
| 364 | 364 | m_mouseCapture = false; | |
@@ -606,7 +606,7 @@ private void DrawBorder(Graphics g) | |||
| 606 | 606 | protected override void OnEnabledChanged(EventArgs e) | |
| 607 | 607 | { | |
| 608 | 608 | base.OnEnabledChanged(e); | |
| 609 | - if (Enabled == false) | ||
| 609 | + if (!Enabled) | ||
| 610 | 610 | { | |
| 611 | 611 | m_mouseOver = false; | |
| 612 | 612 | m_mouseCapture = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -183,15 +183,15 @@ private void AnimateWindow(bool show) | |||
| 183 | 183 | if (show) | |
| 184 | 184 | { | |
| 185 | 185 | Bounds = DockPanel.GetAutoHideWindowBounds(new Rectangle(-rectTarget.Width, -rectTarget.Height, rectTarget.Width, rectTarget.Height)); | |
| 186 | - if (Visible == false) | ||
| 186 | + if (!Visible) | ||
| 187 | 187 | Visible = true; | |
| 188 | 188 | PerformLayout(); | |
| 189 | 189 | } | |
| 190 | 190 | ||
| 191 | 191 | SuspendLayout(); | |
| 192 | 192 | ||
| 193 | 193 | LayoutAnimateWindow(rectSource); | |
| 194 | - if (Visible == false) | ||
| 194 | + if (!Visible) | ||
| 195 | 195 | Visible = true; | |
| 196 | 196 | ||
| 197 | 197 | int speedFactor = 1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -393,7 +393,7 @@ private void InvokeContextMenuDefault(FileInfo[] arrFI) | |||
| 393 | 393 | return; | |
| 394 | 394 | } | |
| 395 | 395 | ||
| 396 | - if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr)) | ||
| 396 | + if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr)) | ||
| 397 | 397 | { | |
| 398 | 398 | ReleaseAll(); | |
| 399 | 399 | return; | |
@@ -481,7 +481,7 @@ private void ShowContextMenu(Point pointScreen) | |||
| 481 | 481 | return; | |
| 482 | 482 | } | |
| 483 | 483 | ||
| 484 | - if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr)) | ||
| 484 | + if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr)) | ||
| 485 | 485 | { | |
| 486 | 486 | ReleaseAll(); | |
| 487 | 487 | return; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -156,22 +156,22 @@ public ushort Flag | |||
| 156 | 156 | get | |
| 157 | 157 | { | |
| 158 | 158 | ushort returnValue = 0; | |
| 159 | - if (this.FOF_MULTIDESTFILES == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_MULTIDESTFILES; | ||
| 160 | - if (this.FOF_CONFIRMMOUSE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_CONFIRMMOUSE; | ||
| 161 | - if (this.FOF_SILENT == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SILENT; | ||
| 162 | - if (this.FOF_RENAMEONCOLLISION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_RENAMEONCOLLISION; | ||
| 163 | - if (this.FOF_NOCONFIRMATION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMATION; | ||
| 164 | - if (this.FOF_WANTMAPPINGHANDLE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTMAPPINGHANDLE; | ||
| 165 | - if (this.FOF_ALLOWUNDO == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_ALLOWUNDO; | ||
| 166 | - if (this.FOF_FILESONLY == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_FILESONLY; | ||
| 167 | - if (this.FOF_SIMPLEPROGRESS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SIMPLEPROGRESS; | ||
| 168 | - if (this.FOF_NOCONFIRMMKDIR == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMMKDIR; | ||
| 169 | - if (this.FOF_NOERRORUI == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOERRORUI; | ||
| 170 | - if (this.FOF_NOCOPYSECURITYATTRIBS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCOPYSECURITYATTRIBS; | ||
| 171 | - if (this.FOF_NORECURSION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSION; | ||
| 172 | - if (this.FOF_NO_CONNECTED_ELEMENTS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NO_CONNECTED_ELEMENTS; | ||
| 173 | - if (this.FOF_WANTNUKEWARNING == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTNUKEWARNING; | ||
| 174 | - if (this.FOF_NORECURSEREPARSE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSEREPARSE; | ||
| 159 | + if (this.FOF_MULTIDESTFILES) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_MULTIDESTFILES; | ||
| 160 | + if (this.FOF_CONFIRMMOUSE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_CONFIRMMOUSE; | ||
| 161 | + if (this.FOF_SILENT) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SILENT; | ||
| 162 | + if (this.FOF_RENAMEONCOLLISION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_RENAMEONCOLLISION; | ||
| 163 | + if (this.FOF_NOCONFIRMATION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMATION; | ||
| 164 | + if (this.FOF_WANTMAPPINGHANDLE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTMAPPINGHANDLE; | ||
| 165 | + if (this.FOF_ALLOWUNDO) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_ALLOWUNDO; | ||
| 166 | + if (this.FOF_FILESONLY) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_FILESONLY; | ||
| 167 | + if (this.FOF_SIMPLEPROGRESS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SIMPLEPROGRESS; | ||
| 168 | + if (this.FOF_NOCONFIRMMKDIR) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMMKDIR; | ||
| 169 | + if (this.FOF_NOERRORUI) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOERRORUI; | ||
| 170 | + if (this.FOF_NOCOPYSECURITYATTRIBS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCOPYSECURITYATTRIBS; | ||
| 171 | + if (this.FOF_NORECURSION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSION; | ||
| 172 | + if (this.FOF_NO_CONNECTED_ELEMENTS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NO_CONNECTED_ELEMENTS; | ||
| 173 | + if (this.FOF_WANTNUKEWARNING) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTNUKEWARNING; | ||
| 174 | + if (this.FOF_NORECURSEREPARSE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSEREPARSE; | ||
| 175 | 175 | return returnValue; | |
| 176 | 176 | } | |
| 177 | 177 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -110,7 +110,7 @@ public DeflaterOutputStream(Stream baseOutputStream, Deflater deflater, int buff | |||
| 110 | 110 | throw new ArgumentNullException("baseOutputStream"); | |
| 111 | 111 | } | |
| 112 | 112 | ||
| 113 | - if (baseOutputStream.CanWrite == false) { | ||
| 113 | + if (!baseOutputStream.CanWrite) { | ||
| 114 | 114 | throw new ArgumentException("Must support writing", "baseOutputStream"); | |
| 115 | 115 | } | |
| 116 | 116 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -571,10 +571,10 @@ public int Version | |||
| 571 | 571 | else if (CompressionMethod.Deflated == method) { | |
| 572 | 572 | result = 20; | |
| 573 | 573 | } | |
| 574 | - else if (IsDirectory == true) { | ||
| 574 | + else if (IsDirectory) { | ||
| 575 | 575 | result = 20; | |
| 576 | 576 | } | |
| 577 | - else if (IsCrypted == true) { | ||
| 577 | + else if (IsCrypted) { | ||
| 578 | 578 | result = 20; | |
| 579 | 579 | } | |
| 580 | 580 | else if (HasDosAttributes(0x08) ) { | |
@@ -1204,7 +1204,7 @@ public static string CleanName(string name) | |||
| 1204 | 1204 | return string.Empty; | |
| 1205 | 1205 | } | |
| 1206 | 1206 | ||
| 1207 | - if (Path.IsPathRooted(name) == true) { | ||
| 1207 | + if (Path.IsPathRooted(name)) { | ||
| 1208 | 1208 | // NOTE: | |
| 1209 | 1209 | // for UNC names... \\machine\share\zoom\beet.txt gives \zoom\beet.txt | |
| 1210 | 1210 | name = name.Substring(Path.GetPathRoot(name).Length); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -812,7 +812,7 @@ public Stream GetInputStream(long entryIndex) | |||
| 812 | 812 | CompressionMethod method = entries_[entryIndex].CompressionMethod; | |
| 813 | 813 | Stream result = new PartialInputStream(this, start, entries_[entryIndex].CompressedSize); | |
| 814 | 814 | ||
| 815 | - if (entries_[entryIndex].IsCrypted == true) { | ||
| 815 | + if (entries_[entryIndex].IsCrypted) { | ||
| 816 | 816 | #if NETCF_1_0 | |
| 817 | 817 | throw new ZipException("decryption not supported for Compact Framework 1.0"); | |
| 818 | 818 | #else | |
@@ -2381,7 +2381,7 @@ Stream GetOutputStream(ZipEntry entry) | |||
| 2381 | 2381 | { | |
| 2382 | 2382 | Stream result = baseStream_; | |
| 2383 | 2383 | ||
| 2384 | - if ( entry.IsCrypted == true ) { | ||
| 2384 | + if ( entry.IsCrypted ) { | ||
| 2385 | 2385 | #if NETCF_1_0 | |
| 2386 | 2386 | throw new ZipException("Encryption not supported for Compact Framework 1.0"); | |
| 2387 | 2387 | #else | |
@@ -3094,7 +3094,7 @@ void ReadEntries() | |||
| 3094 | 3094 | // this could be invalid. | |
| 3095 | 3095 | // Could also speed this up by reading memory in larger blocks. | |
| 3096 | 3096 | ||
| 3097 | - if (baseStream_.CanSeek == false) { | ||
| 3097 | + if (!baseStream_.CanSeek) { | ||
| 3098 | 3098 | throw new ZipException("ZipFile stream must be seekable"); | |
| 3099 | 3099 | } | |
| 3100 | 3100 | ||
@@ -3275,7 +3275,7 @@ Stream CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry) | |||
| 3275 | 3275 | PkzipClassicManaged classicManaged = new PkzipClassicManaged(); | |
| 3276 | 3276 | ||
| 3277 | 3277 | OnKeysRequired(entry.Name); | |
| 3278 | - if (HaveKeys == false) { | ||
| 3278 | + if (!HaveKeys) { | ||
| 3279 | 3279 | throw new ZipException("No password available for encrypted stream"); | |
| 3280 | 3280 | } | |
| 3281 | 3281 | ||
@@ -3287,7 +3287,7 @@ Stream CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry) | |||
| 3287 | 3287 | if (entry.Version == ZipConstants.VERSION_AES) { | |
| 3288 | 3288 | // | |
| 3289 | 3289 | OnKeysRequired(entry.Name); | |
| 3290 | - if (HaveKeys == false) { | ||
| 3290 | + if (!HaveKeys) { | ||
| 3291 | 3291 | throw new ZipException("No password available for AES encrypted stream"); | |
| 3292 | 3292 | } | |
| 3293 | 3293 | int saltLen = entry.AESSaltLen; | |
@@ -3324,7 +3324,7 @@ Stream CreateAndInitEncryptionStream(Stream baseStream, ZipEntry entry) | |||
| 3324 | 3324 | PkzipClassicManaged classicManaged = new PkzipClassicManaged(); | |
| 3325 | 3325 | ||
| 3326 | 3326 | OnKeysRequired(entry.Name); | |
| 3327 | - if (HaveKeys == false) { | ||
| 3327 | + if (!HaveKeys) { | ||
| 3328 | 3328 | throw new ZipException("No password available for encrypted stream"); | |
| 3329 | 3329 | } | |
| 3330 | 3330 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -226,7 +226,7 @@ void WriteLocalHeader(ZipEntry entry, EntryPatchData patchData) | |||
| 226 | 226 | WriteLEShort((byte)method); | |
| 227 | 227 | WriteLEInt((int)entry.DosTime); | |
| 228 | 228 | ||
| 229 | - if (headerInfoAvailable == true) { | ||
| 229 | + if (headerInfoAvailable) { | ||
| 230 | 230 | WriteLEInt((int)entry.Crc); | |
| 231 | 231 | if ( entry.LocalHeaderRequiresZip64 ) { | |
| 232 | 232 | WriteLEInt(-1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments