예제 #1
0
    /// <summary>
    /// Показать панель
    /// </summary>
    /// <param name="nextWindow">Панель для показа</param>
    public void ShowPanel(EnumWindow nextWindow)
    {
        _previousWindow = _currentWindow;
        _currentWindow?.Close();

        _currentWindow = _allWindows[nextWindow];
        _currentWindow.Show();
    }
예제 #2
0
        public void CloseMethod(EnumWindow WindowName)
        {
            List <Window> windows = new List <Window>();

            windows = Application.Current.Windows.OfType <Window>().ToList();
            windows.ForEach(x =>
            {
                if (x.Name == WindowName.ToString())
                {
                    x.Close();
                }
            });
        }
예제 #3
0
 private static extern bool EnumWindows(EnumWindow lpEnumFunc, IntPtr lParam);
예제 #4
0
 public static extern int EnumWindows(EnumWindow ew, string lParam);