logo

New and edit note window. More...

+ Inheritance diagram for NoteFly.FrmNewNote:

Public Member Functions

 FrmNewNote (Notes notes, Note note, Point locfrmnewnote, Size sizefrmnewnote, bool wordwrap)
 Initializes a new instance of the FrmNewNote class for editing a exist note. More...
 
 FrmNewNote (Notes notes, int deltaX, int deltaY, string newtitle, string newcontent)
 Initializes a new instance of the FrmNewNote class for a new note. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Private Member Functions

void SetFormTitle (bool editnote)
 Set the form title. More...
 
void SetFormTooltips (bool editnote)
 Set all form tooltips if tooltips are enabled. More...
 
void ConstructFrmNewNote (Notes notes)
 Initialize components FrmNewNote, set font, tooltip and richtextbox settings More...
 
void btnPluginFormatBtn_Click (object sender, EventArgs e)
 Plugin format button clicked. More...
 
void SetColorsForm (int skinnr)
 Set all the form colors by the skinnr. More...
 
void CreatePluginButtons (int skinnr)
 Create plugin buttons More...
 
void btnAddNote_Click (object sender, EventArgs e)
 User pressed the accept note button. Note will now be saved. More...
 
void btnCancel_Click (object sender, EventArgs e)
 User pressed the cancel button, all things typed in FrmNewNote window will be lost. More...
 
void btnTextBold_Click (object sender, EventArgs e)
 Make note content text bold, or if the selected text is already bold then remove the bold style. More...
 
void btnTextItalic_Click (object sender, EventArgs e)
 Italic text More...
 
void btnTextStriketrough_Click (object sender, EventArgs e)
 Striketrough text More...
 
void btnTextUnderline_Click (object sender, EventArgs e)
 Underline text More...
 
void btnFontBigger_Click (object sender, EventArgs e)
 Make text bigger. More...
 
void btnFontSmaller_Click (object sender, EventArgs e)
 Make text smaller. More...
 
void ChangeFontSizeSelected (float newsize)
 Change the fontsize of the selected text limited from 6pt to 108pt. More...
 
bool checksellen ()
 Check if selection length of rtbNote is larger than zero. More...
 
void contextMenuStripTextActions_Opening (object sender, System.ComponentModel.CancelEventArgs e)
 Check if menuCopyContent and menuCopyTitle should be enabled and add plugin contenxt menu's More...
 
void menumain_Click (object sender, EventArgs e)
 Plugin menu in main contextmenu clicked More...
 
void copyTextToolStripMenuItem_Click (object sender, EventArgs e)
 Copy the note content. More...
 
void copyTextToolStripMenuItem_DropDownOpening (object sender, EventArgs e)
 Check whether pastTextToolStripMenuItem should be enabled. More...
 
void frmNewNote_Activated (object sender, EventArgs e)
 Form got focus, remove transparency. More...
 
void frmNewNote_Deactivate (object sender, EventArgs e)
 Form lost focus, make transparent. More...
 
void importToolStripMenuItem_Click (object sender, EventArgs e)
 Import a file as note. More...
 
void menuStickyOnTop_Click (object sender, EventArgs e)
 Set this note ontop, CheckOnClick is set to true. More...
 
void pastTextToolStripMenuItem_Click (object sender, EventArgs e)
 Pasting text as note content. More...
 
void pbResizeGrip_MouseMove (object sender, MouseEventArgs e)
 Resizing the FtmNewNote form. More...
 
void pnlHeadNewNote_MouseDown (object sender, MouseEventArgs e)
 Moving the note. More...
 
void pnlHeadNewNote_MouseMove (object sender, MouseEventArgs e)
 Move note if pnlHead is being left clicked. More...
 
void pnlHeadNewNote_MouseUp (object sender, MouseEventArgs e)
 End moving note. More...
 
FontStyle removestyle (FontStyle checkstyles, FontStyle removestyle)
 Removes 1 fontsyle from the fontsyles of the checkstyle rtb text. This methode does not check if selection lenght is okay. More...
 
void rtbNote_Enter (object sender, EventArgs e)
 User entered the note content box. More...
 
void rtbNote_Leave (object sender, EventArgs e)
 User leaved the note content box. More...
 
