如果我按右 alt 这个隐藏,当我再次按下程序显示和隐藏

If i press right alt this hide, when i press again program shows and hide

            if (e.KeyData.ToString().ToUpper() == "RMENU")
            {
                if(alt==2)
                    WindowState = WindowState.Normal;
                    alt = 1;
                else
                    WindowState = WindowState.Minimized;
                    alt = 2;
            }

如果我按右 alt 这个隐藏,当我再次按下时程序显示并隐藏

    if (e.KeyData.ToString().ToUpper() == "RMENU")
    {
        if (alt == 2)
        {
            WindowState = WindowState.Normal;
            alt = 1;
        }
        else if (alt == 1)
        {
            WindowState = WindowState.Minimized;
            alt = 2;
        }
    }