} //setClipboard() /**************************************************************************** * * * Common for to avoid redundant code (reporting errors, * * convenient call, workaround for failing clipboard, * * operations, etc.) * * * * Parameters: * * * * aStatusLabel * * * * A value of to null is allowed (used when error reporting * * is not required or possible). * * * * * ****************************************************************************/ public static void setClipboard3( string aClipboardStr, System.Windows.Forms.ToolStripStatusLabel aStatusLabel) { clipboardInfoStruct outclipboardInfo; outclipboardInfo.retries = -1; EditorOverflowApplication.setClipboard( aClipboardStr, out outclipboardInfo); int retries = outclipboardInfo.retries; if (retries > 0) { if (aStatusLabel != null) // It is called with nul from // the Markdown utility... { aStatusLabel.Text = retries.ToString() + " retries accessing the clipboard!"; } else { int peter2 = 2; } } } //setClipboard3()
/**************************************************************************** * <placeholder for header> * ****************************************************************************/ public frmSelectCurrentSite(Sites aSites, EditorOverflowApplication anApplication) { InitializeComponent(); mSites = aSites; mApplication = anApplication; int len = aSites.getSiteURLs().Count; mSitesOrder = new List <string>(len); }
/**************************************************************************** * <placeholder for header> * ****************************************************************************/ private void btnExportLlistToClipboard_Click(object aSender, EventArgs anEvent) { //72 sites as of 2016-07-08, with 20% margin. StringBuilder scratchSB = new StringBuilder(2200); List <string> siteURLS = mSites.getSiteURLs(); foreach (string siteDomainURL in siteURLS) { scratchSB.Append(siteDomainURL); scratchSB.Append("\n"); } EditorOverflowApplication.setClipboard3(scratchSB.ToString(), null); } //btnExportLlistToClipboard_Click()