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); }
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); }
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); }
public FileNoteSource(NoteSystem system) : base(system) { }
public NoteSource(NoteSystem system) { _System = system; }
public abstract bool CreateNote(NoteSystem system, NoteSource source);
public HTTPNoteSource(NoteSystem system) : base(system) { }