private void flowFavorite_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(ScreenFavoriteData))) { ScreenFavoriteData data = (ScreenFavoriteData)e.Data.GetData(typeof(ScreenFavoriteData)); if (data.DIRECTION == ScreenFavoriteData.eDirection.FromMenu) // if drag from MenuControl, it will copy to favorite. { if (AddButtonFavorite(data)) { // Check before add MenuFrameValidator validator = new MenuFrameValidator(); ErrorItem errorItem = validator.CheckExistFavorite(Common.CurrentUserInfomation.UserCD, data.SCREEN_CD.ToNZString()); if (errorItem != null) { MessageDialog.ShowBusiness(this, errorItem.Message); return; } m_menuController.AddScreenFavorite(new NZString(null, data.USER_ACCOUNT), new NZString(null, data.SCREEN_CD)); } } } }