Beispiel #1
0
 public ArrayList reminders()
 {
     Assemblies.File file = new Assemblies.File();
     DirectoryInfo dirinfo = new DirectoryInfo(this.directory);
     DirectoryInfo[] files = dirinfo.GetDirectories();
     ArrayList reminders = new ArrayList();
     foreach (DirectoryInfo _file in files)
     {
         string name = _file.Name;
         ArrayList data = new ArrayList();
         name = unclean(name);
         data.Add(name);
         reminders.Add(data);
     }
     return reminders;
 }
Beispiel #2
0
 public ArrayList notes()
 {
     Assemblies.File file = new Assemblies.File();
     DirectoryInfo dirinfo = new DirectoryInfo(this.directory);
     FileInfo[] files = dirinfo.GetFiles();
     ArrayList notes = new ArrayList();
     foreach(FileInfo _file in files)
     {
         string name = _file.Name;
         ArrayList data = new ArrayList();
         if (checkFormat(name))
         {
             DateTime time = _file.CreationTime;
             DateTime date = _file.LastAccessTime;
             name = unclean(name);
             data.Add(name);
             data.Add(time);
             data.Add(date);
         }
         notes.Add(data);
     }
     return notes;
 }
Beispiel #3
0
 public bool save()
 {
     if (this.name == "" || this.note == "")
     {
         return false;
     }
     else
     {
         clean();
         try
         {
             Assemblies.File file = new Assemblies.File();
             int val = file.Create(1, directory + name);
             val = file.Create(0, directory + name + "\\note.reminder");
             val = file.Create(0, directory + name + "\\time.reminder");
             val = file.Create(0, directory + name + "\\date.reminder");
             file.WriteData(directory + name + "\\note.reminder", note);
             file.WriteData(directory + name + "\\time.reminder", time.ToString());
             file.WriteData(directory + name + "\\date.reminder", date.ToString());
             return true;
         }
         catch
         {
             return false;
         }
     }
 }
Beispiel #4
0
 public bool save()
 {
     if (this.name == "" || this.note == "")
     {
         return false;
     }
     else
     {
         clean();
         Assemblies.File file = new Assemblies.File();
         int val = file.Create(0,  directory + name + ".quicknote");
         file.WriteData(directory + name + ".quicknote", note);
         return true;
     }
 }
Beispiel #5
0
 public void notecontent()
 {
     clean();
     Assemblies.File file = new Assemblies.File();
     note = file.ReadData(directory + name + ".quicknote", 0);
 }