Skip to content

Fix startup for Microsoft Store#224

Merged
Kyome22 merged 9 commits into
runcat-dev:mainfrom
mor39a:fix-startup
Aug 17, 2025
Merged

Fix startup for Microsoft Store#224
Kyome22 merged 9 commits into
runcat-dev:mainfrom
mor39a:fix-startup

Conversation

@mor39a
Copy link
Copy Markdown
Collaborator

@mor39a mor39a commented Aug 9, 2025

Type of Contribution

  • Bug Fix
  • New Feature
  • Refactoring

Summary of the Proposal

Starting from Issue #216 and PR #220 I was investigating and testing different ways and I found this one to be able to configure Launch at Startup when it is packaged for the Microsoft Store.

Reason for the new feature

Launch at startup is a very useful feature that I wouldn't want to lose.

Checklist

  • Code follows proper indentation and naming conventions.
  • Works correctly in both dark theme and light theme.
  • Works correctly on any device. -> Regarding this point, I have only had the opportunity to test it on Windows 10

Close Issues

Comment thread WapForStore/Package.appxmanifest Outdated
Comment thread RunCat365/Program.cs Outdated
@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Aug 9, 2025

There are many unnecessary changes throughout, such as adjustments to indentation and line order. Please keep your changes to a minimum and avoid disrupting the code's formatting.

Comment thread RunCat365/RunCat365.csproj Outdated
Comment thread WapForStore/Package.appxmanifest
Comment thread RunCat365/Program.cs Outdated
Comment thread RunCat365/Program.cs Outdated
Comment thread RunCat365/Program.cs Outdated
Comment thread RunCat365/Program.cs Outdated
@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 9, 2025

@Kyome22 I appreciate your feedback, unfortunately this weekend I will not be able to implement them. If there is no problem, I will do it on Monday.

@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 9, 2025

There are many unnecessary changes throughout, such as adjustments to indentation and line order. Please keep your changes to a minimum and avoid disrupting the code's formatting.

I think some changes were made by my IDE, I'll be more attentive thanks.

@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Aug 9, 2025

I appreciate your feedback, unfortunately this weekend I will not be able to implement them. If there is no problem, I will do it on Monday.

Thank you for your willingness to contribute to the app. Please feel free to take your time and don't feel rushed. (That said, it would be great if you could aim for about two weeks, otherwise I might lose track of the details (lol).)

@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 9, 2025

Thank you. In any case, I don't think I'll take long. The most difficult and time-consuming part was researching and it's done, correcting shouldn't take me long.

@Kyome22 Kyome22 mentioned this pull request Aug 10, 2025
3 tasks
@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Aug 10, 2025

close #226

mor39a and others added 3 commits August 12, 2025 09:26
Co-authored-by: Takuto NAKAMURA (Kyome) <kyomesuke@gmail.com>
Co-authored-by: Takuto NAKAMURA (Kyome) <kyomesuke@gmail.com>
@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 13, 2025

There are many unnecessary changes throughout, such as adjustments to indentation and line order. Please keep your changes to a minimum and avoid disrupting the code's formatting.

@Kyome22 As I mentioned, it was Visual Studio that changed the format, which affected what you mentioned.
I found a solution and it is to use an .editorconfig file to unify the formatting across the project, so any contributor who wants to contribute can do so without affecting the formatting.

Before I implement it, what do you think about it?
The file would look something like this:

root = true

# C# files
[*.cs]
charset = utf-8-bom
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

################################
# CODE FORMATTING
################################

# Braces always on new line
csharp_preserve_single_line_blocks = false
csharp_preserve_single_line_statements = true
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
csharp_new_line_between_members_of_anonymous_types = true
csharp_new_line_between_members_of_object_initializers = true
csharp_new_line_within_query_expression_clauses = true

# Indentation
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Spacing
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_after_cast = false

# Parentheses
csharp_space_between_parentheses = false
csharp_space_between_attribute_brackets = false

################################
# CODE STYLE
################################

# var usage (allowed everywhere)
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# this. qualification (not required)
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion

# Using directives
dotnet_sort_system_directives_first = true:error
dotnet_separate_import_directive_groups = true:error
dotnet_remove_unnecessary_usings = true:error

# Null handling
dotnet_style_null_propagation = true:warning
dotnet_style_coalesce_expression = true:warning

# Prefer "is null" over == null
csharp_style_prefer_is_null_check_over_reference_equality_method = true:error

################################
# FILE HEADER
################################
file_header_template = Copyright 2020 Takuto Nakamura\n\n    Licensed under the Apache License, Version 2.0 (the "License")\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an "AS IS" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.

Move functions to new class.
The logic of the packaged app is separated from the unpackaged app.
@mor39a mor39a requested a review from Kyome22 August 13, 2025 02:14
@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 13, 2025

@Kyome22 I've implemented the comments you gave me. I look forward to further feedback and your opinion on editorconfig.

@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Aug 13, 2025

There are many unnecessary changes throughout, such as adjustments to indentation and line order. Please keep your changes to a minimum and avoid disrupting the code's formatting.

@Kyome22 As I mentioned, it was Visual Studio that changed the format, which affected what you mentioned. I found a solution and it is to use an .editorconfig file to unify the formatting across the project, so any contributor who wants to contribute can do so without affecting the formatting.

@mor39a This is a great suggestion. I'm all for introducing a linter and formatter.

However, since that is a significant topic on its own, I would prefer to handle it in a separate issue or pull request. I anticipate that applying them will generate a large number of diffs in existing files.

If you'd like to work on this first, please open a new PR specifically for it.

@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 13, 2025

If you'd like to work on this first, please open a new PR specifically for it.

I will, thank you.


Regarding the current PR, do you have feedback for me?

Comment thread RunCat365/ContextMenuManager.cs Outdated
Comment thread RunCat365/StartupManager.cs
Comment thread RunCat365/Program.cs Outdated
Comment thread RunCat365/StartupManager.cs Outdated
@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Aug 13, 2025

Regarding the current PR, do you have feedback for me?

I’ve provided feedback on the overall architecture of this feature. Lately, I’ve been really immersed in architecture thinking, so my scrutiny might be a bit harsh. I apologize for that.

@mor39a
Copy link
Copy Markdown
Collaborator Author

mor39a commented Aug 13, 2025

Regarding the current PR, do you have feedback for me?

I’ve provided feedback on the overall architecture of this feature. Lately, I’ve been really immersed in architecture thinking, so my scrutiny might be a bit harsh. I apologize for that.

Don't worry. Thanks for your feedback, I will work on it.

@mor39a mor39a requested a review from Kyome22 August 13, 2025 23:03
Copy link
Copy Markdown
Collaborator

@Kyome22 Kyome22 left a comment

Choose a reason for hiding this comment

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

LGTM

@Kyome22 Kyome22 merged commit 68da689 into runcat-dev:main Aug 17, 2025
@mor39a mor39a deleted the fix-startup branch August 17, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: App doesn't launch at startup

2 participants