xarop_pa_toss
xarop_pa_toss
CC#
Created by xarop_pa_toss on 3/8/2023 in #help
NuGet errors when trying to install MAUI.Controls package on .NET 7
Hey I'm started a new project after installing the workload for MAUI. However I'm missing some useful controls, for example Comboboxes. I tried installing the "maui.controls.runtime" package but I'm getting several errors. I believe it's a versioning problem but I can't figure it out. This is the error when I try to install it:
Erro O pacote 'Microsoft.Maui.Controls.Runtime.win.Msi.x64 7.0.59' tem um tipo de pacote 'DotnetPlatform' que não tem suporte pelo projeto 'SAFTUtilitario'.
Erro O pacote 'Microsoft.Maui.Controls.Runtime.win.Msi.x64 7.0.59' tem um tipo de pacote 'DotnetPlatform' que não tem suporte pelo projeto 'SAFTUtilitario'.
4 replies
CC#
Created by xarop_pa_toss on 12/7/2022 in #help
✅ Need persistent Dictionary that can be used between classes.
Hello! I have a main class that fetches data from two other classes (Calcs and Plans). The plan is to have a "premade" Dictionary that has its values (but not keys) changed by both Calcs and Plans, be used in the main class. What's the most efficient way of doing this? Should I create the Dictionary in the main constructor? I'm not sure how to go about it. Thanks!
5 replies
CC#
Created by xarop_pa_toss on 11/24/2022 in #help
✅ How should I structure 'exit points' in my program?
Hey guys. I'm working solo on a project that involves opening an Excel file, sorting through and transforming into a DataSet. I'm not very experienced and unfortunately am working on this completely solo. This will then be used to create invoices on an ERP; as such, it'll be imported as a .dll into that program. I have a main class inherits from one of the ERPs native classes and it calls methods from another class I wrote myself. That second class has methods to open an Excel file, sort through it with some rules and transforming the results into a DataSet I'll then use to make the invoices. I've tried my best to write fallbacks in the code in case the file isn't present, user doesn't have permission to access it, etc. Question 1: if something goes wrong in the secondary class (for example Excel file is already in use), how do I make it so the whole thing stops. Right now I'm just "return"ing back out of the secondary class to the main one, but that one then has nothing to stop it going forwards. Question 2: I currently have all the secondary classes methods in its constructor meaning that I just have to instanciate it in the main class, and the whole Excel manipulation and DataSet creation happens at once. Would it be a better idea to make those methods public, remove from constructor and call them one by one on the main class? Thank you kindly!!
15 replies