Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Saturday, August 22, 2020

MD5HashChanger ( multiple subfolder, Files, Folders etc )

MD5HashChanger ( multiple subfolder etc ) 

- change md5 files, 

- support multiple files and folders.

- support  drag and drop folder ( not files ) 

Taken from https://github.com/ewwink/MD5-Hash-Changer

and changed with more options for myself

v1.2

http://www.mediafire.com/file/g67g2vg6k8igqci/MD5HashChanger_v1.2.zip/file

 

v1.3

- Multiple files and Multiple Folder, drag and drop 

https://www.mediafire.com/file/cwpb4xrjsg96zkt/MD5HashChanger_v1.3.zip/file




Thursday, April 9, 2020

Async Await Non BLocking UI from OLD HTTPWEBREQUEST

 


 

Taken from https://stackoverflow.com/questions/14577346/converting-ordinary-http-post-web-request-with-async-and-await

from answer https://stackoverflow.com/a/14711326 

There 4 await, even StreamReader WILL BLOCK your UI ( Gw baru tahu disini, ketika koneksi DOWN and SLOW . Internet Provider in village is sucks ) & GetRequestStreamAsync is must




public async Task GetEnvironmentVariablesAsync(Action<Credentials> getResultCallback, Action<Exception> getErrorCallback)
{
    CredentialsCallback = getResultCallback;
    ErrorCallback = getErrorCallback;
    var uri = new Uri(BaseUri);
    var request = (HttpWebRequest) WebRequest.Create(uri);
    request.Method = "POST";
    request.ContentType = "application/json";
    var jsonObject = new JObject
    {
        new JProperty("apiKey",_api),
        new JProperty("affiliateId",_affid),
    };
    var serializedResult = JsonConvert.SerializeObject(jsonObject);
    byte[] requestBody = Encoding.UTF8.GetBytes(serializedResult);

    // ASYNC: using awaitable wrapper to get request stream
    using (var postStream = await request.GetRequestStreamAsync())
    {
        // Write to the request stream.
        // ASYNC: writing to the POST stream can be slow
        await postStream.WriteAsync(requestBody, 0, requestBody.Length);
    }

    try
    {
        // ASYNC: using awaitable wrapper to get response
        var response = (HttpWebResponse) await request.GetResponseAsync();
        if (response != null)
        {
            var reader = new StreamReader(response.GetResponseStream());
            // ASYNC: using StreamReader's async method to read to end, in case
            // the stream i slarge.
            string responseString = await reader.ReadToEndAsync();
            Credentails = JsonConvert.DeserializeObject<Credentials>(responseString);
            if (Credentails != null && string.IsNullOrEmpty(Credentails.Err))
                CredentialsCallback(Credentails);
            else
            {
                if (Credentails != null)
                    ErrorCallback(new Exception(string.Format("Error Code : {0}", StorageCredentails.Err)));
            }
        }
    }
    catch (WebException we)
    {
        var reader = new StreamReader(we.Response.GetResponseStream());
        string responseString = reader.ReadToEnd();
        Debug.WriteLine(responseString);
        ErrorCallback(we);

    }
}


This is MY OWN IMPLEMENTATION



private async Task<string> REQUESTBLOCK( string blogid, string bearer)
{

string responseresult = string.Empty;

try
{



 HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https:/website/");

 request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0";
 request.Accept = "*/*";
 request.Headers.Set(HttpRequestHeader.AcceptLanguage, "en-US,en;q=0.5");
 request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br");
 request.Referer = "https:/website/" + blogid + "/write/new";
 request.ContentType = "application/json";
 request.Headers.Set(HttpRequestHeader.Authorization, bearer);
 request.Headers.Add("X-Client-Release", @"RELEASE");
 request.Headers.Add("X-Client-Request-Id", @"IDCLIENT");
 request.Headers.Add("Origin", @"https:/website/");
 request.KeepAlive = true;

 request.Method = "POST";
 request.ServicePoint.Expect100Continue = false;


 string body = @"DISINIJSON";
 byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body);
 request.ContentLength = postBytes.Length;
 Stream stream = await request.GetRequestStreamAsync();
 stream.Write(postBytes, 0, postBytes.Length);
 stream.Close();

 using (var response = await request.GetResponseAsync())
 {
  using (Stream dataStream = response.GetResponseStream())
  {
   // Open the stream using a StreamReader for easy access.  
   StreamReader reader = new StreamReader(dataStream);
   // Read the content.  
   string responseFromServer = await reader.ReadToEndAsync();
   // Display the content.  
   //Console.WriteLine(responseFromServer);

   responseresult = responseFromServer;
   //Console.WriteLine(dataurl);
  }

 }

}  
 catch  /*(WebException e) */
 {

 }

}

