Esempio n. 1
0
    void setContentDelay()
    {
        contentType dataType = curContent.type;

        switch (dataType)
        {
        case contentType.message:
            delayTime = curContent.message.delay;
            break;

        case contentType.button:
            delayTime = curContent.button.delay;
            break;

        case contentType.audio:
            delayTime = curContent.audio.delay;
            break;

        case contentType.input:
            delayTime = curContent.input.delay;
            break;

        case contentType.vibrate:
            delayTime = curContent.vibrate.delay;
            break;
        }

        delayTime = delayTime / 1000;
        //  Debug.Log("delaytime"+delayTime);
        if (delayTime < 0)
        {
            delayTime = 0;
        }
    }
Esempio n. 2
0
 private void GetMeasureLaw(contentType model)
 {
     foreach (var item in this.measureLawVm.Items.Cast <DataItemViewModelBase>())
     {
         if (item.Ids.Count > 0)
         {
             if (item.UseOlder || !item.UseNew)
             {
                 foreach (var measureLaw in item.ListModelOlder)
                 {
                     model.measureLaws.Add(measureLaw);
                 }
             }
             else
             {
                 foreach (var measureLaw in item.ListModelNew)
                 {
                     model.measureLaws.Add(measureLaw);
                 }
             }
         }
         else
         {
             foreach (var measureLaw in item.ListModelNew)
             {
                 model.measureLaws.Add(measureLaw);
             }
         }
     }
 }
Esempio n. 3
0
        private void LoadData()
        {
            FileInfo    olderfile = new FileInfo(Application.StartupPath + "\\" + "old.xml"); FileInfo newfile = new FileInfo(Application.StartupPath + "\\" + "new.xml");
            contentType modelold = Deserializer <contentType>(olderfile);
            contentType modelnew = Deserializer <contentType>(newfile);

            clientInfoVm   = new ClientInfoGroupItemViewModel(modelold.clientInfo, modelnew.clientInfo);
            relativeInfoVm = new RelativeInfoGroupItemViewModel(modelold.clientInfo.Id, modelold.relativeInfos, modelnew.relativeInfos);
            documentDataVm = new DocumentDataGroupItemViewModel(modelold.clientInfo.Id, modelold.documentDatas, modelnew.documentDatas);
            measureLawVm   = new MeasureLawGroupItemViewModel(modelold.clientInfo.Id, modelold.measureLaws, modelnew.measureLaws);

            var measureLawGroup = new GroupDataExpandRowControl(measureLawVm, "Massnahmen");

            measureLawGroup.Dock = DockStyle.Top;
            this.xtraScrollableControl1.Controls.Add(measureLawGroup);

            var documentDataGroup = new GroupDataExpandRowControl(documentDataVm, "Dokumente");

            documentDataGroup.Dock = DockStyle.Top;
            this.xtraScrollableControl1.Controls.Add(documentDataGroup);

            var relativeInfoGroup = new GroupDataExpandRowControl(relativeInfoVm, "Angehörige");

            relativeInfoGroup.Dock = DockStyle.Top;
            this.xtraScrollableControl1.Controls.Add(relativeInfoGroup);

            var clientInfoGroup = new GroupDataControl(clientInfoVm);

            clientInfoGroup.Dock = DockStyle.Top;
            this.xtraScrollableControl1.Controls.Add(clientInfoGroup);
        }
Esempio n. 4
0
 private void FormDemoGetData_Load(object sender, EventArgs e)
 {
     FileInfo    olderfile = new FileInfo(Application.StartupPath + "\\" + "old.xml");
     FileInfo    newfile   = new FileInfo(Application.StartupPath + "\\" + "new.xml");
     contentType modelold  = Deserializer <contentType>(olderfile);
     contentType modelnew  = Deserializer <contentType>(newfile);
 }
Esempio n. 5
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var contenType = new contentType();

            contenType.clientInfo = this.clientInfoVm.GetDataChange();
            this.GetRelativeInfo(contenType);
            this.GetDocumentData(contenType);
            this.GetMeasureLaw(contenType);
        }
Esempio n. 6
0
        public static void  AddAttachment(int conversationId, contentType type, string uri)
        {
            Attachment att = new Attachment();

            att.ConversationId = conversationId;
            att.ContentType    = type.ToString();
            att.ContentUrl     = uri;
            db.Attachments.Add(att);
            db.SaveChanges();
        }
