private void SaveGaveItemClick(object sender, RoutedEventArgs e)
        {
            //Validate data
            string message;

            if (!IsValidate(out message))
            {
                RaiseInformMessage(message);
                return;
            }

            // Add new or update
            switch (_currentAction)
            {
            case ActionState.Add:
                GameItems.Add(NewGameItem);
                FileManagement.SaveListGameData(GameItems);
                RaiseInformMessage("Data has been added successfully");
                break;

            case ActionState.Update:
                UpdateProperty(SelectedGameItem, UpdateGameItem);
                FileManagement.SaveListGameData(GameItems);
                RaiseInformMessage("Data has been saved successfully");
                break;
            }

            //Re-load data
            LoadData();
        }
        private void ImportListAndAddClick(object sender, RoutedEventArgs e)
        {
            var dialog = new OpenFileDialog
            {
                Filter      = "All file|*.*|JPEG file (.jpg)|*.jpg|PNG file (.png)|*.png|Bitmap file (.bmp)|*.bmp",
                Multiselect = true
            };

            if (dialog.ShowDialog() != true)
            {
                return;
            }


            bool addQuestionMark = NewGameItem.GameName == Constant.GameConstant.TalkInMinute;

            foreach (var fileName in dialog.FileNames)
            {
                //NewGameItem
                GameItems.Add(new GameItem
                {
                    GameName = NewGameItem.GameName,
                    Topic    = NewGameItem.Topic,
                    Title    = Path.GetFileNameWithoutExtension(fileName) + (addQuestionMark ? "?" : string.Empty),
                    Image    = ConvertHelper.ImageToByte(fileName)
                });
            }

            FileManagement.SaveListGameData(GameItems);
            RaiseInformMessage("Data has been imported successfully");
            //Re-load data
            NewGameItem.Title = Path.GetFileNameWithoutExtension(dialog.FileNames[0]) + (addQuestionMark ? "?" : string.Empty);
            LoadData();
        }
        private void DeleteGameItemClick(object sender, RoutedEventArgs e)
        {
            if (GameItems == null || GameItems.Count < 1 || SelectedGameItem == null)
            {
                MessageBox.Show("No selected item to delete", "Delete", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }

            if (MessageBox.Show("Are you sure to delete selected item?", "Delete", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                GameItems.Remove(SelectedGameItem);
                FileManagement.SaveListGameData(GameItems);
                //Re-load data
                LoadData();
            }
        }