Пример #1
0
        private static string GetFilePath(RestoreWindowSettings settings, Window window)
        {
            if (!string.IsNullOrWhiteSpace(settings.FilePath))
            {
                return(settings.FilePath);
            }

            string windowName = window.GetType().FullName;

            return(FrameworkUtils.GetFullPathToExe(windowName.Replace('.', '_') + ".xml"));
        }
Пример #2
0
        public static RestoreWindowHandler Activate(Window window, RestoreWindowSettings settings)
        {
            RestoreWindowHandler handler;

            if (!handlers.TryGetValue(window, out handler))
            {
                handler = new RestoreWindowHandler(window, settings);
                handlers.Add(window, handler);
            }

            handler.Activate();

            return(handler);
        }
Пример #3
0
 public RestoreWindowHandler(Window window, RestoreWindowSettings settings)
 {
     this.window   = window;
     this.settings = settings;
 }