Ejemplo n.º 1
0
        private void DockItemClosing(object sender, ItemCancelEventArgs e)
        {
            Debug.WriteLine("DockItemClosing: {0}", e.Item);

            var         info  = new PanelLayoutInfo();
            LayoutPanel panel = null;

            if (e.Item is LayoutPanel)
            {
                panel           = (LayoutPanel)e.Item;
                info.IsFloating = false;
            }
            else if (e.Item is FloatGroup)
            {
                var g = (FloatGroup)e.Item;
                panel              = (LayoutPanel)g.Items[0];
                info.IsFloating    = true;
                info.FloatLocation = g.FloatLocation;
                info.FloatSize     = g.FloatSize;
            }

            var key = FindKeyByObject(panel);

            if (key != "")
            {
                _panelInfos[key] = info;
                _openDocuments.Remove(key);
            }
        }
Ejemplo n.º 2
0
        private void DockItemClosing(object sender, ItemCancelEventArgs e)
        {
            Debug.WriteLine("DockItemClosing: {0}", e.Item);

            var info = new PanelLayoutInfo();
            LayoutPanel panel = null;
            if (e.Item is LayoutPanel)
            {
                panel = (LayoutPanel) e.Item;
                info.IsFloating = false;
            }
            else if (e.Item is FloatGroup)
            {
                var g = (FloatGroup) e.Item;
                panel = (LayoutPanel)g.Items[0];
                info.IsFloating = true;
                info.FloatLocation = g.FloatLocation;
                info.FloatSize = g.FloatSize;
            }

            var key = FindKeyByObject(panel);
            if (key != "")
            {
                _panelInfos[key] = info;
                _openDocuments.Remove(key);
            }
        }