RTFBox.vb
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:87k
- 'HTML Area Server Side Control for ASP .NET
- 'Created by Sameers (theAngrycodeR)
- 'All Rights Reserved
- 'Contact : theAngrycodeR@Yahoo.com
- Imports System.ComponentModel
- Imports System.Web.UI
- Imports System.Web.UI.WebControls
- Imports System.Xml
- Imports System.Drawing
- Imports System.Windows.Forms.Design
- Imports System
- Imports System.IO
- Imports System.Web
- Imports System.Drawing.Design
- Namespace HangamaHouse
- Public Class RTFBox
- Inherits System.Web.UI.WebControls.WebControl
- Implements IPostBackDataHandler
- #Region "Private Variable Declaration"
- Public Event TextChanged As EventHandler
- Private mEmDlgWidth As Integer = 110
- Private mEmDlgHeight As Integer = 140
- Private mIconsPath As String = "icons"
- Private mSmilesPath As String = "icons/smiles"
- Private mButtonBackColor As Color = ColorTranslator.FromHtml("#D6D3CE") 'ColorTranslator.ToHtml
- Private mTableBackColor As Color = ColorTranslator.FromHtml("#D6D3CE")
- Private mCellBackColor As Color = ColorTranslator.FromHtml("#D6D3CE")
- Private mColorFilePath As String = "ColorPicker.html"
- Private mSmilesFilePath As String = "Smiles.html"
- Private mWidth As Integer = 500
- #End Region
- Public Sub New()
- 'Create Modal Dialogue Fies
- End Sub
- #Region "Public Properties"
- Public Property EmotionsDialogueWidth() As Integer
- Get
- Return mEmDlgWidth
- End Get
- Set(ByVal Value As Integer)
- mEmDlgWidth = Value
- End Set
- End Property
- Public Property EmotionsDialogueHeight() As Integer
- Get
- Return mEmDlgHeight
- End Get
- Set(ByVal Value As Integer)
- mEmDlgHeight = Value
- End Set
- End Property
- Public Property IconsPath() As String
- Get
- Return mIconsPath
- End Get
- Set(ByVal Value As String)
- mIconsPath = Value
- End Set
- End Property
- Public Property SmilesPath() As String
- Get
- Return mSmilesPath
- End Get
- Set(ByVal Value As String)
- mSmilesPath = Value
- End Set
- End Property
- Public ReadOnly Property StyleSheet() As String
- Get
- Return Me.GenerateCSSCode()
- End Get
- End Property
- Public Property ButtonBackColor() As Color
- Get
- Return mButtonBackColor
- End Get
- Set(ByVal Value As Color)
- mButtonBackColor = Value
- End Set
- End Property
- Public Property TableBackColor() As Color
- Get
- Return mTableBackColor
- End Get
- Set(ByVal Value As Color)
- mTableBackColor = Value
- End Set
- End Property
- Public Property TableCellBackColor() As Color
- Get
- Return mCellBackColor
- End Get
- Set(ByVal Value As Color)
- mCellBackColor = Value
- End Set
- End Property
- Public Property SmilesPickerFilePath() As String
- Get
- Return mSmilesFilePath
- End Get
- Set(ByVal Value As String)
- mSmilesFilePath = Value
- End Set
- End Property
- Public Property ColorPickerFilePath() As String
- Get
- Return mColorFilePath
- End Get
- Set(ByVal Value As String)
- mColorFilePath = Value
- End Set
- End Property
- Public Property Text() As String
- Get
- Return CType(Me.ViewState("Text"), String)
- End Get
- Set(ByVal Value As String)
- Value = Replace(Value, "", "\") ' is a Special Character, Replace with \
- Value = Replace(Value, "'", "’") ' ' is cause of Error, replace with '
- Value = Replace(Value, vbCrLf, " ")
- Me.ViewState("Text") = Value
- End Set
- End Property
- #End Region
- #Region "Private Functions"
- Private Function GenerateCSSCode() As String
- Dim mCSS As String
- mCSS = vbCrLf
- mCSS = "<STYLE> " & vbCrLf
- mCSS += ".EditControl { " & vbCrLf
- mCSS += "width:" & Me.mWidth & "px; " & vbCrLf
- mCSS += "height:300px; } " & vbCrLf
- mCSS += ".tblTable { " & vbCrLf
- mCSS += "width : " & Me.mWidth & "px; " & vbCrLf
- mCSS += "height: 30px; " & vbCrLf
- mCSS += "border:0; " & vbCrLf
- mCSS += "cellspacing:0; " & vbCrLf
- mCSS += "cellpadding:0; " & vbCrLf
- mCSS += "background-color:" & ColorTranslator.ToHtml(mTableBackColor) & ";" & vbCrLf
- mCSS += " } " & vbCrLf
- mCSS += ".butClass { " & vbCrLf
- mCSS += "width:22; " & vbCrLf
- mCSS += "height:22; " & vbCrLf
- mCSS += "border: 0px solid; " & vbCrLf
- mCSS += "border-color: #D6D3CE ; " & vbCrLf
- mCSS += "background-color:" & ColorTranslator.ToHtml(mButtonBackColor) & ";" & vbCrLf
- mCSS += " } " & vbCrLf
- mCSS += ".tdClass { " & vbCrLf
- mCSS += "padding-left: 0px; " & vbCrLf
- mCSS += "padding-top:0px; " & vbCrLf
- mCSS += "background-Color: " & ColorTranslator.ToHtml(mCellBackColor) & "; } " & vbCrLf
- mCSS += "</STYLE>" & vbCrLf
- Return (mCSS & vbCrLf)
- End Function
- Private Function GenerateSelONScript() As String
- Dim mStr As String
- mStr = "<Script Language=""javascript"">" & vbCrLf
- mStr += "function selOn(ctrl) {" & vbCrLf
- mStr += " var mImage " & vbCrLf
- mStr += " switch(ctrl.id)" & vbCrLf
- mStr += " {" & vbCrLf
- mStr += " case 'imgCuston' :" & vbCrLf
- mStr += " mImage = 'customtag_over.gif';" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgAbout' :" & vbCrLf
- mStr += " mImage = 'about_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgBold' :" & vbCrLf
- mStr += " mImage = 'bold_over.gif';" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgItalic' :" & vbCrLf
- mStr += " mImage = 'italic_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgBoldItalic' :" & vbCrLf
- mStr += " mImage = 'bolditalicunderline_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUnderLine' :" & vbCrLf
- mStr += " mImage = 'underline_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgStrikeThrough' :" & vbCrLf
- mStr += " mImage = 'strikethrough_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgSpecialChar' :" & vbCrLf
- mStr += " mImage ='specialchars_over.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += "" & vbCrLf
- mStr += " case 'imgSuperScript' :" & vbCrLf
- mStr += " mImage = 'superscript_over.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSubScript' :" & vbCrLf
- mStr += " mImage = 'subscript_over.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSave':" & vbCrLf
- mStr += " mImage = 'save_over.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgAlignLeft' :" & vbCrLf
- mStr += " mImage = 'alignleft_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignRight' :" & vbCrLf
- mStr += " mImage = 'alignright_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignCenter' :" & vbCrLf
- mStr += " mImage = 'aligncenter_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignJustify' :" & vbCrLf
- mStr += " mImage = 'alignjustify_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCut' :" & vbCrLf
- mStr += " mImage = 'cut_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCopy' :" & vbCrLf
- mStr += " mImage = 'copy_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgPaste' :" & vbCrLf
- mStr += " mImage = 'paste_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgImage' :" & vbCrLf
- mStr += " mImage = 'image_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLink' :" & vbCrLf
- mStr += " mImage = 'link_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLine' :" & vbCrLf
- mStr += " mImage = 'line_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUndo' :" & vbCrLf
- mStr += " mImage = 'undo_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgRedo' :" & vbCrLf
- mStr += " mImage = 'redo_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOrderList' :" & vbCrLf
- mStr += " mImage = 'orderedlist_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUnOrderList' :" & vbCrLf
- mStr += " mImage = 'unorderedlist_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOutdent' :" & vbCrLf
- mStr += " mImage = 'outdent_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgIndent' :" & vbCrLf
- mStr += " mImage = 'indent_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgHighLight' :" & vbCrLf
- mStr += " mImage = 'highlight_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgFontColor' :" & vbCrLf
- mStr += " mImage = 'fontcolor_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCustom' :" & vbCrLf
- mStr += " mImage = 'customtag_over.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " default :" & vbCrLf
- mStr += " mImage = ctrl.src;" & vbCrLf
- mStr += "" & vbCrLf
- mStr += " }" & vbCrLf
- mStr += " var mNewImage = new Image();" & vbCrLf
- mStr += " mNewImage.src = '" & mIconsPath & "/' + mImage ;" & vbCrLf
- mStr += " if (! (mImage == ctrl.src) ) " & vbCrLf
- mStr += " ctrl.src = mNewImage.src;" & vbCrLf
- mStr += " ctrl.style.cursor = 'hand'; " & vbCrLf
- 'mStr += " ctrl.style.borderColor = '#000000';" & vbCrLf
- 'mStr += " ctrl.style.backgroundColor = '#B5BED6';" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "</Script>" & vbCrLf
- Return (mStr & vbCrLf)
- End Function
- Private Function GenerateSelOFFScript() As String
- Dim mStr As String
- mStr = "<Script Language=""javascript"">" & vbCrLf
- mStr += "function selOff(ctrl)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " var mImage ;" & vbCrLf
- mStr += " switch(ctrl.id)" & vbCrLf
- mStr += " {" & vbCrLf
- mStr += " case 'imgCuston' :" & vbCrLf
- mStr += " mImage = 'customtag_off.gif';" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgAbout' :" & vbCrLf
- mStr += " mImage = 'about_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgBold' :" & vbCrLf
- mStr += " mImage = 'bold_off.gif';" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgItalic' :" & vbCrLf
- mStr += " mImage = 'italic_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgBoldItalic' :" & vbCrLf
- mStr += " mImage = 'bolditalicunderline_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += "" & vbCrLf
- mStr += " case 'imgSuperScript' :" & vbCrLf
- mStr += " mImage = 'superscript_off.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSubScript' :" & vbCrLf
- mStr += " mImage = 'subscript_off.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSpecialChar' :" & vbCrLf
- mStr += " mImage = 'specialchars_off.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSave':" & vbCrLf
- mStr += " mImage = 'save_off.gif'" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgUnderLine' :" & vbCrLf
- mStr += " mImage = 'underline_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgStrikeThrough' :" & vbCrLf
- mStr += " mImage = 'strikethrough_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignLeft' :" & vbCrLf
- mStr += " mImage = 'alignleft_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignRight' :" & vbCrLf
- mStr += " mImage = 'alignright_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignCenter' :" & vbCrLf
- mStr += " mImage = 'aligncenter_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignJustify' :" & vbCrLf
- mStr += " mImage = 'alignjustify_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCut' :" & vbCrLf
- mStr += " mImage = 'cut_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCopy' :" & vbCrLf
- mStr += " mImage = 'copy_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgPaste' :" & vbCrLf
- mStr += " mImage = 'paste_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgImage' :" & vbCrLf
- mStr += " mImage = 'image_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLink' :" & vbCrLf
- mStr += " mImage = 'link_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLine' :" & vbCrLf
- mStr += " mImage = 'line_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += "" & vbCrLf
- mStr += " case 'imgUndo' :" & vbCrLf
- mStr += " mImage = 'undo_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgRedo' :" & vbCrLf
- mStr += " mImage = 'redo_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOrderList' :" & vbCrLf
- mStr += " mImage = 'orderedlist_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUnOrderList' :" & vbCrLf
- mStr += " mImage = 'unorderedlist_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOutdent' :" & vbCrLf
- mStr += " mImage = 'outdent_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgIndent' :" & vbCrLf
- mStr += " mImage = 'indent_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgHighLight' :" & vbCrLf
- mStr += " mImage = 'highlight_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgFontColor' :" & vbCrLf
- mStr += " mImage = 'fontcolor_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCustom' :" & vbCrLf
- mStr += " mImage = 'customtag_off.gif';" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " default :" & vbCrLf
- mStr += " mImage = ctrl.src; " & vbCrLf
- mStr += " }" & vbCrLf
- mStr += " var mNewImage = new Image();" & vbCrLf
- mStr += " mNewImage.src = '" & mIconsPath & "/' + mImage ;" & vbCrLf
- mStr += " if (! (mImage == ctrl.src) ) " & vbCrLf
- mStr += " ctrl.src = mNewImage.src;" & vbCrLf
- 'mStr += " ctrl.style.borderColor = '#D6D3CE'; " & vbCrLf
- 'mStr += " ctrl.style.backgroundColor = '#D6D3CE';" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "</Script>" & vbCrLf
- Return (mStr & vbCrLf)
- End Function
- Private Function GenerateSelDown_UpScript() As String
- Dim mStr As String
- mStr = "<Script Language=""javascript"">" & vbCrLf
- mStr += "function selDown(ctrl)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " ctrl.style.backgroundColor = '" & ColorTranslator.ToHtml(Me.mButtonBackColor) & "';" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "function selUp(ctrl)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " ctrl.style.backgroundColor = '" & ColorTranslator.ToHtml(Me.mButtonBackColor) & "';" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "</Script>" & vbCrLf
- Return (mStr & vbCrLf)
- End Function
- Private Function GenerateCommandScript() As String
- Dim mStr As String
- mStr = "<Script Language=""javascript"">" & vbCrLf
- mStr += "function doCommand(ctrl)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " //BackColor" & vbCrLf
- mStr += " var mCommand, uInterface, vValue;" & vbCrLf
- mStr += "switch(ctrl.id)" & vbCrLf
- mStr += "{ " & vbCrLf
- mStr += " case 'imgSuperScript' :" & vbCrLf
- mStr += " mCommand = 'superscript'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSubScript' :" & vbCrLf
- mStr += " mCommand = 'subscript'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgBold' :" & vbCrLf
- mStr += " mCommand = 'bold'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgItalic' :" & vbCrLf
- mStr += " mCommand = 'italic'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgBoldItalic' :" & vbCrLf
- mStr += " doCommand (document.all['imgBold'])" & vbCrLf
- mStr += " doCommand (document.all['imgItalic'])" & vbCrLf
- mStr += " doCommand (document.all['imgUnderLine'])" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgUnderLine' :" & vbCrLf
- mStr += " mCommand = 'underline'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgStrikeThrough' :" & vbCrLf
- mStr += " mCommand = 'strikethrough'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignLeft' :" & vbCrLf
- mStr += " mCommand = 'justifyleft'; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignRight' :" & vbCrLf
- mStr += " mCommand = 'justifyright';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignCenter' :" & vbCrLf
- mStr += " mCommand = 'justifycenter';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgAlignJustify' :" & vbCrLf
- mStr += " mCommand = 'justifyfull';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCut' :" & vbCrLf
- mStr += " mCommand = 'cut';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgCopy' :" & vbCrLf
- mStr += " mCommand = 'copy';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgPaste' :" & vbCrLf
- mStr += " mCommand = 'paste';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgImage' :" & vbCrLf
- mStr += " //Note that if we set UserInterface to true and vValue to null, then" & vbCrLf
- mStr += " //A Dialogue will appear asking for Image location." & vbCrLf
- mStr += " mCommand = 'insertimage';" & vbCrLf
- mStr += " uInterface = true;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLink' :" & vbCrLf
- mStr += " mCommand = 'createlink';" & vbCrLf
- mStr += " uInterface = true;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgLine' :" & vbCrLf
- mStr += " mCommand = 'inserthorizontalrule';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUndo' :" & vbCrLf
- mStr += " mCommand = 'undo';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgRedo' :" & vbCrLf
- mStr += " mCommand = 'redo';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOrderList' :" & vbCrLf
- mStr += " mCommand = 'insertorderedlist';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgUnOrderList' :" & vbCrLf
- mStr += " mCommand = 'insertunorderedlist';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgOutdent' :" & vbCrLf
- mStr += " mCommand = 'outdent';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgIndent' :" & vbCrLf
- mStr += " mCommand = 'indent';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'lstStyle' :" & vbCrLf
- mStr += " mCommand = 'formatblock';" & vbCrLf
- mStr += " vValue = ctrl.options[ctrl.selectedIndex].value ;" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " break;" & vbCrLf
- 'TODO List Font is not working, Check here
- mStr += " case 'lstFontSize' :" & vbCrLf
- mStr += " mCommand = 'fontsize';" & vbCrLf
- mStr += " vValue = ctrl.options[ctrl.selectedIndex].value ;" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'lstFont' :" & vbCrLf
- mStr += " mCommand = 'fontname';" & vbCrLf
- mStr += " vValue = ctrl.options[ctrl.selectedIndex].value ; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'lstColor' :" & vbCrLf
- mStr += " mCommand = 'forecolor';" & vbCrLf
- mStr += " vValue = ctrl.options[ctrl.selectedIndex].value ; " & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgDelete' :" & vbCrLf
- mStr += " mCommand = 'delete';" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgPrint' :" & vbCrLf
- mStr += " mCommand = 'delete';" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " uInterface = true; " & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSave' :" & vbCrLf
- mStr += " mCommand = 'saveas';" & vbCrLf
- mStr += " vValue = null;" & vbCrLf
- mStr += " uInterface = true; " & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgCustom' : " & vbCrLf
- mStr += " var temp = table2.style.display;" & vbCrLf
- mStr += " if (temp == 'none')" & vbCrLf
- mStr += " {" & vbCrLf
- mStr += " var mTemp1 = RTFEdit_" & Me.UniqueID & ".document.body.innerText;" & vbCrLf
- mStr += " table1.style.display = 'inline';" & vbCrLf
- mStr += " table2.style.display = 'inline'; " & vbCrLf
- mStr += " RTFEdit_" & Me.UniqueID & ".document.body.innerHTML = mTemp1;" & vbCrLf
- mStr += " }" & vbCrLf
- mStr += " else" & vbCrLf
- mStr += " { " & vbCrLf
- mStr += " //First Set the HTMLText in the TextBox" & vbCrLf
- mStr += " var mTemp = RTFEdit_" & Me.UniqueID & ".document.body.innerHTML;" & vbCrLf
- mStr += " table1.style.display = 'none';" & vbCrLf
- mStr += " table2.style.display = 'none'; " & vbCrLf
- mStr += " RTFEdit_" & Me.UniqueID & ".document.body.innerText = mTemp; " & vbCrLf
- mStr += " }" & vbCrLf
- mStr += " break; " & vbCrLf
- mStr += " case 'imgFontColor' :" & vbCrLf
- mStr += " var oldcolor = GetEditBoxColor('forecolor'); " & vbCrLf
- mStr += " mCommand = 'forecolor';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = GetColorFromUser(oldcolor);" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgHighLight' : " & vbCrLf
- mStr += " var oldcolor = GetEditBoxColor('backcolor'); " & vbCrLf
- mStr += " mCommand = 'backcolor';" & vbCrLf
- mStr += " uInterface = false;" & vbCrLf
- mStr += " vValue = GetColorFromUser(oldcolor); " & vbCrLf
- mStr += " break;" & vbCrLf
- 'TODO Insert Special Characters
- mStr += " case 'imgSpecialChar' :" & vbCrLf
- mStr += " alert ('Special Characters will be provided soon.');" & vbCrLf
- mStr += " return; " & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " case 'imgSmile' :" & vbCrLf
- mStr += " var posX = event.screenX;" & vbCrLf
- mStr += " var posY = event.screenY + 20;" & vbCrLf
- mStr += " var screenW = screen.width; // screen size" & vbCrLf
- mStr += " var screenH = screen.height - 20; // take taskbar into account" & vbCrLf
- mStr += " //if (posX + 232 > screenW) { posX = posX - 232 - 40; } // if mouse too far right" & vbCrLf
- mStr += " //if (posY + 164 > screenH) { posY = posY - 164 - 80; } // if mouse too far down" & vbCrLf
- mStr += " var wPosition = 'dialogLeft:' +posX+ '; dialogTop:' +posY;" & vbCrLf
- mStr += " var newimage = showModalDialog('" & Me.mSmilesFilePath & "', ''," & vbCrLf
- mStr += " 'dialogWidth:" & Me.EmotionsDialogueWidth & "px; dialogHeight: " & Me.EmotionsDialogueHeight & "px; '" & vbCrLf
- mStr += " + 'resizable: no; help: no; status: no; scroll: no; '" & vbCrLf
- mStr += " + wPosition); " & vbCrLf
- 'mStr += " var firstpart = location.href ;" & vbCrLf
- 'mStr += " var firstpart = firstpart.substr(0, firstpart.lastIndexOf('/'))" & vbCrLf
- mStr += " if (newimage == null) return;"
- mStr += " newimage = '" & Me.mSmilesPath & "' + '/' + newimage;" & vbCrLf
- mStr += " mCommand = 'insertimage';" & vbCrLf
- mStr += " vValue = newimage;" & vbCrLf
- mStr += " uInterface = false; " & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += " break ;" & vbCrLf
- 'TODO Insert About Dialogue
- mStr += " case 'imgAbout' :" & vbCrLf
- mStr += " alert ('HTML Area. Created by Sameers (theAngrycodeR)');" & vbCrLf
- mStr += " break;" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += " RTFEdit_" & Me.UniqueID & ".focus ();" & vbCrLf
- mStr += " RTFEdit_" & Me.UniqueID & ".document.execCommand (mCommand, uInterface, vValue);" & vbCrLf
- mStr += " RTFEdit_" & Me.UniqueID & ".focus ();" & vbCrLf
- mStr += "} " & vbCrLf
- mStr += "function GetColorFromUser(oldcolor)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " var posX = event.screenX;" & vbCrLf
- mStr += " var posY = event.screenY + 20;" & vbCrLf
- mStr += " var screenW = screen.width; // screen size" & vbCrLf
- mStr += " var screenH = screen.height - 20; // take taskbar into account" & vbCrLf
- mStr += " if (posX + 232 > screenW) { posX = posX - 232 - 40; } // if mouse too far right" & vbCrLf
- mStr += " if (posY + 164 > screenH) { posY = posY - 164 - 80; } // if mouse too far down" & vbCrLf
- mStr += " var wPosition = 'dialogLeft:' +posX+ '; dialogTop:' +posY;" & vbCrLf
- mStr += " var newcolor = showModalDialog('" & Me.mColorFilePath & "', oldcolor," & vbCrLf
- mStr += " 'dialogWidth:238px; dialogHeight: 187px; '" & vbCrLf
- mStr += " + 'resizable: no; help: no; status: no; scroll: no; '" & vbCrLf
- mStr += " + wPosition);" & vbCrLf
- mStr += " return newcolor" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "function GetEditBoxColor(colorCommand)" & vbCrLf
- mStr += "{" & vbCrLf
- mStr += " return DecimalToRGB(RTFEdit_" & Me.UniqueID & ".document.queryCommandValue(colorCommand));" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "function DecimalToRGB(value) {" & vbCrLf
- mStr += " var hex_string = '';" & vbCrLf
- mStr += " for (var hexpair = 0; hexpair < 3; hexpair++) {" & vbCrLf
- mStr += " var byte = value & 0xFF; // get low byte" & vbCrLf
- mStr += " value >>= 8; // drop low byte" & vbCrLf
- mStr += " var nybble2 = byte & 0x0F; // get low nybble (4 bits)" & vbCrLf
- mStr += " var nybble1 = (byte >> 4) & 0x0F; // get high nybble" & vbCrLf
- mStr += " hex_string += nybble1.toString(16); // convert nybble to hex" & vbCrLf
- mStr += " hex_string += nybble2.toString(16); // convert nybble to hex" & vbCrLf
- mStr += " }" & vbCrLf
- mStr += " return hex_string.toUpperCase();" & vbCrLf
- mStr += "}" & vbCrLf
- mStr += "</Script>" & vbCrLf
- Return (mStr & vbCrLf)
- End Function
- Private Function GenerateHTMLAreaBody() As String
- Dim mStr As String
- 'Start of Main Table which will have three tables
- mStr = "<TABLE align=""center"" class=""tblTable"" cellpadding=0 cellspacing=0>" & vbCrLf
- mStr += "<TR>" & vbCrLf
- mStr += "<TD class=""tdClass"">" & vbCrLf
- 'Start Making Frist Table (ie First Row of Toolbar) & vbCrLf
- mStr += " <TABLE id=""table1"" class=""tblTable"">" & vbCrLf
- mStr += " <TR>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgSave"" alt=""Save"" name=""imgSave"" class=""butClass"" src=""" & mIconsPath & "/save_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgUndo"" alt=""Undo"" name=""imgUndo"" class=""butClass"" src=""" & mIconsPath & "/undo_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgRedo"" alt=""Redo"" name=""imgRedo"" class=""butClass"" src=""" & mIconsPath & "/redo_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgSubScript"" alt=""Subscript"" name=""imgSubScript"" class=""butClass"" src=""" & mIconsPath & "/subscript_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgSuperScript"" alt=""SuperScript"" name=""imgSuperScript"" class=""butClass"" src=""" & mIconsPath & "/superscript_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgOrderList"" alt=""Ordered List"" name=""imgOrderList"" class=""butClass"" src=""" & mIconsPath & "/orderedlist_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgUnOrderList"" alt=""Unordered List"" name=""imgUnOrderList"" class=""butClass"" src=""" & mIconsPath & "/unorderedlist_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img alt=""Outdent"" ID=""imgOutdent"" name=""imgOutdent"" class=""butClass"" src=""" & mIconsPath & "/outdent_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img alt=""Indent"" ID=""imgIndent"" name=""imgIndent"" class=""butClass"" src=""" & mIconsPath & "/indent_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""> <!-- Insert the Style List -->" & vbCrLf
- mStr += " <select id=""lstStyle"" width=30px onChange=""doCommand(this);"">" & vbCrLf
- mStr += " <option value=""paragraph"">Paragraph</option>" & vbCrLf
- mStr += " <option value=""Heading 1"">H1</option>" & vbCrLf
- mStr += " <option value=""Heading 2"">H2</option>" & vbCrLf
- mStr += " <option value=""Heading 3"">H3</option>" & vbCrLf
- mStr += " <option value=""Heading 4"">H4</option>" & vbCrLf
- mStr += " <option value=""Heading 5"">H5</option>" & vbCrLf
- mStr += " <option value=""Heading 6"">H6</option>" & vbCrLf
- mStr += " <option value=""Heading 7"">H7</option>" & vbCrLf
- mStr += " </select>" & vbCrLf
- mStr += " </td>" & vbCrLf
- mStr += " <td class=""tdClass"">" & vbCrLf
- mStr += " <Select id=""lstFont"" name=""lstFont"" width=30px onChange=""doCommand(this);"">" & vbCrLf
- mStr += " <option value=""Arial"">Arial</option>" & vbCrLf
- mStr += " <option value=""Courier"">Courier</option>" & vbCrLf
- mStr += " <option value=""Sans Serif"">Sans Serif</option>" & vbCrLf
- mStr += " <option value=""Tahoma"">Tahoma</option>" & vbCrLf
- mStr += " <option value=""Verdana"">Verdana</option>" & vbCrLf
- mStr += " <option value=""Wingdings"">Wingdings</option>" & vbCrLf
- mStr += " </Select>" & vbCrLf
- mStr += " </td>" & vbCrLf
- mStr += " <td class=""tdClass"">" & vbCrLf
- mStr += " <select id=""lstFontSize"" onChange=""doCommand(this);"" width=30px>" & vbCrLf
- mStr += " <option value=1>Very Small</option>" & vbCrLf
- mStr += " <option value=2>Small</option>" & vbCrLf
- mStr += " <option value=3>Medium</option>" & vbCrLf
- mStr += " <option value=4>Large</option>" & vbCrLf
- mStr += " <option value=5>Larger</option>" & vbCrLf
- mStr += " <option value=6>Very Large</option>" & vbCrLf
- mStr += " <option value=7>Extra Large</option>" & vbCrLf
- mStr += " </select>" & vbCrLf
- mStr += " </td>" & vbCrLf
- mStr += " </TR>" & vbCrLf
- mStr += " </TABLE>" & vbCrLf
- 'End of First Table
- mStr += "</TD>" & vbCrLf
- mStr += "</TR>" & vbCrLf
- 'Create Second Table Now
- mStr += " <TR>" & vbCrLf
- mStr += " <TD class=""tdClass"">" & vbCrLf
- mStr += " <TABLE id=""table2"" class=""tblTable"">" & vbCrLf
- mStr += " <TR>" & vbCrLf
- mStr += " <TD class=""tdClass"">" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgBold"" alt=""Bold"" name=""imgBold"" class=""butClass"" src=""" & mIconsPath & "/bold_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgItalic"" alt=""Italic"" name=""imgItalic"" class=""butClass"" src=""" & mIconsPath & "/italic_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgUnderLine"" alt=""Underline"" name=""imgUnderLine"" class=""butClass"" src=""" & mIconsPath & "/underline_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgBoldItalic"" alt=""Bold Italic UnderLine"" name=""imgBoldItalic"" class=""butClass"" src=""" & mIconsPath & "/bolditalicunderline_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgStrikeThrough"" alt=""Strike Trhough"" name=""imgStrikeThrough"" class=""butClass"" src=""" & mIconsPath & "/strikethrough_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img src=""" & mIconsPath & "/separator.gif""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgAlignLeft"" alt=""Left Align"" name=""imgAlignLeft"" class=""butClass"" src=""" & mIconsPath & "/alignleft_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgAlignCenter"" alt=""Center Align"" name=""imgAlignCenter"" class=""butClass"" src=""" & mIconsPath & "/aligncenter_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgAlignRight"" alt=""Right Align"" name=""imgAlignRight"" class=""butClass"" src=""" & mIconsPath & "/alignright_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgAlignJustify"" alt=""Justify"" name=""imgAlignJustify"" class=""butClass"" src=""" & mIconsPath & "/alignjustify_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img src=""" & mIconsPath & "/separator.gif""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgCut"" alt=""Cut"" name=""imgCut"" class=""butClass"" src=""" & mIconsPath & "/cut_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgCopy"" alt=""Copy"" name=""imgCopy"" class=""butClass"" src=""" & mIconsPath & "/copy_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgPaste"" alt=""Paste"" name=""imgPaste"" class=""butClass"" src=""" & mIconsPath & "/paste_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgSpecialChar"" alt=""Special Character"" name=""imgSpecialChar"" class=""butClass"" src=""" & mIconsPath & "/specialchars_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img src=""" & mIconsPath & "/separator.gif""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgImage"" alt=""Insert Image"" name=""imgImage"" class=""butClass"" src=""" & mIconsPath & "/image_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgLink"" alt=""Hyper Link"" name=""imgLink"" class=""butClass"" src=""" & mIconsPath & "/link_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgLine"" alt=""Insert Line"" name=""imgLine"" class=""butClass"" src=""" & mIconsPath & "/line_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgFontColor"" alt=""Text Color"" name=""imgFontColor"" class=""butClass"" src=""" & mIconsPath & "/fontcolor_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgHighLight"" alt=""Highlight Color"" name=""imgHighLight"" class=""butClass"" src=""" & mIconsPath & "/highlight_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " <td class=""tdClass""><img ID=""imgSmile"" alt=""Insert Smiles"" name=""imgSmile"" class=""butClass"" src=""" & mIconsPath & "/1.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)""></td>" & vbCrLf
- mStr += " </TR>" & vbCrLf
- mStr += " </TABLE>" & vbCrLf
- 'End of Second Table
- mStr += " </TD>" & vbCrLf
- mStr += "</TR>" & vbCrLf
- 'Create Third Table Now
- mStr += " <TR>" & vbCrLf
- mStr += " <TD class=""tdClass"">" & vbCrLf
- mStr += " <TABLE id=""table3"" class=""tblTable"">" & vbCrLf
- mStr += " <TR>" & vbCrLf
- mStr += " <TD class=""tdClass"">" & vbCrLf
- 'mStr += " <Form Id=""frmEdit"" name=""frmEdit"">" & vbCrLf
- mStr += " <IFrame name=RTFEdit_" & Me.UniqueID & " ID=RTFEdit_" & Me.UniqueID & " class=""EditControl"" ></IFrame>" & vbCrLf
- mStr += " <Input type=""hidden"" name=" & Me.UniqueID & " ID=" & Me.UniqueID & " value='" & Text & "' >" & vbCrLf
- 'mStr += " </Form>" & vbCrLf
- mStr += " </TD>" & vbCrLf
- mStr += " </TR>" & vbCrLf
- mStr += " <TR>" & vbCrLf
- mStr += " <td align=""right"" class=""tdClass"">" & vbCrLf
- mStr += " <img alt=""HTML View"" ID=""imgCustom"" name=""imgCustom"" class=""butClass"" src=""" & mIconsPath & "/customtag_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)"">" & vbCrLf
- mStr += " <img alt=""About"" ID=""imgAbout"" name=""imgAbout"" class=""butClass"" src=""" & mIconsPath & "/about_off.gif"" onMouseOver=""selOn(this)"" onMouseOut=""selOff(this)"" onMouseDown=""selDown(this)"" onMouseUp=""selUp(this)"" onClick=""doCommand(this)"">" & vbCrLf
- mStr += " </td>" & vbCrLf
- mStr += " </TR>" & vbCrLf
- mStr += " </TABLE>" & vbCrLf
- 'End of Third Table, Now Close the top most table
- mStr += " </TD>" & vbCrLf
- mStr += " </TR>" & vbCrLf
- mStr += "</TABLE>" & vbCrLf
- 'That's all, Now return the HTML String
- Return (mStr & vbCrLf)
- End Function
- Private Function GeneratePostBackScript() As String
- Dim mStr As String
- mStr = "<Script Language=""javascript"" for=RTFEdit_" & Me.UniqueID & " event=""onblur"">" & vbCrLf
- mStr += "var temp = table2.style.display;" & vbCrLf
- mStr += "if (temp == 'none' ) " & vbCrLf
- mStr += " " & Me.UniqueID & ".value = RTFEdit_" & Me.UniqueID & ".document.body.innerText;" & vbCrLf
- mStr += "else" & vbCrLf
- mStr += " " & Me.UniqueID & ".value = RTFEdit_" & Me.UniqueID & ".document.body.innerHTML;" & vbCrLf
- mStr += "</Script>" & vbCrLf
- ''Dim mStr1 As String = "RTFEdit_" & Me.UniqueID & ".document.body.innerHTML = " & Me.UniqueID & ".value ;"
- mStr += "<Script Language=""javascript"" for=RTFEdit_" & Me.UniqueID & " event=""onload"">" & vbCrLf
- ''mStr += "setTimeout ('" & mStr1 & "', 3000)"
- 'mStr += "<Script Language=javascript>"
- mStr += "RTFEdit_" & Me.UniqueID & ".document.body.innerHTML = '" & Me.Text & "'"
- mStr += "</Script>"
- Return (mStr & vbCrLf)
- End Function
- 'Private Function CreateColorPalatte() As String
- ' Dim mStr As String
- ' mStr += "<!-- note: this version of the color picker is optimized for IE 5.5+ only -->"
- ' mStr += "<html><head><title>Select Color</title>"
- ' mStr += "<script language=""javascript"">"
- ' mStr += "function _CloseOnEsc() {"
- ' mStr += "if (event.keyCode == 27) { window.close(); return; }"
- ' mStr += "}"
- ' mStr += "function Init() { // run on page load"
- ' mStr += "document.body.onkeypress = _CloseOnEsc;"
- ' mStr += "color = window.dialogArguments;"
- ' mStr += "color = ValidateColor(color) || '000000';"
- ' mStr += "View(color); // set default color"
- ' mStr += "}"
- ' mStr += "function View(color) { // preview color"
- ' mStr += "document.all.ColorPreview.style.backgroundColor = '#' + color;"
- ' mStr += "document.all.ColorHex.value = '#' + color;"
- ' mStr += "}"
- ' mStr += "function Set(string) { // select color"
- ' mStr += "color = ValidateColor(string);"
- ' mStr += "if (color == null) { alert('Invalid color code: ' + string); } // invalid color"
- ' mStr += "else { // valid color"
- ' mStr += "View(color); // show selected color"
- ' mStr += "window.returnValue = color; // set return value"
- ' mStr += "window.close(); // close dialog"
- ' mStr += "}"
- ' mStr += "}"
- ' mStr += "function ValidateColor(string) { // return valid color code"
- ' mStr += "string = string || '';"
- ' mStr += "string = string + "";"
- ' mStr += "string = string.toUpperCase();"
- ' mStr += "chars = '0123456789ABCDEF';"
- ' mStr += "out = '';"
- ' mStr += "for (i=0; i<string.length; i++) { // remove invalid color chars"
- ' mStr += "schar = string.charAt(i);"
- ' mStr += "if (chars.indexOf(schar) != -1) { out += schar; }"
- ' mStr += "}"
- ' mStr += "if (out.length != 6) { return null; } // check length"
- ' mStr += "return out;"
- ' mStr += "} "
- ' mStr += "</script>"
- ' mStr += "</head>"
- ' mStr += "<body bgcolor=""#000000"" topmargin=0 leftmargin=0 onload=""Init()"">"
- ' mStr += "<form method=get onSubmit=""Set(document.all.ColorHex.value); return false;"">"
- ' mStr += "<table border=0 cellspacing=0 cellpadding=4 width=100%>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=""buttonface"" valign=center>"
- ' mStr += "<div style=""background-color: #000000; padding: 1; height: 21px; width: 50px"">"
- ' mStr += "<div id=""ColorPreview"" style=""height: 100%; width: 100%""></div></div>"
- ' mStr += "</td>"
- ' mStr += "<td id=""td1"" bgcolor=""buttonface"" valign=center>"
- ' mStr += "<input type=""text"" ID=""ColorHex"" name=""ColorHex"" value="""" size=15 style=""font-size: 12px;"">"
- ' mStr += "</td>"
- ' mStr += "<td bgcolor=""buttonface"" width=100%></td>"
- ' mStr += "</tr>"
- ' mStr += "</table>"
- ' mStr += "<table border=0 cellspacing=1 cellpadding=0 bgcolor=#000000 style=""cursor: hand;"">"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#003300 onMouseOver=View('003300') onClick=Set('003300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#006600 onMouseOver=View('006600') onClick=Set('006600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#009900 onMouseOver=View('009900') onClick=Set('009900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CC00 onMouseOver=View('00CC00') onClick=Set('00CC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#330000 onMouseOver=View('330000') onClick=Set('330000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#333300 onMouseOver=View('333300') onClick=Set('333300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#336600 onMouseOver=View('336600') onClick=Set('336600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#339900 onMouseOver=View('339900') onClick=Set('339900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CC00 onMouseOver=View('33CC00') onClick=Set('33CC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FF00 onMouseOver=View('33FF00') onClick=Set('33FF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#660000 onMouseOver=View('660000') onClick=Set('660000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#663300 onMouseOver=View('663300') onClick=Set('663300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#666600 onMouseOver=View('666600') onClick=Set('666600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#669900 onMouseOver=View('669900') onClick=Set('669900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CC00 onMouseOver=View('66CC00') onClick=Set('66CC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FF00 onMouseOver=View('66FF00') onClick=Set('66FF00') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000033 onMouseOver=View('000033') onClick=Set('000033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#003333 onMouseOver=View('003333') onClick=Set('003333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#006633 onMouseOver=View('006633') onClick=Set('006633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#009933 onMouseOver=View('009933') onClick=Set('009933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CC33 onMouseOver=View('00CC33') onClick=Set('00CC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FF33 onMouseOver=View('00FF33') onClick=Set('00FF33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#330033 onMouseOver=View('330033') onClick=Set('330033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#336633 onMouseOver=View('336633') onClick=Set('336633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#339933 onMouseOver=View('339933') onClick=Set('339933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CC33 onMouseOver=View('33CC33') onClick=Set('33CC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FF33 onMouseOver=View('33FF33') onClick=Set('33FF33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#660033 onMouseOver=View('660033') onClick=Set('660033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#663333 onMouseOver=View('663333') onClick=Set('663333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#666633 onMouseOver=View('666633') onClick=Set('666633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#669933 onMouseOver=View('669933') onClick=Set('669933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CC33 onMouseOver=View('66CC33') onClick=Set('66CC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FF33 onMouseOver=View('66FF33') onClick=Set('66FF33') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000066 onMouseOver=View('000066') onClick=Set('000066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#003366 onMouseOver=View('003366') onClick=Set('003366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#006666 onMouseOver=View('006666') onClick=Set('006666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#009966 onMouseOver=View('009966') onClick=Set('009966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CC66 onMouseOver=View('00CC66') onClick=Set('00CC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FF66 onMouseOver=View('00FF66') onClick=Set('00FF66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#330066 onMouseOver=View('330066') onClick=Set('330066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#333366 onMouseOver=View('333366') onClick=Set('333366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#336666 onMouseOver=View('336666') onClick=Set('336666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#339966 onMouseOver=View('339966') onClick=Set('339966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CC66 onMouseOver=View('33CC66') onClick=Set('33CC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FF66 onMouseOver=View('33FF66') onClick=Set('33FF66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#660066 onMouseOver=View('660066') onClick=Set('660066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#663366 onMouseOver=View('663366') onClick=Set('663366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#669966 onMouseOver=View('669966') onClick=Set('669966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CC66 onMouseOver=View('66CC66') onClick=Set('66CC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FF66 onMouseOver=View('66FF66') onClick=Set('66FF66') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000099 onMouseOver=View('000099') onClick=Set('000099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#003399 onMouseOver=View('003399') onClick=Set('003399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#006699 onMouseOver=View('006699') onClick=Set('006699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#009999 onMouseOver=View('009999') onClick=Set('009999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CC99 onMouseOver=View('00CC99') onClick=Set('00CC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FF99 onMouseOver=View('00FF99') onClick=Set('00FF99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#330099 onMouseOver=View('330099') onClick=Set('330099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#333399 onMouseOver=View('333399') onClick=Set('333399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#336699 onMouseOver=View('336699') onClick=Set('336699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#339999 onMouseOver=View('339999') onClick=Set('339999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CC99 onMouseOver=View('33CC99') onClick=Set('33CC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FF99 onMouseOver=View('33FF99') onClick=Set('33FF99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#660099 onMouseOver=View('660099') onClick=Set('660099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#663399 onMouseOver=View('663399') onClick=Set('663399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#666699 onMouseOver=View('666699') onClick=Set('666699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#669999 onMouseOver=View('669999') onClick=Set('669999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CC99 onMouseOver=View('66CC99') onClick=Set('66CC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FF99 onMouseOver=View('66FF99') onClick=Set('66FF99') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0000CC onMouseOver=View('0000CC') onClick=Set('0000CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0033CC onMouseOver=View('0033CC') onClick=Set('0033CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0066CC onMouseOver=View('0066CC') onClick=Set('0066CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0099CC onMouseOver=View('0099CC') onClick=Set('0099CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CCCC onMouseOver=View('00CCCC') onClick=Set('00CCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FFCC onMouseOver=View('00FFCC') onClick=Set('00FFCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3300CC onMouseOver=View('3300CC') onClick=Set('3300CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3333CC onMouseOver=View('3333CC') onClick=Set('3333CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3366CC onMouseOver=View('3366CC') onClick=Set('3366CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3399CC onMouseOver=View('3399CC') onClick=Set('3399CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CCCC onMouseOver=View('33CCCC') onClick=Set('33CCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FFCC onMouseOver=View('33FFCC') onClick=Set('33FFCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6600CC onMouseOver=View('6600CC') onClick=Set('6600CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6633CC onMouseOver=View('6633CC') onClick=Set('6633CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6666CC onMouseOver=View('6666CC') onClick=Set('6666CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6699CC onMouseOver=View('6699CC') onClick=Set('6699CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CCCC onMouseOver=View('66CCCC') onClick=Set('66CCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FFCC onMouseOver=View('66FFCC') onClick=Set('66FFCC') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0033FF onMouseOver=View('0033FF') onClick=Set('0033FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0066FF onMouseOver=View('0066FF') onClick=Set('0066FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0099FF onMouseOver=View('0099FF') onClick=Set('0099FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00CCFF onMouseOver=View('00CCFF') onClick=Set('00CCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3300FF onMouseOver=View('3300FF') onClick=Set('3300FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3333FF onMouseOver=View('3333FF') onClick=Set('3333FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3366FF onMouseOver=View('3366FF') onClick=Set('3366FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#3399FF onMouseOver=View('3399FF') onClick=Set('3399FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33CCFF onMouseOver=View('33CCFF') onClick=Set('33CCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#33FFFF onMouseOver=View('33FFFF') onClick=Set('33FFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6600FF onMouseOver=View('6600FF') onClick=Set('6600FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6633FF onMouseOver=View('6633FF') onClick=Set('6633FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6666FF onMouseOver=View('6666FF') onClick=Set('6666FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#6699FF onMouseOver=View('6699FF') onClick=Set('6699FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66CCFF onMouseOver=View('66CCFF') onClick=Set('66CCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#66FFFF onMouseOver=View('66FFFF') onClick=Set('66FFFF') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#990000 onMouseOver=View('990000') onClick=Set('990000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#993300 onMouseOver=View('993300') onClick=Set('993300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#996600 onMouseOver=View('996600') onClick=Set('996600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#999900 onMouseOver=View('999900') onClick=Set('999900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CC00 onMouseOver=View('99CC00') onClick=Set('99CC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FF00 onMouseOver=View('99FF00') onClick=Set('99FF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC0000 onMouseOver=View('CC0000') onClick=Set('CC0000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC3300 onMouseOver=View('CC3300') onClick=Set('CC3300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC6600 onMouseOver=View('CC6600') onClick=Set('CC6600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC9900 onMouseOver=View('CC9900') onClick=Set('CC9900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCC00 onMouseOver=View('CCCC00') onClick=Set('CCCC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFF00 onMouseOver=View('CCFF00') onClick=Set('CCFF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF3300 onMouseOver=View('FF3300') onClick=Set('FF3300') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF6600 onMouseOver=View('FF6600') onClick=Set('FF6600') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF9900 onMouseOver=View('FF9900') onClick=Set('FF9900') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCC00 onMouseOver=View('FFCC00') onClick=Set('FFCC00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#990033 onMouseOver=View('990033') onClick=Set('990033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#993333 onMouseOver=View('993333') onClick=Set('993333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#996633 onMouseOver=View('996633') onClick=Set('996633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#999933 onMouseOver=View('999933') onClick=Set('999933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CC33 onMouseOver=View('99CC33') onClick=Set('99CC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FF33 onMouseOver=View('99FF33') onClick=Set('99FF33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC0033 onMouseOver=View('CC0033') onClick=Set('CC0033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC3333 onMouseOver=View('CC3333') onClick=Set('CC3333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC6633 onMouseOver=View('CC6633') onClick=Set('CC6633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC9933 onMouseOver=View('CC9933') onClick=Set('CC9933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCC33 onMouseOver=View('CCCC33') onClick=Set('CCCC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFF33 onMouseOver=View('CCFF33') onClick=Set('CCFF33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF0033 onMouseOver=View('FF0033') onClick=Set('FF0033') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF3333 onMouseOver=View('FF3333') onClick=Set('FF3333') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF6633 onMouseOver=View('FF6633') onClick=Set('FF6633') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF9933 onMouseOver=View('FF9933') onClick=Set('FF9933') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCC33 onMouseOver=View('FFCC33') onClick=Set('FFCC33') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFF33 onMouseOver=View('FFFF33') onClick=Set('FFFF33') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#990066 onMouseOver=View('990066') onClick=Set('990066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#993366 onMouseOver=View('993366') onClick=Set('993366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#996666 onMouseOver=View('996666') onClick=Set('996666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#999966 onMouseOver=View('999966') onClick=Set('999966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CC66 onMouseOver=View('99CC66') onClick=Set('99CC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FF66 onMouseOver=View('99FF66') onClick=Set('99FF66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC0066 onMouseOver=View('CC0066') onClick=Set('CC0066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC3366 onMouseOver=View('CC3366') onClick=Set('CC3366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC6666 onMouseOver=View('CC6666') onClick=Set('CC6666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC9966 onMouseOver=View('CC9966') onClick=Set('CC9966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCC66 onMouseOver=View('CCCC66') onClick=Set('CCCC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFF66 onMouseOver=View('CCFF66') onClick=Set('CCFF66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF0066 onMouseOver=View('FF0066') onClick=Set('FF0066') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF3366 onMouseOver=View('FF3366') onClick=Set('FF3366') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF6666 onMouseOver=View('FF6666') onClick=Set('FF6666') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF9966 onMouseOver=View('FF9966') onClick=Set('FF9966') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCC66 onMouseOver=View('FFCC66') onClick=Set('FFCC66') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFF66 onMouseOver=View('FFFF66') onClick=Set('FFFF66') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#990099 onMouseOver=View('990099') onClick=Set('990099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#993399 onMouseOver=View('993399') onClick=Set('993399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#996699 onMouseOver=View('996699') onClick=Set('996699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CC99 onMouseOver=View('99CC99') onClick=Set('99CC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FF99 onMouseOver=View('99FF99') onClick=Set('99FF99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC0099 onMouseOver=View('CC0099') onClick=Set('CC0099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC3399 onMouseOver=View('CC3399') onClick=Set('CC3399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC6699 onMouseOver=View('CC6699') onClick=Set('CC6699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC9999 onMouseOver=View('CC9999') onClick=Set('CC9999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCC99 onMouseOver=View('CCCC99') onClick=Set('CCCC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFF99 onMouseOver=View('CCFF99') onClick=Set('CCFF99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF0099 onMouseOver=View('FF0099') onClick=Set('FF0099') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF3399 onMouseOver=View('FF3399') onClick=Set('FF3399') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF6699 onMouseOver=View('FF6699') onClick=Set('FF6699') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF9999 onMouseOver=View('FF9999') onClick=Set('FF9999') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCC99 onMouseOver=View('FFCC99') onClick=Set('FFCC99') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFF99 onMouseOver=View('FFFF99') onClick=Set('FFFF99') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9900CC onMouseOver=View('9900CC') onClick=Set('9900CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9933CC onMouseOver=View('9933CC') onClick=Set('9933CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9966CC onMouseOver=View('9966CC') onClick=Set('9966CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9999CC onMouseOver=View('9999CC') onClick=Set('9999CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CCCC onMouseOver=View('99CCCC') onClick=Set('99CCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FFCC onMouseOver=View('99FFCC') onClick=Set('99FFCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC00CC onMouseOver=View('CC00CC') onClick=Set('CC00CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC33CC onMouseOver=View('CC33CC') onClick=Set('CC33CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC66CC onMouseOver=View('CC66CC') onClick=Set('CC66CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC99CC onMouseOver=View('CC99CC') onClick=Set('CC99CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFFCC onMouseOver=View('CCFFCC') onClick=Set('CCFFCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF00CC onMouseOver=View('FF00CC') onClick=Set('FF00CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF33CC onMouseOver=View('FF33CC') onClick=Set('FF33CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF66CC onMouseOver=View('FF66CC') onClick=Set('FF66CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF99CC onMouseOver=View('FF99CC') onClick=Set('FF99CC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCCCC onMouseOver=View('FFCCCC') onClick=Set('FFCCCC') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFFCC onMouseOver=View('FFFFCC') onClick=Set('FFFFCC') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "<tr>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9900FF onMouseOver=View('9900FF') onClick=Set('9900FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9933FF onMouseOver=View('9933FF') onClick=Set('9933FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9966FF onMouseOver=View('9966FF') onClick=Set('9966FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#9999FF onMouseOver=View('9999FF') onClick=Set('9999FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99CCFF onMouseOver=View('99CCFF') onClick=Set('99CCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#99FFFF onMouseOver=View('99FFFF') onClick=Set('99FFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC00FF onMouseOver=View('CC00FF') onClick=Set('CC00FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC33FF onMouseOver=View('CC33FF') onClick=Set('CC33FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC66FF onMouseOver=View('CC66FF') onClick=Set('CC66FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CC99FF onMouseOver=View('CC99FF') onClick=Set('CC99FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCCCFF onMouseOver=View('CCCCFF') onClick=Set('CCCCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#CCFFFF onMouseOver=View('CCFFFF') onClick=Set('CCFFFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF33FF onMouseOver=View('FF33FF') onClick=Set('FF33FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF66FF onMouseOver=View('FF66FF') onClick=Set('FF66FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FF99FF onMouseOver=View('FF99FF') onClick=Set('FF99FF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFCCFF onMouseOver=View('FFCCFF') onClick=Set('FFCCFF') height=10 width=10></td>"
- ' mStr += "<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height=10 width=10></td>"
- ' mStr += "</tr>"
- ' mStr += "</table>"
- ' mStr += "</form>"
- ' mStr += "</body></html>"
- ' 'Dim mWriter As new System.IO.StreamWriter(
- ' 'mWriter.Write(mStr)
- 'End Function
- #End Region
- #Region "Protected Overrides Sub"
- Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
- writer.Write(Me.GenerateHTMLAreaBody)
- 'Conver the Simple IFrame to Editable TextBox
- writer.RenderBeginTag("Script")
- writer.Write("RTFEdit_" & Me.UniqueID & ".document.designMode='on';")
- 'writer.Write("RTFEdit_" & Me.UniqueID & ".document.body.innerText = '" & Text & "'")
- writer.RenderEndTag()
- 'End Converting IFrame to Editable Textbox
- End Sub
- Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
- Page.RegisterClientScriptBlock("myStyleSheetScript", Me.GenerateCSSCode())
- Page.RegisterClientScriptBlock("myCommandScript", Me.GenerateCommandScript())
- Page.RegisterClientScriptBlock("mySelUpDownScript", Me.GenerateSelDown_UpScript())
- Page.RegisterClientScriptBlock("myselOFFScript", Me.GenerateSelOFFScript())
- Page.RegisterClientScriptBlock("myselONScript", Me.GenerateSelONScript())
- Page.RegisterClientScriptBlock(Me.UniqueID & "_PostBackScript", Me.GeneratePostBackScript())
- End Sub
- #End Region
- #Region "Interface Implementation"
- Public Function LoadPostData(ByVal postDataKey As String, ByVal postCollection As System.Collections.Specialized.NameValueCollection) As Boolean Implements System.Web.UI.IPostBackDataHandler.LoadPostData
- Dim currentValue As String = Text
- Dim postedValue As String = postCollection(postDataKey)
- If currentValue Is Nothing Or Not postedValue.Equals(currentValue) Then
- Text = postedValue
- Return True
- End If
- Return False
- End Function
- Public Sub RaisePostDataChangedEvent() Implements System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent
- OnTextChanged(EventArgs.Empty)
- End Sub
- Protected Overridable Sub OnTextChanged(ByVal e As EventArgs)
- RaiseEvent TextChanged(Me, e)
- End Sub
- #End Region
- End Class
- End Namespace