示例#1
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            CLR0MaterialEntryWrapper w = GetInstance <CLR0MaterialEntryWrapper>();

            _menu.Items[1].Enabled = _menu.Items[7].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;
        }
示例#2
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            CLR0MaterialEntryWrapper w = GetInstance <CLR0MaterialEntryWrapper>();

            ReplaceToolStripMenuItem.Enabled  = w.Parent != null;
            RestoreToolStripMenuItem.Enabled  = w._resource.IsDirty || w._resource.IsBranch;
            MoveUpToolStripMenuItem.Enabled   = w.PrevNode != null;
            MoveDownToolStripMenuItem.Enabled = w.NextNode != null;
            DeleteToolStripMenuItem.Enabled   = w.Parent != null;
        }