keyshortcuts not working in my windows application using c#

Dineshkumar.S 451 Reputation points
2022-11-07T13:10:01.21+00:00

In my windows application if i Press CTRL + 1 on particular link a video will be played in the browser based on the link now it is not working all of a sudden
refer the code below

foreach(HtmlAgilityPack.HtmlNode video in videos)
{
linkCounter += 1;
video.InnerHtml = video.InnerHtml + "[Video - To play, press Ctrl+" + linkCounter.ToString() + "]";
dcLinks.Add(linkCounter, video);
dcLinks[linkCounter] = video;
dcLinks.Clear();
}

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
326 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,582 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dineshkumar.S 451 Reputation points
    2022-11-08T10:51:20.1+00:00

    Hey thanks for your suggestion as you said there is some issue with the upload part and i had fixed it thanks
    Fix as below if(!dcLinks.ContainsKey(linkCounter))
    {
    dcLinks.Add(linkCounter, video);
    }
    dcLinks[linkCounter] = video;

                    // dcLinks[linkCounter] = video;  
                    // dcLinks.Clear();  
    
    0 comments No comments