private void linkLabelCompany_Clicked(object sender, EventArgs args) { try { MouseEventArgs mouseArgs = args as MouseEventArgs; if (null == mouseArgs) { return; } if (mouseArgs.Button == MouseButtons.Left) { LinkLabel label = sender as LinkLabel; System.Diagnostics.Process.Start(label.Tag as string); } else if (mouseArgs.Button == MouseButtons.Right) { LastClickedLinkLabel = sender as Control; LinkContextMenu.Show(sender as Control, 0, 0); } } catch (Exception exception) { Forms.ErrorForm.ShowError(this, exception, ErrorCategory.NonCritical); } }
private void UriTargetForm_Click(object sender, EventArgs args) { try { MouseEventArgs mouseArgs = args as MouseEventArgs; if (null == mouseArgs) { return; } if (mouseArgs.Button == MouseButtons.Right) { LastClickedLinkLabel = sender as Label; LinkContextMenu.Show(sender as Control, 0, 0); } } catch (Exception exception) { Forms.ErrorForm.ShowError(this, exception, ErrorCategory.NonCritical); } }