fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using Microsoft.Phone.Controls;
  13. using System.IO.IsolatedStorage;
  14. using System.IO;
  15.  
  16.  
  17. namespace GTA_V_Guide._100Check
  18. {
  19. public partial class Hobbies : PhoneApplicationPage
  20. {
  21. Boolean IsChecked;
  22. IsolatedStorageFile gtavStorage = IsolatedStorageFile.GetUserStoreForApplication();
  23. StreamReader readFile = null;
  24.  
  25. string hobbies;
  26.  
  27. public Hobbies()
  28. {
  29. InitializeComponent();
  30. validate();
  31. checkandreadFile();
  32. }
  33.  
  34. public void validate()
  35. {
  36.  
  37. using (StreamWriter writeFile = new StreamWriter(new IsolatedStorageFileStream("Hobbies.txt", FileMode.Create, FileAccess.Write, gtavStorage)))
  38. {
  39. //StringWriter str = new StringWriter();
  40. //hobbies = "Handgun";
  41. //write
  42.  
  43. string Handgun = "Handgun, False";
  44. if (chkHandgun.IsChecked == true)
  45. {
  46. StringWriter str = new StringWriter();
  47. Handgun = "Handgun, True";
  48. writeFile.WriteLine(Handgun, true);
  49. writeFile.WriteLine(str.ToString());
  50. writeFile.Close();
  51. }
  52.  
  53. }
  54.  
  55.  
  56. }//end val
  57.  
  58. public void checkandreadFile()
  59. {
  60. using (StreamReader reader = readFile)
  61. readFile = new StreamReader(new IsolatedStorageFileStream("Hobbies.txt", FileMode.Open, gtavStorage));
  62.  
  63. hobbies = readFile.ReadToEnd();//decalired hobbies at the top
  64. if (hobbies.Contains("Handgun, True"))
  65. {
  66. chkHandgun.IsChecked = true;
  67.  
  68. }
  69. else
  70. {
  71. chkHandgun.IsChecked = false;
  72. }
  73. readFile.Close();
  74.  
  75. //IsolatedStorageFileStream fileStream = gtavStorage.OpenFile("Hobbies.txt", FileMode.Open, FileAccess.Read);
  76. //using (StreamReader reader = new StreamReader(fileStream))
  77. //{ //Visualize the text data in a TextBlock text
  78. // this.hobbies = reader.ReadToEnd();
  79. // if (hobbies.Contains("Handgun, True"))
  80. // {
  81. // chkHandgun.IsChecked = true;
  82. // }
  83.  
  84.  
  85.  
  86. //}
  87. }//End readFile
  88.  
  89.  
  90. }
  91. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(6,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(7,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(8,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(9,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(10,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(11,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(12,17): error CS0234: The type or namespace name `Phone' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Compilation failed: 8 error(s), 0 warnings
stdout
Standard output is empty