private void MenuItem_Click_3(object sender, RoutedEventArgs e)
        {
            //MenuItem cc = this.menu2.Items[0] as MenuItem;
            var     item = sender as MenuItem;
            Window4 w4   = new Window4();

            w4.gettype(item.Name);
            w4.createidss += new Window4.myevent(createidsst);
            w4.Show();
        }
Beispiel #2
0
        private void List_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox list = (ListBox)sender;
            Taask   task = (Taask)list.SelectedItem;

            task.qestion  = new List <string>();
            task.answers  = new List <string>();
            task.pictures = new List <string>();
            task.V1       = new List <string>();
            task.V2       = new List <string>();
            task.V3       = new List <string>();
            task.V4       = new List <string>();
            XDocument doc = XDocument.Load(@"XMLBAS.xml");

            foreach (var testElement in doc.Root.Elements())
            {
                if (testElement.Attribute("Name").Value == task.name && testElement.Attribute("Author").Value == task.author && testElement.Attribute("Qestions").Value == task.qestions)
                {
                    task.password = testElement.Attribute("pas").Value;
                    foreach (var questionElement in testElement.Elements())
                    {
                        task.answers.Add(questionElement.Attribute("ans").Value);
                        task.qestion.Add(questionElement.Attribute("qes").Value);
                        task.V1.Add(questionElement.Attribute("v1").Value);
                        task.V2.Add(questionElement.Attribute("v2").Value);
                        task.V3.Add(questionElement.Attribute("v3").Value);
                        task.V4.Add(questionElement.Attribute("v4").Value);
                        task.pictures.Add(Directory.GetCurrentDirectory() + questionElement.Attribute("pic").Value);
                    }
                }
            }

            if (rehim.SelectedItem != testirovanie)
            {
                Window8 w = new Window8(task);
                w.Show();
                Close();
            }

            else
            {
                Window4 win = new Window4(task);
                win.Show();
                Close();
            }
        }
        private void Szukaj_TE(object sender, RoutedEventArgs e)
        {
            Window4 szukajTE = new Window4();

            szukajTE.Show();
        }