예제 #1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     System = new NoteSystem();
     System.Startup();
     Application.Run(new GlobalToolWindow());
 }
 public override bool CreateNote(NoteSystem system, NoteSource source)
 {
     if (source.MatchesFileType(".whlnk"))
     {
         string         name         = "get name from .whlnk file;";
         HTTPNoteSource linkedSource = new HTTPNoteSource(system);
         linkedSource.SetName(name);
         SetFileTypeFromMIMEType(linkedSource);
         system.CreateNote(linkedSource);
         return(true);
     }
     return(false);
 }
예제 #3
0
 public override bool CreateNote(NoteSystem system, NoteSource source)
 {
     if (source.MatchesFileType(".wflnk"))
     {
         string         name         = "get name from .wflnk file;";
         FileNoteSource linkedSource = new FileNoteSource(system);
         linkedSource.SetName(name);
         List <NoteSource> linkedSources = new List <NoteSource>()
         {
             linkedSource
         };
         system.CreateNotes();
         return(true);
     }
     return(false);
 }
예제 #4
0
 public override bool CreateNote(NoteSystem system, NoteSource source)
 {
     if (source.MatchesFileType(".txt"))
     {
         TextNotePanel panel = new TextNotePanel();
         panel.SuspendLayout();
         //panel.txtContent.Location = new System.Drawing.Point(20, 20);
         //panel.txtContent.Visible = true;
         panel.Controls.Add(panel.txtContent);
         panel.ResumeLayout(false);
         using (System.IO.TextReader reader = new System.IO.StreamReader(source.GetStream()))
         {
             panel.txtContent.Text = reader.ReadToEnd();
             system.AddNotePanel(panel);
         }
         return(true);
     }
     return(false);
 }
 public override bool CreateNote(NoteSystem system, NoteSource source)
 {
     if (source.MatchesFileType(".jpg"))
     {
         NotePanel panel = new ImageNotePanel();
         system.AddNotePanel(panel);
         return(true);
     }
     if (source.MatchesFileType(".png"))
     {
         NotePanel panel = new ImageNotePanel();
         system.AddNotePanel(panel);
         return(true);
     }
     if (source.MatchesFileType(".gif"))
     {
         NotePanel panel = new ImageNotePanel();
         system.AddNotePanel(panel);
         return(true);
     }
     return(false);
 }
예제 #6
0
 public FileNoteSource(NoteSystem system)
     : base(system)
 {
 }
예제 #7
0
 public NoteSource(NoteSystem system)
 {
     _System = system;
 }
예제 #8
0
 public abstract bool CreateNote(NoteSystem system, NoteSource source);
예제 #9
0
 public HTTPNoteSource(NoteSystem system)
     : base(system)
 {
 }