XmlUtil class, for saving and parsering xml.
More...
|
static string | GetContentString (string filename, string nodename) |
| Get a xml node and return the value as string. More...
|
|
static int | GetContentInt (string filename, string nodename) |
| Get a xml node and return the value as integer. More...
|
|
static bool | ParserListPlugins (string response, short[] ipluginversionparts, System.Windows.Forms.ListBox lbxAvailablePlugins) |
| Parser the listing of the plugins More...
|
|
static DownloadDetailsPlugin | ParserDetailsPlugin (string response) |
| Parser the details of the plugin detail response More...
|
|
static Note | LoadNoteFile (Notes notes, string notefilename) |
| Load a note file. More...
|
|
static bool | LoadSettings () |
| Loads the settings file and set the settings in the static Settings class in memory. More...
|
|
static List< Skin > | LoadSkins () |
| Gets all skins from skin file. create Application data folder if does not exist. Create default SKINFILE if not exist. More...
|
|
static bool | WriteDefaultSettings () |
| Write the default settings. Used for if SETTINGSFILE is not created yet. More...
|
|
static bool | WriteNote (Note note, string skinname, string content) |
| Write a note xml file. More...
|
|
static void | ReadNoteFlyNotesBackupFile (Notes notes, string filepath) |
| Read all notes from a notes backup file and return a array with all the notes. More...
|
|
static bool | WriteSettings () |
| Write settings file. More...
|
|
static System.Drawing.Color | ConvToClr (string colorstring) |
| Convert HEX color to color object. More...
|
|
static short[] | ParserLatestVersion (string serverresponse, out string versionquality, out string downloadurl, out string rsasignature) |
| Get the new version as a integer array with first major second valeau the minor version and the third valeau being the release version. More...
|
|
static HighlightLanguage | ParserLanguageLexical (string file, string name) |
| Return a array of keywords used for the prgramming language we are doing a syntax check on. More...
|
|
static string | GetContentStringLimited (string notefilepath, int limittextchars) |
| Get the content node a note node More...
|
|
static void | WriteNoteBody (XmlTextWriter xmlwrite, Note note, string skinname, string content) |
| Write the note node with properties. More...
|
|
|
static Note | ParserNoteNode (Notes notes, Note note, int readnotenum, bool setallcontent) |
| Parser a note node in a xml file, readnotenum is the number of note node to be parser and returned as note object. More...
|
|
static void | WriteDefaultSkins (string filename) |
| Writes the default skins to the SKINFILE. Used for if SKINFILE is not created yet. More...
|
|
static void | CheckFile (string filename) |
| Checks if filesize is not 0 bytes for a filename More...
|
|
static void | WriteXMLBool (XmlTextWriter xmlwrite, string element, bool checknode) |
| Write 1 value for true and 0 for false. More...
|
|
static void NoteFly.xmlUtil.CheckFile |
( |
string |
filename | ) |
|
|
staticprivate |
- Parameters
-
filename | The filename to check |
static System.Drawing.Color NoteFly.xmlUtil.ConvToClr |
( |
string |
colorstring | ) |
|
|
static |
- Parameters
-
colorstring | Hex color as string. |
- Returns
- Color object.
static int NoteFly.xmlUtil.GetContentInt |
( |
string |
filename, |
|
|
string |
nodename |
|
) |
| |
|
static |
- Parameters
-
filename | The filename and path to search in. |
nodename | The node name to lookup. |
- Returns
- A integer value
static string NoteFly.xmlUtil.GetContentString |
( |
string |
filename, |
|
|
string |
nodename |
|
) |
| |
|
static |
- Parameters
-
filename | The filename and path to search in. |
nodename | The node name to lookup. |
- Returns
- Return node content as string, empty if not found.
static string NoteFly.xmlUtil.GetContentStringLimited |
( |
string |
notefilepath, |
|
|
int |
limittextchars |
|
) |
| |
|
static |
- Parameters
-
notefilepath | The file to load as xml file. |
limittextchars | The limit on how many characters to read at most with the content node of the xmlfile. |
- Returns
- The valeau of the content node in the xml file limited to the amount of characters given by limittextchars.
static Note NoteFly.xmlUtil.LoadNoteFile |
( |
Notes |
notes, |
|
|
string |
notefilename |
|
) |
| |
|
static |
- Parameters
-
notes | Reference to notes class. |
notefilename | The note filename. |
- Returns
- An note object.
static bool NoteFly.xmlUtil.LoadSettings |
( |
| ) |
|
|
static |
- Returns
- True if file settings exists.
static List<Skin> NoteFly.xmlUtil.LoadSkins |
( |
| ) |
|
|
static |
- Returns
- A list of skins objects
- Parameters
-
response | Parser the xml response |
installedpluginnames | The names of the plugins installed. |
alreadyinstalled | Is the plugin to get details from already installed. |
updateavailable | Is a update availible based on parsering of the serverresponse |
- Returns
- Array of strings with details from the plugin.
static HighlightLanguage NoteFly.xmlUtil.ParserLanguageLexical |
( |
string |
file, |
|
|
string |
name |
|
) |
| |
|
static |
- Parameters
-
file | The file to parser. |
name | The language to lookup. |
- Returns
- HighlightLanguage object.
static short [] NoteFly.xmlUtil.ParserLatestVersion |
( |
string |
serverresponse, |
|
|
out string |
versionquality, |
|
|
out string |
downloadurl, |
|
|
out string |
rsasignature |
|
) |
| |
|
static |
- Parameters
-
serverresponse | The server reponse stream. |
versionquality | The latest version quality, e.g: alpha, beta, rc or nothing for final. |
downloadurl | The download url found. |
rsasignature | RSA signature. |
- Returns
- The newest version as integer array, any negative valeau(-1 by default) considered as error.
static bool NoteFly.xmlUtil.ParserListPlugins |
( |
string |
response, |
|
|
short[] |
ipluginversionparts, |
|
|
System.Windows.Forms.ListBox |
lbxAvailablePlugins |
|
) |
| |
|
static |
- Parameters
-
response | The server response. |
ipluginversionparts | The Iplugin version as array with major, minor, release numbers |
lbxAvailablePlugins | ListBox with availible plugins |
- Returns
- True if parsering of response succeeded.
static Note NoteFly.xmlUtil.ParserNoteNode |
( |
Notes |
notes, |
|
|
Note |
note, |
|
|
int |
readnotenum, |
|
|
bool |
setallcontent |
|
) |
| |
|
staticprivate |
- Parameters
-
notes | Reference to notes class. |
note | The note object to set. |
readnotenum | The number occurance of the note node to be parser (first, sencod etc.) |
setallcontent | Force to set the note temporary content variable in the note class even if not visible. |
- Returns
- A note object
static void NoteFly.xmlUtil.ReadNoteFlyNotesBackupFile |
( |
Notes |
notes, |
|
|
string |
filepath |
|
) |
| |
|
static |
- Parameters
-
notes | Reference to notes class. |
filepath | The notes backup filename and path. |
static bool NoteFly.xmlUtil.WriteDefaultSettings |
( |
| ) |
|
|
static |
- Returns
- True if writing settings succeeded otherwise false.
static void NoteFly.xmlUtil.WriteDefaultSkins |
( |
string |
filename | ) |
|
|
staticprivate |
- Parameters
-
filename | The skins file filename and path |
static bool NoteFly.xmlUtil.WriteNote |
( |
Note |
note, |
|
|
string |
skinname, |
|
|
string |
content |
|
) |
| |
|
static |
- Parameters
-
note | The note object. |
skinname | The skin name of the note. |
content | The note content. |
- Returns
- True on succeeded otherwise false.
static void NoteFly.xmlUtil.WriteNoteBody |
( |
XmlTextWriter |
xmlwrite, |
|
|
Note |
note, |
|
|
string |
skinname, |
|
|
string |
content |
|
) |
| |
|
static |
- Parameters
-
xmlwrite | The XmlTextWriter object to write with. |
note | The note object. |
skinname | The skinname used by this note. |
content | The note content. |
static bool NoteFly.xmlUtil.WriteSettings |
( |
| ) |
|
|
static |
static void NoteFly.xmlUtil.WriteXMLBool |
( |
XmlTextWriter |
xmlwrite, |
|
|
string |
element, |
|
|
bool |
checknode |
|
) |
| |
|
staticprivate |
- Parameters
-
xmlwrite | XmlTextWriter object. |
element | The element name |
checknode | The node to check |
const string NoteFly.xmlUtil.NOTEVERSION = "3" |
|
private |
const string NoteFly.xmlUtil.SETTINGSFILE = "settings.xml" |
const string NoteFly.xmlUtil.SKINFILE = "skins.xml" |
XmlTextReader NoteFly.xmlUtil.xmlread = null |
|
staticprivate |
XmlTextWriter NoteFly.xmlUtil.xmlwrite = null |
|
staticprivate |
|