예제 #1
0
        public static void CheckConnection(eMammalIntegrationWindow window, bool loadProject = false)
        {
            eMammalMySQLOps db = new eMammalMySQLOps();

            bool isConnectionOpen = false;

            while (isConnectionOpen == false)
            {
                Thread.Sleep(200);
                isConnectionOpen = db.OpenConnectionIfNotOpen(true);
            }
            window.Dispatcher.BeginInvoke(new Action(() =>
            {
                Common.SetMessage(window, Constants.DATABASE_AVAILABLE, false, false);

                window.Tab.Visibility = Visibility.Visible;

                if (loadProject)
                {
                    window.Loadproject();
                }

                window.Tab.SelectedIndex = 0;
                window.Tab.IsEnabled     = true;

                window.IsEnabled = true;

                window.ButtonBack.Visibility = Visibility.Hidden;
                window.ReactivateButton(window.ButtonNext);
                window.ReactivateButton(window.ButtonBrowse);
            }));
        }
        //double tabTopOriginalMargin;
        //double originalHeight;

        public eMammalIntegrationWindow()
        {
            InitializeComponent();
            db = new eMammalMySQLOps(this);

            //tabTopOriginalMargin = Tab.Margin.Top;

            eMammalIntegration = new eMammalIntegration(this);
        }
예제 #3
0
 public eMammalIntegration(eMammalIntegrationWindow window)
 {
     this.window = window;
     db          = new eMammalMySQLOps(window);
 }