Thursday, February 6, 2020

Scraper GoodReads, Ebook Scraper








Scraper GoodReads, Ebook Scraper, result come with 3 different data, ID, LINK, TITLE.

GOODREADS:
Goodreads is the world’s largest site for readers and book recommendations. Our mission is to help people find and share books they love. Goodreads launched in January 2007. 

Btw the scraper will randomly delay between 5 second to 30 seconds.

Btw dont forget to join us in our FB GROUPS


ScreenSHOT





Requirement 

NET 4.6.1 and atleast WINDOWS 7

 Scraper GoodReads v1.1

https://www.mediafire.com/file/hhroeqayz2dzzsd/Scraper_GoodReads_v1.0.zip/file
https://www.mediafire.com/file/hhroeqayz2dzzsd/Scraper_GoodReads_v1.0.zip/file
https://www.mediafire.com/file/hhroeqayz2dzzsd/Scraper_GoodReads_v1.0.zip/file
https://www.mediafire.com/file/hhroeqayz2dzzsd/Scraper_GoodReads_v1.0.zip/file

Tuesday, August 13, 2019

Try and Catch , Logger Message with Showing Line Number C#

 

try{
}
catch(Error iwnien)
 StackTrace st = new StackTrace(iwnien, true);
 StackFrame[] frames = st.GetFrames();

 var path = System.IO.Path.Combine(Application.StartupPath, "Log.txt");


 // Iterate over the frames extracting the information you need


 StringBuilder error_string = new StringBuilder();
 foreach (StackFrame frame in frames)
 {
 try {

  error_string.AppendLine( frame.GetMethod().Name.ToString() + frame.GetFileLineNumber() );
 } catch { }

 //Console.WriteLine("{0}:{1}({2},{3})", frame.GetFileName(), frame.GetMethod().Name, frame.GetFileLineNumber(), frame.GetFileColumnNumber());
 }

 System.IO.File.AppendAllLines(path, new string[] { error_string.ToString() });

}

Thursday, October 11, 2018

Get Frame and counting where is the frame....

 


 

Taken from https://stackoverflow.com/a/36264064 as Note and here the main problem https://stackoverflow.com/questions/36105240/cefsharp-and-frames-only-retrieving-html-from-first-frame

    public static IFrame GetFrame(this ChromiumWebBrowser browser, string FrameName)
    {
        IFrame frame = null;

        var identifiers = browser.GetBrowser().GetFrameIdentifiers();

        foreach (var i in identifiers)
        {
            frame = browser.GetBrowser().GetFrame(i);
            if (frame.Name == FrameName)
                return frame;
        }

        return null;
    }
var frame = browser.GetFrame("nameofframe");
        if (frame != null)
            frame.EvaluateScriptAsync("document.getElementById('whateveridyouwanttoclick').click();");

Monday, September 10, 2018

Better Way to opening folder C#

 
 
using System;
using System.Reflection;
using System.Windows.Forms;

class OpenFolderDialog
{
    //public bool AddExtension { get; set; }
    public bool AutoUpgradeEnabled { get; set; }
    //public bool CheckFileExists { get; set; }
    public bool CheckPathExists { get; set; }
    //public bool DereferenceLinks { get; set; }
    public string Title { get; set; }
    //public string DefaultExt { get; set; }
    public string InitialDirectory { get; set; }
    //public bool ValidateNames { get; set; }
    //public bool SupportMultiDottedExtensions { get; set; }
    //public bool ShowHelp { get; set; }
    public bool Multiselect { get; set; }
    public bool RestoreDirectory { get; set; }
    //public string Filter { get; set; }
    public string SelectedPath { get; private set; }
    public string[] SelectedPaths { get; private set; }

    private FolderBrowserDialog FolderBrowser
    {
        get
        {
            return new FolderBrowserDialog()
            {
                ShowNewFolderButton = true,
                Description = Title,
                SelectedPath = InitialDirectory
            };
        }
    }

    private OpenFileDialog Dialog
    {
        get
        {
            return new OpenFileDialog()
            {
                Title = Title,
                AddExtension = false,
                AutoUpgradeEnabled = AutoUpgradeEnabled,
                CheckFileExists = true,
                CheckPathExists = CheckPathExists,
                DefaultExt = string.Empty,
                DereferenceLinks = false,
                InitialDirectory = InitialDirectory,
                ValidateNames = false,
                SupportMultiDottedExtensions = false,
                ShowHelp = false,
                Multiselect = Multiselect,
                RestoreDirectory = RestoreDirectory,
                Filter = string.Empty,
                FileName = SelectedPath
            };
        }
    }

    /// Handle of the control or window to be the parent of the file dialog
    /// true if the user clicks OK
    public DialogResult ShowDialog(IntPtr hWndOwner)
    {
        if (Environment.OSVersion.Version.Major >= 6)
        {
            OpenFileDialog dialog = Dialog;
            DialogResult result = VistaDialog.Show(hWndOwner, dialog) != 0 ? DialogResult.Cancel : DialogResult.OK;
            SelectedPath = dialog.FileName;
            SelectedPaths = dialog.FileNames;
            return result;
        }
        else
        {
            FolderBrowserDialog XPDialog = FolderBrowser;
            DialogResult result = XPDialog.ShowDialog();
            SelectedPath = XPDialog.SelectedPath;
            return result;
        }
    }

    private static class VistaDialog
    {
        private const BindingFlags c_flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
        private readonly static Assembly s_windowsFormsAssembly = typeof(FileDialog).Assembly;
        private readonly static Type s_iFileDialogType = s_windowsFormsAssembly.GetType("System.Windows.Forms.FileDialogNative+IFileDialog");
        private readonly static MethodInfo s_createVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("CreateVistaDialog", c_flags);
        private readonly static MethodInfo s_onBeforeVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("OnBeforeVistaDialog", c_flags);
        private readonly static MethodInfo s_getOptionsMethodInfo = typeof(FileDialog).GetMethod("GetOptions", c_flags);
        private readonly static MethodInfo s_setOptionsMethodInfo = s_iFileDialogType.GetMethod("SetOptions", c_flags);
        private readonly static uint s_fosPickFoldersBitFlag = (uint)s_windowsFormsAssembly
            .GetType("System.Windows.Forms.FileDialogNative+FOS")
            .GetField("FOS_PICKFOLDERS")
            .GetValue(null);
        private readonly static ConstructorInfo s_vistaDialogEventsConstructorInfo = s_windowsFormsAssembly
            .GetType("System.Windows.Forms.FileDialog+VistaDialogEvents")
            .GetConstructor(c_flags, null, new[] { typeof(FileDialog) }, null);
        private readonly static MethodInfo s_adviseMethodInfo = s_iFileDialogType.GetMethod("Advise");
        private readonly static MethodInfo s_unAdviseMethodInfo = s_iFileDialogType.GetMethod("Unadvise");
        private readonly static MethodInfo s_showMethodInfo = s_iFileDialogType.GetMethod("Show");

