コード例 #1
0
 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_2(object sender, RoutedEventArgs e)
        {
            Findworker a = new Findworker();

            //Позиция на экране
            a.Left = (this.Left) + (this.Width - a.Width) / 2;
            a.Top  = (this.Top) + (this.Height - a.Height) / 2;
            a.Show();
            this.Close();
        }