public override void ValidateMenuItems(Diagram diagram)
		{
			base.ValidateMenuItems(diagram);
			mnuCut.Enabled = diagram.CanCutToClipboard;
            mnuCopy.Enabled = diagram.CanCopyToClipboard;
            mnuGenerateCode.Enabled = diagram.GetSelectedShapes().Any(p => p.Entity is TypeBase);
            mnuEditDatabaseSchema.Enabled = mnuGenerateCode.Enabled;
            UpdateTexts();
		}
		public override void ValidateMenuItems(Diagram diagram)
		{
			base.ValidateMenuItems(diagram);
			GeneralKryptonContextMenu.Default.ValidateMenuItems(diagram);

			bool multiSelection = (diagram.SelectedElementCount >= 2);
			itemAlign.Enabled = multiSelection;
			itemAlignTop.Enabled = multiSelection;
			itemAlignLeft.Enabled = multiSelection;
			itemAlignBottom.Enabled = multiSelection;
			itemAlignRight.Enabled = multiSelection;
			itemAlignHorizontal.Enabled = multiSelection;
			itemAlignVertical.Enabled = multiSelection;
			itemMakeSameSize.Enabled = multiSelection;
			itemSameWidth.Enabled = multiSelection;
			itemSameHeight.Enabled = multiSelection;
			itemSameSize.Enabled = multiSelection;

            locked = true;
            if (diagram.SelectedShapeCount == 1)
            {
                var s = diagram.GetSelectedShapes().First();
                itemBackColorColumns.SelectedColor = s.BackColor;
                itemStanderBackColorColumns.SelectedColor = s.BackColor;
                itemNoBackColor.Checked = s.BackColor.IsEmpty;
                itemForeColorColumns.SelectedColor = s.ForeColor;
                itemStanderForeColorColumns.SelectedColor = s.ForeColor;
                itemNoForeColor.Checked = s.ForeColor.IsEmpty;
            }
            else
            {
                itemBackColorColumns.SelectedColor = Color.Empty;
                itemStanderBackColorColumns.SelectedColor = Color.Empty;
                itemNoBackColor.Checked = false;
                itemForeColorColumns.SelectedColor = Color.Empty;
                itemStanderForeColorColumns.SelectedColor = Color.Empty;
                itemNoForeColor.Checked = false;
            }
            locked = false;
            UpdateTexts();
		}