Changeset 1769
- Timestamp:
- 2/8/2010 7:29:41 AM (2 years ago)
- Location:
- branches/eraser6/CodeReview
- Files:
-
- 13 edited
-
. (modified) (1 prop)
-
Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs (modified) (4 diffs)
-
Eraser.Manager/DirectExecutor.cs (modified) (2 diffs)
-
Eraser.msbuild (modified) (1 prop)
-
Eraser/BlackBoxMainForm.cs (modified) (1 diff)
-
Eraser/BlackBoxMainForm.it.resx (modified) (1 prop)
-
Eraser/BlackBoxUploadForm.it.resx (modified) (1 prop)
-
Eraser/MainForm.cs (modified) (2 diffs)
-
Eraser/Program.GuiProgram.cs (modified) (1 diff)
-
Eraser/Strings.NL.resx (modified) (2 diffs)
-
Eraser/Strings.en.resx (modified) (2 diffs)
-
Eraser/Strings.it.resx (modified) (2 diffs)
-
Eraser/Strings.resx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview
- Property svn:mergeinfo changed
/branches/eraser6/6.0 merged: 1744,1752,1754 /trunk/eraser6 merged: 1751-1764
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs
r1768 r1769 86 86 if (paths == null) 87 87 { 88 if (targetSize <= dataSize)88 if (targetSize <= DataSize) 89 89 amountToWrite = targetSize; 90 90 else 91 amountToWrite = dataSize * 2;91 amountToWrite = DataSize * 2; 92 92 } 93 93 else 94 amountToWrite = paths.Count * dataSize * 2;94 amountToWrite = paths.Count * DataSize * 2; 95 95 96 96 //The final amount has to be multiplied by the number of passes. … … 116 116 //If the target stream is shorter than or equal to 32kb, just forward it to 117 117 //the default function. 118 if (strm.Length < dataSize * 2)118 if (strm.Length < DataSize * 2) 119 119 { 120 120 method.Erase(strm, erasureLength, prng, callback); … … 124 124 //We need to intercept the callback function as we run the erasure method 125 125 //twice on two parts of the file. 126 long dataSize = method.CalculateEraseDataSize(null, DataSize * 2); 126 127 ErasureMethodProgressFunction customCallback = 127 128 delegate(long lastWritten, long totalData, int currentPass) 128 129 { 129 callback(lastWritten, dataSize * 2, currentPass);130 callback(lastWritten, dataSize, currentPass); 130 131 }; 131 132 … … 142 143 /// The amount of data to be erased from the header and the end of the file. 143 144 /// </summary> 144 private const long dataSize = 16 * 1024;145 private const long DataSize = 16 * 1024; 145 146 146 147 private ErasureMethod method; -
branches/eraser6/CodeReview/Eraser.Manager/DirectExecutor.cs
r1767 r1769 55 55 thread.Abort(); 56 56 schedulerInterrupt.Set(); 57 58 //Wait for the executor thread to exit -- we call some event functions 59 //and these events may need invocation on the main thread. So, 60 //pump messages from the main thread until the thread exits. 61 if (System.Windows.Forms.Application.MessageLoop) 62 { 63 if (!thread.Join(new TimeSpan(0, 0, 0, 0, 100))) 64 System.Windows.Forms.Application.DoEvents(); 65 } 66 67 //If we are disposing on a secondary thread, or a thread without 68 //a message loop, just wait for the thread to exit indefinitely 69 else 70 thread.Join(); 71 57 72 schedulerInterrupt.Close(); 58 73 } … … 615 630 "not be erased because the file was either compressed, encrypted or " + 616 631 "a sparse file.", info.FullName), LogLevel.Error)); 632 continue; 617 633 } 618 634 -
branches/eraser6/CodeReview/Eraser.msbuild
- Property svn:mergeinfo changed
/trunk/eraser6/Eraser.msbuild merged: 1751-1764
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser/BlackBoxMainForm.cs
r1681 r1769 58 58 private void ReportsLv_ItemActivate(object sender, EventArgs e) 59 59 { 60 if (ReportsLv.SelectedItems.Count == 0) 61 return; 62 60 63 Process.Start((ReportsLv.SelectedItems[0].Tag as BlackBoxReport).Path); 61 64 } -
branches/eraser6/CodeReview/Eraser/BlackBoxMainForm.it.resx
- Property svn:mergeinfo changed
/trunk/eraser6/Eraser/BlackBoxMainForm.it.resx merged: 1751-1764
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser/BlackBoxUploadForm.it.resx
- Property svn:mergeinfo changed
/trunk/eraser6/Eraser/BlackBoxUploadForm.it.resx merged: 1751-1764
- Property svn:mergeinfo changed
-
branches/eraser6/CodeReview/Eraser/MainForm.cs
r1768 r1769 34 34 using System.Diagnostics; 35 35 using System.Reflection; 36 using System.Runtime.Serialization; 36 37 37 38 namespace Eraser … … 261 262 FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) 262 263 { 263 Program.eraserClient.Tasks.LoadFromStream(stream); 264 try 265 { 266 Program.eraserClient.Tasks.LoadFromStream(stream); 267 } 268 catch (FileLoadException ex) 269 { 270 MessageBox.Show(S._("The task list could not be imported. The error " + 271 "returned was: {0}", ex.Message), S._("Eraser"), 272 MessageBoxButtons.OK, MessageBoxIcon.Error, 273 MessageBoxDefaultButton.Button1, 274 S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 275 } 276 catch (SerializationException ex) 277 { 278 MessageBox.Show(S._("The task list could not be imported. The error " + 279 "returned was: {0}", ex.Message), S._("Eraser"), 280 MessageBoxButtons.OK, MessageBoxIcon.Error, 281 MessageBoxDefaultButton.Button1, 282 S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 283 } 264 284 } 265 285 } -
branches/eraser6/CodeReview/Eraser/Program.GuiProgram.cs
r1768 r1769 162 162 { 163 163 MessageBox.Show(S._("Another instance of Eraser is already running but " + 164 "cannot be connected to.\n\nThe error returned was: {0}", ex.Message ,164 "cannot be connected to.\n\nThe error returned was: {0}", ex.Message), 165 165 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 166 166 MessageBoxDefaultButton.Button1, 167 167 S.IsRightToLeft(null) ? 168 MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0) );168 MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 169 169 } 170 170 catch (TimeoutException) -
branches/eraser6/CodeReview/Eraser/Strings.NL.resx
r1750 r1769 163 163 <value>(Untranslated)</value> 164 164 </data> 165 <data name="The task list could not be imported. The error returned was: {0}" xml:space="preserve"> 166 <value>(Untranslated)</value> 167 </data> 165 168 <data name="The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}" xml:space="preserve"> 166 169 <value>(Untranslated)</value> … … 175 178 <value>(Untranslated)</value> 176 179 </data> 177 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0} Eraser" xml:space="preserve">180 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}" xml:space="preserve"> 178 181 <value>(Untranslated)</value> 179 182 </data> -
branches/eraser6/CodeReview/Eraser/Strings.en.resx
r1750 r1769 163 163 <value>Session: {0:F}</value> 164 164 </data> 165 <data name="The task list could not be imported. The error returned was: {0}" xml:space="preserve"> 166 <value>The task list could not be imported. The error returned was: {0}</value> 167 </data> 165 168 <data name="The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}" xml:space="preserve"> 166 169 <value>The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}</value> … … 175 178 <value>Another instance of Eraser is already running but it is running with higher privileges than this instance of Eraser.\n\nEraser will now exit.</value> 176 179 </data> 177 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0} Eraser" xml:space="preserve">178 <value> (Untranslated)</value>180 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}" xml:space="preserve"> 181 <value>Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}</value> 179 182 </data> 180 183 <data name="Total: {0,2:#0.00%}" xml:space="preserve"> -
branches/eraser6/CodeReview/Eraser/Strings.it.resx
r1750 r1769 163 163 <value>Sessione: {0:F}</value> 164 164 </data> 165 <data name="The task list could not be imported. The error returned was: {0}" xml:space="preserve"> 166 <value>(Untranslated)</value> 167 </data> 165 168 <data name="The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}" xml:space="preserve"> 166 169 <value>La documentazione di Eraser non può essere aperta. Verificare che Adobe Acrobat Reader sia installato e che la vostra installazione di Eraser non sia corrotta.\n\nL'errore è stato: {0}</value> … … 175 178 <value>Un'altra occorrenza di Eraser è già in esecuzione, ma con privilegi più elevati di questa.\n\nEraser adesso si chiuderà.</value> 176 179 </data> 177 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0} Eraser" xml:space="preserve">180 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}" xml:space="preserve"> 178 181 <value>(Untranslated)</value> 179 182 </data> -
branches/eraser6/CodeReview/Eraser/Strings.resx
r1750 r1769 163 163 <value>Session: {0:F}</value> 164 164 </data> 165 <data name="The task list could not be imported. The error returned was: {0}" xml:space="preserve"> 166 <value>The task list could not be imported. The error returned was: {0}</value> 167 </data> 165 168 <data name="The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}" xml:space="preserve"> 166 169 <value>The Eraser documentation file could not be opened. Check that Adobe Reader installed and that your Eraser install is not corrupt.\n\nThe error returned was: {0}</value> … … 175 178 <value>Another instance of Eraser is already running but it is running with higher privileges than this instance of Eraser.\n\nEraser will now exit.</value> 176 179 </data> 177 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0} Eraser" xml:space="preserve">178 <value>Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0} Eraser</value>180 <data name="Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}" xml:space="preserve"> 181 <value>Another instance of Eraser is already running but cannot be connected to.\n\nThe error returned was: {0}</value> 179 182 </data> 180 183 <data name="Total: {0,2:#0.00%}" xml:space="preserve">
Note: See TracChangeset
for help on using the changeset viewer.
