Example #1
0
        private void Execute_LoadCardPack()
        {
            View.LoadCardPackDialog   newDialog = new View.LoadCardPackDialog();
            LoadCardPackDiagViewModel diagVM    = new LoadCardPackDiagViewModel(newDialog);

            newDialog.DataContext = diagVM;

            if (newDialog.ShowDialog() == true)
            {
                this.lobbyClient.Deck = diagVM.GetSelectedItem();
                this.OnPropertyChanged("ActivePackName");
            }
        }
Example #2
0
        private void Execute_LoadCardPack()
        {
            View.LoadCardPackDialog   newDialog = new View.LoadCardPackDialog();
            LoadCardPackDiagViewModel diagVM    = new LoadCardPackDiagViewModel(newDialog);

            newDialog.DataContext = diagVM;

            if (newDialog.ShowDialog() == true)
            {
                this.QnAModel.CardPackItem = diagVM.GetSelectedItem();
                this.Card_SelectedIndex    = 0;
                this.OnPropertyChanged("CardTitleList");
            }
        }
Example #3
0
        private void Execute_LoadCardPack()
        {
            View.LoadCardPackDialog   newDialog = new View.LoadCardPackDialog();
            LoadCardPackDiagViewModel diagVM    = new LoadCardPackDiagViewModel(newDialog);

            newDialog.DataContext = diagVM;

            if (newDialog.ShowDialog() == true)
            {
                {
                    this.QnAModel = new Model.QnAModel(diagVM.GetSelectedItem());
                }
            }
            this.OnPropertyChanged("ActiveCardPack");
        }
Example #4
0
        private void Execute_ExportCardPack()
        {
            View.LoadCardPackDialog newDialog = new View.LoadCardPackDialog();
            LoadCardPackDiagViewModel diagVM = new LoadCardPackDiagViewModel(newDialog);
            newDialog.DataContext = diagVM;

            CardPack SelectedCardPack;
            if (newDialog.ShowDialog() == true)
            {
                SelectedCardPack = diagVM.GetSelectedItem();

                System.Windows.Forms.SaveFileDialog saveDialog = new System.Windows.Forms.SaveFileDialog();
                saveDialog.Filter = "Card Pack Zip(*.lcpz)|*.lcpz|Any File (*.*)|*.*";
                saveDialog.Title = "export card pack";
                if (saveDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    CardPack.ExportCardPack(SelectedCardPack.PackName, saveDialog.FileName);
                }
            }
        }