Exemplo n.º 1
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            myWindow.ShowDialog();
            if (PublicClass.ContinueToTest)
            {
                try
                {
                    if (!MyDatabaseMethod.SelectCurrentDatabase())
                    {
                        PublicClass.ContinueToTest = false;
                        MessageExt.Instance.ShowDialog("数据库连接出错", "提示");
                        await Task.Delay(10);

                        return;
                    }
                    else
                    {
                        this.txtDatabase.Text = PublicClass.CurrentDatabase;
                    }
                }
                catch (Exception ex)
                {
                    MessageExt.Instance.ShowDialog("数据库连接出错" + ex.ToString(), "提示");
                }
            }
        }
Exemplo n.º 2
0
        private void btnComsetting_Click(object sender, RoutedEventArgs e)
        {
            ComWindow myWindow = new ComWindow();

            myWindow.ShowDialog();
        }