Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.5.0 and 0.6.0 #6

Open
wants to merge 68 commits into
base: master
Choose a base branch
from

Conversation

fabianoriccardi
Copy link

No description provided.

Doug Krahmer and others added 30 commits February 2, 2020 12:01
…ication can capture ThreadInterruptedException; show appropriate message if user stops the test
Copy link
Owner

@dkrahmer dkrahmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like most of your changes. I have a few tweaks I would like you to make before I accept your PR. See file comments for details. I may have additional feedback but I wanted send you what I have so far.

Other feedback:

  • The .sln file should be updated with the VS 2022 header, including MinimumVisualStudioVersion.
  • The logo looks great!


private void linkLabelRepository_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string url = "http://www.github.com/fabianoriccardi/MediaTester";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should link to the head repo (dkrahmer) instead of your fork.

this.ChooseTargetButton.Location = new System.Drawing.Point(306, 32);
this.ChooseTargetButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ChooseTargetButton.Name = "ChooseTargetButton";
this.ChooseTargetButton.Size = new System.Drawing.Size(28, 31);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button is too small and only shows ".." instead of "..." when I run the app.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course the button can be enlarged, but this seems weird, I see it correclty. Which OS do you use? May you attach a screeshot?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a screenshot when running. It looks the same in the VS2022 designer view.
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why it happens, however I have resized it.

this.button1.Size = new System.Drawing.Size(50, 32);
this.button1.TabIndex = 21;
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things:

  • button1 and the event method should have descriptive names since they are referenced in non-designer code.
  • My original "About..." link was kinda hacky but this new button is too big and covers an unrelated control. Maybe change this to a small image of a question mark in a circle (?) placed in the lower right of the window, in the far right corner of the status bar.
  • Add a tooltip that shows "About..." so the user knows what it is without having to click on it.

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{82DBB478-8EF7-45B1-8200-F28BEF178019}</ProjectGuid>
<TargetFramework>net6.0</TargetFramework>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For best compatibility, I would like this to have multiple build targets. Framework 4.7.2 (for Windows) with Costura.Fody and net6.0 (for everything else). Let me know if you need help with getting multiple build targets setup with a conditional Costura.Fody nuget package.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would ask your help for this.

{
while (string.IsNullOrEmpty(testDirectory))
{
Console.WriteLine();
Console.WriteLine();
Console.Write("Please enter a drive letter or path to test: ");
Console.Write("Please enter a drive letter or a full path: ");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really need to specify "a full path"? The following seems sufficient:

Console.Write("Please enter a drive letter or path: ");

CodeMaid.config Outdated
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project uses .editorconfig. This CodeMaid.config file should not be committed since it is your personal preferences. Please remove and add to .gitignore

README.md Outdated

- MediaTester: the GUI frontend. This project is based on WinForms for .NET Framework 4.7.2, for the best compatibility with the latests versions of Windows 10/11.

The code is developed in VS2022 and automatically styled with CodeMaid.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove reference to CodeMaid. You are welcome to use it but it is not part of this project. This project uses .editorconfig for style preferences.

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this assembly binding necessary?

@@ -7,9 +7,9 @@
[assembly: AssemblyTitle("MediaTester")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("KrahmerSoft")]
[assembly: AssemblyCompany("")]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add back "KrahmerSoft"

this.button1.TabIndex = 3;
this.button1.Text = "OK";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button1 and the event method should have descriptive names since they are referenced in non-designer code.

/// <summary>
/// Remove test files after write+verify. This method do no update the progress bar!
/// </summary>
private void RemoveTempDataFilesNoProgressBar()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? It seems redundant.

public WriteBlockCompleteHandler AfterWriteBlock;
public VerifyBlockCompleteHandler AfterQuickTest;
public VerifyBlockCompleteHandler AfterVerifyBlock;
public ExceptionHandler OnException;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change all of these names? I am fine with changing from delegate to event but the names should stay the same.

else if (_options.MaxBytesToTest > GetAvailableBytes())
{
TotalTargetBytes = GetAvailableBytes();
OnExceptionThrown(new Exception($"Not enough space to test the requested size. Downsizing to the available disk space: {TotalTargetBytes:#,##0} bytes"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really an exception?

}

/// <summary>
/// Verify a test file. TODO this function can be split and simplified.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not have TODO in a method summary

/// <param name="bytesVerified"></param>
/// <param name="bytesFailed"></param>
/// <param name="updateTotalBytes"></param>
/// <returns></returns>
private bool VerifyTestFile(int testFileIndex, string testFilePath, out int bytesVerified, out int bytesFailed, bool updateTotalBytes = false)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there so many changes to this method?

/// Creates and writes all the test files.
/// </summary>
/// <returns></returns>
private bool GenerateTestFiles()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there so many changes to this method?

@@ -631,7 +605,7 @@ private void InitializeComponent()
private System.Windows.Forms.Label FailedBytesLabel;
private System.Windows.Forms.Label VerifiedBytesLabel;
private System.Windows.Forms.Label WrittenBytesLabel;
private System.Windows.Forms.Label ReadSpeedLabel;
private System.Windows.Forms.Label VerifySpeedLabel;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you rename this?

@dkrahmer
Copy link
Owner

dkrahmer commented Apr 6, 2022

@fabianoriccardi, I have spend some more time reviewing this PR. I like a lot of your improvements but you also included many changes based on personal preference, rather than necessity. Also, much of the added text contains grammatical errors. I am not interested in a complete overhaul or restyle of my applications. I think you should break this PR up into smaller PRs that focus on bug fixes rather than personal preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants