private void Window_Closed(object sender, EventArgs e)
        {
            MessageBox.Show("关闭主窗口");

            Window1 wis = new Window1();
            wis.Show();

        }
        public void ShowForm()
        {
            engineCtlForm.Topmost = true;
            engineCtlForm.WindowStartupLocation = System.Windows.WindowStartupLocation.Manual;
            engineCtlForm.Left = System.Windows.SystemParameters.PrimaryScreenWidth - engineCtlForm.Width - 60;
            engineCtlForm.Top  = (System.Windows.SystemParameters.PrimaryScreenHeight - engineCtlForm.Height) / 2;
            engineCtlForm.Show();

            directCtrlForm.Topmost = true;
            directCtrlForm.WindowStartupLocation = System.Windows.WindowStartupLocation.Manual;
            directCtrlForm.Left = 20;
            directCtrlForm.Top  = (System.Windows.SystemParameters.PrimaryScreenHeight - directCtrlForm.Height) / 2;
            directCtrlForm.Show();
        }
Exemple #3
0
        public void ShowForm()
        {
            if (engineCtlForm.IsVisible || directCtrlForm.IsVisible)
            {
                return;
            }

            System.Windows.Forms.Application.EnableVisualStyles();

            engineCtlForm.Topmost = true;
            engineCtlForm.WindowStartupLocation = System.Windows.WindowStartupLocation.Manual;
            engineCtlForm.Left = System.Windows.SystemParameters.PrimaryScreenWidth - engineCtlForm.Width - 60;
            engineCtlForm.Top  = (System.Windows.SystemParameters.PrimaryScreenHeight - engineCtlForm.Height) / 2;
            engineCtlForm.Show();

            directCtrlForm.Topmost = true;
            directCtrlForm.WindowStartupLocation = System.Windows.WindowStartupLocation.Manual;
            directCtrlForm.Left = 20;
            directCtrlForm.Top  = (System.Windows.SystemParameters.PrimaryScreenHeight - directCtrlForm.Height) / 2;
            directCtrlForm.Show();

            SubscribeToLaserScan("/laser_pointcloud_base_link");
        }
 private void Application_Startup_1(object sender, StartupEventArgs e)
 {
     Window1 window1 = new Window1();
     window1.Show();
 }
Exemple #5
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            Window1 win = new Window1();

            win.Show();
        }
 private void salir(object sender, MouseButtonEventArgs e)
 {
     Window1 VentanaInicial = new Window1();
     VentanaInicial.Show();
     this.Close();
 }
        private void Btinfo_Click(object sender, RoutedEventArgs e)
        {
            Window1 fix = new Window1();

            fix.Show();
        }
        private void b1_Click(object sender, RoutedEventArgs e)
        {
            Connection c = new Connection();
            c.add();
            String user_name = t1.Text;

            String pass_word = p.Password;

            SqlCommand cmd = new SqlCommand("select user_name,password from login where user_name='" + user_name + "' and password='******' ",c.con);
            SqlDataReader dr;
            dr= cmd.ExecuteReader();
            int count = 0;
            while (dr.Read())
            {
                count += 1;
            }
            dr.Close();
            if (count == 1)
            {
                //MessageBox.Show("Login sucess ");
                SqlCommand cm = new SqlCommand("select emp_id from login where user_name='" + user_name + "' and password='******'",c.con);
                int a = (Int32)cm.ExecuteScalar();
                SqlCommand cm1=new SqlCommand("select ws_name from Workstaion where ws_id='"+a+"'",c.con);
                String works = (String)cm1.ExecuteScalar();
                A.identy = a;
                if (a == 3 || a == 4 || a == 5 || a == 6 || a == 7 || a==1 ||a==2) {
                    Window1 a1 = new Window1();
                    a1.Title = "Log in "+works;
                    a1.Show();
                    this.Hide();
                }

            }
            else
            {
                MessageBox.Show("User Name or Password is Incorrect!");

            }
            c.exit();
        }
Exemple #9
0
        void wbEvents2_NewWindow2(ref object ppDisp, ref bool Cancel)
        {
            Window1 wnd = new Window1();
            wnd.Show();
            wnd.myWebBrowser.Navigate(new Uri("about:blank"));
            //wnd.myWebBrowser.Navigating += new System.Windows.Navigation.NavigatingCancelEventHandler(myWebBrowser_Navigating);

            Guid SID_SWebBrowserApp = new Guid("0002DF05-0000-0000-C000-000000000046");
            IServiceProvider serviceProvider = (IServiceProvider)wnd.myWebBrowser.Document;

            Guid serviceGuid = SID_SWebBrowserApp;

            Guid iid = typeof(SHDocVw.IWebBrowser2).GUID;

            SHDocVw.IWebBrowser2 myWebBrowser2 = (SHDocVw.IWebBrowser2)serviceProvider.QueryService(ref serviceGuid, ref iid);

            ppDisp = myWebBrowser2.Application;

            SHDocVw.DWebBrowserEvents2_Event wbEvents2 = (SHDocVw.DWebBrowserEvents2_Event)myWebBrowser2;
            wbEvents2.NewWindow2 += new SHDocVw.DWebBrowserEvents2_NewWindow2EventHandler(wbEvents2_NewWindow2);
            wbEvents2.NavigateError += new SHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(wbEvents2_NavigateError);
            wbEvents2.RedirectXDomainBlocked += new SHDocVw.DWebBrowserEvents2_RedirectXDomainBlockedEventHandler(wbEvents2_RedirectXDomainBlocked);
            wbEvents2.ThirdPartyUrlBlocked += new SHDocVw.DWebBrowserEvents2_ThirdPartyUrlBlockedEventHandler(wbEvents2_ThirdPartyUrlBlocked);
        }
Exemple #10
0
 private void BT_NextWindow_Click(object sender, RoutedEventArgs e)
 {
     Window1 win1 = new Window1();
     win1.Show();
     this.Close();
 }
Exemple #11
0
        private void Insert_Compounds(object sender, RoutedEventArgs e)
        {
            Window1 win1 = new Window1();

            win1.Show();
        }