        public static int Show(IntPtr ownerHandle, OpenFileDialog dialog)
        {
            var iFileDialog = s_createVistaDialogMethodInfo.Invoke(dialog, new object[] { });
            s_onBeforeVistaDialogMethodInfo.Invoke(dialog, new[] { iFileDialog });
            s_setOptionsMethodInfo.Invoke(iFileDialog, new object[] { (uint)s_getOptionsMethodInfo.Invoke(dialog, new object[] { }) | s_fosPickFoldersBitFlag });
            var adviseParametersWithOutputConnectionToken = new[] { s_vistaDialogEventsConstructorInfo.Invoke(new object[] { dialog }), 0U };
            s_adviseMethodInfo.Invoke(iFileDialog, adviseParametersWithOutputConnectionToken);

            try
            {
                return (int)s_showMethodInfo.Invoke(iFileDialog, new object[] { ownerHandle });

            }
            finally
            {
                s_unAdviseMethodInfo.Invoke(iFileDialog, new[] { adviseParametersWithOutputConnectionToken[1] });
            }
        }
    }
}
usage
OpenFolderDialog folder = new OpenFolderDialog()
            {
                Title = "Select destination folder",
                AutoUpgradeEnabled = true,
                CheckPathExists = true,
                InitialDirectory =
                Environment.GetFolderPath
                (Environment.SpecialFolder.DesktopDirectory),
                Multiselect = false,
                RestoreDirectory = true
            };
            DialogResult result = folder.ShowDialog(IntPtr.Zero);
            if (result.Equals(DialogResult.OK))
            {
                //MessageBox.Show(folder.SelectedPath + " Paths:" + folder.SelectedPaths.Length);
                textBox1.Text = folder.SelectedPath;
            }

Monday, July 23, 2018

NOTES for js in C#

 


 

https://stackoverflow.com/questions/49015061/anglesharp-run-all-javascript-before-looking-for-element

var config = AngleSharp.Configuration.Default.WithDefaultLoader().WithCookies().WithJavaScript().WithCss();
            var browsingContext = BrowsingContext.New(config);

            await browsingContext.OpenAsync("https://users.premierleague.com/");
            await browsingContext.Active.QuerySelector("form[action='/accounts/login/']").SubmitAsync(new
            {
                login = "abc@gmail.com",
                password = "password"
            });
            await browsingContext.OpenAsync("https://fantasy.premierleague.com/a/team/my/");
   
foreach (var element in elements)
            {
                var scripts = element.GetElementsByTagName("script");
                
                foreach(var script in scripts)
                {
                    script.Parent.RemoveChild(script);
                }
            }
https://stackoverflow.com/questions/18156795/parsing-html-to-get-script-variable-value/18157325#18157325
var html = @"
             // Some HTML
             
             // More HTML
             ";

// Grab the content of the first script element
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(html);
var script = doc.DocumentNode.Descendants()
                             .Where(n => n.Name == "script")
                             .First().InnerText;

// Return the data of spect and stringify it into a proper JSON object
var engine = new Jurassic.ScriptEngine();
var result = engine.Evaluate("(function() { " + script + " return spect; })()");
var json = JSONObject.Stringify(engine, result);

Console.WriteLine(json);
Console.ReadKey();
Output:
https://github.com/paulbartrum/jurassic
http://html-agility-pack.net/

https://stackoverflow.com/questions/20930414/how-to-dynamically-generate-html-code-using-nets-webbrowser-or-mshtml-htmldocu/20934538#20934538

https://stackoverflow.com/questions/21697048/how-to-fix-a-opacity-bug-with-drawtobitmap-on-webbrowser-control/21828265#21828265

Sunday, August 20, 2017

Radiobutton requires clicking twice when databound

Taken from here https://stackoverflow.com/questions/19052725/radiobutton-requires-clicking-twice-when-databound


In the click event:
private void RadioButtonClick(object sender, EventArgs e)
{
    var rb = sender as RadioButton;
    if (rb != null && !rb.Checked)
    {
        rb.Checked = !rb.Checked;
    }
}
More read http://www.whilenotdeadlearn.com/blog/2008/07/surviving-winforms-databinding

2008 until 2017 ( this note ). Still exist until now.

Monday, August 22, 2016

Kill Child Process When Parent Exit C#


 

 

Taken from
http://stackoverflow.com/questions/3342941/kill-child-process-when-parent-process-is-killed

for My NOTE



