예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     main = new WinPos();
     System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
예제 #2
0
 public MainWindow()
 {
     InitializeComponent();
     main = new WinPos();
     System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
예제 #3
0
파일: WinPos.cs 프로젝트: tempbottle/INCC6
 public WinPos GetChildPos(double h, double w)
 {
     WinPos child = new WinPos();
     child.height = h < maxh ? h : maxh;
     child.top = this.top + 200;
     child.width = w < maxw ? w : maxw;
     //move to right of main window if won't go off the screen
     child.left = this.left + w < maxw ? this.left + w : this.left + 200;
     return child;
 }
예제 #4
0
        public WinPos GetChildPos(double h, double w)
        {
            WinPos child = new WinPos();

            child.height = h < maxh ? h : maxh;
            child.top    = this.top + 200;
            child.width  = w < maxw ? w : maxw;
            //move to right of main window if won't go off the screen
            child.left = this.left + w < maxw ? this.left + w : this.left + 200;
            return(child);
        }
예제 #5
0
        private void AcquireVerificationClick(object sender, RoutedEventArgs e)
        {
            IDDAcquireAssay f        = new IDDAcquireAssay();
            WinPos          childPos = main.GetChildPos(f.Height, f.Width);

            f.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            if (childPos.height < f.Height || childPos.width < f.Width) // Resize if it will go off screen.
            {
                f.Size = new System.Drawing.Size((int)childPos.width, (int)childPos.height);
            }
            f.Location = new System.Drawing.Point((int)childPos.left, (int)childPos.top);
            f.ShowDialog();
        }
예제 #6
0
        private void MaintainCollarClick(object sender, RoutedEventArgs e)
        {
            //HN -- Cross ref shown first, next button takes you to IDDCollarCal
            IDDCollarCrossRef f        = new IDDCollarCrossRef();
            WinPos            childPos = main.GetChildPos(f.Height, f.Width);

            f.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            if (childPos.height < f.Height || childPos.width < f.Width) // Resize if it will go off screen.
            {
                f.Size = new System.Drawing.Size((int)childPos.width, (int)childPos.height);
            }
            f.Location = new System.Drawing.Point((int)childPos.left, (int)childPos.top);

            f.ShowDialog();
        }