Пример #1
0
 public bool IsTourExist(Tour tour)
 {
     Logger.Log("<-");
     bool result = false;
     OpenToursListWindow();
     List<string> tours = GetTourNames();
     if (tours.Contains(tour.Name)) result = true;
     Logger.Log("-> result: " + result.ToString());
     return result;
 }
Пример #2
0
        public void AddTour(Tour tour)
        {
            Logger.Log("<- " + tour);

            InitTourCreationMode();
            SetTourName(tour.Name);
            SetTourDescription(tour.Description);
            SetTourBookmarks(tour.Bookmarks);
            CreateTour();
            Logger.Log("->");
        }
Пример #3
0
 public void DeleteTourByApi(Tour tour)
 {
     DataContractJsonSerializer tourSerializer = new DataContractJsonSerializer(typeof(Tour));
     HttpWebRequest request = MakeDeleteRequest(TourApiServiceUrl);
     Stream requestStream = request.GetRequestStream();
     tourSerializer.WriteObject(requestStream, tour);
     request.GetResponse();
 }