Exemplo n.º 1
0
 private void ContinueButton_Click(object sender, RoutedEventArgs e)
 {
     string name = NameTextBox.Text;
     string info = InfoTextBox.Text;
     if ((name != "") && (name != null))
     {
         int ID = (name + info).GetHashCode();
         TreeProcessor.TreeProcessorSingletone.SetCurrentTree(
             new GenTree(DateTime.Now, DateTime.Now, name, info));
         var tmpWind = new TreeEditorWindow();
         tmpWind.Show();
         this.Close();
     }
     else
         MessageBox.Show("Please, fill 'tree's name' field");
 }
Exemplo n.º 2
0
 /* private void CrTreesListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
  * {
  *   GenTree selTree;
  *   TreeProcessor.TreeProcessorSingletone.GetTreeInfoFromIndex(
  *       CrTreesListView.SelectedIndex, out selTree);
  *   SelectedTreeLabel.Content = selTree.Information;
  * }
  */
 private void SelectTreeButton_Click(object sender, RoutedEventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         if (TreeProcessor.TreeProcessorSingletone.SetCurrentTree(listBox1.SelectedIndex))
         {
             var wind = new TreeEditorWindow();
             wind.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Some error!!!");
         }
     }
 }
Exemplo n.º 3
0
        private void ContinueButton_Click(object sender, RoutedEventArgs e)
        {
            string name = NameTextBox.Text;
            string info = InfoTextBox.Text;

            if ((name != "") && (name != null))
            {
                int ID = (name + info).GetHashCode();
                TreeProcessor.TreeProcessorSingletone.SetCurrentTree(
                    new GenTree(DateTime.Now, DateTime.Now, name, info));
                var tmpWind = new TreeEditorWindow();
                tmpWind.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Please, fill 'tree's name' field");
            }
        }
Exemplo n.º 4
0
 /* private void CrTreesListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     GenTree selTree;
     TreeProcessor.TreeProcessorSingletone.GetTreeInfoFromIndex(
         CrTreesListView.SelectedIndex, out selTree);
     SelectedTreeLabel.Content = selTree.Information;
 }
 */
 private void SelectTreeButton_Click(object sender, RoutedEventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         if (TreeProcessor.TreeProcessorSingletone.SetCurrentTree(listBox1.SelectedIndex))
         {
             var wind = new TreeEditorWindow();
             wind.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Some error!!!");
         }
     }
 }