Пример #1
0
 private void cbAddress_SelectionChangeCommitted(object sender, EventArgs e)
 {
     if (tcTrees.SelectedTab == tbServer)
     {
         if (VersionControlPath.IsValidPath(cbAddress.Text))
         {
             stvServerTreeView.Navigate(cbAddress.Text);
         }
     }
     else
     {
         if (FileSpec.IsLegalNtfsName(cbAddress.Text, (int)PathLength.MaxLength, false))
         {
             ltvLocalTreeView.Navigate(cbAddress.Text);
         }
     }
 }
Пример #2
0
 private void cbAddress_Validating(object sender, CancelEventArgs e)
 {
     if (tcTrees.SelectedTab == tbServer)
     {
         if (!VersionControlPath.IsValidPath(cbAddress.Text.Trim()))
         {
             e.Cancel = true;
         }
     }
     else
     {
         if (!FileSpec.IsLegalNtfsName(cbAddress.Text.Trim(), (int)PathLength.MaxLength, false))
         {
             e.Cancel = true;
         }
     }
 }
Пример #3
0
 private void cbAddress_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         e.Handled = true;
         if (tcTrees.SelectedTab == tbServer)
         {
             if (VersionControlPath.IsValidPath(cbAddress.Text))
             {
                 stvServerTreeView.Navigate(cbAddress.Text);
                 cbAddress.Items.Add(cbAddress.Text);
             }
         }
         else
         {
             if (FileSpec.IsLegalNtfsName(cbAddress.Text, (int)PathLength.MaxLength, false))
             {
                 ltvLocalTreeView.Navigate(cbAddress.Text);
                 cbAddress.Items.Add(cbAddress.Text);
             }
         }
     }
 }