void rtbNote_LinkClicked (object sender, LinkClickedEventArgs e)
 A hyperlink is clicked, check settings to see if confirm launch dialog have to be showed, if not then directly launch the URL. More...
 
void rtbNote_MouseClick (object sender, MouseEventArgs e)
 Force context menu to show up. More...
 
void SetFontSettings ()
 Set the font and textdirection FrmNewNote. More...
 
void SetToolbarEnabled (bool enabled)
 Toggle toolbar buttons. More...
 
void tbTitle_Enter (object sender, EventArgs e)
 User entered the title box. More...
 
void tbTitle_Leave (object sender, EventArgs e)
 User leaved the title box More...
 
void FrmNewNote_KeyDown (object sender, KeyEventArgs e)
 Handle keyboard shortcuts More...
 
void btnTextBulletlist_Click (object sender, EventArgs e)
 Make buttet item of current selected line(s). More...
 
void menuShowtoolbar_Click (object sender, EventArgs e)
 Show or hide buttons for formatting. More...
 
void menuWordWarp_Click (object sender, EventArgs e)
 Toggle to wrap lines in the richedit control More...
 
void titleToolStripMenuItem_Click (object sender, EventArgs e)
 Paste text to title if clipboard contains any text. More...
 
void rtbNewNote_KeyUp (object sender, KeyEventArgs e)
 Key is released in rtbNewNote More...
 
int GetSkinnr ()
 Get the skin number of this new- or editing note. More...
 
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor. More...
 

Private Attributes

const int MARGIN = 5
 Margin between format buttons and content. More...
 
bool moving = false
 Indicated if the form is being moved. More...
 
Note note
 Reference to a new or editing note, More...
 
Notes notes
 Pointer to the notes class. More...
 
RTFDirectEdit rtfdirectedit = new RTFDirectEdit()
 Pointer to rtfdirectedit class. More...
 
ToolTip tooltip
 The tooltip. More...
 
Point oldp
 The old position of the mouse while resizing. More...
 
System.Windows.Forms.TextBox tbTitle
 TextBox tbTitle More...
 
System.Windows.Forms.Label lbTextTitle
 Label lbTextTitle More...
 
System.Windows.Forms.Button btnAddNote
 Button btnAddNote More...
 
System.Windows.Forms.Panel pnlHeadNewNote
 Panel pnlHeadNewNote More...
 
System.Windows.Forms.Button btnCancel
 Button btnCancel More...
 
System.Windows.Forms.ContextMenuStrip contextMenuStripTextActions
 ContextMenuStrip contextMenuStripTextActions More...
 
System.Windows.Forms.ToolStripMenuItem menuCopy
 ToolStripMenuItem menuCopyContent More...
 
System.Windows.Forms.ToolStripMenuItem menuSaveNewNote
 ToolStripMenuItem menuSaveNewNote More...
 
System.Windows.Forms.ToolStripMenuItem menuCancelNewNote
 ToolStripMenuItem menuCancelNewNote More...
 
System.ComponentModel.IContainer components = null
 Required designer variable. More...
 
System.Windows.Forms.ToolStripMenuItem menuStickyOnTop
 ToolStripMenuItem menuStickyOnTop More...
 
System.Windows.Forms.RichTextBox rtbNewNote
 RichTextBox rtbNewNote More...
 
System.Windows.Forms.ToolStripMenuItem menuImportfile
 ToolStripMenuItem importToolStripMenuItem More...
 
System.Windows.Forms.PictureBox pbResizeGrip
 PictureBox pbResizeGrip More...
 
System.Windows.Forms.ToolStripMenuItem menuShowtoolbar
 ToolStripMenuItem menuShowtoolbar More...
 
System.Windows.Forms.ToolStripMenuItem menuWordWarp
 ToolStripMenuItem menuWordWarp More...
 
System.Windows.Forms.Button btnTextBold
 Button btnTextBold More...
 
System.Windows.Forms.Button btnTextItalic
 Button btnTextItalic More...
 
System.Windows.Forms.Button btnTextStriketrough
 Button btnTextStriketrough More...
 
System.Windows.Forms.Button btnTextUnderline
 Button btnTextUnderline More...
 