/// <summary>
/// Allows processes to be automatically killed if this parent process unexpectedly quits.
/// This feature requires Windows 8 or greater. On Windows 7, nothing is done.</summary>
/// <remarks>References:
///  http://stackoverflow.com/a/4657392/386091
///  http://stackoverflow.com/a/9164742/386091 </remarks>
public static class ChildProcessTracker
{
    /// <summary>
    /// Add the process to be tracked. If our current process is killed, the child processes
    /// that we are tracking will be automatically killed, too. If the child process terminates
    /// first, that's fine, too.</summary>
    /// <param name="process"></param>
    public static void AddProcess(Process process)
    {
        if (s_jobHandle != IntPtr.Zero)
        {
            bool success = AssignProcessToJobObject(s_jobHandle, process.Handle);
            if (!success)
                throw new Win32Exception();
        }
    }

    static ChildProcessTracker()
    {
        // This feature requires Windows 8 or later. To support Windows 7 requires
        //  registry settings to be added if you are using Visual Studio plus an
        //  app.manifest change.
        //  http://stackoverflow.com/a/4232259/386091
        //  http://stackoverflow.com/a/9507862/386091
        if (Environment.OSVersion.Version < new Version(6, 2))
            return;

        // The job name is optional (and can be null) but it helps with diagnostics.
        //  If it's not null, it has to be unique. Use SysInternals' Handle command-line
        //  utility: handle -a ChildProcessTracker
        string jobName = "ChildProcessTracker" + Process.GetCurrentProcess().Id;
        s_jobHandle = CreateJobObject(IntPtr.Zero, jobName);

        var info = new JOBOBJECT_BASIC_LIMIT_INFORMATION();

        // This is the key flag. When our process is killed, Windows will automatically
        //  close the job handle, and when that happens, we want the child processes to
        //  be killed, too.
        info.LimitFlags = JOBOBJECTLIMIT.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;

        var extendedInfo = new JOBOBJECT_EXTENDED_LIMIT_INFORMATION();
        extendedInfo.BasicLimitInformation = info;

        int length = Marshal.SizeOf(typeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
        IntPtr extendedInfoPtr = Marshal.AllocHGlobal(length);
        try
        {
            Marshal.StructureToPtr(extendedInfo, extendedInfoPtr, false);

            if (!SetInformationJobObject(s_jobHandle, JobObjectInfoType.ExtendedLimitInformation,
                extendedInfoPtr, (uint)length))
            {
                throw new Win32Exception();
            }
        }
        finally
        {
            Marshal.FreeHGlobal(extendedInfoPtr);
        }
    }

    [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
    static extern IntPtr CreateJobObject(IntPtr lpJobAttributes, string name);

    [DllImport("kernel32.dll")]
    static extern bool SetInformationJobObject(IntPtr job, JobObjectInfoType infoType,
        IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength);

    [DllImport("kernel32.dll", SetLastError = true)]
    static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process);

    // Windows will automatically close any open job handles when our process terminates.
    //  This can be verified by using SysInternals' Handle utility. When the job handle
    //  is closed, the child processes will be killed.
    private static readonly IntPtr s_jobHandle;
}

public enum JobObjectInfoType
{
    AssociateCompletionPortInformation = 7,
    BasicLimitInformation = 2,
    BasicUIRestrictions = 4,
    EndOfJobTimeInformation = 6,
    ExtendedLimitInformation = 9,
    SecurityLimitInformation = 5,
    GroupInformation = 11
}

[StructLayout(LayoutKind.Sequential)]
public struct JOBOBJECT_BASIC_LIMIT_INFORMATION
{
    public Int64 PerProcessUserTimeLimit;
    public Int64 PerJobUserTimeLimit;
    public JOBOBJECTLIMIT LimitFlags;
    public UIntPtr MinimumWorkingSetSize;
    public UIntPtr MaximumWorkingSetSize;
    public UInt32 ActiveProcessLimit;
    public Int64 Affinity;
    public UInt32 PriorityClass;
    public UInt32 SchedulingClass;
}

[Flags]
public enum JOBOBJECTLIMIT : uint
{
    JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x2000
}

[StructLayout(LayoutKind.Sequential)]
public struct IO_COUNTERS
{
    public UInt64 ReadOperationCount;
    public UInt64 WriteOperationCount;
    public UInt64 OtherOperationCount;
    public UInt64 ReadTransferCount;
    public UInt64 WriteTransferCount;
    public UInt64 OtherTransferCount;
}

[StructLayout(LayoutKind.Sequential)]
public struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
{
    public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
    public IO_COUNTERS IoInfo;
    public UIntPtr ProcessMemoryLimit;
    public UIntPtr JobMemoryLimit;
    public UIntPtr PeakProcessMemoryUsed;
    public UIntPtr PeakJobMemoryUsed;
}


This answer started with @Matt Howells' excellent answer plus others (see links in the code below). Improvements:
  • Supports 32-bit and 64-bit.
  • Fixes some problems in @Matt Howells' answer:
    1. The small memory leak of extendedInfoPtr
    2. The 'Win32' compile error, and
    3. A stack-unbalanced exception I got in the call to CreateJobObject (using Windows 10, Visual Studio 2015, 32-bit).
  • Names the Job, so you if you use SysInternals, for example, you can easily find it.
  • Has a somewhat simpler API and less code.
Here's how to use this code:
// Get a Process object somehow.
Process process = Process.Start(exePath, args);
// Add the Process to ChildProcessTracker.
ChildProcessTracker.AddProcess(process);
To support Windows 7 requires:
In my case, I didn't need to support Windows 7, so I have a simple check at the top of the static constructor below.

Saturday, April 30, 2016

Retry Class C#

 


 

Using this class, taken from http://kb.zillionics.com/c-retry-pattern/ as my note

