public void abc(object sender, EventArgs e)
 {
     GetWindow(CurrentUser.hand).Close();
     if (CurrentUser.winid == 1)
     {
         MainWindow a = new MainWindow();
         a.Left = (this.Left) + (this.Width - a.Width) / 2;
         a.Top  = (this.Top) + (this.Height - a.Height) / 2;
         a.Show();
     }
     if (CurrentUser.winid == 2)
     {
         Findjob a = new Findjob();
         a.Left = (this.Left) + (this.Width - a.Width) / 2;
         a.Top  = (this.Top) + (this.Height - a.Height) / 2;
         a.Show();
     }
     if (CurrentUser.winid == 3)
     {
         Findworker a = new Findworker();
         a.Left = (this.Left) + (this.Width - a.Width) / 2;
         a.Top  = (this.Top) + (this.Height - a.Height) / 2;
         a.Show();
     }
 }
示例#2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //Open Find Job

            Findjob a = new Findjob();

            a.Left = (this.Left) + (this.Width - a.Width) / 2;
            a.Top  = (this.Top) + (this.Height - a.Height) / 2;
            a.Show();
            this.Close();
            //Screen Position

            //this.Close();
        }