Reconfigure for GIT
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Text
|
||||
|
||||
''' <summary>
|
||||
''' Helper class to return the cleaned rtf, especcially the merge fields
|
||||
''' to be clean and replaced by their values. Keep in mind:
|
||||
''' 1. NO PIPES (|) allowed in the merge field(they will be removed) !!!
|
||||
''' 2. ALL SPACES will be removed
|
||||
''' </summary>
|
||||
Public Class RTFMergeFieldCleaner
|
||||
Private _ArrayOfFields(,) As String
|
||||
''' <summary>
|
||||
''' Returns array of uncleaned (0st dimension 1) and cleaned (1st dimension 1) strings
|
||||
''' </summary>
|
||||
Public ReadOnly Property ArrayOfFields() As String(,)
|
||||
Get
|
||||
Return _ArrayOfFields
|
||||
End Get
|
||||
End Property
|
||||
''' <summary>
|
||||
''' Returns the amount of millisecconds it took to clean the page from strange rtf tags
|
||||
''' </summary>
|
||||
Public ReadOnly Property MilliseccondsItTookToProcess() As Integer
|
||||
Get
|
||||
Return processedinmillisecconds
|
||||
End Get
|
||||
End Property
|
||||
'onderstaande is essentieel om de volgende instantie van een merge field te vinden
|
||||
'houdt enkel bij waar de search was in het document
|
||||
Private bcounter As Integer
|
||||
'om de waarde om te slaan
|
||||
Dim processedinmillisecconds As Integer
|
||||
''' <summary>
|
||||
''' Input string or stringbuilder. Returns cleaned(everything within
|
||||
''' the tags is cleaned from rtf codes)string or stringbuilder
|
||||
''' On failure or no start and end tag combination it will return an
|
||||
''' empty string or stringbuilder or a mangled one :-)
|
||||
''' </summary>
|
||||
Public Function CleanDocument(ByVal rtfSring As String, Optional ByVal detectStartChar As Char = CChar("["), Optional ByVal detectEndChar As Char = CChar("]")) As String
|
||||
|
||||
Dim time As Integer = Date.Now.TimeOfDay.Milliseconds
|
||||
|
||||
Dim sb As New StringBuilder(rtfSring)
|
||||
Dim sbclean As New StringBuilder(sb.ToString)
|
||||
Dim tempstr(1) As String
|
||||
Dim stepper As Integer = 0
|
||||
Do
|
||||
tempstr = ReturnNextRtfString(sb, detectStartChar, detectEndChar, True)
|
||||
'als de return leeg is exit, dit implicdeert dat er geen start tag was gevonden
|
||||
If tempstr(0) Is Nothing Then Exit Do
|
||||
sbclean.Replace(tempstr(0), tempstr(1))
|
||||
'array opbouwen met de velden evt groter maken
|
||||
ReDim Preserve _ArrayOfFields(1, stepper)
|
||||
_ArrayOfFields(0, stepper) = tempstr(0)
|
||||
_ArrayOfFields(1, stepper) = tempstr(1)
|
||||
stepper += 1
|
||||
Loop
|
||||
|
||||
processedinmillisecconds = Date.Now.TimeOfDay.Milliseconds - time
|
||||
|
||||
Return sbclean.ToString
|
||||
|
||||
End Function
|
||||
' overload van de vorige alleen nu met een string builder
|
||||
Public Function CleanDocument(ByRef sb As StringBuilder, Optional ByVal detectStartChar As Char = CChar("["), Optional ByVal detectEndChar As Char = CChar("]")) As StringBuilder
|
||||
Dim time As Integer = Date.Now.TimeOfDay.Milliseconds
|
||||
|
||||
Dim sbclean As New StringBuilder(sb.ToString)
|
||||
Dim stepper As Integer = 0
|
||||
Dim tempstr(1) As String
|
||||
Do
|
||||
tempstr = ReturnNextRtfString(sb, detectStartChar, detectEndChar, True)
|
||||
If tempstr(0) Is Nothing Then Exit Do
|
||||
sbclean.Replace(tempstr(0), tempstr(1))
|
||||
ReDim Preserve _ArrayOfFields(1, stepper)
|
||||
_ArrayOfFields(0, stepper) = tempstr(0)
|
||||
_ArrayOfFields(1, stepper) = tempstr(1)
|
||||
stepper += 1
|
||||
Loop
|
||||
|
||||
processedinmillisecconds = Date.Now.TimeOfDay.Milliseconds - time
|
||||
|
||||
Return sbclean
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Returns the next rtf string with the start and end tags.
|
||||
''' optional define other start and end tags, and defin if the sting gets cleaned
|
||||
''' </summary>
|
||||
Private Function ReturnNextRtfString(ByRef sb As StringBuilder, ByVal startchar As Char, ByVal endchar As Char, Optional ByVal autoclean As Boolean = False) As String()
|
||||
|
||||
Dim startcounter, endcounter As Integer
|
||||
Dim acounter As Integer
|
||||
Dim returnstring(1) As String
|
||||
' loop door de hele stringbuilder vanaf het startpunt
|
||||
For acounter = bcounter To sb.Length - 1
|
||||
'zoek begin
|
||||
If sb.Chars(acounter) = startchar Then
|
||||
startcounter = acounter
|
||||
End If
|
||||
'zoek einde
|
||||
If sb.Chars(acounter) = endchar Then
|
||||
endcounter = acounter + 1
|
||||
'set nieuwe start voor de volgende aanroep van de functie
|
||||
bcounter = acounter + 1
|
||||
End If
|
||||
'retourneer de substring
|
||||
If startcounter > 0 AndAlso endcounter > startcounter Then
|
||||
'als auto clean dan meteen schoonmaken
|
||||
If autoclean = True Then
|
||||
returnstring(1) = CleanRtfString(sb.ToString.Substring(startcounter, endcounter - startcounter))
|
||||
returnstring(0) = sb.ToString.Substring(startcounter, endcounter - startcounter)
|
||||
Return returnstring
|
||||
Else
|
||||
returnstring(0) = sb.ToString.Substring(startcounter, endcounter - startcounter)
|
||||
Return returnstring
|
||||
End If
|
||||
|
||||
Exit Function
|
||||
End If
|
||||
Next
|
||||
Return returnstring
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Removes anny rtf codes between the tags leaving the strue string as return
|
||||
''' allso it removes spaces(32) and pipes(|)
|
||||
''' internally it replaces everything it does not know by pipes thats why :-)
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Private Function CleanRtfString(ByRef rtfstring As String) As String
|
||||
Dim sb As New StringBuilder(rtfstring)
|
||||
Dim cleansb As New StringBuilder
|
||||
|
||||
Dim ccounter As Integer
|
||||
|
||||
For ccounter = 0 To sb.Length
|
||||
'verwijderen van dit soort strings \af0\afs20 en { }
|
||||
'als geen leesteken onder de 32 ascii nummer dan weg
|
||||
If Asc(sb.Chars(ccounter)) > 32 AndAlso sb.Chars(ccounter) <> "|" AndAlso sb.Chars(ccounter) <> "\" AndAlso sb.Chars(ccounter) <> "{" AndAlso sb.Chars(ccounter) <> "}" Then
|
||||
cleansb.Append(sb.Chars(ccounter))
|
||||
|
||||
End If
|
||||
'als we er overheen zijn dan pleite!
|
||||
If ccounter + 1 >= sb.Length Then Exit For
|
||||
|
||||
' ff al het andre wordt genegeerd en omgezet in een pipe(|)
|
||||
If sb.Chars(ccounter + 1) = "\" OrElse sb.Chars(ccounter + 1) = "{" OrElse sb.Chars(ccounter + 1) = "}" Then
|
||||
For dcounter As Integer = ccounter + 1 To sb.Length - 1
|
||||
If sb.Chars(dcounter) = CChar(" ") Then Exit For
|
||||
sb.Chars(dcounter) = CChar("|")
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
'alle pipes weg en retourneren
|
||||
cleansb.Replace("|", "")
|
||||
Return cleansb.ToString
|
||||
End Function
|
||||
End Class
|
||||
@@ -0,0 +1,63 @@
|
||||
' Developer Express Code Central Example:
|
||||
' How to create a PropertyEditor based on the XtraRichEdit control
|
||||
'
|
||||
' Take special note that this editor is intended to be used for a simple and most
|
||||
' common scenario when only one text property in a Detail View is edited with the
|
||||
' help of the XtraRichEdit control. Other scenarios are not supported in this
|
||||
' example and are required to be implemented manually. For example, if there are
|
||||
' more than one property, edited with this editor in a Detail View, then there may
|
||||
' be problems with merging in ribbons. See the issue for more detailed
|
||||
' information. See Also: Implement Custom Property Editors How to: Implement a
|
||||
' Property Editor for Windows Forms Applications XtraRichEdit Home
|
||||
'
|
||||
' You can find sample updates and versions for different programming languages here:
|
||||
' http://www.devexpress.com/example=E1509
|
||||
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
<PropertyEditor(GetType([String]), False)> _
|
||||
Public Class RichEditPropertyEditor
|
||||
Inherits WinPropertyEditor
|
||||
Public Sub New(ByVal objectType As Type, ByVal info As IModelMemberViewItem)
|
||||
MyBase.New(objectType, info)
|
||||
ControlBindingProperty = "RtfText"
|
||||
End Sub
|
||||
Private richEditUserControlCore As RichEditUserControl = Nothing
|
||||
Public ReadOnly Property RichEditUserControl() As RichEditUserControl
|
||||
Get
|
||||
Return richEditUserControlCore
|
||||
End Get
|
||||
End Property
|
||||
Protected Overrides Function CreateControlCore() As Object
|
||||
richEditUserControlCore = New RichEditUserControl()
|
||||
AddHandler richEditUserControlCore.RichEditControl.RtfTextChanged, AddressOf RichEditControl_RtfTextChanged
|
||||
UpdateReadOnly()
|
||||
Return richEditUserControlCore
|
||||
End Function
|
||||
Protected Overrides Sub OnAllowEditChanged()
|
||||
MyBase.OnAllowEditChanged()
|
||||
UpdateReadOnly()
|
||||
End Sub
|
||||
Private Sub UpdateReadOnly()
|
||||
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
'Dim _Customers_Collection As New XPCollection(Of Customers)(_ocur.Session)
|
||||
'If RichEditUserControl IsNot Nothing AndAlso RichEditUserControl.RichEditControl IsNot Nothing Then
|
||||
|
||||
' RichEditUserControl.RichEditControl.ReadOnly = Not AllowEdit
|
||||
' 'RichEditUserControl.RichEditControl.Options.MailMerge.DataSource = _Customers_Collection
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub RichEditControl_RtfTextChanged(sender As Object, e As EventArgs)
|
||||
'Me.PropertyValue = Me.RichEditUserControl.RichEditControl.RtfText
|
||||
OnControlValueChanged()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+1774
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
||||
' Developer Express Code Central Example:
|
||||
' How to create a PropertyEditor based on the XtraRichEdit control
|
||||
'
|
||||
' Take special note that this editor is intended to be used for a simple and most
|
||||
' common scenario when only one text property in a Detail View is edited with the
|
||||
' help of the XtraRichEdit control. Other scenarios are not supported in this
|
||||
' example and are required to be implemented manually. For example, if there are
|
||||
' more than one property, edited with this editor in a Detail View, then there may
|
||||
' be problems with merging in ribbons. See the issue for more detailed
|
||||
' information. See Also: Implement Custom Property Editors How to: Implement a
|
||||
' Property Editor for Windows Forms Applications XtraRichEdit Home
|
||||
'
|
||||
' You can find sample updates and versions for different programming languages here:
|
||||
' http://www.devexpress.com/example=E1509
|
||||
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraRichEdit
|
||||
Imports DevExpress.XtraBars.Ribbon
|
||||
Imports DevExpress.XtraBars
|
||||
|
||||
Partial Public Class RichEditUserControl
|
||||
Inherits XtraUserControl
|
||||
|
||||
Private _EnterMoveNextControl As Boolean
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
Me.richEditControl_Renamed.Document.Sections(0).Page.PaperKind = System.Drawing.Printing.PaperKind.A4
|
||||
End Sub
|
||||
|
||||
Public Property EnterMoveNextControl As Boolean
|
||||
Get
|
||||
Return _EnterMoveNextControl
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
_EnterMoveNextControl = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property RichEditControl() As RichEditControl
|
||||
Get
|
||||
Return (Me.richEditControl_Renamed)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property RibbonControl() As RibbonControl
|
||||
Get
|
||||
Return Me.ribbonControl1
|
||||
End Get
|
||||
End Property
|
||||
Public Property RtfText() As String
|
||||
Get
|
||||
If richEditControl_Renamed IsNot Nothing Then
|
||||
Return richEditControl_Renamed.RtfText
|
||||
End If
|
||||
Return String.Empty
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
If richEditControl_Renamed IsNot Nothing Then
|
||||
richEditControl_Renamed.RtfText = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Property MailingDataSource As Object
|
||||
Get
|
||||
Return Me.richEditControl_Renamed.Options.MailMerge.DataSource
|
||||
End Get
|
||||
Set(value As Object)
|
||||
Me.richEditControl_Renamed.Options.MailMerge.DataSource = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property MailingInsertItemLink As DevExpress.XtraBars.PopupMenu
|
||||
Get
|
||||
Dim _RichEditUserControl As RichEditUserControl = TryCast(Me.RichEditControl.GetContainerControl, RichEditUserControl)
|
||||
Dim _InsertMergeFieldItem As DevExpress.XtraRichEdit.UI.InsertMergeFieldItem = TryCast(_RichEditUserControl.InsertMergeFieldItem1, DevExpress.XtraRichEdit.UI.InsertMergeFieldItem)
|
||||
Dim _PopupMenu As PopupMenu = TryCast(_InsertMergeFieldItem.DropDownControl, PopupMenu)
|
||||
|
||||
Return _PopupMenu
|
||||
End Get
|
||||
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,25 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), NonPersistent()> _
|
||||
Public Class RichTextView
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Size(-1)> Property RichText As String
|
||||
Property ObjectType As Type
|
||||
Property ObjectGUID As Guid
|
||||
End Class
|
||||
@@ -0,0 +1,81 @@
|
||||
Partial Class RichTextViewVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aViewRichText = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewRichText_Save = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewRichText_SaveAndClose = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aViewRichText
|
||||
'
|
||||
Me.aViewRichText.Caption = "aView Rich Text"
|
||||
Me.aViewRichText.ConfirmationMessage = Nothing
|
||||
Me.aViewRichText.Id = "aViewRichText"
|
||||
Me.aViewRichText.ImageName = Nothing
|
||||
Me.aViewRichText.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewRichText.Shortcut = Nothing
|
||||
Me.aViewRichText.Tag = Nothing
|
||||
Me.aViewRichText.TargetObjectsCriteria = Nothing
|
||||
Me.aViewRichText.TargetViewId = Nothing
|
||||
Me.aViewRichText.ToolTip = Nothing
|
||||
Me.aViewRichText.TypeOfView = Nothing
|
||||
'
|
||||
'aViewRichText_Save
|
||||
'
|
||||
Me.aViewRichText_Save.Caption = "aViewRichText_Save"
|
||||
Me.aViewRichText_Save.ConfirmationMessage = Nothing
|
||||
Me.aViewRichText_Save.Id = "aViewRichText_Save"
|
||||
Me.aViewRichText_Save.ImageName = Nothing
|
||||
Me.aViewRichText_Save.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewRichText_Save.Shortcut = Nothing
|
||||
Me.aViewRichText_Save.Tag = Nothing
|
||||
Me.aViewRichText_Save.TargetObjectsCriteria = Nothing
|
||||
Me.aViewRichText_Save.TargetViewId = Nothing
|
||||
Me.aViewRichText_Save.ToolTip = Nothing
|
||||
Me.aViewRichText_Save.TypeOfView = Nothing
|
||||
'
|
||||
'aViewRichText_SaveAndClose
|
||||
'
|
||||
Me.aViewRichText_SaveAndClose.Caption = "aViewRichText_SaveAndClose"
|
||||
Me.aViewRichText_SaveAndClose.ConfirmationMessage = Nothing
|
||||
Me.aViewRichText_SaveAndClose.Id = "aViewRichText_SaveAndClose"
|
||||
Me.aViewRichText_SaveAndClose.ImageName = Nothing
|
||||
Me.aViewRichText_SaveAndClose.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewRichText_SaveAndClose.Shortcut = Nothing
|
||||
Me.aViewRichText_SaveAndClose.Tag = Nothing
|
||||
Me.aViewRichText_SaveAndClose.TargetObjectsCriteria = Nothing
|
||||
Me.aViewRichText_SaveAndClose.TargetViewId = Nothing
|
||||
Me.aViewRichText_SaveAndClose.ToolTip = Nothing
|
||||
Me.aViewRichText_SaveAndClose.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aViewRichText As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewRichText_Save As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewRichText_SaveAndClose As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aViewRichText.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewRichText_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>147, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewRichText_SaveAndClose.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>307, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,76 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class RichTextViewVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText_Save.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText_SaveAndClose.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "ContractTemplate_DetailView" Then
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "RichTextView_DetailView" Then
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText_Save.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText_SaveAndClose.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aViewRichText_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewRichText.Execute
|
||||
Try
|
||||
If View.Id = "ContractTemplate_DetailView" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ContractTemplate As ContractTemplate = TryCast(View.SelectedObjects(0), ContractTemplate)
|
||||
|
||||
If _ContractTemplate Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _RichTextView As RichTextView = _ocur.CreateObject(Of RichTextView)()
|
||||
_RichTextView.RichText = _ContractTemplate.DocumentBody
|
||||
_RichTextView.ObjectGUID = _ContractTemplate.Oid
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "RichTextView_DetailView", False, _RichTextView)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub aViewRichText_Save_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewRichText_Save.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _RichTextView As RichTextView = TryCast(View.SelectedObjects(0), RichTextView)
|
||||
If _RichTextView Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt")
|
||||
|
||||
Dim _ContractTemplate As ContractTemplate = _ocur.FindObject(Of ContractTemplate)(CriteriaOperator.Parse("Oid=?", _RichTextView.ObjectGUID))
|
||||
|
||||
If _ContractTemplate IsNot Nothing Then
|
||||
_ContractTemplate.DocumentBody = _RichTextView.RichText
|
||||
If Not _ocur.IsNewObject(_ContractTemplate) Then _ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aViewRichText_SaveAndClose_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewRichText_SaveAndClose.Execute
|
||||
Frame.GetController(Of RichTextViewVC).aViewRichText_Save.DoExecute()
|
||||
View.Close()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user