コード例 #1
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            GenericWrapper w = GetInstance <GenericWrapper>();

            _menu.Items[2].Enabled = w.PrevNode != null;
            _menu.Items[3].Enabled = w.NextNode != null;
        }
コード例 #2
0
        internal protected virtual void OnMovedDown(ResourceNode node, bool select)
        {
            GenericWrapper res = this.FindResource(node, false) as GenericWrapper;

            res.MoveDown(select);
            res.EnsureVisible();
            //res.TreeView.SelectedNode = res;
        }
コード例 #3
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            GenericWrapper w = GetInstance <GenericWrapper>();

            _menu.Items[1].Enabled = _menu.Items[8].Enabled = w.Parent != null;
            _menu.Items[2].Enabled = ((w._resource.IsDirty) || (w._resource.IsBranch));
            _menu.Items[4].Enabled = w.PrevNode != null;
            _menu.Items[5].Enabled = w.NextNode != null;
        }
コード例 #4
0
        public static BaseWrapper Wrap(IWin32Window owner, ResourceNode node)
        {
            _owner = owner;
            BaseWrapper w;

            if (!NodeWrapperAttribute.Wrappers.ContainsKey(node.ResourceType))
            {
                w = new GenericWrapper();
            }
            else
            {
                w = Activator.CreateInstance(NodeWrapperAttribute.Wrappers[node.ResourceType]) as BaseWrapper;
            }
            w.Link(node);
            return(w);
        }