Esempio n. 7
0
 public YUITransform(contentType contentType)
 {
     if (contentType == contentType.css)
        {
     this._contentType = "text/css";
        }
        else
        {
     this._contentType = "text/javascript";
        }
 }
Esempio n. 8
0
 private void Bin()
 {
     if (cbBin.Checked)
     {
         ContentType = contentType.binaer;
     }
     else
     {
         ContentType = contentType.text;
     }
 }
Esempio n. 9
0
        private string GetMediaType(contentType type)
        {
            switch (type)
            {
            case contentType.JSON:
                return("application/json");

            case contentType.XML:
                return("application/xml");
            }

            return("application/json");
        }
Esempio n. 10
0
        /// <summary>
        /// Integrity check according to the content type.
        /// </summary>
        /// <remarks>
        /// During the serialization process, this method is called internally before serializing the surrogate.
        /// During the deserialization process, it can be used in the ConvertToObject method.
        ///  </remarks>
        protected override bool CheckSurrogateData(contentType content, string logMessage = null)
        {
            if (content == contentType.Tessellation)
            {
                if (Vertices == null || Vertices.Length == 0)
                {
                    WriteLog(logMessage != null ? logMessage : "Warning MyCircle with no vertices.");
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 11
0
        public RequestInfo(string uri, Object data, contentType type = contentType.JSON, methodType mtd = methodType.e_GET)
        {
            this.RequestURI = uri;
            this.Method     = mtd;
            switch (type)
            {
            case contentType.JSON:
                this.Content = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, GetMediaType(type));
                break;

            case contentType.XML:
                break;
            }
        }
Esempio n. 12
0
    void CallContentByType()
    {
        contentType dataType = curContent.type;

        waitContentHold = curContent.hold;
        Debug.Log("curContent" + curContent.type);

        switch (dataType)
        {
        case contentType.message:
            GenerateContent(curContent, curContent.message);
            curOrderIndex++;
            curContentIndex++;
            break;

        case contentType.button:

            GenerateContent(curContent, curContent.button);
            contentTypingEnd = true;
            curContentIndex++;
            curOrderIndex++;
            //curDialogState = DialogState.waitButton;
            //return;
            break;

        case contentType.audio:
            GenerateContent(curContent.audio);
            contentTypingEnd = true;
            curOrderIndex++;
            break;

        case contentType.input:
            GenerateContent(curContent.input);
            curDialogState = DialogState.waitInput;
            return;

        // break;

        case contentType.vibrate:
            contentTypingEnd = true;
            GenerateContent(curContent.vibrate);
            curOrderIndex++;
            break;
        }

        waitContentHold = curContent.hold;
        Debug.Log("waitContentHold ->" + waitContentHold);
        CheckNextContent();
    }
Esempio n. 13
0
 private void GetRelativeInfo(contentType model)
 {
     foreach (var item in this.relativeInfoVm.Items.Cast <DataItemViewModelBase>())
     {
         if (!string.IsNullOrWhiteSpace(item.Id))
         {
             if (item.UseNew)
             {
                 model.relativeInfos.Add((relativeInfoType)item.ModelNew);
             }
         }
         else
         {
             model.relativeInfos.Add((relativeInfoType)item.ModelNew);
         }
     }
 }
Esempio n. 14
0
 private void GetDocumentData(contentType model)
 {
     foreach (var item in this.documentDataVm.Items.Cast <DataItemViewModelBase>())
     {
         if (!string.IsNullOrWhiteSpace(item.Id))
         {
             if (item.UseNew)
             {
                 model.documentDatas.Add((documentDataType)item.ModelNew);
             }
         }
         else
         {
             model.documentDatas.Add((documentDataType)item.ModelNew);
         }
     }
 }
Esempio n. 15
0
    //used only input field message -> not connect content list only for ui arrange
    public void InstantiateMessage(contentType type, string dataString)
    {
        switch (type)
        {
        case contentType.message:
            newBubbleObject = messagePrefab;
            break;

        case contentType.button:
            newBubbleObject = buttonPrefab;
            break;
        }

        if (curBubble != null)
        {
            exBubble = curBubble.GetComponent <RectTransform>();
        }


        //instantiate exmessage
        curBubble = Instantiate(newBubbleObject);

        Buble curMessageBubble = curBubble.GetComponent <Buble>();

        //register curmessage to curspace
        curBubble.transform.SetParent(bubbleSpace[0]);

        //resize bubble bg
        float bgsize = curDialogBg.sizeDelta.y - inputFieldSize - 10;

        curDialogBg.offsetMax = new Vector2(0, bgsize);
        curDialogBg.offsetMin = new Vector2(0, 0);
        curDialogBg.transform.localPosition = Vector3.zero;



        //link on bubble size
        curMessageBubble.onBubbleResize += RepositionBubblePanel;

        //set text area to right anchor(input answer only)
        curMessageBubble.ui_const.alignment = TMPro.TextAlignmentOptions.MidlineRight;
        curMessageBubble.myString           = dataString;
    }
Esempio n. 16
0
        public void ClickContentType(contentType checkItem)
        {
            switch (checkItem)
            {
            case contentType.Cases:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Cases")).Click();
                break;

            case contentType.Employees:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Employees")).Click();
                break;

            case contentType.HomePages:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Home Pages")).Click();
                break;

            case contentType.Insights:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Insights")).Click();
                break;

            case contentType.Lists:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Lists")).Click();
                break;

            case contentType.PracticeAreaPages:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Practice Area Pages")).Click();
                break;

            case contentType.Proposals:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Proposals")).Click();
                break;

            case contentType.Taxonomies:
                gmtWin.Get <CheckBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Taxonomies")).Click();
                break;
            }
        }
        public KmehrTransactionItemBuilder SetMedicinalProduct(string cnk, string name)
        {
            var content = new contentType
            {
                Items = new object[1]
                {
                    new medicinalProductType
                    {
                        intendedcd = new CDDRUGCNK[1]
                        {
                            new CDDRUGCNK
                            {
                                SV    = "LOCALDB",
                                S     = CDDRUGCNKschemes.CDDRUGCNK,
                                Value = cnk
                            }
                        }
                    }
                },
                ItemsElementName = new ItemsChoiceType2[1]
                {
                    ItemsChoiceType2.medicinalproduct
                }
            };
            var itemType       = (itemType)_obj;
            var contentTypeLst = new List <contentType>();

            if (itemType.content != null)
            {
                contentTypeLst.AddRange(itemType.content.ToList());
            }

            contentTypeLst.Add(content);
            itemType.content = contentTypeLst.ToArray();
            return(this);
        }
 return(new EwfResponse(
            contentType,
            fileNameCreator ?? (() => ""),
Esempio n. 19
0
 private void GetClientInfoData(contentType model)
 {
     model.clientInfo = this.clientInfoVm.GetDataChange();
 }
Esempio n. 20
0
 public String submissionDownloadLink(sortBy sort, contentType cType, viewSource vSource, int page, String additionalKey, String additionalValue)
 {
     return String.Format("http://chat.sofurry.com/ajaxfetch.php?f=browse&sort={0}&contentType={1}&viewSource={2}&page={3}&{4}={5}", (int)sort, (int)cType, (int)vSource, page, additionalKey, additionalValue);
 }
Esempio n. 21
0
 public String submissionDownloadLink(sortBy sort, contentType cType, viewSource vSource)
 {
     return String.Format("http://chat.sofurry.com/ajaxfetch.php?f=browse&sort={0}&contentType={1}&viewSource={2}&page=0", (int)sort, (int)cType, (int)vSource);
 }
 (string.Equals(contentType, CommonEditorContentTypes.ImageType, StringComparison.OrdinalIgnoreCase)));
Esempio n. 23
0
            // stringify converts its arguments to a string and the type of the content.
            // All pointers are dereferenced, as in the text/template package.
            private static (@string, contentType) stringify(params object[] args)
            {
                @string     _p0 = default;
                contentType _p0 = default;

                args = args.Clone();

                if (len(args) == 1L)
                {
                    switch (indirect(args[0L]).type())
                    {
                    case @string s:
                        return(s, contentTypePlain);

                        break;

                    case CSS s:
                        return(string(s), contentTypeCSS);

                        break;

                    case HTML s:
                        return(string(s), contentTypeHTML);

                        break;

                    case HTMLAttr s:
                        return(string(s), contentTypeHTMLAttr);

                        break;

                    case JS s:
                        return(string(s), contentTypeJS);

                        break;

                    case JSStr s:
                        return(string(s), contentTypeJSStr);

                        break;

                    case URL s:
                        return(string(s), contentTypeURL);

                        break;

                    case Srcset s:
                        return(string(s), contentTypeSrcset);

                        break;
                    }
                }

                long i = 0L;

                foreach (var(_, arg) in args)
                {
                    // We skip untyped nil arguments for backward compatibility.
                    // Without this they would be output as <nil>, escaped.
                    // See issue 25875.
                    if (arg == null)
                    {
                        continue;
                    }

                    args[i] = indirectToStringerOrError(arg);
                    i++;
                }
                return(fmt.Sprint(args[..i]), contentTypePlain);
Esempio n. 24
0
        public ADPSheet ConvertContent(string[] _content) //Takes a string array and converts it to an ADPSheet, then returns it
        {
            int[]   timeSignature = new int[2];
            ADPNote latestNote    = new ADPNote();

            latestNote.Key    = "C";
            latestNote.Octave = 4;

            ADPMusicalSymbol tempMusicalSymbol;

            ADPBar tempBar;
            int    alternativeNr = 0;

            string tempo = "error";
            string key   = "error";

            contentType type = contentType.none;

            ADPSheet adps = new ADPSheet();
            ADPTrack adpt = new ADPTrack();

            adpt.Name = "LilypondTrack";

            List <ADPMusicalSymbol>         notes        = new List <ADPMusicalSymbol>();
            List <List <ADPMusicalSymbol> > alternatives = new List <List <ADPMusicalSymbol> >();

            for (int i = 2; i < _content.Length; i++)
            {
                string temp = _content[i];
                switch (_content[i])
                {
                case "":
                    break;

                case "\\tempo":
                    tempo = _content[i + 1];
                    i++;
                    break;

                case "\\time":
                    string str = _content[i + 1];
                    timeSignature[0] = (int)Char.GetNumericValue(str[0]);
                    timeSignature[1] = (int)Char.GetNumericValue(str[2]);
                    i++;
                    break;

                case "\\repeat":
                    tempBar = new ADPBar();
                    tempBar.MusicalSymbols = notes;
                    int[] tempTimeSignature = new int[2];
                    tempTimeSignature[0]  = timeSignature[0];
                    tempTimeSignature[1]  = timeSignature[1];
                    tempBar.TimeSignature = tempTimeSignature;
                    //adpt.Bars.Add(tempBar);
                    notes = new List <ADPMusicalSymbol>();
                    i++;
                    i++;
                    break;

                case "\\alternative":
                    //type = contentType.alternativeBlok;
                    break;

                case "\\clef":
                    key = _content[i + 1];
                    i++;
                    break;

                case "|":     //add maatstreep / new bar?
                    if (type == contentType.alternative)
                    {
                        //Had een Alternative maatstreep gemaakt
                    }
                    else
                    {
                        tempBar = new ADPBar();
                        tempBar.MusicalSymbols = notes;
                        tempTimeSignature      = new int[2];
                        tempTimeSignature[0]   = timeSignature[0];
                        tempTimeSignature[1]   = timeSignature[1];
                        tempBar.TimeSignature  = tempTimeSignature;
                        adpt.Bars.Add(tempBar);
                        notes = new List <ADPMusicalSymbol>();
                    }
                    break;

                case "{":     //add alternative if alternativeblock
                    if (type == contentType.alternativeBlok)
                    {
                        type = contentType.alternative;
                        alternatives.Add(new List <ADPMusicalSymbol>());
                    }
                    break;

                case "}":
                    //close alternative if alternativeblock
                    //if (type == contentType.alternative)
                    //{
                    //    type = contentType.alternativeBlok;
                    //    alternativeNr++;
                    //}

                    //else
                    //{
                    //    type = contentType.none;
                    //}
                    if (notes.Count > 0)
                    {
                        ADPBar tempBar2 = new ADPBar();
                        tempBar2.MusicalSymbols = notes;
                        tempBar2.TimeSignature  = timeSignature;
                        adpt.Bars.Add(tempBar2);
                        notes = new List <ADPMusicalSymbol>();
                    }
                    break;

                case "}}":      //End of File
                    break;

                case "~":
                    break;

                default:

                    if (type == contentType.alternative)
                    {
                        //add alternative note
                        string[] inputStrings = convertToInputStrings(_content[i], latestNote);
                        if (inputStrings != null)
                        {
                            tempMusicalSymbol = musicalSymbolFactory.GetMusicalSymbol(inputStrings);
                            if (tempMusicalSymbol is ADPNote)
                            {
                                latestNote = (ADPNote)tempMusicalSymbol;
                            }
                            alternatives[alternativeNr].Add(tempMusicalSymbol);
                        }
                    }
                    else
                    {
                        //add normal note
                        string[] inputStrings = convertToInputStrings(_content[i], latestNote);
                        if (inputStrings != null)
                        {
                            tempMusicalSymbol = musicalSymbolFactory.GetMusicalSymbol(inputStrings);
                            if (tempMusicalSymbol is ADPNote)
                            {
                                latestNote = (ADPNote)tempMusicalSymbol;
                            }
                            notes.Add(tempMusicalSymbol);
                        }
                    }
                    break;
                }
            }
            adps.Tracks.Add(adpt); //Only need to add one track
            return(adps);
        }
Esempio n. 25
0
        private List <ISymbol> readContent()
        {
            int alternativeNr = 0;

            string sleutel = "error";

            contentType type = contentType.none;

            List <ISymbol>         notes        = new List <ISymbol>();         // alle noten die geen onderdeel zijn van alternative
            List <List <ISymbol> > alternatives = new List <List <ISymbol> >(); // alle alternatives + noten per alternative

            for (int i = 2; i < lilyPondContents.Length; i++)
            {
                switch (lilyPondContents[i])
                {
                case "\\tempo":
                    string[] sTempo = lilyPondContents[i + 1].Split('=');
                    int[]    iTempo = { Int32.Parse(sTempo[0]), Int32.Parse(sTempo[1]) };
                    notes.Add(new TempoSymbol {
                        tempo = iTempo
                    });
                    i++;
                    break;

                case "\\time":
                    notes.Add(getProperMaatsoort(lilyPondContents[i + 1]));
                    i++;
                    break;

                case "\\repeat":
                    break;

                case "\\alternative":
                    type = contentType.alternativeBlok;
                    break;

                case "\\clef":
                    sleutel = lilyPondContents[i + 1];
                    i++;
                    break;

                case "|":
                    if (type == contentType.alternative)
                    {
                        alternatives[alternativeNr].Add(createMaatStreep());
                    }
                    else
                    {
                        notes.Add(createMaatStreep());
                    }
                    break;

                case "{":
                    if (type == contentType.alternativeBlok)
                    {
                        type = contentType.alternative;
                        alternatives.Add(new List <ISymbol>());
                    }
                    break;

                case "}":
                    if (type == contentType.alternative)
                    {
                        type = contentType.alternativeBlok;
                        alternativeNr++;
                    }
                    else
                    {
                        type = contentType.none;
                    }
                    break;

                case "volta":
                    try
                    {
                        repeatTimes = Int32.Parse(lilyPondContents[i + 1]);
                    }
                    catch { }
                    break;

                default:
                    // gebruik deze voor de (cashew)noten
                    if (lilyPondContents[i] != string.Empty && Regex.IsMatch(lilyPondContents[i], @"[a-zA-Z]") && Regex.IsMatch(lilyPondContents[i], @"[0-9]"))
                    {
                        if (type == contentType.alternative)
                        {
                            alternatives[alternativeNr].Add(createNote(lilyPondContents[i]));
                        }
                        else
                        {
                            notes.Add(createNote(lilyPondContents[i]));
                        }
                    }

                    break;
                }
            }
            return(notes);
        }
Esempio n. 26
0
 SetContentTypeAndData(contentType, draftData, publishedData, publishedSnapshotAccessor, variationContextAccessor, publishedModelFactory);
Esempio n. 27
0
    void SetContentType(Content data)
    {
        contentType dataType = contentType.none;


        //message
        if (data.message.txt_const.ko != null)
        {
            if (dataType == contentType.none)
            {
                data.type = contentType.message;
            }
            else
            {
                data.type = contentType.multiple;
            }
        }

        else if (data.button.option.ko != null)
        {
            if (dataType == contentType.none)
            {
                data.type = contentType.button;
                SetActionType(data, data.button.action, out data.button.type);
            }
            else
            {
                data.type = contentType.multiple;
            }
        }

        else if (data.audio.autoplay)
        {
            if (dataType == contentType.none)
            {
                data.type = contentType.audio;


                list_sources.Add(data);
            }
            else
            {
                data.type = contentType.multiple;
            }
        }

        else if (data.vibrate.autoplay)
        {
            if (dataType == contentType.none)
            {
                data.type = contentType.vibrate;
            }
            else
            {
                data.type = contentType.multiple;
            }
        }

        else if (data.input.options != null)
        {
            if (dataType == contentType.none)
            {
                data.type = contentType.input;

                for (int i = 0; i < data.input.options.Length; i++)
                {
                    SetActionType(data, data.input.options[i].action, out data.input.options[i].type);
                }
            }
            else
            {
                data.type = contentType.multiple;
            }
        }

        //set my dialog number
        data.dialogNumber = settingDialogNumber;
        debug_audio       = new AudioClip[list_DownloadContent.Count];
    }
        public async Task CreateQR()
        {
            var jsonString = string.Empty;
            var access_token = string.Empty;
            if (!String.IsNullOrEmpty(ConsumerKey) && !String.IsNullOrEmpty(ConsumerSecret))
            {
                var tokenFile = @"./token.json";
                if (!File.Exists(tokenFile))
                {
                    var accessTokenResponse = await getAccessToken();
                    jsonString = await accessTokenResponse.Content.ReadAsStringAsync();
                    var tokenJson = Codeplex.Data.DynamicJson.Parse(jsonString);
                    StreamWriter writer = new StreamWriter(tokenFile, false);
                    writer.WriteLine(jsonString);
                    writer.Close();
                    access_token = tokenJson.access_token;
                }
                else
                {
                    StreamReader sr = new StreamReader(tokenFile);
                    string text = sr.ReadToEnd();
                    sr.Close();
                    var tokenJson = Codeplex.Data.DynamicJson.Parse(text);
                    var refresh_token = tokenJson.refresh_token;
                    var refreshTokenResponse = await refreshAccessToken(refresh_token);
                    jsonString = await refreshTokenResponse.Content.ReadAsStringAsync();
                    tokenJson = Codeplex.Data.DynamicJson.Parse(jsonString);
                    access_token = tokenJson.access_token;

                    tokenJson.access_token = access_token;

                    var reJson = tokenJson.ToString();
                    if (String.IsNullOrEmpty(reJson))
                    {
                        StreamWriter writer = new StreamWriter(tokenFile, false);
                        writer.WriteLine(tokenJson.toString());
                        writer.Close();
                    }

                }
            }
            
            
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            var youtubeMovieUrlTemplate = "https://www.youtube.com/watch?v=";
            // GetWebPageAsyncメソッドを呼び出す
            Task<string> webTask;
            var uploadPlaylistId = String.Empty;
            if (String.IsNullOrEmpty(access_token))
            {
                webTask = getYoutubeItemList(String.Empty);
                jsonString = await webTask;
                var json = Codeplex.Data.DynamicJson.Parse(jsonString);
                var check = json.items.Deserialize<Object[]>();
                if ((check as Array).Length == 0)
                {
                    this.TargetContentType = contentType.Channel;
                    this.UserChannnel = this.UserName;
                    webTask = getYoutubeItemList(String.Empty);
                    jsonString = await webTask;
                    json = Codeplex.Data.DynamicJson.Parse(jsonString);
                    check = json.items.Deserialize<Object[]>();
                    if ((check as Array).Length == 0)
                    {
                        return;
                    }
                }
                uploadPlaylistId = json.items[0].contentDetails.relatedPlaylists.uploads;
            }
            
            
            
            
            var nextPageToken = String.Empty;
            var hasNextPage = true;
            while (hasNextPage)
            {
                var jsonString2 = String.Empty;
                if (String.IsNullOrEmpty(access_token))
                {
                    webTask = getYoutubeMovieItemList(uploadPlaylistId, nextPageToken,String.Empty);
                }
                else
                {
                    webTask = getYoutubeMovieItemList(uploadPlaylistId, nextPageToken,access_token);
                }
                
                jsonString2 = await webTask;
                var json2 = Codeplex.Data.DynamicJson.Parse(jsonString2);
                foreach (var item in json2.items)
                {
                    Debug.WriteLine(counter.ToString());
                    var fileName = item.snippet.title as String;
                    char[] invalidch = Path.GetInvalidFileNameChars();
                    foreach (char c in invalidch)
                    {
                        fileName = fileName.Replace(c, '_');
                    }
                    fileName = fileName.Replace(" ", "_") + ".png";
                    var url = String.Empty;
                    if (String.IsNullOrEmpty(access_token))
                    {
                         url = youtubeMovieUrlTemplate + item.snippet.resourceId.videoId;
                    }
                    else
                    {
                         url = youtubeMovieUrlTemplate + item.id.videoId;
                         
                    }
                    writeQR(url, TargetFolderPath + "\\" + counter + "_" + fileName);
                    
                    
                    counter++;
                }
                if (json2.IsDefined("nextPageToken"))
                {
                    nextPageToken = json2.nextPageToken;
                    hasNextPage = !String.IsNullOrEmpty(nextPageToken);
                    Debug.WriteLine("has next Page");
                }
                else
                {
                    hasNextPage = false;
                    Debug.WriteLine("has next no page");
                }
            }
            
        }