public bool EqualPlacement(ApplicationDisplayMetrics other)
 {
     return(this.WindowPlacement.NormalPosition.Left == other.WindowPlacement.NormalPosition.Left &&
            this.WindowPlacement.NormalPosition.Top == other.WindowPlacement.NormalPosition.Top &&
            this.WindowPlacement.NormalPosition.Width == other.WindowPlacement.NormalPosition.Width &&
            this.WindowPlacement.NormalPosition.Height == other.WindowPlacement.NormalPosition.Height);
 }
Ejemplo n.º 2
0
        }                                                   //non-persistent data used for tmp argument passing only

        public bool EqualPlacement(ApplicationDisplayMetrics other)
        {
            bool posEqual         = this.WindowPlacement.NormalPosition.Equals(other.WindowPlacement.NormalPosition);
            bool minmaxStateEqual = this.WindowPlacement.ShowCmd == other.WindowPlacement.ShowCmd;

            return(posEqual && minmaxStateEqual);
        }
        public bool EqualPlacement(ApplicationDisplayMetrics other)
        {
            bool posEqual           = this.WindowPlacement.NormalPosition.Equals(other.WindowPlacement.NormalPosition);
            bool minmaxStateEqual   = this.WindowPlacement.ShowCmd == other.WindowPlacement.ShowCmd;
            bool minimizeStateEqual = this.IsMinimized == other.IsMinimized;
            bool allEqual           = posEqual && minmaxStateEqual && minimizeStateEqual;

            if (minimizeStateEqual && this.IsMinimized && !allEqual)
            {
                Log.Trace("reject placement change in minimized state");
                return(true);
            }

            return(allEqual);
        }