Exemplo n.º 1
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            SRT0EntryWrapper w = GetInstance <SRT0EntryWrapper>();

            _menu.Items[0].Enabled = w._resource.Children.Count < 11;
            _menu.Items[3].Enabled = _menu.Items[10].Enabled = w.Parent != null;
            _menu.Items[4].Enabled = w._resource.IsDirty || w._resource.IsBranch;
            _menu.Items[6].Enabled = w.PrevNode != null;
            _menu.Items[7].Enabled = w.NextNode != null;
        }
Exemplo n.º 2
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            SRT0EntryWrapper w = GetInstance <SRT0EntryWrapper>();

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