private void _showSourceButton_Click(object sender, EventArgs e) { if (UriUtil.IsHttpUri(_sourceTextBox.Text) || UriUtil.IsFileUri(_sourceTextBox.Text)) { Process.Start(_sourceTextBox.Text); } }
// ------------------------------ // private // ------------------------------ private void UpdateOkButtonEnabled() { if (StringUtil.IsNullOrWhitespace(_titleTextTextBox.Text)) { _okButton.Enabled = false; } else if (_linkTargetListBox.SelectedIndex == 0) { _okButton.Enabled = _memoListView.MemoListBox.SelectedItems.Count > 0; } else if (_linkTargetListBox.SelectedIndex == 1) { _okButton.Enabled = UriUtil.IsHttpUri(_addressTextBox.Text) || UriUtil.IsFileUri(_addressTextBox.Text); } }
private void UpdateSourceTextBox() { _sourceTextBox.Text = _memo.Source; _showSourceButton.Enabled = UriUtil.IsHttpUri(_sourceTextBox.Text) || UriUtil.IsFileUri(_sourceTextBox.Text); }