    class Retry
    {
        /// <summary>
        /// Retry calling of a method if it fails
        /// </summary>
        /// <typeparam name="T">Return data type</typeparam>
        /// <param name="method">Method</param>
        /// <param name="numRetries">Number of Retries</param>
        /// <param name="secondsToWaitBeforeRetry"></param>
        /// <returns>T</returns>
        public static T RetryMethod<T>(Func<T> method, int numRetries, int secondsToWaitBeforeRetry)
        {
            if (method == null)
                throw new ArgumentNullException("method");
            T retval = default(T);
            do
            {
                try
                {
                    retval = method();
                    return retval;
                }
                catch (Exception ex)
                {
                    //Logger.Log(ex.ToString());
                    //Logger.Log("Retrying... Count down: " + numRetries);
                    if (numRetries <= 0) throw;
                    Thread.Sleep(secondsToWaitBeforeRetry * 1000);
                }
            } while (numRetries-- > 0);
            return retval;
        }

        /// <summary>
        /// Retry calling of an Action if it fails
        /// </summary>
        /// <typeparam name="T">Return data type</typeparam>
        /// <param name="method">Method</param>
        /// <param name="numRetries">Number of Retries</param>
        /// <param name="secondsToWaitBeforeRetry"></param>
        public static void RetryAction(Action action, int numRetries, int secondsToWaitBeforeRetry)
        {
            if (action == null)
                throw new ArgumentNullException("action");
            do
            {
                try { action(); return; }
                catch (Exception ex)
                {
                    //Logger.Log(ex.ToString());
                    //Logger.Log("Retrying... Count down: " + numRetries);
                    if (numRetries <= 0) throw;
                    else Thread.Sleep(secondsToWaitBeforeRetry * 1000);
                }
            } while (numRetries-- > 0);
        }
    }
How to using it 

  string ret = Retry.RetryMethod(() => {
                                     string abac = ambildataimdb(line,  c, lines);
                                     return abac;
                                    }, 3, 5);
Or VOID


  Retry.RetryAction(() =>
                         {
                           ambildataimdb(line,  c, lines);
                                    }, 3, 5);

Tuesday, April 26, 2016

Richtextbox copy paste as plaintext

 


 

private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == Keys.V)
            {
                richTextBox1.Text += (string)Clipboard.GetData("Text");
                e.Handled = true;
            }
        }


 On event KeyDown

NUGET, reinstall, install, uninstall

 

 

REINSTALL

Update-Package –reinstall <packageName>

REINSTALL ALL
Update-Package -Reinstall

INSTALL

Install-Package Geckofx45 

UNINSTALL  

Uninstall-Package OpenIdPortableAre


UNINSTALL with dependencies 


Uninstall-Package OpenIdPortableArea –RemoveDependencies