예제 #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            XMLRead    CheckXML      = new XMLRead();
            XMLEdit    xmlEditWindow = new XMLEdit();
            MainWindow mainWindow    = new MainWindow();

            if (!CheckXML.CheckExistXML())
            {
                xmlEditWindow.Show();
            }
            else
            {
                mainWindow.Show();
            }
        }
예제 #2
0
        private void ConnButton_Click(object sender, RoutedEventArgs e)
        {
            List <string> xx = Conn1.DoConn("event", "SELECT * FROM events ORDER BY event ASC");

            foreach (string a in xx)
            {
                comboBox.Items.Add(a);
            }

            List <string> xx1 = Conn1.DoConn("id_event", "SELECT * FROM events ORDER BY event ASC");

            foreach (string a1 in xx1)
            {
                comboBox1.Items.Add(a1);
            }

            if (xx.Count() == 0 || xx1.Count() == 0)
            {
                XMLEdit xmlEditWindow = new XMLEdit();
                this.Close();
                xmlEditWindow.Show();
            }
            //MessageBox.Show(xx.Count().ToString());
        }