Discussion Board

Page 4 of 4 FirstFirst 1234
Results 46 to 51 of 51
  1. #46
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,112

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    Quote Originally Posted by Patoche View Post
    I'ill try to launch the code.it launched successful but nothing happened i can't even add Appointment. Do you know why?
    Please replace the following function :

    Code:
    void Appointments_SearchCompleted(object sender, AppointmentsSearchEventArgs e)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
    
            if (e.Results.Count() > 0)
            {
                foreach (Appointment appt in e.Results)
                {
                    if (appt.StartTime == saveAppointmentTask.StartTime && appt.StartTime == saveAppointmentTask.EndTime && appt.Subject == saveAppointmentTask.Subject && !appt.IsAllDayEvent)
                    {
    
                    }
                    else
                    {
                        saveAppointmentTask.Show();
                        rootobjindex++;
                    }
                }
            }
            else
            {
                saveAppointmentTask.Show();
                rootobjindex++;
            }
        }
    It wasn't calling the saveAppointmentTask.Show(); in case there are no items already added to calender. It should work now, but yes as i said earlier you might have to re-check the conditions to compare the two appointments as written inside foreach loop (the 'if' condition(s))

  2. #47
    Registered User
    Join Date
    Jul 2014
    Posts
    29

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    i have a question. Is it possible to create a button and then when we click it, it will access directly in the emulator's calendar instead of exit of my app each time. I mean can i access to the native calendar without exit my app

  3. #48
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,112

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    I do not think you can launch calender app within your app. The SaveAppointmentTask - a launcher will always take the user to the native calender app of the device, loosing the focus of your app and resumed when an appointment is saved.

  4. #49
    Registered User
    Join Date
    Jul 2014
    Posts
    29

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    i don't wanna launch calendar app within my app, i am just trying to redirect my app to the native calendar app via a button or something like that. Is it possible?

  5. #50
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,112

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    Quote Originally Posted by Patoche View Post
    i don't wanna launch calendar app within my app, i am just trying to redirect my app to the native calendar app via a button or something like that. Is it possible?
    saveAppointmentTask.Show(); does that only, you can call this Show() method on the click of a button(saveAppointmentTask should be declared at the top rather than local as done in #43) which will open up the new appointment page & save it to the native calender. Your app obviously will lost focus and regain when coming back from calender app.

  6. #51
    Registered User
    Join Date
    Jul 2014
    Posts
    29

    Re: [Moved]Windows Phone SaveAppointmentTask and Json Parsing

    if (e.Results.Count() > 0)
    {
    foreach (Appointment appt in e.Results)
    {
    if (appt.StartTime != saveAppointmentTask.StartTime && appt.StartTime != saveAppointmentTask.EndTime &&
    appt.Subject != saveAppointmentTask.Subject && appt.IsAllDayEvent != SwitchCal[rootobjindex].allDay)
    {
    saveAppointmentTask.Show();
    rootobjindex++;
    // Error.Text = "Your events have been successfully synchronized with your native calendar";

    }
    else
    {
    Error.Text = "Nothing to add...";
    }
    }
    }
    else
    {
    saveAppointmentTask.Show();
    rootobjindex++;
    Error.Text = "Your events have been successfully synchronized with your native calendar";

    }

    it's the actual code inside of the search function. it add all the appointment and if there is nothing to add, it just displays a message.When i delete the first appointment it will add again but when i delete the third or fourth one, nothing happened

Similar Threads

  1. SOAP Parsing in windows phone
    By mandardac in forum Windows Phone General
    Replies: 2
    Last Post: 2012-11-01, 18:37
  2. XML Parsing for windows phone 7
    By sreerajvr in forum Windows Phone General
    Replies: 2
    Last Post: 2012-03-19, 08:41
  3. JSON parsing in QT?
    By sindhuks in forum Qt
    Replies: 7
    Last Post: 2011-03-29, 22:44
  4. JSON Parsing
    By raja_salomo in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-09-25, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×