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

            _menu.Items[6].Enabled = w.PrevNode != null;
            _menu.Items[7].Enabled = w.NextNode != null;
        }
Beispiel #2
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            STPMWrapper w = GetInstance <STPMWrapper>();

            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;
        }