System.Windows.Forms.Button btnFontSmaller
 Button btnFontSmaller More...
 
System.Windows.Forms.Button btnFontBigger
 Button btnFontBigger More...
 
System.Windows.Forms.Button btnTextBulletlist
 Button btnTextBulletlist More...
 
System.Windows.Forms.TableLayoutPanel tlpnlFormatbtn
 TableLayoutPanel tableLayoutPanelFormatbtn More...
 
System.Windows.Forms.ToolStripMenuItem menuCopyContent
 ToolStripMenuItem menuCopyContent More...
 
System.Windows.Forms.ToolStripMenuItem menuCopyTitle
 ToolStripMenuItem menuCopyTitle More...
 
System.Windows.Forms.ToolStripMenuItem menuPasteTo
 ToolStripMenuItem menuPasteTo More...
 
System.Windows.Forms.ToolStripMenuItem contentToolStripMenuItem
 ToolStripMenuItem contentToolStripMenuItem More...
 
System.Windows.Forms.ToolStripMenuItem titleToolStripMenuItem
 ToolStripMenuItem titleToolStripMenuItem More...
 
System.Windows.Forms.TableLayoutPanel tableLayoutPanelHeader
 

Detailed Description

Creating a new note window.

Constructor & Destructor Documentation

NoteFly.FrmNewNote.FrmNewNote ( Notes  notes,
Note  note,
Point  locfrmnewnote,
Size  sizefrmnewnote,
bool  wordwrap 
)
Parameters
notesThe class with access to all notes.
noteThe note to edit.
locfrmnewnoteThe location of the FrmNewNote should get.
sizefrmnewnoteThe size of the FrnNewNote should get.
wordwrapWrap words that exceeded the width of the richedittext control.
NoteFly.FrmNewNote.FrmNewNote ( Notes  notes,
int  deltaX,
int  deltaY,
string  newtitle,
string  newcontent 
)
Parameters
notesThe class with access to all notes.
deltaXX position change from center screen position to show form.
deltaYY position change from center screen position to show form.
contentclipboard

Member Function Documentation

