
C# Forums
293 FOLLOWERS
C# Forums is the exclusive C# .NET community. Join the discussions about installation, IDE, .NET Framework, .NET Core, Security/Obfuscation and accessibility. You can also talk about Graphics / GDI+, Remoting, Console Application, Component Development, and Deployment.
C# Forums
2d ago
Hi,
I get the current azimuth value from the GPS and I would like the image embedded in GmapControl to rotate depending on the azimuth, which I did, but I would like the current image to remain from the value from 180 to 360, but as it will be from 0 to 180 so that the image is rotated so that it is not upside down.
It will probably require two images, but I'm not sure how to do it; I haven't been able to solve it yet. Does anyone have experience with this?
I use the nuGet elements of...
Read more ..read more
C# Forums
3d ago
Hi all,
I need to send emails from a Windows Forms program in c#.
I have to use gmail's smtp, because the account is gmail.
I saw that you can create passwords in google settings for use in apps.
I would like to create a safe and reliable method.
I have already found the code in c#, I wanted to know if it is correct to create a password for the apps and use them in my program, or if there are other more modern methods.
I can't ask the customer for the account password, that's why I was...
Read more ..read more
C# Forums
4d ago
Hi everybody,
I am sorry for not being able to give you a sample code of what I have done but I have nothing to show for what I have done so far. You will see in the image above I have selected some text. What I want to do is programmatically open an image, select some text in the image, read the text, and do something like import it somewhere. The important part is to open the image, select some text, and read it into a field or variable.
I have Googled but the select text and...
Read more ..read more
C# Forums
4d ago
Hi everybody,
I am sorry for not being able to give you a sample code of what I have done but I have nothing to show for what I have done so far. You will see in the image above I have selected some text. What I want to do is programmatically open an image, select some text in the image, read the text, and do something like import it somewhere. The important part is to open the image, select some text, and read it into a field or variable.
I have Googled but the select text and...
Read more ..read more
C# Forums
5d ago
Hi all. I'm going to create a game using WPF. Unfortunately, I'm a newbie and I need some support. The game is similar to 1010! from GramGames, so for now I want to make a field that contains a cells, some kind of grid, and the rectangular figures that can be placed on this field.
I made some action plan:
1. Make a custom control called "cell" using button. Cells can be empty or not, so empty cells should be active, occupied cells should not. That means on active cells I can place some...
Read more ..read more
C# Forums
5d ago
A few events are raised rapidly from the same thread where the handler is, I want this handler to process only one event (doesn't matter which one).
Since it's all in one thread, I can't use lock or other technique for multi-thread sync, so I simply use a bool flag, like so:
C#:
bool busy = false;
static internal readonly EventHandler ClickHandler = (object? sender, EventArgs e) =>
{
if (busy) return;
busy = true;
//...
};
It seems though that...
Read more ..read more
C# Forums
5d ago
I installed the xamarin.firebase.messaging package, when compiling, it gives the following error:
[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] Process: com.test.myapp, PID: 5361
[AndroidRuntime] java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/ArrayMap;
[AndroidRuntime] at com.google.firebase.FirebaseApp.<clinit>(FirebaseApp.java:101)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:236)
[AndroidRuntime] at...
Read more ..read more
C# Forums
5d ago
Ich have a questions concerning the generation of a c# code of an image. i am trying for long time to generate the c# code of this image or of an image simmilar but it is not comming out. if some one could help me i will bw very gratefull ..read more
C# Forums
5d ago
I know we have an authorization attribute.
C#:
[HttpGet("{id}")]
[Authorize]
public IActionResult Get(int id)
In the startup.cs
C#:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, options => Configuration.Bind("JwtSettings", options))
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => Configuration.Bind("CookieSettings", options));
After I run the API, it returns a 404 for me.
1)...
Read more ..read more
C# Forums
1w ago
I am trying to learn API development. I am using .net 3.1(my org uses VS 2019 and it is only showing me this framework). I have chosen API template(that has a sample Weatherforecast API). Upon executing it,I can see plain JSON in chrome but I wanted swagger UI).
I am getting the following error -
I can see the swagger homepage but I get a Failed to Load API, error code 500 Error
I navigated to this error and it says
C#:
asp.net core does not support multiple apps in the same app pool...
Read more ..read more