logo

Notes class, holds all notes More...

+ Inheritance diagram for NoteFly.Notes:

Public Member Functions

 Notes (bool resetpositions)
 Initializes a new instance of the Notes class. More...
 
void AddNoteDefaultSettings (string title, int skinnr, int x, int y, int width, int height, string content, bool wordwarp)
 Add a new default note to the notes list More...
 
void BringToFrontNotes ()
 Bring all notes to front of all other windows. More...
 
Note CreateNoteDefaultSettings (string title, int skinnr, int x, int y, int width, int height, bool wordwarp)
 Create a new note object with some default settings The default settings are note that can't be changed while editing a note. More...
 
int GenerateRandomSkinnr ()
 Generate a random skinnummer. More...
 
System.Drawing.Color GetHighlightClr (int skinnr)
 Gets the highlight color. More...
 
Note GetNote (int pos)
 Gets a note, by position in list More...
 
string GetNoteFilename (string title)
 Create a string used for filename of the note based on the title of the note limited to the first xx characters. More...
 
System.Drawing.Color GetPrimaryClr (int skinnr)
 Gets the primary color. More...
 
System.Drawing.Color GetSelectClr (int skinnr)
 Gets the selected color. More...
 
Bitmap GetPrimaryTexture (int skinnr)
 Gets the primary texture for a skin. More...
 
System.Windows.Forms.ImageLayout GetPrimaryTextureLayout (int skinnr)
 Get the primary texture image layout for a skin. More...
 
string GetSkinName (int skinnr)
 Get the name of a skin by the skinnr. More...
 
int GetSkinNr (string skinname)
 Get the skinnr that belongs by a name. If not found return 0 is return so first skin is used. More...
 
string[] GetSkinsNames ()
 Gets a string array with all the skin names. More...
 
System.Drawing.Color GetTextClr (int skinnr)
 Gets the text color. More...
 
void LoadNotes (bool hasbeenfirstrun, bool resetpositions)
 Loads all note files in the NotesSavepath. More...
 
void RemoveNote (int pos)
 Remove a note from the notes list. More...
 
string StripForbiddenFilenameChars (string orgname)
 Strip forbidden filename characters of a string. More...
 
void UpdateAllNoteForms ()
 Update all note forms. More...
 
string GetPrimaryTextureFile (int skinnr)
 Get the primary texture full file path. More...
 
void ReloadAllSkins ()
 Reload all skins again. More...
 
string GetNotesSavepath ()
 Gets the notes save directory. More...
 
string GetSettingsFile ()
 Gets the full file path to the settings file. More...
 
string GetSkinsFile ()
 Gets the skins file path skins file. More...
 
void LogPluginInfo (string infomsg)
 Log plugin info. More...
 
void LogPluginError (string errormsg)
 Log plugin error. More...
 
string GetAssemblyTitle ()
 Gets the programme title. (for plugins) More...
 
string GetAssemblyVersionAsString ()
 Get programme version. Method for plugins More...
 
bool GetSettingBool (string settingname)
 Get a setting as boolean. (for plugins) More...
 
int GetSettingInt (string settingname)
 Get a setting as integer. (for plugins) More...
 
float GetSettingFloat (string settingname)
 Get a setting as float. (for plugins) More...
 
string GetSettingString (string settingname)
 Get a setting as string. (for plugins) More...
 
void ClearAllNotes ()
 Clear all notes from memory of notefly. More...
 
string GetInstallFolder ()
 Get install folder of program Wrapper method for plugins. More...
 
string GetOS ()
 Get operating system this program is running on Wrapper method for plugins. More...
 

Public Attributes

const string NOTEEXTENSION = ".nfn"
 The note extension More...
 

Properties

int CountNotes [get]
 Gets the number of notes there are. More...
 
int CountSkins [get]
 Gets the number of skins there are. More...
 
- Properties inherited from IPlugin.IPluginHost
int CountNotes [get]
 Gets the number of notes More...
 
int CountSkins [get]
 Gets the number of skins More...
 

Private Member Functions

object FindSettings (string settingname)
 Find a setting in the setting class. (for plugins) More...
 
bool ImportingNotesNoteFly1 ()
 Ask and import notes from NoteFly 1.0.x if application data folder of NoteFly 1.0.x exist. More...
 
void CreateNotesImportedFlagfile (string folder)
 Create a empty file so this newer NoteFly version knows the application data of NoteFly 1.0.x is imported. More...
 
bool ImportingNotesNoteFly2 ()
 Import NoteFly 2.5.x/2.0.x notes. to be move to importnotes class. More...
 
