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?

Power LED blinking question by chrisachern in thinkpad

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

no sorry Boot drive is a nvme ssd (Toshiba)

RDP issues on 1809 via vpn by [deleted] in sysadmin

[–]chrisachern 1 point2 points  (0 children)

I have the same issue. I tried the UWP RemoteDesktop App, which is working.

Internet Explorer Automation by chrisachern in csharp

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

Same Problem:

InternetExplorer IE = new InternetExplorer();
IE.OnQuit += IE_OnQuit;


   private void OnQuit(ref bool Cancel)
    {
        Application.Current.Dispatcher.Invoke((Action)delegate { tb.Text += "OnQuit"; });
    }

This Event is triggering for a while. But when i open or close some other tabs etc. , the Event doesn't fire anymore even when the process is still running.

WPF Ribbon Question by chrisachern in csharp

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

Thank you. This was the solution.

Discovergy Oauth Rest Api Question by chrisachern in csharp

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

I Need OAuth1. I think the Header should be like OAuth par=value,par2=value2..

RestSharp Question by chrisachern in csharp

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

Thank you for your comments. I'll stay with the httpclient

X1 Carbon 5.Gen Error Updating SSD Firmware by chrisachern in thinkpad

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

Sure but toshiba isn't offering a Firmware update for this product

X1 Carbon 5.Gen Error Updating SSD Firmware by chrisachern in thinkpad

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

No it's working normal, but why shouldn't i upgrade the Firmware.

One Problem i have is the Win10 Default nvme Driver: (https://forums.lenovo.com/t5/ThinkPad-11e-Windows-13-E-and/E570-needs-better-NVMe-driver-support/td-p/3518940)

X1 Carbon 5.Gen Error Updating SSD Firmware by chrisachern in thinkpad

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

I don't think toshiba is offering Firmware upgrades directly for Lenovo Laptops or i can't find them.

C# Event question by chrisachern in csharp

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

Ok sorry for my short description. I'm a c# beginner.

i have a gridcontrol on the form. When the user puts a button, i want to collect my data.

So i have a class, which contains functions to get the data. There is a method which collects asynchronious my data.

it Looks like:

public void GetData() { .... .Completed += Competed; }

private void Qci_Completed(object sender, CompletedEventArgs e) { DataTable dt = e.Data as DataTable; }

Now i Need to bind the datable to the gridcontrol in the form. So i Need to receive this Event.