Example #1
0
 private void StartTxt_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode.Equals(Keys.Right) && StartTxt.SelectionStart == StartTxt.Text.Length)
     {
         FinishTxt.Focus();
     }
 }
Example #2
0
        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();
        }