int CheckLimitNotesTotal (int totanumbernotes)
 This method set a limit on how many notes total can be loaded. More...
 
bool CheckLimitNotesVisible (int currentnumber)
 Check if NotesWarnlimitVisible is reached and display warning then. More...
 
string Checknewfilename (string newfile, int usedlimitlengthfile, char sepchar)
 Check if filename already exist if it is then generate a new one. More...
 
void CreateFirstrunNote ()
 Create a demo note with instruction . Don't create demo note again if a file with same filename already exist. (Should be the first time that NoteFly is runned displayed only.) More...
 
System.Drawing.Color GetColor (int type, int skinnr)
 Get the color. More...
 
bool AddNote (Note note)
 Add a new note the the notes list. More...
 

Private Attributes

const int LIMITLENFILE = 8
 The maximum length of the filename. More...
 
const string IMPORTEDFLAGFILE = "impnf30.flg"
 Empty file that hints notefly2 that notefly1 notes folder has been imported. More...
 
List< Notenotes
 The list with all notes. More...
 
List< Skinskins
 List with all skins for notes. More...
 

Detailed Description

Constructor & Destructor Documentation

NoteFly.Notes.Notes ( bool  resetpositions)
Parameters
resetpositionsBoolean true for reseting all notes positions on loading.

Member Function Documentation

bool NoteFly.Notes.AddNote ( Note  note)
private
Parameters
noteThe note to be added.
Returns
True if succesfull added.
void NoteFly.Notes.AddNoteDefaultSettings ( string  title,
int  skinnr,
int  x,
int  y,
int  width,
int  height,
string  content,
bool  wordwarp 
)
Parameters
titleThe title the note.
skinnrThe skinnr
xThe X location of the note.
yThe Y location of the note.
widthThe width of the note.
heightThe height of the note.
contentThe note rtf content.
wordwarpIs the note content word warped.

Implements IPlugin.IPluginHost.

void NoteFly.Notes.BringToFrontNotes ( )
int NoteFly.Notes.CheckLimitNotesTotal ( int  totanumbernotes)
private
Parameters
totanumbernotesThe total number of notes.
Returns
The number of notes to load.
bool NoteFly.Notes.CheckLimitNotesVisible ( int  currentnumber)
private
Parameters
currentnumberThe number of notes that are currently visible.
Returns
True if warning limit is exceeded.
string NoteFly.Notes.Checknewfilename ( string  newfile,
int  usedlimitlengthfile,
char  sepchar 
)
private
Parameters
newfileThe suggested new filename.
usedlimitlengthfileThe used file length limit.
sepcharSeperator character.
Returns
Empty string on all used.
void NoteFly.Notes.ClearAllNotes ( )
void NoteFly.Notes.CreateFirstrunNote ( )
private
Note NoteFly.Notes.CreateNoteDefaultSettings ( string  title,
int  skinnr,
int  x,
int  y,
int  width,
int  height,
bool  wordwarp 
)
Parameters
titleThe title of the note.
skinnrThe skinnr
xX coordinate
yY coordinate
widthWidth of the note
heightHeight of the note
wordwarpIs the note content word warped.
Returns
Note object
void NoteFly.Notes.CreateNotesImportedFlagfile ( string  folder)
private
Parameters
folderPath to NoteFly 1.0.x application data folder.
object NoteFly.Notes.FindSettings ( string  settingname)
private
Parameters
settingnameThe name of the setting.
Returns
Return the setting valeau as object
int NoteFly.Notes.GenerateRandomSkinnr ( )
Returns
A random skin number/position
string NoteFly.Notes.GetAssemblyTitle ( )
Returns
The title of the assembly.

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetAssemblyVersionAsString ( )
Returns
Get the assembly version as string

Implements IPlugin.IPluginHost.

System.Drawing.Color NoteFly.Notes.GetColor ( int  type,
int  skinnr 
)
private
Parameters
typeWhat part of the skin 1 primary-, 2 selected-, 3 hightlight-, 4 text color
skinnrThe skin nummer in the skinslist.
Returns
The request color
System.Drawing.Color NoteFly.Notes.GetHighlightClr ( int  skinnr)
Parameters
skinnrThe skin number
Returns
Color object

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetInstallFolder ( )
Returns

Implements IPlugin.IPluginHost.

