toast notifications(+) #17
@@ -16,6 +16,7 @@ namespace ntfysh_client
|
||||
private readonly NotificationListener _notificationListener;
|
||||
private bool _startInTray;
|
||||
private bool _trueExit;
|
||||
private NotificationDialog notificationDialog;
|
||||
|
||||
public MainForm(NotificationListener notificationListener, bool startInTray = false)
|
||||
{
|
||||
@@ -32,6 +33,8 @@ namespace ntfysh_client
|
||||
{
|
||||
LoadSettings();
|
||||
LoadTopics();
|
||||
|
||||
this.notificationDialog = new NotificationDialog();
|
||||
}
|
||||
|
||||
protected override void SetVisibleCore(bool value)
|
||||
@@ -70,7 +73,9 @@ namespace ntfysh_client
|
||||
|
||||
string finalTitle = string.IsNullOrWhiteSpace(e.Title) ? $"{e.Sender.TopicId}@{e.Sender.ServerUrl}" : e.Title;
|
||||
|
||||
notifyIcon.ShowBalloonTip((int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, finalTitle, e.Message, priorityIcon);
|
||||
//notifyIcon.ShowBalloonTip((int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, finalTitle, e.Message, priorityIcon);
|
||||
//this.notificationDialog.IsVisible = true;
|
||||
this.notificationDialog.ShowNotification(finalTitle, e.Message);
|
||||
}
|
||||
|
||||
private void OnConnectionMultiAttemptFailure(NotificationListener sender, SubscribedTopic topic)
|
||||
|
85
ntfysh_client/NotificationDialog.Designer.cs
generated
Normal file
@@ -0,0 +1,85 @@
|
||||
namespace ntfysh_client
|
||||
{
|
||||
partial class NotificationDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
tbTitle = new System.Windows.Forms.TextBox();
|
||||
button1 = new System.Windows.Forms.Button();
|
||||
tbMessage = new System.Windows.Forms.TextBox();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tbTitle
|
||||
//
|
||||
tbTitle.Location = new System.Drawing.Point(12, 58);
|
||||
tbTitle.Name = "tbTitle";
|
||||
tbTitle.ReadOnly = true;
|
||||
tbTitle.Size = new System.Drawing.Size(725, 23);
|
||||
tbTitle.TabIndex = 0;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.Location = new System.Drawing.Point(759, 7);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new System.Drawing.Size(29, 38);
|
||||
button1.TabIndex = 1;
|
||||
button1.Text = "x";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
button1.Click += btnClose_Click;
|
||||
//
|
||||
// tbMessage
|
||||
//
|
||||
tbMessage.Location = new System.Drawing.Point(12, 97);
|
||||
tbMessage.Multiline = true;
|
||||
tbMessage.Name = "tbMessage";
|
||||
tbMessage.ReadOnly = true;
|
||||
tbMessage.Size = new System.Drawing.Size(725, 253);
|
||||
tbMessage.TabIndex = 2;
|
||||
//
|
||||
// NotificationDialog
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
ClientSize = new System.Drawing.Size(800, 450);
|
||||
Controls.Add(tbMessage);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(tbTitle);
|
||||
FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
Name = "NotificationDialog";
|
||||
Text = "NotificationDialog";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox tbTitle;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox tbMessage;
|
||||
}
|
||||
}
|
84
ntfysh_client/NotificationDialog.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
using System;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Collections.Generic;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.ComponentModel;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Data;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Drawing;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Linq;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Runtime.InteropServices;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Text;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Threading.Tasks;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using System.Windows.Forms;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
namespace ntfysh_client
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
public partial class NotificationDialog : Form
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
private static extern bool AnimateWindow(IntPtr hWnd, int time, int flags);
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
private const int ScreenMargin = 20;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
private void SetWindowPosition()
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
int workingtop = Screen.PrimaryScreen.WorkingArea.Height - this.Height;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.Top = workingtop - NotificationDialog.ScreenMargin;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
int workingleft = Screen.PrimaryScreen.WorkingArea.Width - this.Width;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.Left = workingleft - NotificationDialog.ScreenMargin;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
protected override void SetVisibleCore(bool value)
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
//base.SetVisibleCore(false);
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.SetWindowPosition();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
if (value)
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.BringToFront();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
AnimateWindow(this.Handle, 250, 0x00040000 | 0x00000008);
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
base.SetVisibleCore(value);
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
public void ShowNotification(string title, string message)
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.tbTitle.Text = title;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.tbMessage.Text = message;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.Show();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.SetWindowPosition();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
public bool IsVisible
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
get { return this.Visible; }
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
set { this.Visible = value; }
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
protected override void OnShown(EventArgs e)
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
base.OnShown(e);
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
public NotificationDialog()
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.IsVisible = false;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
InitializeComponent();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
InitializeWindowHidden();
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
private void InitializeWindowHidden()
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.Opacity = 0;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.ShowNotification("Title", "Message");
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.IsVisible = false;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.Opacity = 1;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
{
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
this.IsVisible = false;
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
||||
}
|
||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() This is a great candidate for the new
This is a great candidate for the new `switch expression` syntax, and then it can be turned into a lambda
```csharp
private Image? ConvertToolTipIconToImage(ToolTipIcon icon) => icon switch
{
ToolTipIcon.Info => SystemIcons.Information.ToBitmap(),
ToolTipIcon.Warning => SystemIcons.Warning.ToBitmap(),
ToolTipIcon.Error => SystemIcons.Error.ToBitmap(),
_ => null
}
```
![]() Nitpick: Lambda one liner Nitpick: Lambda one liner
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter title casing without underscores Nitpick: Naming convention is capitalised first letter title casing without underscores
![]() Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
![]() This appears to be set but never read outside of the This appears to be set but never read outside of the `progress` getter
![]() Could this just read Could this just read `this.progressBar1.Value` instead?
![]() Any reason we're wrapping this? Is it protected usually? Any reason we're wrapping this? Is it protected usually?
![]() Does this need Does this need `this`es?
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway. I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
![]() @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style? @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
![]() I'll change the comment to better explain the desired intent
rationale: I'll change the comment to better explain the desired intent
```suggestion
// don't animate, immediately "close"
```
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
![]() I think this is just left over from my first attempts at getting the animation to work. I think this is just left over from my first attempts at getting the animation to work.
![]() I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment). I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
![]() changed changed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() removed removed
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() updated updated
![]() swapped swapped
![]() removed removed
![]() yes, I originally thought there would be more to the setter. Removed. yes, I originally thought there would be more to the setter. Removed.
![]() Not in the end. Removed. (I had originally though the UI would be Not in the end. Removed. (I had originally though the UI would be `.SetInfo(...); .Show()` or something, but the way it is now has a better expandability and doesn't use this.
![]() no, that's just what style I was used to back when I last worked in C# (removed all) no, that's just what style I was used to back when I last worked in C# (removed all)
![]() This got changed to This got changed to `timeoutSeconds` to deal with corresponding comment in `MainForm.cs`
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() I added a blank line before the if statement I added a blank line before the if statement
![]() heh, wonder where that style came from... heh, wonder where that style came from...
![]() settings dialog is using camelCase for everything.... I think the Pep8 guidance that "consistency within a file is most important" is a good point here. I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase. settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
![]() renamed renamed
![]()
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible. > @alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
![]() I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments). I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
|
120
ntfysh_client/NotificationDialog.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
Nitpick: newline
Nitpick: newline
Nitpick: One liner?
if (this.shownStopwatch is null) return;
Nitpick: One liner?
if (this.shownStopwatch is null) return;
Nitpick: newline
Nitpick: newline
What's the purpose of this override?
What's the purpose of this override?
Nitpick: newline
Nitpick: newline
This is a great candidate for the new
switch expression
syntax, and then it can be turned into a lambdaThis is a great candidate for the new
switch expression
syntax, and then it can be turned into a lambdaNitpick: Lambda one liner
Nitpick: Lambda one liner
Nitpick: Naming convention is capitalised first letter
Nitpick: Naming convention is capitalised first letter
Nitpick: Naming convention is capitalised first letter title casing without underscores
Nitpick: Naming convention is capitalised first letter title casing without underscores
Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
Nitpick: convention is use of _ for private variables to avoid the use of this. Goes for all others in this section
This appears to be set but never read outside of the
progress
getterThis appears to be set but never read outside of the
progress
getterCould this just read
this.progressBar1.Value
instead?Could this just read
this.progressBar1.Value
instead?Any reason we're wrapping this? Is it protected usually?
Any reason we're wrapping this? Is it protected usually?
Does this need
this
es?Does this need
this
es?Nitpick: newline
Nitpick: newline
Nitpick: newline
Nitpick: newline
Nitpick: newline
Nitpick: newline
Nitpick: Naming convention is capitalised first letter
Nitpick: Naming convention is capitalised first letter
Nitpick:
timeout_ms
should betimeoutMilliseconds
Nitpick:
timeout_ms
should betimeoutMilliseconds
immediate?
immediate?
I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
I try to rename my elements to match the TitleCase naming convention. Not a major one, just a nice-to-have. I appreciate this isn't consistent within the application anyway.
@alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
@alexhorner, is there a linter tool or editor config file that I can setup to check code against the desired style?
I'll change the comment to better explain the desired intent
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
I'll change the comment to better explain the desired intent
rationale:
if a user click the x button, they expect the window to go away "now". My observation is that general Windows users are about 50% split on whether a going away animation in response to telling a window to close is annoying or "fine" (and only a few people "prefer it"). Because of this, I intentionally implemented the button close handler to immediately close the pop up (don't animate, and don't wait for the timeout).
I think this is just left over from my first attempts at getting the animation to work.
I think this is just left over from my first attempts at getting the animation to work.
I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
I went through and attempted to add a blank line before every if statement that was not the opening statement of the parent scope (and if preceded by a comment, the blank line went before the comment).
changed
changed
I added a blank line before the if statement
I added a blank line before the if statement
removed
removed
I added a blank line before the if statement
I added a blank line before the if statement
updated
updated
swapped
swapped
removed
removed
yes, I originally thought there would be more to the setter. Removed.
yes, I originally thought there would be more to the setter. Removed.
Not in the end. Removed. (I had originally though the UI would be
.SetInfo(...); .Show()
or something, but the way it is now has a better expandability and doesn't use this.Not in the end. Removed. (I had originally though the UI would be
.SetInfo(...); .Show()
or something, but the way it is now has a better expandability and doesn't use this.no, that's just what style I was used to back when I last worked in C# (removed all)
no, that's just what style I was used to back when I last worked in C# (removed all)
This got changed to
timeoutSeconds
to deal with corresponding comment inMainForm.cs
This got changed to
timeoutSeconds
to deal with corresponding comment inMainForm.cs
I added a blank line before the if statement
I added a blank line before the if statement
I added a blank line before the if statement
I added a blank line before the if statement
heh, wonder where that style came from...
heh, wonder where that style came from...
settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
settings dialog is using camelCase for everything....
I think the Pep8 guidance that "consistency within a file is most important" is a good point here.
I opted to make the new things in SettingsDialogue always use camelCase, but changed the NotificationDialogue be TitleCase.
renamed
renamed
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
So typically I use Rider (alternatively Resharper) whilst working and it picks out most of these things. As far as I know, what it works on is the microsoft standard convention, so I just use that as it's pretty universal and sensible.
I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).
I installed an ran the Rider ide and looked through for additional style changes (and applied the ones that didn't seem to conflict with the previous comments).