toast notifications(+) #17
@@ -20,8 +20,8 @@ namespace ntfysh_client
|
|||||||
|
|||||||
private System.Windows.Forms.Timer? _updateTimer = null;
|
private System.Windows.Forms.Timer? _updateTimer = null;
|
||||||
private Stopwatch? _shownStopwatch = null;
|
private Stopwatch? _shownStopwatch = null;
|
||||||
|
|
||||||
private BaseTheme _darkModeTheme = new DarkModeTheme();
|
private readonly BaseTheme _darkModeTheme = new DarkModeTheme();
|
||||||
![]() 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 BaseTheme _defaultTheme = new DefaultTheme();
|
private readonly BaseTheme _defaultTheme = new DefaultTheme();
|
||||||
![]() 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 BaseTheme? _theme = null;
|
private BaseTheme? _theme = null;
|
||||||
|
|
||||||
public NotificationDialog()
|
public NotificationDialog()
|
||||||
@@ -41,14 +41,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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).
|
|||||||
HandleTimeout(null, null);
|
HandleTimeout(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(showInDarkMode)
|
_theme = showInDarkMode ? _darkModeTheme : _defaultTheme;
|
||||||
![]() 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: 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).
|
|||||||
_theme = _darkModeTheme;
|
|
||||||
![]() 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).
|
|||||||
else
|
|
||||||
![]() 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).
|
|||||||
_theme = _defaultTheme;
|
|
||||||
![]() 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).
|
|||||||
|
|
||||||
ApplyTheme();
|
ApplyTheme();
|
||||||
|
|
||||||
@@ -111,7 +104,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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 ApplyTheme()
|
private void ApplyTheme()
|
||||||
{
|
{
|
||||||
if (_theme is null) _theme = _defaultTheme;
|
_theme ??= _defaultTheme;
|
||||||
![]() 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).
|
|||||||
|
|
||||||
// back colors
|
// back colors
|
||||||
BackColor = _theme.BackgroundColor;
|
BackColor = _theme.BackgroundColor;
|
||||||
@@ -139,7 +132,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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 (_shownStopwatch is null) return;
|
if (_shownStopwatch is null) return;
|
||||||
|
|
||||||
ProgressBar1.Value = (_timeoutSeconds - _shownStopwatch.Elapsed.Seconds) * 100 / _timeoutSeconds;
|
ProgressBar1.Value = (_timeoutSeconds - _shownStopwatch.Elapsed.Seconds) * 100 / _timeoutSeconds;
|
||||||
LblTimeout.Text = $"{_timeoutSeconds - _shownStopwatch.Elapsed.Seconds}";
|
LblTimeout.Text = $@"{_timeoutSeconds - _shownStopwatch.Elapsed.Seconds}";
|
||||||
![]() 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)
|
protected override void SetVisibleCore(bool value)
|
||||||
@@ -153,7 +146,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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(
|
AnimateWindow(
|
||||||
Handle,
|
Handle,
|
||||||
time: 250,
|
time: 250,
|
||||||
flags: NFWinUserAnimateWindowConstnats.AW_SLIDE | NFWinUserAnimateWindowConstnats.AW_VER_NEGATIVE
|
flags: NFWinUserAnimateWindowConstants.AW_SLIDE | NFWinUserAnimateWindowConstants.AW_VER_NEGATIVE
|
||||||
![]() 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: newlines
Nitpick: newlines
```csharp
this.BringToFront();
AnimateWindow
(
...
);
```
![]() Added Added
|
|||||||
|
|
||||||
@@ -162,11 +155,11 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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()
|
private void SetWindowPosition()
|
||||||
![]() Nitpick: newline Nitpick: newline
![]() I added a blank line before the if statement I added a blank line before the if statement
|
|||||||
{
|
{
|
||||||
int workingtop = Screen.PrimaryScreen.WorkingArea.Height - Height;
|
var workingTop = Screen.PrimaryScreen.WorkingArea.Height - 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).
![]() 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).
|
|||||||
Top = workingtop - NotificationDialog.ScreenMargin;
|
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 - Width;
|
var workingLeft = Screen.PrimaryScreen.WorkingArea.Width - 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).
![]() 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).
|
|||||||
Left = workingleft - NotificationDialog.ScreenMargin;
|
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).
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void UIThreadAnimatedHideWindow(object? sender, EventArgs? e)
|
private void UIThreadAnimatedHideWindow(object? sender, EventArgs? e)
|
||||||
@@ -175,7 +168,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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(
|
AnimateWindow(
|
||||||
Handle,
|
Handle,
|
||||||
time: 250,
|
time: 250,
|
||||||
flags: NFWinUserAnimateWindowConstnats.AW_SLIDE | NFWinUserAnimateWindowConstnats.AW_VER_POSITIVE | NFWinUserAnimateWindowConstnats.AW_HIDE
|
flags: NFWinUserAnimateWindowConstants.AW_SLIDE | NFWinUserAnimateWindowConstants.AW_VER_POSITIVE | NFWinUserAnimateWindowConstants.AW_HIDE
|
||||||
![]() 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: Newlines, same as earlier Nitpick: Newlines, same as earlier `AnimateWindow` example
![]() added added
|
|||||||
Visible = false;
|
Visible = false;
|
||||||
@@ -219,7 +212,7 @@ namespace ntfysh_client
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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).
|
|||||||
Visible = false;
|
Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class NFWinUserAnimateWindowConstnats
|
private class NFWinUserAnimateWindowConstants
|
||||||
![]() 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 const int AW_HOR_POSITIVE = 0x00000001;
|
public const int AW_HOR_POSITIVE = 0x00000001;
|
||||||
public const int AW_HOR_NEGATIVE = 0x00000002;
|
public const int AW_HOR_NEGATIVE = 0x00000002;
|
||||||
|
|||||||
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: One liner? Nitpick: One liner? `if (this.shownStopwatch is null) return;`
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() What's the purpose of this override? What's the purpose of this override?
![]() What's the purpose of this override? What's the purpose of this override?
![]() Nitpick: newline Nitpick: newline
![]() 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
}
```
![]() 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: 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 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: 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
![]() 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
![]() 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?
![]() 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?
![]() 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?
![]() 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: newline Nitpick: newline
![]() Nitpick: newline Nitpick: newline
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() Nitpick: Nitpick: `timeout_ms` should be `timeoutMilliseconds`
![]() immediate? immediate?
![]() 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.
![]() 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?
![]() @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'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 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).
![]() 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
![]() changed changed
![]() 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
![]() removed removed
![]() removed removed
![]() 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
![]() updated updated
![]() updated updated
![]() swapped swapped
![]() swapped swapped
![]() removed removed
![]() 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.
![]() 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.
![]() 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)
![]() 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`
![]() 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
![]() 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...
![]() 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.
![]() 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
![]() 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.
![]()
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).
![]() 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).
|
@@ -66,7 +66,7 @@ namespace ntfysh_client
|
|||||||
public SettingsDialog()
|
public SettingsDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
SetNotificationsUIElements();
|
SetNotificationsUiElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButton_Click(object sender, EventArgs e)
|
private void saveButton_Click(object sender, EventArgs e)
|
||||||
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Nitpick: Naming convention is capitalised first letter Nitpick: Naming convention is capitalised first letter
![]() Would it be better to make Would it be better to make `0` no timeout requiring closing notifications instead of `-1`? My logic behind this is `0` is not a valid value anyway, and would result in the immediate closure of the notification, which seems somewhat pointless and a bug. Then we don't end up with an invalid value between two valid values (`-1` and `1`) and can enforce a minimum value of `0` easily.
![]() 0 for not timeout makes sense. Although, a 0 was valid before. (but...., If I understand correctly, a default Windows install will ignore anything outside of 1-10 and just use 10 instead, so a 0 before became 10 s, ...., but the way we have it setup now anyone upgrading will have to open the settings dialogue to switch over anyays...) I'm leaning toward using 0. 0 for not timeout makes sense. Although, a 0 was valid before.
(but...., If I understand correctly, a default Windows install will ignore anything outside of 1-10 and just use 10 instead, so a 0 before became 10 s, ...., but the way we have it setup now anyone upgrading will have to open the settings dialogue to switch over anyays...)
I'm leaning toward using 0.
![]() renamed renamed
![]() Changed Changed
![]() Changed to 0 and dropped -1 handling/updating Changed to 0 and dropped -1 handling/updating
|
|||||||
@@ -79,7 +79,7 @@ namespace ntfysh_client
|
|||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetNotificationsUIElements()
|
private void SetNotificationsUiElements()
|
||||||
{
|
{
|
||||||
groupCustomNotificationSettings.Enabled = useCustomTrayNotifications.Checked;
|
groupCustomNotificationSettings.Enabled = useCustomTrayNotifications.Checked;
|
||||||
timeoutLabel.Text = useCustomTrayNotifications.Checked ? _customNotificationsTimeout : _windowsNotificationsTimeout;
|
timeoutLabel.Text = useCustomTrayNotifications.Checked ? _customNotificationsTimeout : _windowsNotificationsTimeout;
|
||||||
@@ -87,7 +87,7 @@ namespace ntfysh_client
|
|||||||
|
|
||||||
private void UseCustomTrayNotifications_CheckedChanged(object sender, EventArgs e)
|
private void UseCustomTrayNotifications_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetNotificationsUIElements();
|
SetNotificationsUiElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string _windowsNotificationsTimeout = "Notification Toast Timeout (seconds, may be ignored by OS based on accessibility settings):";
|
private const string _windowsNotificationsTimeout = "Notification Toast Timeout (seconds, may be ignored by OS based on accessibility settings):";
|
||||||
|
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).