Note NoteFly.Notes.GetNote ( int  pos)
Parameters
posNote position in list notes
Returns
The Note object
string NoteFly.Notes.GetNoteFilename ( string  title)
Parameters
titleThe title of the note
Returns
A safe filename based on the title.
string NoteFly.Notes.GetNotesSavepath ( )
Returns
The directory where notes are saved.

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetOS ( )
Returns
Enum value as string.

Implements IPlugin.IPluginHost.

System.Drawing.Color NoteFly.Notes.GetPrimaryClr ( int  skinnr)
Parameters
skinnrThe skin number
Returns
The primary color

Implements IPlugin.IPluginHost.

Bitmap NoteFly.Notes.GetPrimaryTexture ( int  skinnr)
Parameters
skinnrThe skin number
Returns
A bitmap

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetPrimaryTextureFile ( int  skinnr)
Parameters
skinnrThe skin position
Returns
The full file path the texture file.

Implements IPlugin.IPluginHost.

System.Windows.Forms.ImageLayout NoteFly.Notes.GetPrimaryTextureLayout ( int  skinnr)
Parameters
skinnrThe skin number
Returns
The image layout how the note texture is used.

Implements IPlugin.IPluginHost.

System.Drawing.Color NoteFly.Notes.GetSelectClr ( int  skinnr)
Parameters
skinnrThe skin number
Returns
The selected skin color.

Implements IPlugin.IPluginHost.

bool NoteFly.Notes.GetSettingBool ( string  settingname)
Parameters
settingnameThe name of the setting.
Returns
A boolean setting.

Implements IPlugin.IPluginHost.

float NoteFly.Notes.GetSettingFloat ( string  settingname)
Parameters
settingnameThe name of the setting.
Returns
An float setting

Implements IPlugin.IPluginHost.

int NoteFly.Notes.GetSettingInt ( string  settingname)
Parameters
settingnameThe name of the setting.
Returns
An integer setting

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetSettingsFile ( )
Returns
Settings file

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetSettingString ( string  settingname)
Parameters
settingnameThe name of the setting.
Returns
An string setting.

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetSkinName ( int  skinnr)
Parameters
skinnrThe skin number
Returns
The name of the skin, e.g. Yellow

Implements IPlugin.IPluginHost.

int NoteFly.Notes.GetSkinNr ( string  skinname)
Parameters
skinnameThe skin name.
Returns
The skinnr.

Implements IPlugin.IPluginHost.

string NoteFly.Notes.GetSkinsFile ( )
Returns
The skins file full path.

Implements IPlugin.IPluginHost.

string [] NoteFly.Notes.GetSkinsNames ( )
Returns
An array with skin names.

Implements IPlugin.IPluginHost.

System.Drawing.Color NoteFly.Notes.GetTextClr ( int  skinnr)
Parameters
skinnrThe skin number
Returns
Color object in text color.

Implements IPlugin.IPluginHost.

bool NoteFly.Notes.ImportingNotesNoteFly1 ( )
private
Returns
True if imported done, false if importing notefly 1.0.x notes not nessesary.
bool NoteFly.Notes.ImportingNotesNoteFly2 ( )
private
Returns
True if already imported.
void NoteFly.Notes.LoadNotes ( bool  hasbeenfirstrun,
bool  resetpositions 
)
Parameters
hasbeenfirstrunTrue if it is the first run.
resetpositionsTrue for reseting all the notes positions.
void NoteFly.Notes.LogPluginError ( string  errormsg)
Parameters
errormsgError message

Implements IPlugin.IPluginHost.

void NoteFly.Notes.LogPluginInfo ( string  infomsg)
Parameters
infomsgInfo message

Implements IPlugin.IPluginHost.

void NoteFly.Notes.ReloadAllSkins ( )

Implements IPlugin.IPluginHost.

void NoteFly.Notes.RemoveNote ( int  pos)
Parameters
posThe note position in the list.
string NoteFly.Notes.StripForbiddenFilenameChars ( string  orgname)
Parameters
orgnameThe string to strip forbidden filecharacters from.
Returns
The filename safe string
void NoteFly.Notes.UpdateAllNoteForms ( )

Implements IPlugin.IPluginHost.

Member Data Documentation

const string NoteFly.Notes.IMPORTEDFLAGFILE = "impnf30.flg"
private
const int NoteFly.Notes.LIMITLENFILE = 8
private
const string NoteFly.Notes.NOTEEXTENSION = ".nfn"
List<Note> NoteFly.Notes.notes
private
List<Skin> NoteFly.Notes.skins
private

Property Documentation

int NoteFly.Notes.CountNotes
get
int NoteFly.Notes.CountSkins
get