private async Task UploadToBlob() { if (TitleEntry == null || TitleEntry.Trim() == "" || !PickerItemSelectedFlag) { await _pageService.DisplayAlert("Error!", "Please fill the form properly", "Ok", "Cancel"); return; } Busy = true; var courseid = _coursesList[_selectedCourseIndex].Id; var titleEntry = TitleEntry; await DependencyService.Get <IUploader>().UploadToBlob(courseid, titleEntry, Settings.StudentId, IsGeneralToggled); await _pageService.DisplayAlert("Upload Success", "Notebook Added Successfully.", "Ok", "Cancel"); await _pageService.PushAsync(new Views.NotebooksDB.NotebooksMainPage()); await FCMPushNotificationSender.Send( "NS" + courseid, "New Notebook", "New notebook that you may interest in has been added"); Busy = false; }
protected override void InitLines() { ArrayList temp = new ArrayList(); ArrayList title = new ArrayList(); byte lineNum = ReadByte(); while (lineNum != 0) { if (flagAnswers == 1 && lineNum == 200) { countAnswers = ReadByte(); for (byte i = 0; i < countAnswers; i++) { TitleEntry line = new TitleEntry(); line.number = ReadByte(); line.text = ReadPascalString(); title.Add(line); } } else { LineEntry line = new LineEntry(); line.number = lineNum; line.text = ReadPascalString(); temp.Add(line); } lineNum = ReadByte(); } lines = (LineEntry[])temp.ToArray(typeof(LineEntry)); if (flagAnswers > 0) { titles = (TitleEntry[])title.ToArray(typeof(TitleEntry)); } }
protected override void InitLines() { ArrayList temp = new ArrayList(); ArrayList title = new ArrayList(); byte lineNum = ReadByte(); while (lineNum != 0) { if (flagAnswers == 1 && lineNum == 200) { countAnswers = ReadByte(); for (byte i = 0; i < countAnswers; i++) { TitleEntry line = new TitleEntry(); line.number = ReadByte(); line.text = ReadPascalString(); title.Add(line); } } else { LineEntry line = new LineEntry(); line.number = lineNum; line.text = ReadPascalString(); temp.Add(line); } lineNum = ReadByte(); } lines = (LineEntry[])temp.ToArray(typeof(LineEntry)); if (flagAnswers > 0) titles = (TitleEntry[])title.ToArray(typeof(TitleEntry)); }
public override void GetPacketDataString(TextWriter text, bool flagsDescription) { text.Write("\n\tisTitle:{0} caption: \"{1}\" isGlued:0x{2:X2}", flagAnswers, caption, isGlued); for (int i = 0; i < lines.Length; i++) { LineEntry line = (LineEntry)lines[i]; text.Write("\n\t{0,2}: \"{1}\"", line.number, line.text); } if (flagAnswers > 0) { text.Write("\n\tcountAnswers:{0}", countAnswers); for (int i = 0; i < countAnswers; i++) { TitleEntry line = (TitleEntry)titles[i]; text.Write("\n\t{0,2}: \"{1}\"", line.number, line.text); } } }
private void RebuildGame(GameFile game, FileEntry fileEntry = null, TitleEntry titleEntry = null) { Debug.WriteLine("{0} {1}", game.TitleId, game.Title); var name = game.TitleId + ".gpd"; fileEntry = fileEntry ?? GetFileEntry(name, true); titleEntry = titleEntry ?? ProfileInfo.TitlesPlayed.FirstOrDefault(t => t.TitleCode == game.TitleId); if (titleEntry == null) { throw new ArgumentException("Invalid title: " + game.TitleId); } game.Rebuild(); ////HACK: Horizon emu //RemoveFile(fileEntry); ReplaceFile(fileEntry, game); titleEntry.AchievementsUnlocked = game.UnlockedAchievementCount; titleEntry.GamerscoreUnlocked = game.Gamerscore; }
protected override void OnAppearing() { base.OnAppearing(); TitleEntry.Focus(); }