Beispiel #1
0
        public void Purchase(MusicStoreTrackInfo track)
        {
            // FIXME: Login shouldnt be here
            if (!Login())
            {
                return;
            }

            string message = String.Format(Catalog.GetString("You are about to purchase the song <i>{0}</i> from <i>{1}</i>, " +
                                                             "by <i>{2}</i>. Your account will be charged a fee of {3}."),
                                           track.Title,
                                           track.Album,
                                           track.Artist,
                                           track.DisplayPrice);

            ResponseType response = HigMessageDialog.RunHigMessageDialog(null,
                                                                         0,
                                                                         MessageType.Info,
                                                                         ButtonsType.OkCancel,
                                                                         "Purchase Song",
                                                                         message);

            if (response != ResponseType.Ok)
            {
                return;
            }

            MusicStorePurchaseTransaction trans = new MusicStorePurchaseTransaction(this, track);

            trans.Run();
        }
        public void Purchase(MusicStoreTrackInfo track)
        {
            // FIXME: Login shouldnt be here
            if (!Login ())
                return;

                        string message = String.Format (Catalog.GetString ("You are about to purchase the song <i>{0}</i> from <i>{1}</i>, " +
                                                                           "by <i>{2}</i>. Your account will be charged a fee of {3}."),
                            track.Title,
                            track.Album,
                            track.Artist,
                            track.DisplayPrice);

                        ResponseType response = HigMessageDialog.RunHigMessageDialog (null,
                                                                                      0,
                                                                                      MessageType.Info,
                                                                                      ButtonsType.OkCancel,
                                                                                      "Purchase Song",
                                                                                      message);

                        if (response != ResponseType.Ok)
                                return;

            MusicStorePurchaseTransaction trans = new MusicStorePurchaseTransaction (this, track);
            trans.Run ();
        }