Giter Site home page Giter Site logo

RDP instant mode doesn't work about 2lcs HOT 5 CLOSED

DjLysy avatar DjLysy commented on May 8, 2024
RDP instant mode doesn't work

from 2lcs.

Comments (5)

fraga avatar fraga commented on May 8, 2024 1

Never mind I overlooked the implementation and when I did the async piece that should've left as sync and we would still use the Result as @DjLysy implemented is correct.

Looking forward, I think we need to refactor the backgroundworker and replace it with Task. Since this is all probably going to go away with One experience (one admin) I would leave it for now!

Thanks @DjLysy for the contribution!

PS: I'm always out of my depth with C# too, always learning!

from 2lcs.

FH-Inway avatar FH-Inway commented on May 8, 2024

Thanks for reporting the issue and providing the fix in pr #94 as well, much appreciated! I merged it and released 0.49.0.

I was not even aware that 2LCS could be used like that. Seems something that we should add to the documentation.

Just to provide context for the future, this functionality was added in #66, while the async stuff was added in #75

@fraga Let us know if you see any issues in undoing async for RDPConnect.

from 2lcs.

fraga avatar fraga commented on May 8, 2024

Hey this is great!

What if we add the sync version as it was and just wrap that in async instead of just removing the async? Let me know your thoughts.

from 2lcs.

FH-Inway avatar FH-Inway commented on May 8, 2024

Could you explain a bit more on how this could be done? I'm a bit out of my depth with C# and async.

From what I can tell, since BackgroundWorker is used to call OnWorkerDoWork, it already runs asynchronously?

worker = new BackgroundWorker
{
WorkerReportsProgress = true,
WorkerSupportsCancellation = true
};
worker.DoWork += new DoWorkEventHandler(OnWorkerDoWork);
worker.ProgressChanged += new ProgressChangedEventHandler(OnWorkerProgressChanged);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(OnWorkerRunWorkerCompleted);
this.SetProgress(10, "Authenticating to LCS");
using (var form = new Login())
{
form.ShowDialog();
}
worker.RunWorkerAsync();

from 2lcs.

FH-Inway avatar FH-Inway commented on May 8, 2024

@fraga Thanks for looking into it. I agree, the LCS days are numbered and so is 2LCS. But while we still have it, it is work keeping it alive. Will keep the Task refactor in mind in case we revisit that part again.

from 2lcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.