/// <summary> /// Handles the Click event of the About control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void Show_Click(object sender, EventArgs e) { var form = new frmProcess(); //if (form.Visible) //{ form.ShowDialog(); //} }
private void cmdProcess_Click(object sender, EventArgs e) { if (lstWorkstations.SelectedIndex >= 0) { IStarGateCallBack _Callback = ComputerListDic[lstWorkstations.Items[lstWorkstations.SelectedIndex].Value.ToString()]; ProcessInfo[] ProcessList = _Callback.GetProcess(); //_service.SendMessage(lstWorkstations.Items[lstWorkstations.SelectedIndex].Value.ToString(),"CCC"); var xOpen = new frmProcess(ProcessList, _Callback); xOpen.ShowDialog(); } }
private void mnuPEdit_Click(object sender, EventArgs e) { Form f = new frmProcess(); f.ShowDialog(this); }
private void lvwFileProcesses_DoubleClick(object sender, EventArgs e) { Form f = new frmProcess(); f.ShowDialog(this); }
private void btnResize_Click(object sender, EventArgs e) { string errors = ""; //Validate... if (!Directory.Exists(txtSource.Text)) { errors += "- A source directory is required.\n"; } if (!Directory.Exists(txtDestination.Text)) { errors += "- A destination directory is required.\n"; } if (txtSource.Text == txtDestination.Text) { errors += "- Source and Destination directories cannot be the same.\n"; } int maxWidth = 0; int maxHeight = 0; double percentage = 0; if ((txtMaxWidth.Text.Trim() == "" && txtMaxHeight.Text.Trim() == "" && txtPercentage.Text.Trim() == "") || (txtMaxWidth.Text.Trim() != "" && txtMaxHeight.Text.Trim() != "" && txtPercentage.Text.Trim() != "")) { errors += "- You must choose to use Max Width, Max Height, or Percentage.\n"; } else { if (txtMaxWidth.Text.Trim().Length > 0 && !int.TryParse(txtMaxWidth.Text, out maxWidth)) { errors += "- Max Width must be a valid positive number.\n"; } else if (txtMaxWidth.Text.Trim().Length > 0 && maxWidth <= 0) { errors += "- Max Width must be a valid positive number.\n"; } if (txtMaxHeight.Text.Trim().Length > 0 && !int.TryParse(txtMaxHeight.Text, out maxHeight)) { errors += "- Max Height must be a valid positive number.\n"; } else if (txtMaxHeight.Text.Trim().Length > 0 && maxHeight <= 0) { errors += "- Max Height must be a valid positive number.\n"; } if (txtPercentage.Text.Trim().Length > 0 && !double.TryParse(txtPercentage.Text, out percentage)) { errors += "- Percentage must be a valid positive number.\n"; } else if (txtPercentage.Text.Trim().Length > 0 && percentage <= 0) { errors += "- Percentage must be a valid positive number.\n"; } } if (txtPrefix.Text.IndexOfAny(Path.GetInvalidFileNameChars()) > -1) { errors += "- Prefix has characters that invalid for a file name.\n"; } if (Directory.Exists(txtSource.Text) && Program.LoadImages(txtSource.Text).Length == 0) { errors += "- There are no images in the source folder.\n"; } //Got errors? if (errors.Length > 0) { Program.ShowMessageBox("There were some errors with your entry:\n\n" + errors); return; } //Open up the new form and go! frmProcess form = new frmProcess(txtSource.Text, txtDestination.Text, maxWidth, maxHeight, percentage, txtPrefix.Text, chkKeepAspect.Checked, chkStretch.Checked, trkThreadCount.Value); form.ShowDialog(); form.Dispose(); }