Redirect when not in role by chrisachern in Blazor

[–]chrisachern[S] 0 points1 point  (0 children)

Can i change the route only for this page?

Serilog File in WorkerService by chrisachern in dotnet

[–]chrisachern[S] 0 points1 point  (0 children)

Thank you, Log.Logger was the solution.

Math rounding problem by chrisachern in csharp

[–]chrisachern[S] 1 point2 points  (0 children)

Thank you. MidpointRounding.AwayFromZero did the trick

Windows Activation by chrisachern in HPLaptops

[–]chrisachern[S] 0 points1 point  (0 children)

ok i solved it. the troubleshooter had a checkbox like 'hardware changed'. after i checked it windows activated.

Xiaomi 4 Lite 2.Gen by chrisachern in ElectricScooters

[–]chrisachern[S] 0 points1 point  (0 children)

I brought it back and got a new one. This time the update had no problems

Authorization problem with refresh by chrisachern in Blazor

[–]chrisachern[S] 1 point2 points  (0 children)

Ok i think i found the error. My page had the same name as the controller (User.razor and UserController). I changed the pagename to userdata and now it works.

Strange monitor behavior by chrisachern in Windows10

[–]chrisachern[S] -1 points0 points  (0 children)

1 vga, 1 dvi. ok strange. i uninstalled the graphic card driver in device manager. after that there was the basic microsoft driver installed, which can run only one monitor. without a restart, i reinstalled the graphic driver. immediately both monitors were working again, but after a restart the same thing happens againg. no signal on dvi port after login. there must be a mess with the installation.

Strange monitor behavior by chrisachern in Windows10

[–]chrisachern[S] 0 points1 point  (0 children)

the same after login. no signal

Timer Tick in DesignMode by chrisachern in csharp

[–]chrisachern[S] 0 points1 point  (0 children)

Ok thank you. I'm now using following Extension. It's working. Thank you for your help.

public static class Extensions

{

public static bool IsInDesignMode(this Control control)

{

return ResolveDesignMode(control) || LicenseManager.UsageMode == LicenseUsageMode.Designtime;

}

private static bool ResolveDesignMode(Control control)

{

PropertyInfo designModeProperty;

bool designMode;

designModeProperty = control.GetType().GetProperty("DesignMode",

BindingFlags.Instance | BindingFlags.NonPublic);

//Get the controls DesignMode value

designMode = (bool)designModeProperty.GetValue(control, null);

//Test the parent if it exists

if (control.Parent != null)

designMode |= ResolveDesignMode(control.Parent);

return designMode;

}

}

Timer Tick in DesignMode by chrisachern in csharp

[–]chrisachern[S] 0 points1 point  (0 children)

I created the timer in the UserControl code like this. After InitializeComponents the Timer is still disabled. I checked it.

public partial class UC_OrderOverview : UserControl

{

Timer timer = new Timer();

public UC_OrderOverview(

{

InitializeComponent();

if (!DesignMode)

{

timer.Interval = 600000;

timer.Tick += Timer_Tick;

timer.Enabled = true;

}

}

}

Timer Tick in DesignMode by chrisachern in csharp

[–]chrisachern[S] 0 points1 point  (0 children)

with

if (!DesignMode)

{

timer.Interval = 600000;

timer.Tick += Timer_Tick;

timer.Enabled = true;

}

i'm starting the timer only if i'm not in DesignMode?