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

            _menu.Items[5].Enabled = _menu.Items[12].Enabled = w.Parent != null;
            _menu.Items[6].Enabled = w._resource.IsDirty || w._resource.IsBranch;
            _menu.Items[8].Enabled = w.PrevNode != null;
            _menu.Items[9].Enabled = w.NextNode != null;
        }
Esempio n. 2
0
        private static void MenuOpening(object sender, CancelEventArgs e)
        {
            PAT0Wrapper w = GetInstance <PAT0Wrapper>();

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