예제 #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     EventControl.LoadData();
     TaskBarControl.StartTaskBar();
     PanelPages.Content = new Main();
     ControlSignal.Start();
 }
예제 #2
0
 private void FatherItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (MessageBox.Show("Видаляться всі дії з таким словом", "Ви впевнені?", MessageBoxButton.YesNoCancel) == MessageBoxResult.Yes)
     {
         XMLControl.DeleteEvent((sender as TreeViewItem).Header.ToString());
         EventControl.DeleteFromName((sender as TreeViewItem).Header.ToString());
         MainStackEvents.Children.Clear();
         InfoStackEvents.Children.Clear();
         InfoStackEvents.UpdateLayout();
         Start();
     }
 }
예제 #3
0
        public static void StartTranslate()
        {
            string word = Start(DataAssistant.FolderNameFile + (DataAssistant.CountSound - 1).ToString() + DataAssistant.NameFileWriter)[0];

            if (ConstStandartEvent.HaveOrNo(word) == false && word != "#?#" && word != " ")
            {
                string log = "";
                if (EventData.Contains(word))
                {
                    List <string> answers = EventControl.StartEvent(word);
                    for (int i = 0; i < answers.Count; ++i)
                    {
                        log += i.ToString() + " : " + answers[i] + "; ";
                    }
                    PageMainData.Words.Add(word + " | " + (log == "" ? "немає завдань" : log));
                }
                else
                {
                    PageMainData.Words.Add(word + " | " + "нерозпізнано");
                }
            }
        }