private void SetLabelTime(Object s) { if (this.label_RemainingTime.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.SetLabelTime); this.Invoke(aPC, new object[] { s }); } else { this.label_RemainingTime.Text = (String)s; } }
private void UpdateCurrOperationStatus(Object text) { if (this.label_CurrentOperation.InvokeRequired) { Common.OneParamDelegate gC = new Common.OneParamDelegate(this.UpdateCurrOperationStatus); this.label_CurrentOperation.Invoke(gC, text); } else { this.label_CurrentOperation.Text = (String)text; } }
private void SetProgressBar(Object s) { if (this.progressBar_EncrDecrProgress.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.SetProgressBar); this.Invoke(aPC, new object[] { s }); } else { this.progressBar_EncrDecrProgress.Maximum = Int32.Parse((String)s); } }
private void ButtonOpenLoadedFileFolderEnabled(Object enabled) { if (this.button_OpenLoadedFileFolder.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.ButtonOpenLoadedFileFolderEnabled); this.button_OpenLoadedFileFolder.Invoke(aPC, enabled); } else { this.button_OpenLoadedFileFolder.Enabled = (Boolean)enabled; } }
private void ButtonPrepareAlgorithmEnabled(Object enabled) { if (this.button_PrepareAlgorithm.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.ButtonPrepareAlgorithmEnabled); this.button_PrepareAlgorithm.Invoke(aPC, enabled); } else { this.button_PrepareAlgorithm.Enabled = (Boolean)enabled; } }
private void ButtonLoadDataEnabled(Object enabled) { if (this.button_LoadDataFromFile.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.ButtonLoadDataEnabled); this.button_LoadDataFromFile.Invoke(aPC, enabled); } else { this.button_LoadDataFromFile.Enabled = (Boolean)enabled; } }
private void ButtonEncryptEnabled(Object enabled) { if (this.button_Encrypt.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.ButtonEncryptEnabled); this.button_Encrypt.Invoke(aPC, enabled); } else { this.button_Encrypt.Enabled = (Boolean)enabled; } }
private void PanelButtonsEnabled(Object enabled) { if (this.panel_Buttons.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.PanelButtonsEnabled); this.panel_Buttons.Invoke(aPC, enabled); } else { this.panel_Buttons.Enabled = (Boolean)enabled; } }
private void RichTextBoxConsoleAddText(Object text) { if (this.richTextBox_Console.InvokeRequired) { Common.OneParamDelegate aPC = new Common.OneParamDelegate(this.RichTextBoxConsoleAddText); this.richTextBox_Console.Invoke(aPC, text); } else { this.richTextBox_Console.Text += (String)text + "\n"; RichTextBoxScrollToBottom(); } }
public void RunMultiThreadedRSAEncDec(Common.OneParamDelegate oPD, Object methodToRunParam, UInt32 nrThreads) { Int64[] splittedDataBoundaries = (Int64[])methodToRunParam; if (nrThreads > nrCores) { threadPool = new Thread[nrThreads]; Common.RaiseAppEvent(Common.AppEventTypeEnum.NrThreadsBiggerThanNrCores, null); } for (Int32 i = 0; i < nrThreads; i++) { threadPool[i] = new Thread(new ParameterizedThreadStart(oPD)); threadPool[i].Priority = ThreadPriority.AboveNormal; threadPool[i].Start(new Int64[] { splittedDataBoundaries[i], splittedDataBoundaries[i + 1], i }); } }