private void StartTxt_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode.Equals(Keys.Right) && StartTxt.SelectionStart == StartTxt.Text.Length) { FinishTxt.Focus(); } }
public void AddEdgeListView() { var start = StartTxt.Text; var finish = FinishTxt.Text; StartTxt.Clear(); FinishTxt.Clear(); if (start != finish) { Graph.Add(new Edge(start, finish)); EdgesListView.Items.Add(new ListViewItem(new string[] { start, "->", finish })); } StartTxt.Focus(); }