Exemplo n.º 1
0
 public WindowInformation(WindowKey key, WindowKey parentKey, Window window,
                          Action <IResultDataCollection> afterWindowClosedAction)
 {
     Key       = key;
     ParentKey = parentKey;
     Window    = window;
     AfterWindowClosedAction = afterWindowClosedAction;
 }
        public WindowInformation Get(WindowKey key)
        {
            WindowInformation window;

            _windows.TryGetValue(key, out window);

            return(window);
        }
        public bool ContainsKey(WindowKey key)
        {
            if (ReferenceEquals(key, null))
            {
                return(false);
            }

            return(_windows.ContainsKey(key));
        }
Exemplo n.º 4
0
        public bool Equals(WindowKey other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Type == other.Type && Key.Equals(other.Key));
        }
        public WindowInformation GetParent(WindowKey key)
        {
            if (ReferenceEquals(key, null))
            {
                return(null);
            }

            var information = Get(key);

            var parentKey = information?.ParentKey;

            if (ReferenceEquals(parentKey, null))
            {
                return(null);
            }

            return(Get(parentKey));
        }