void NoteFly.FrmNewNote.btnAddNote_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnCancel_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnFontBigger_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnFontSmaller_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnPluginFormatBtn_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderThe button clicked
eEvent arguments
void NoteFly.FrmNewNote.btnTextBold_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnTextBulletlist_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnTextItalic_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnTextStriketrough_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.btnTextUnderline_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.ChangeFontSizeSelected ( float  newsize)
private
Parameters
newsizeEvent arguments
bool NoteFly.FrmNewNote.checksellen ( )
private
Returns
true if length is larger than 0.
void NoteFly.FrmNewNote.ConstructFrmNewNote ( Notes  notes)
private
Parameters
notesReference to notes class.
void NoteFly.FrmNewNote.contextMenuStripTextActions_Opening ( object  sender,
System.ComponentModel.CancelEventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.copyTextToolStripMenuItem_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.copyTextToolStripMenuItem_DropDownOpening ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.CreatePluginButtons ( int  skinnr)
private
Parameters
skinnrThe skin position
override void NoteFly.FrmNewNote.Dispose ( bool  disposing)
protected
Parameters
disposingTrue if managed resources should be disposed; otherwise, false.
void NoteFly.FrmNewNote.frmNewNote_Activated ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.frmNewNote_Deactivate ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.FrmNewNote_KeyDown ( object  sender,
KeyEventArgs  e 
)
private
Parameters
senderSender object
eKeyEvent arguments
int NoteFly.FrmNewNote.GetSkinnr ( )
private
Returns
Skin number of editing note or NotesDefaultSkinnr for new note.
void NoteFly.FrmNewNote.importToolStripMenuItem_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.InitializeComponent ( )
private
void NoteFly.FrmNewNote.menumain_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.menuShowtoolbar_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.menuStickyOnTop_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.menuWordWarp_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.pastTextToolStripMenuItem_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.pbResizeGrip_MouseMove ( object  sender,
MouseEventArgs  e 
)
private
Parameters
senderSender object
eMouse event arguments
void NoteFly.FrmNewNote.pnlHeadNewNote_MouseDown ( object  sender,
MouseEventArgs  e 
)
private
Parameters
senderSender object
eMouse event arguments
void NoteFly.FrmNewNote.pnlHeadNewNote_MouseMove ( object  sender,
MouseEventArgs  e 
)
private
Parameters
senderSender object
eMouse event arguments
void NoteFly.FrmNewNote.pnlHeadNewNote_MouseUp ( object  sender,
MouseEventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
FontStyle NoteFly.FrmNewNote.removestyle ( FontStyle  checkstyles,
FontStyle  removestyle 
)
private
Parameters
checkstylesThe FontStyle apply operations on.
removestyleThe FontStyle to remove.
Returns
The new fontstyle
void NoteFly.FrmNewNote.rtbNewNote_KeyUp ( object  sender,
KeyEventArgs  e 
)
private
Parameters
senderSender object
eKey event arguments
void NoteFly.FrmNewNote.rtbNote_Enter ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.rtbNote_Leave ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.rtbNote_LinkClicked ( object  sender,
LinkClickedEventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.rtbNote_MouseClick ( object  sender,
MouseEventArgs  e 
)
private
Parameters
senderSender object
eMouse event arguments
void NoteFly.FrmNewNote.SetColorsForm ( int  skinnr)
private
Parameters
skinnrSkin number
void NoteFly.FrmNewNote.SetFontSettings ( )
private
void NoteFly.FrmNewNote.SetFormTitle ( bool  editnote)
private
Parameters
editnoteTrue if this form is used for note editing and not creating a new note.
void NoteFly.FrmNewNote.SetFormTooltips ( bool  editnote)
private
Parameters
editnote
void NoteFly.FrmNewNote.SetToolbarEnabled ( bool  enabled)
private
Parameters
enabledTrue if toolbar should be enabled.
void NoteFly.FrmNewNote.tbTitle_Enter ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.tbTitle_Leave ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments
void NoteFly.FrmNewNote.titleToolStripMenuItem_Click ( object  sender,
EventArgs  e 
)
private
Parameters
senderSender object
eEvent arguments

Member Data Documentation

System.Windows.Forms.Button NoteFly.FrmNewNote.btnAddNote
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnCancel
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnFontBigger
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnFontSmaller
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnTextBold
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnTextBulletlist
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnTextItalic
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnTextStriketrough
private
System.Windows.Forms.Button NoteFly.FrmNewNote.btnTextUnderline
private
System.ComponentModel.IContainer NoteFly.FrmNewNote.components = null
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.contentToolStripMenuItem
private
System.Windows.Forms.ContextMenuStrip NoteFly.FrmNewNote.contextMenuStripTextActions
private
System.Windows.Forms.Label NoteFly.FrmNewNote.lbTextTitle
private
const int NoteFly.FrmNewNote.MARGIN = 5
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuCancelNewNote
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuCopy
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuCopyContent
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuCopyTitle
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuImportfile
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuPasteTo
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuSaveNewNote
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuShowtoolbar
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuStickyOnTop
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.menuWordWarp
private
bool NoteFly.FrmNewNote.moving = false
private
Note NoteFly.FrmNewNote.note
private
Notes NoteFly.FrmNewNote.notes
private
Point NoteFly.FrmNewNote.oldp
private
System.Windows.Forms.PictureBox NoteFly.FrmNewNote.pbResizeGrip
private
System.Windows.Forms.Panel NoteFly.FrmNewNote.pnlHeadNewNote
private
System.Windows.Forms.RichTextBox NoteFly.FrmNewNote.rtbNewNote
private
RTFDirectEdit NoteFly.FrmNewNote.rtfdirectedit = new RTFDirectEdit()
private
System.Windows.Forms.TableLayoutPanel NoteFly.FrmNewNote.tableLayoutPanelHeader
private
System.Windows.Forms.TextBox NoteFly.FrmNewNote.tbTitle
private
System.Windows.Forms.ToolStripMenuItem NoteFly.FrmNewNote.titleToolStripMenuItem
private
System.Windows.Forms.TableLayoutPanel NoteFly.FrmNewNote.tlpnlFormatbtn
private
ToolTip NoteFly.FrmNewNote.tooltip
private