diff --git a/VB/console-ai-extension/Program.vb b/VB/console-ai-extension/Program.vb index 1b01736..64e3ff1 100644 --- a/VB/console-ai-extension/Program.vb +++ b/VB/console-ai-extension/Program.vb @@ -5,6 +5,8 @@ Imports DevExpress.AIIntegration Imports DevExpress.AIIntegration.Extensions Imports DevExpress.AIIntegration.Localization Imports DevExpress.Data +Imports Microsoft.Extensions.AI +Imports System Imports System.Globalization @@ -13,9 +15,6 @@ Namespace Runtime_AI_Extensions Shared Sub Main(ByVal args() As String) Console.OutputEncoding = System.Text.Encoding.UTF8 - 'Enable sending large texts to Ollama - 'AsyncDownloadPolicy.ConfigureHttpClient += AsyncDownloadPolicy_ConfigureHttpClient; - 'Enable localization 'AIIntegrationLocalizer.Active = new CustomAILocalizer(); @@ -32,13 +31,6 @@ Namespace Runtime_AI_Extensions Console.ReadKey() End Sub - Private Shared Sub AsyncDownloadPolicy_ConfigureHttpClient(ByVal sender As Object, ByVal e As AsyncDownloadPolicy.ConfigureHttpClientEventArgs) - Dim fullTypeName? As String = e?.ValueType.FullName - If fullTypeName.Contains("Ollama") Then - e.Client.Timeout = TimeSpan.FromMinutes(15) - End If - End Sub - Public Class SampleAITextModifier 'Modify the following lines to obtain and pass your personal Azure OpenAI credentails to the Register* method. Private ReadOnly Property AzureOpenAIEndpoint() As String @@ -58,10 +50,16 @@ Namespace Runtime_AI_Extensions End Property Private defaultAIContainer As AIExtensionsContainerDefault + Public Sub New() - defaultAIContainer = New AIExtensionsContainerDefault() - 'defaultAIContainer.RegisterChatClientOllamaAIService("http://localhost:11434/api/chat", "llama3.1"); - defaultAIContainer.RegisterChatClientOpenAIService(New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)), DeploymentName) + + '''To register Ollama + 'OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/api/chat", "llama3.1"); + 'defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(ollamaChatClient); + + '''To register Azure OpenAI + Dim azureOpenAIClient As New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)) + defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(azureOpenAIClient.AsChatClient(DeploymentName)) End Sub Public Sub ChangeDefaults() @@ -81,7 +79,7 @@ Namespace Runtime_AI_Extensions Loop Return translatedText End If - ' Something unexpected happens + ' When something unexpected has happened Select Case result.Status Case ResponseStatus.MaxTokenLimitExceeded, ResponseStatus.InputSizeLimitExceeded Return "The text you're trying to send within a request is too long and exceeds the limit." @@ -95,8 +93,8 @@ Namespace Runtime_AI_Extensions ' How to replace the default extension Public Async Function GetShakespeareText(ByVal textToModify As String) As Task(Of String) - defaultAIContainer.Register(Of RewriteStyleRequest, WilliamShakespeareStyleExtension)() - Dim res As String = Await defaultAIContainer.RewriteStyleAsync(New RewriteStyleRequest(textToModify, WritingStyle.Formal)) + defaultAIContainer.Register(Of ChangeStyleRequest, WilliamShakespeareStyleExtension)() + Dim res As String = Await defaultAIContainer.ChangeStyleAsync(New ChangeStyleRequest(textToModify, WritingStyle.Formal)) Return res End Function @@ -117,12 +115,12 @@ Namespace Runtime_AI_Extensions End Class #Region "How to modify the default extension" Public Class WilliamShakespeareStyleExtension - Inherits RewriteStyleExtension + Inherits ChangeStyleExtension Public Sub New(ByVal serviceProvider As IServiceProvider) MyBase.New(serviceProvider) End Sub - Protected Overrides Function GetSystemPrompt(ByVal request As RewriteStyleRequest) As String + Protected Overrides Function GetSystemPrompt(ByVal request As ChangeStyleRequest) As String Return "Rewrite this text in the William Shakespeare style." End Function End Class diff --git a/VB/console-ai-extension/Runtime-AI-Extensions.vbproj b/VB/console-ai-extension/Runtime-AI-Extensions.vbproj index 2424cb1..56965b0 100644 --- a/VB/console-ai-extension/Runtime-AI-Extensions.vbproj +++ b/VB/console-ai-extension/Runtime-AI-Extensions.vbproj @@ -20,10 +20,10 @@ - - - - + + + + diff --git a/VB/winforms-ai-extensions/MemoEditForm.Designer.vb b/VB/winforms-ai-extensions/MemoEditForm.Designer.vb index a3446b5..46b5690 100644 --- a/VB/winforms-ai-extensions/MemoEditForm.Designer.vb +++ b/VB/winforms-ai-extensions/MemoEditForm.Designer.vb @@ -36,25 +36,25 @@ ' ' memoEdit1 ' - languageInfo1.Culture = New System.Globalization.CultureInfo("es") - languageInfo2.Culture = New System.Globalization.CultureInfo("de") - languageInfo3.Culture = New System.Globalization.CultureInfo("pt") - behaviorManager1.SetBehaviors(memoEdit1, New DevExpress.Utils.Behaviors.Behavior() { CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ExpandBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditExpandBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ExpandBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ShortenBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditShortenBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ShortenBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ToneStyleBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditToneStyleBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ToneStyleBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ExplainBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditExplainBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ExplainBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ProofreadBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditProofreadBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ProofreadBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.RewriteStyleBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditRewriteStyleBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.RewriteStyleBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.SummarizeBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditSummarizeBehaviorSource), New Object() { DevExpress.AIIntegration.SummarizeBehaviorMode.Abstractive, Nothing }), DevExpress.AIIntegration.WinForms.SummarizeBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.CustomRequestBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditCustomRequestBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.TranslateBehavior), GetType(DevExpress.AIIntegration.WinForms.MemoEditTranslateBehaviorSource), New Object() { New DevExpress.AIIntegration.Desktop.LanguageInfo() { languageInfo1, languageInfo2, languageInfo3 }, Nothing }), DevExpress.AIIntegration.WinForms.TranslateBehavior) }) + languageInfo1.Culture = New System.Globalization.CultureInfo("pt") + languageInfo2.Culture = New System.Globalization.CultureInfo("es") + languageInfo3.Culture = New System.Globalization.CultureInfo("de") + behaviorManager1.SetBehaviors(memoEdit1, New DevExpress.Utils.Behaviors.Behavior() { DevExpress.AIIntegration.WinForms.ExpandBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditExpandBehaviorSource)), DevExpress.AIIntegration.WinForms.ShortenBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditShortenBehaviorSource)), DevExpress.AIIntegration.WinForms.SummarizeBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditSummarizeBehaviorSource), DevExpress.AIIntegration.SummarizationMode.Abstractive), DevExpress.AIIntegration.WinForms.ExplainBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditExplainBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeToneBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditChangeToneBehaviorSource)), DevExpress.AIIntegration.WinForms.ProofreadBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditProofreadBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeStyleBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditChangeStyleBehaviorSource)), DevExpress.AIIntegration.WinForms.TranslateBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditTranslateBehaviorSource), New DevExpress.AIIntegration.Desktop.LanguageInfo() { languageInfo1, languageInfo2, languageInfo3 }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.MemoEditCustomRequestBehaviorSource)) }) memoEdit1.Dock = DockStyle.Fill memoEdit1.EditValue = resources.GetString("memoEdit1.EditValue") memoEdit1.Location = New Point(0, 0) - memoEdit1.Margin = New Padding(3, 2, 3, 2) + memoEdit1.Margin = New Padding(2, 2, 2, 2) memoEdit1.Name = "memoEdit1" - memoEdit1.Size = New Size(1268, 653) + memoEdit1.Size = New Size(951, 496) memoEdit1.TabIndex = 0 ' ' MemoEditForm ' - AutoScaleDimensions = New SizeF(12F, 25F) + AutoScaleDimensions = New SizeF(9F, 19F) AutoScaleMode = AutoScaleMode.Font - ClientSize = New Size(1268, 653) + ClientSize = New Size(951, 496) Controls.Add(memoEdit1) - Margin = New Padding(3, 2, 3, 2) + Margin = New Padding(2, 2, 2, 2) Name = "MemoEditForm" Text = "Form1" DirectCast(memoEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/VB/winforms-ai-extensions/Program.vb b/VB/winforms-ai-extensions/Program.vb index 5b57aed..e1dbd3d 100644 --- a/VB/winforms-ai-extensions/Program.vb +++ b/VB/winforms-ai-extensions/Program.vb @@ -1,5 +1,6 @@ Imports Azure.AI.OpenAI Imports DevExpress.AIIntegration +Imports Microsoft.Extensions.AI Namespace WinForms_AI_Extensions Friend Module Program @@ -36,7 +37,11 @@ Namespace WinForms_AI_Extensions End Sub Private Sub RegisterDevExpressAI() - AIExtensionsContainerDesktop.Default.RegisterChatClientOpenAIService(New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)), DeploymentName) + '''To register Ollama + 'OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/api/chat", "llama3.1"); + + Dim azureOpenAIClient As New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)) + AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient.AsChatClient(DeploymentName)) End Sub End Module End Namespace \ No newline at end of file diff --git a/VB/winforms-ai-extensions/RichEditForm.Designer.vb b/VB/winforms-ai-extensions/RichEditForm.Designer.vb index 3041bb9..353ea65 100644 --- a/VB/winforms-ai-extensions/RichEditForm.Designer.vb +++ b/VB/winforms-ai-extensions/RichEditForm.Designer.vb @@ -27,14 +27,10 @@ Dim languageInfo1 As New DevExpress.AIIntegration.Desktop.LanguageInfo() Dim languageInfo2 As New DevExpress.AIIntegration.Desktop.LanguageInfo() Dim languageInfo3 As New DevExpress.AIIntegration.Desktop.LanguageInfo() - Dim reduceOperation1 As New DevExpress.XtraBars.Ribbon.ReduceOperation() Dim galleryItemGroup1 As New DevExpress.XtraBars.Ribbon.GalleryItemGroup() + Dim reduceOperation1 As New DevExpress.XtraBars.Ribbon.ReduceOperation() richEditControl1 = New DevExpress.XtraRichEdit.RichEditControl() - richEditBarController1 = New DevExpress.XtraRichEdit.UI.RichEditBarController(components) - behaviorManager1 = New DevExpress.Utils.Behaviors.BehaviorManager(components) ribbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() - commonRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.CommonRibbonPageGroup() - fileRibbonPage1 = New DevExpress.XtraRichEdit.UI.FileRibbonPage() undoItem1 = New DevExpress.XtraRichEdit.UI.UndoItem() redoItem1 = New DevExpress.XtraRichEdit.UI.RedoItem() fileNewItem1 = New DevExpress.XtraRichEdit.UI.FileNewItem() @@ -44,20 +40,20 @@ quickPrintItem1 = New DevExpress.XtraRichEdit.UI.QuickPrintItem() printItem1 = New DevExpress.XtraRichEdit.UI.PrintItem() printPreviewItem1 = New DevExpress.XtraRichEdit.UI.PrintPreviewItem() - infoRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.InfoRibbonPageGroup() encryptDocumentItem1 = New DevExpress.XtraRichEdit.UI.EncryptDocumentItem() showDocumentPropertiesFormItem1 = New DevExpress.XtraRichEdit.UI.ShowDocumentPropertiesFormItem() - clipboardRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.ClipboardRibbonPageGroup() - homeRibbonPage1 = New DevExpress.XtraRichEdit.UI.HomeRibbonPage() pasteItem1 = New DevExpress.XtraRichEdit.UI.PasteItem() cutItem1 = New DevExpress.XtraRichEdit.UI.CutItem() copyItem1 = New DevExpress.XtraRichEdit.UI.CopyItem() pasteSpecialItem1 = New DevExpress.XtraRichEdit.UI.PasteSpecialItem() - fontRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.FontRibbonPageGroup() + barButtonGroup1 = New DevExpress.XtraBars.BarButtonGroup() changeFontNameItem1 = New DevExpress.XtraRichEdit.UI.ChangeFontNameItem() + repositoryItemFontEditRichEdit1 = New DevExpress.XtraRichEdit.UI.RepositoryItemFontEditRichEdit() changeFontSizeItem1 = New DevExpress.XtraRichEdit.UI.ChangeFontSizeItem() + repositoryItemRichEditFontSizeEdit1 = New DevExpress.XtraRichEdit.Design.RepositoryItemRichEditFontSizeEdit() fontSizeIncreaseItem1 = New DevExpress.XtraRichEdit.UI.FontSizeIncreaseItem() fontSizeDecreaseItem1 = New DevExpress.XtraRichEdit.UI.FontSizeDecreaseItem() + barButtonGroup2 = New DevExpress.XtraBars.BarButtonGroup() toggleFontBoldItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontBoldItem() toggleFontItalicItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontItalicItem() toggleFontUnderlineItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontUnderlineItem() @@ -66,23 +62,20 @@ toggleFontDoubleStrikeoutItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontDoubleStrikeoutItem() toggleFontSuperscriptItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontSuperscriptItem() toggleFontSubscriptItem1 = New DevExpress.XtraRichEdit.UI.ToggleFontSubscriptItem() + barButtonGroup3 = New DevExpress.XtraBars.BarButtonGroup() changeFontColorItem1 = New DevExpress.XtraRichEdit.UI.ChangeFontColorItem() changeFontHighlightColorItem1 = New DevExpress.XtraRichEdit.UI.ChangeFontHighlightColorItem() + changeTextCaseItem1 = New DevExpress.XtraRichEdit.UI.ChangeTextCaseItem() makeTextUpperCaseItem1 = New DevExpress.XtraRichEdit.UI.MakeTextUpperCaseItem() makeTextLowerCaseItem1 = New DevExpress.XtraRichEdit.UI.MakeTextLowerCaseItem() capitalizeEachWordCaseItem1 = New DevExpress.XtraRichEdit.UI.CapitalizeEachWordCaseItem() toggleTextCaseItem1 = New DevExpress.XtraRichEdit.UI.ToggleTextCaseItem() - changeTextCaseItem1 = New DevExpress.XtraRichEdit.UI.ChangeTextCaseItem() clearFormattingItem1 = New DevExpress.XtraRichEdit.UI.ClearFormattingItem() - barButtonGroup1 = New DevExpress.XtraBars.BarButtonGroup() - repositoryItemFontEditRichEdit1 = New DevExpress.XtraRichEdit.UI.RepositoryItemFontEditRichEdit() - repositoryItemRichEditFontSizeEdit1 = New DevExpress.XtraRichEdit.Design.RepositoryItemRichEditFontSizeEdit() - barButtonGroup2 = New DevExpress.XtraBars.BarButtonGroup() - barButtonGroup3 = New DevExpress.XtraBars.BarButtonGroup() - paragraphRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.ParagraphRibbonPageGroup() + barButtonGroup4 = New DevExpress.XtraBars.BarButtonGroup() toggleBulletedListItem1 = New DevExpress.XtraRichEdit.UI.ToggleBulletedListItem() toggleNumberingListItem1 = New DevExpress.XtraRichEdit.UI.ToggleNumberingListItem() toggleMultiLevelListItem1 = New DevExpress.XtraRichEdit.UI.ToggleMultiLevelListItem() + barButtonGroup5 = New DevExpress.XtraBars.BarButtonGroup() decreaseIndentItem1 = New DevExpress.XtraRichEdit.UI.DecreaseIndentItem() increaseIndentItem1 = New DevExpress.XtraRichEdit.UI.IncreaseIndentItem() rtlToggleBulletedListItem1 = New DevExpress.XtraRichEdit.UI.RtlToggleBulletedListItem() @@ -92,18 +85,21 @@ rtlIncreaseIndentItem1 = New DevExpress.XtraRichEdit.UI.RtlIncreaseIndentItem() toggleParagraphLeftToRightItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphLeftToRightItem() toggleParagraphRightToLeftItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphRightToLeftItem() + barButtonGroup6 = New DevExpress.XtraBars.BarButtonGroup() toggleParagraphAlignmentLeftItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentLeftItem() toggleParagraphAlignmentCenterItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentCenterItem() toggleParagraphAlignmentRightItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentRightItem() toggleParagraphAlignmentJustifyItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyItem() + toggleParagraphAlignmentArabicJustifyGroupItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyGroupItem() toggleParagraphAlignmentArabicJustifyItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyItem() toggleParagraphAlignmentJustifyLowItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyLowItem() toggleParagraphAlignmentJustifyMediumItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyMediumItem() toggleParagraphAlignmentJustifyHighItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyHighItem() - toggleParagraphAlignmentArabicJustifyGroupItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyGroupItem() toggleParagraphAlignmentDistributeItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentDistributeItem() toggleParagraphAlignmentThaiDistributeItem1 = New DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentThaiDistributeItem() toggleShowWhitespaceItem1 = New DevExpress.XtraRichEdit.UI.ToggleShowWhitespaceItem() + barButtonGroup7 = New DevExpress.XtraBars.BarButtonGroup() + changeParagraphLineSpacingItem1 = New DevExpress.XtraRichEdit.UI.ChangeParagraphLineSpacingItem() setSingleParagraphSpacingItem1 = New DevExpress.XtraRichEdit.UI.SetSingleParagraphSpacingItem() setSesquialteralParagraphSpacingItem1 = New DevExpress.XtraRichEdit.UI.SetSesquialteralParagraphSpacingItem() setDoubleParagraphSpacingItem1 = New DevExpress.XtraRichEdit.UI.SetDoubleParagraphSpacingItem() @@ -112,167 +108,77 @@ removeSpacingBeforeParagraphItem1 = New DevExpress.XtraRichEdit.UI.RemoveSpacingBeforeParagraphItem() addSpacingAfterParagraphItem1 = New DevExpress.XtraRichEdit.UI.AddSpacingAfterParagraphItem() removeSpacingAfterParagraphItem1 = New DevExpress.XtraRichEdit.UI.RemoveSpacingAfterParagraphItem() - changeParagraphLineSpacingItem1 = New DevExpress.XtraRichEdit.UI.ChangeParagraphLineSpacingItem() changeParagraphBackColorItem1 = New DevExpress.XtraRichEdit.UI.ChangeParagraphBackColorItem() - barButtonGroup4 = New DevExpress.XtraBars.BarButtonGroup() - barButtonGroup5 = New DevExpress.XtraBars.BarButtonGroup() - barButtonGroup6 = New DevExpress.XtraBars.BarButtonGroup() - barButtonGroup7 = New DevExpress.XtraBars.BarButtonGroup() - stylesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.StylesRibbonPageGroup() galleryChangeStyleItem1 = New DevExpress.XtraRichEdit.UI.GalleryChangeStyleItem() - editingRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.EditingRibbonPageGroup() findItem1 = New DevExpress.XtraRichEdit.UI.FindItem() replaceItem1 = New DevExpress.XtraRichEdit.UI.ReplaceItem() - pagesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.PagesRibbonPageGroup() - insertRibbonPage1 = New DevExpress.XtraRichEdit.UI.InsertRibbonPage() insertPageBreakItem21 = New DevExpress.XtraRichEdit.UI.InsertPageBreakItem2() - tablesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.TablesRibbonPageGroup() insertTableItem1 = New DevExpress.XtraRichEdit.UI.InsertTableItem() - illustrationsRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.IllustrationsRibbonPageGroup() insertFloatingPictureItem1 = New DevExpress.XtraRichEdit.UI.InsertFloatingPictureItem() - linksRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.LinksRibbonPageGroup() insertBookmarkItem1 = New DevExpress.XtraRichEdit.UI.InsertBookmarkItem() insertHyperlinkItem1 = New DevExpress.XtraRichEdit.UI.InsertHyperlinkItem() - headerFooterRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.HeaderFooterRibbonPageGroup() editPageHeaderItem1 = New DevExpress.XtraRichEdit.UI.EditPageHeaderItem() editPageFooterItem1 = New DevExpress.XtraRichEdit.UI.EditPageFooterItem() insertPageNumberItem1 = New DevExpress.XtraRichEdit.UI.InsertPageNumberItem() insertPageCountItem1 = New DevExpress.XtraRichEdit.UI.InsertPageCountItem() - textRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.TextRibbonPageGroup() insertTextBoxItem1 = New DevExpress.XtraRichEdit.UI.InsertTextBoxItem() insertObjectItem1 = New DevExpress.XtraRichEdit.UI.InsertObjectItem() - symbolsRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.SymbolsRibbonPageGroup() insertSymbolItem1 = New DevExpress.XtraRichEdit.UI.InsertSymbolItem() - DirectCast(richEditBarController1, System.ComponentModel.ISupportInitialize).BeginInit() - DirectCast(behaviorManager1, System.ComponentModel.ISupportInitialize).BeginInit() + fileRibbonPage1 = New DevExpress.XtraRichEdit.UI.FileRibbonPage() + commonRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.CommonRibbonPageGroup() + infoRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.InfoRibbonPageGroup() + homeRibbonPage1 = New DevExpress.XtraRichEdit.UI.HomeRibbonPage() + clipboardRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.ClipboardRibbonPageGroup() + fontRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.FontRibbonPageGroup() + paragraphRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.ParagraphRibbonPageGroup() + stylesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.StylesRibbonPageGroup() + editingRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.EditingRibbonPageGroup() + insertRibbonPage1 = New DevExpress.XtraRichEdit.UI.InsertRibbonPage() + pagesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.PagesRibbonPageGroup() + tablesRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.TablesRibbonPageGroup() + illustrationsRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.IllustrationsRibbonPageGroup() + linksRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.LinksRibbonPageGroup() + headerFooterRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.HeaderFooterRibbonPageGroup() + textRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.TextRibbonPageGroup() + symbolsRibbonPageGroup1 = New DevExpress.XtraRichEdit.UI.SymbolsRibbonPageGroup() + richEditBarController1 = New DevExpress.XtraRichEdit.UI.RichEditBarController(components) + behaviorManager1 = New DevExpress.Utils.Behaviors.BehaviorManager(components) DirectCast(ribbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() DirectCast(repositoryItemFontEditRichEdit1, System.ComponentModel.ISupportInitialize).BeginInit() DirectCast(repositoryItemRichEditFontSizeEdit1, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(richEditBarController1, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(behaviorManager1, System.ComponentModel.ISupportInitialize).BeginInit() SuspendLayout() ' ' richEditControl1 ' - languageInfo1.Culture = New System.Globalization.CultureInfo("de") - languageInfo2.Culture = New System.Globalization.CultureInfo("pt") - languageInfo3.Culture = New System.Globalization.CultureInfo("es") - behaviorManager1.SetBehaviors(richEditControl1, New DevExpress.Utils.Behaviors.Behavior() { CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.SummarizeBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditSummarizeBehaviorSource), New Object() { DevExpress.AIIntegration.SummarizeBehaviorMode.Abstractive, Nothing }), DevExpress.AIIntegration.WinForms.SummarizeBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.TranslateBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditTranslateBehaviorSource), New Object() { New DevExpress.AIIntegration.Desktop.LanguageInfo() { languageInfo1, languageInfo2, languageInfo3 }, Nothing }), DevExpress.AIIntegration.WinForms.TranslateBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ToneStyleBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditToneStyleBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ToneStyleBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ProofreadBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditProofreadBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ProofreadBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.RewriteStyleBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditRewriteStyleBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.RewriteStyleBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ExpandBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditExpandBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ExpandBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ShortenBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditShortenBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ShortenBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.ExplainBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditExplainBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.ExplainBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.CustomRequestBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditCustomRequestBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.GenerateDescriptionBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditGenerateDescriptionBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.GenerateDescriptionBehavior), CType(DevExpress.Utils.Behaviors.Behavior.Create(GetType(DevExpress.AIIntegration.WinForms.GenerateAltTextBehavior), GetType(DevExpress.AIIntegration.WinForms.RichEditGenerateAltTextBehaviorSource), New Object() { Nothing }), DevExpress.AIIntegration.WinForms.GenerateAltTextBehavior) }) + languageInfo1.Culture = New System.Globalization.CultureInfo("pt") + languageInfo2.Culture = New System.Globalization.CultureInfo("es") + languageInfo3.Culture = New System.Globalization.CultureInfo("de") + behaviorManager1.SetBehaviors(richEditControl1, New DevExpress.Utils.Behaviors.Behavior() { DevExpress.AIIntegration.WinForms.ExpandBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditExpandBehaviorSource)), DevExpress.AIIntegration.WinForms.ShortenBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditShortenBehaviorSource)), DevExpress.AIIntegration.WinForms.SummarizeBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditSummarizeBehaviorSource), DevExpress.AIIntegration.SummarizationMode.Abstractive), DevExpress.AIIntegration.WinForms.ExplainBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditExplainBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeToneBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditChangeToneBehaviorSource)), DevExpress.AIIntegration.WinForms.ProofreadBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditProofreadBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeStyleBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditChangeStyleBehaviorSource)), DevExpress.AIIntegration.WinForms.TranslateBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditTranslateBehaviorSource), New DevExpress.AIIntegration.Desktop.LanguageInfo() { languageInfo1, languageInfo2, languageInfo3 }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditCustomRequestBehaviorSource)), DevExpress.AIIntegration.WinForms.GenerateImageDescriptionBehavior.Create(GetType(DevExpress.AIIntegration.WinForms.RichEditGenerateDescriptionBehaviorSource)) }) richEditControl1.Dock = DockStyle.Fill - richEditControl1.Location = New Point(0, 292) + richEditControl1.Location = New Point(0, 231) + richEditControl1.Margin = New Padding(2, 2, 2, 2) richEditControl1.MenuManager = ribbonControl1 richEditControl1.Name = "richEditControl1" richEditControl1.Options.DocumentSaveOptions.CurrentFormat = DevExpress.XtraRichEdit.DocumentFormat.PlainText - richEditControl1.Size = New Size(1895, 1431) + richEditControl1.Size = New Size(1421, 1004) richEditControl1.TabIndex = 0 richEditControl1.Text = "Text" ' - ' richEditBarController1 - ' - richEditBarController1.BarItems.Add(undoItem1) - richEditBarController1.BarItems.Add(redoItem1) - richEditBarController1.BarItems.Add(fileNewItem1) - richEditBarController1.BarItems.Add(fileOpenItem1) - richEditBarController1.BarItems.Add(fileSaveItem1) - richEditBarController1.BarItems.Add(fileSaveAsItem1) - richEditBarController1.BarItems.Add(quickPrintItem1) - richEditBarController1.BarItems.Add(printItem1) - richEditBarController1.BarItems.Add(printPreviewItem1) - richEditBarController1.BarItems.Add(encryptDocumentItem1) - richEditBarController1.BarItems.Add(showDocumentPropertiesFormItem1) - richEditBarController1.BarItems.Add(pasteItem1) - richEditBarController1.BarItems.Add(cutItem1) - richEditBarController1.BarItems.Add(copyItem1) - richEditBarController1.BarItems.Add(pasteSpecialItem1) - richEditBarController1.BarItems.Add(changeFontNameItem1) - richEditBarController1.BarItems.Add(changeFontSizeItem1) - richEditBarController1.BarItems.Add(fontSizeIncreaseItem1) - richEditBarController1.BarItems.Add(fontSizeDecreaseItem1) - richEditBarController1.BarItems.Add(toggleFontBoldItem1) - richEditBarController1.BarItems.Add(toggleFontItalicItem1) - richEditBarController1.BarItems.Add(toggleFontUnderlineItem1) - richEditBarController1.BarItems.Add(toggleFontDoubleUnderlineItem1) - richEditBarController1.BarItems.Add(toggleFontStrikeoutItem1) - richEditBarController1.BarItems.Add(toggleFontDoubleStrikeoutItem1) - richEditBarController1.BarItems.Add(toggleFontSuperscriptItem1) - richEditBarController1.BarItems.Add(toggleFontSubscriptItem1) - richEditBarController1.BarItems.Add(changeFontColorItem1) - richEditBarController1.BarItems.Add(changeFontHighlightColorItem1) - richEditBarController1.BarItems.Add(makeTextUpperCaseItem1) - richEditBarController1.BarItems.Add(makeTextLowerCaseItem1) - richEditBarController1.BarItems.Add(capitalizeEachWordCaseItem1) - richEditBarController1.BarItems.Add(toggleTextCaseItem1) - richEditBarController1.BarItems.Add(changeTextCaseItem1) - richEditBarController1.BarItems.Add(clearFormattingItem1) - richEditBarController1.BarItems.Add(toggleBulletedListItem1) - richEditBarController1.BarItems.Add(toggleNumberingListItem1) - richEditBarController1.BarItems.Add(toggleMultiLevelListItem1) - richEditBarController1.BarItems.Add(decreaseIndentItem1) - richEditBarController1.BarItems.Add(increaseIndentItem1) - richEditBarController1.BarItems.Add(rtlToggleBulletedListItem1) - richEditBarController1.BarItems.Add(rtlToggleNumberingListItem1) - richEditBarController1.BarItems.Add(rtlToggleMultiLevelListItem1) - richEditBarController1.BarItems.Add(rtlDecreaseIndentItem1) - richEditBarController1.BarItems.Add(rtlIncreaseIndentItem1) - richEditBarController1.BarItems.Add(toggleParagraphLeftToRightItem1) - richEditBarController1.BarItems.Add(toggleParagraphRightToLeftItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentLeftItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentCenterItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentRightItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyLowItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyMediumItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyHighItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyGroupItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentDistributeItem1) - richEditBarController1.BarItems.Add(toggleParagraphAlignmentThaiDistributeItem1) - richEditBarController1.BarItems.Add(toggleShowWhitespaceItem1) - richEditBarController1.BarItems.Add(setSingleParagraphSpacingItem1) - richEditBarController1.BarItems.Add(setSesquialteralParagraphSpacingItem1) - richEditBarController1.BarItems.Add(setDoubleParagraphSpacingItem1) - richEditBarController1.BarItems.Add(showLineSpacingFormItem1) - richEditBarController1.BarItems.Add(addSpacingBeforeParagraphItem1) - richEditBarController1.BarItems.Add(removeSpacingBeforeParagraphItem1) - richEditBarController1.BarItems.Add(addSpacingAfterParagraphItem1) - richEditBarController1.BarItems.Add(removeSpacingAfterParagraphItem1) - richEditBarController1.BarItems.Add(changeParagraphLineSpacingItem1) - richEditBarController1.BarItems.Add(changeParagraphBackColorItem1) - richEditBarController1.BarItems.Add(galleryChangeStyleItem1) - richEditBarController1.BarItems.Add(findItem1) - richEditBarController1.BarItems.Add(replaceItem1) - richEditBarController1.BarItems.Add(insertPageBreakItem21) - richEditBarController1.BarItems.Add(insertTableItem1) - richEditBarController1.BarItems.Add(insertFloatingPictureItem1) - richEditBarController1.BarItems.Add(insertBookmarkItem1) - richEditBarController1.BarItems.Add(insertHyperlinkItem1) - richEditBarController1.BarItems.Add(editPageHeaderItem1) - richEditBarController1.BarItems.Add(editPageFooterItem1) - richEditBarController1.BarItems.Add(insertPageNumberItem1) - richEditBarController1.BarItems.Add(insertPageCountItem1) - richEditBarController1.BarItems.Add(insertTextBoxItem1) - richEditBarController1.BarItems.Add(insertObjectItem1) - richEditBarController1.BarItems.Add(insertSymbolItem1) - richEditBarController1.Control = richEditControl1 - ' ' ribbonControl1 ' + ribbonControl1.EmptyAreaImageOptions.ImagePadding = New Padding(22, 23, 22, 23) ribbonControl1.ExpandCollapseItem.Id = 0 ribbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() { ribbonControl1.ExpandCollapseItem, undoItem1, redoItem1, fileNewItem1, fileOpenItem1, fileSaveItem1, fileSaveAsItem1, quickPrintItem1, printItem1, printPreviewItem1, encryptDocumentItem1, showDocumentPropertiesFormItem1, pasteItem1, cutItem1, copyItem1, pasteSpecialItem1, barButtonGroup1, changeFontNameItem1, changeFontSizeItem1, fontSizeIncreaseItem1, fontSizeDecreaseItem1, barButtonGroup2, toggleFontBoldItem1, toggleFontItalicItem1, toggleFontUnderlineItem1, toggleFontDoubleUnderlineItem1, toggleFontStrikeoutItem1, toggleFontDoubleStrikeoutItem1, toggleFontSuperscriptItem1, toggleFontSubscriptItem1, barButtonGroup3, changeFontColorItem1, changeFontHighlightColorItem1, changeTextCaseItem1, makeTextUpperCaseItem1, makeTextLowerCaseItem1, capitalizeEachWordCaseItem1, toggleTextCaseItem1, clearFormattingItem1, barButtonGroup4, toggleBulletedListItem1, toggleNumberingListItem1, toggleMultiLevelListItem1, barButtonGroup5, decreaseIndentItem1, increaseIndentItem1, rtlToggleBulletedListItem1, rtlToggleNumberingListItem1, rtlToggleMultiLevelListItem1, rtlDecreaseIndentItem1, rtlIncreaseIndentItem1, toggleParagraphLeftToRightItem1, toggleParagraphRightToLeftItem1, barButtonGroup6, toggleParagraphAlignmentLeftItem1, toggleParagraphAlignmentCenterItem1, toggleParagraphAlignmentRightItem1, toggleParagraphAlignmentJustifyItem1, toggleParagraphAlignmentArabicJustifyGroupItem1, toggleParagraphAlignmentArabicJustifyItem1, toggleParagraphAlignmentJustifyLowItem1, toggleParagraphAlignmentJustifyMediumItem1, toggleParagraphAlignmentJustifyHighItem1, toggleParagraphAlignmentDistributeItem1, toggleParagraphAlignmentThaiDistributeItem1, toggleShowWhitespaceItem1, barButtonGroup7, changeParagraphLineSpacingItem1, setSingleParagraphSpacingItem1, setSesquialteralParagraphSpacingItem1, setDoubleParagraphSpacingItem1, showLineSpacingFormItem1, addSpacingBeforeParagraphItem1, removeSpacingBeforeParagraphItem1, addSpacingAfterParagraphItem1, removeSpacingAfterParagraphItem1, changeParagraphBackColorItem1, galleryChangeStyleItem1, findItem1, replaceItem1, insertPageBreakItem21, insertTableItem1, insertFloatingPictureItem1, insertBookmarkItem1, insertHyperlinkItem1, editPageHeaderItem1, editPageFooterItem1, insertPageNumberItem1, insertPageCountItem1, insertTextBoxItem1, insertObjectItem1, insertSymbolItem1 }) ribbonControl1.Location = New Point(0, 0) + ribbonControl1.Margin = New Padding(2, 2, 2, 2) ribbonControl1.MaxItemId = 92 ribbonControl1.Name = "ribbonControl1" + ribbonControl1.OptionsMenuMinWidth = 247 ribbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() { fileRibbonPage1, homeRibbonPage1, insertRibbonPage1 }) ribbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() { repositoryItemFontEditRichEdit1, repositoryItemRichEditFontSizeEdit1 }) - ribbonControl1.Size = New Size(1895, 292) - ' - ' commonRibbonPageGroup1 - ' - commonRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - commonRibbonPageGroup1.Name = "commonRibbonPageGroup1" - ' - ' fileRibbonPage1 - ' - fileRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { commonRibbonPageGroup1, infoRibbonPageGroup1 }) - fileRibbonPage1.Name = "fileRibbonPage1" + ribbonControl1.Size = New Size(1421, 231) ' ' undoItem1 ' @@ -319,11 +225,6 @@ printPreviewItem1.Id = 9 printPreviewItem1.Name = "printPreviewItem1" ' - ' infoRibbonPageGroup1 - ' - infoRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - infoRibbonPageGroup1.Name = "infoRibbonPageGroup1" - ' ' encryptDocumentItem1 ' encryptDocumentItem1.Id = 10 @@ -334,22 +235,6 @@ showDocumentPropertiesFormItem1.Id = 11 showDocumentPropertiesFormItem1.Name = "showDocumentPropertiesFormItem1" ' - ' clipboardRibbonPageGroup1 - ' - clipboardRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - clipboardRibbonPageGroup1.Name = "clipboardRibbonPageGroup1" - ' - ' homeRibbonPage1 - ' - homeRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { clipboardRibbonPageGroup1, fontRibbonPageGroup1, paragraphRibbonPageGroup1, stylesRibbonPageGroup1, editingRibbonPageGroup1 }) - homeRibbonPage1.Name = "homeRibbonPage1" - reduceOperation1.Behavior = DevExpress.XtraBars.Ribbon.ReduceOperationBehavior.UntilAvailable - reduceOperation1.GroupName = Nothing - reduceOperation1.ItemLinkIndex = 0 - reduceOperation1.ItemLinksCount = 0 - reduceOperation1.Operation = DevExpress.XtraBars.Ribbon.ReduceOperationType.Gallery - homeRibbonPage1.ReduceOperations.Add(reduceOperation1) - ' ' pasteItem1 ' pasteItem1.Id = 19 @@ -370,10 +255,11 @@ pasteSpecialItem1.Id = 22 pasteSpecialItem1.Name = "pasteSpecialItem1" ' - ' fontRibbonPageGroup1 + ' barButtonGroup1 ' - fontRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True - fontRibbonPageGroup1.Name = "fontRibbonPageGroup1" + barButtonGroup1.Id = 12 + barButtonGroup1.Name = "barButtonGroup1" + barButtonGroup1.Tag = "{97BBE334-159B-44d9-A168-0411957565E8}" ' ' changeFontNameItem1 ' @@ -381,12 +267,25 @@ changeFontNameItem1.Id = 23 changeFontNameItem1.Name = "changeFontNameItem1" ' + ' repositoryItemFontEditRichEdit1 + ' + repositoryItemFontEditRichEdit1.AutoHeight = False + repositoryItemFontEditRichEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() { New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }) + repositoryItemFontEditRichEdit1.Name = "repositoryItemFontEditRichEdit1" + ' ' changeFontSizeItem1 ' changeFontSizeItem1.Edit = repositoryItemRichEditFontSizeEdit1 changeFontSizeItem1.Id = 24 changeFontSizeItem1.Name = "changeFontSizeItem1" ' + ' repositoryItemRichEditFontSizeEdit1 + ' + repositoryItemRichEditFontSizeEdit1.AutoHeight = False + repositoryItemRichEditFontSizeEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() { New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }) + repositoryItemRichEditFontSizeEdit1.Control = richEditControl1 + repositoryItemRichEditFontSizeEdit1.Name = "repositoryItemRichEditFontSizeEdit1" + ' ' fontSizeIncreaseItem1 ' fontSizeIncreaseItem1.Id = 25 @@ -397,6 +296,12 @@ fontSizeDecreaseItem1.Id = 26 fontSizeDecreaseItem1.Name = "fontSizeDecreaseItem1" ' + ' barButtonGroup2 + ' + barButtonGroup2.Id = 13 + barButtonGroup2.Name = "barButtonGroup2" + barButtonGroup2.Tag = "{433DA7F0-03E2-4650-9DB5-66DD92D16E39}" + ' ' toggleFontBoldItem1 ' toggleFontBoldItem1.Id = 27 @@ -437,6 +342,12 @@ toggleFontSubscriptItem1.Id = 34 toggleFontSubscriptItem1.Name = "toggleFontSubscriptItem1" ' + ' barButtonGroup3 + ' + barButtonGroup3.Id = 14 + barButtonGroup3.Name = "barButtonGroup3" + barButtonGroup3.Tag = "{DF8C5334-EDE3-47c9-A42C-FE9A9247E180}" + ' ' changeFontColorItem1 ' changeFontColorItem1.Id = 35 @@ -447,6 +358,17 @@ changeFontHighlightColorItem1.Id = 36 changeFontHighlightColorItem1.Name = "changeFontHighlightColorItem1" ' + ' changeTextCaseItem1 + ' + changeTextCaseItem1.Id = 37 + changeTextCaseItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { + New DevExpress.XtraBars.LinkPersistInfo(makeTextUpperCaseItem1), + New DevExpress.XtraBars.LinkPersistInfo(makeTextLowerCaseItem1), + New DevExpress.XtraBars.LinkPersistInfo(capitalizeEachWordCaseItem1), + New DevExpress.XtraBars.LinkPersistInfo(toggleTextCaseItem1) + }) + changeTextCaseItem1.Name = "changeTextCaseItem1" + ' ' makeTextUpperCaseItem1 ' makeTextUpperCaseItem1.Id = 38 @@ -467,62 +389,21 @@ toggleTextCaseItem1.Id = 41 toggleTextCaseItem1.Name = "toggleTextCaseItem1" ' - ' changeTextCaseItem1 - ' - changeTextCaseItem1.Id = 37 - changeTextCaseItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { - New DevExpress.XtraBars.LinkPersistInfo(makeTextUpperCaseItem1), - New DevExpress.XtraBars.LinkPersistInfo(makeTextLowerCaseItem1), - New DevExpress.XtraBars.LinkPersistInfo(capitalizeEachWordCaseItem1), - New DevExpress.XtraBars.LinkPersistInfo(toggleTextCaseItem1) - }) - changeTextCaseItem1.Name = "changeTextCaseItem1" - ' ' clearFormattingItem1 ' clearFormattingItem1.Id = 42 clearFormattingItem1.Name = "clearFormattingItem1" ' - ' barButtonGroup1 + ' barButtonGroup4 ' - barButtonGroup1.Id = 12 - barButtonGroup1.Name = "barButtonGroup1" - barButtonGroup1.Tag = "{97BBE334-159B-44d9-A168-0411957565E8}" + barButtonGroup4.Id = 15 + barButtonGroup4.Name = "barButtonGroup4" + barButtonGroup4.Tag = "{0B3A7A43-3079-4ce0-83A8-3789F5F6DC9F}" ' - ' repositoryItemFontEditRichEdit1 + ' toggleBulletedListItem1 ' - repositoryItemFontEditRichEdit1.AutoHeight = False - repositoryItemFontEditRichEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() { New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }) - repositoryItemFontEditRichEdit1.Name = "repositoryItemFontEditRichEdit1" - ' - ' repositoryItemRichEditFontSizeEdit1 - ' - repositoryItemRichEditFontSizeEdit1.AutoHeight = False - repositoryItemRichEditFontSizeEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() { New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }) - repositoryItemRichEditFontSizeEdit1.Control = richEditControl1 - repositoryItemRichEditFontSizeEdit1.Name = "repositoryItemRichEditFontSizeEdit1" - ' - ' barButtonGroup2 - ' - barButtonGroup2.Id = 13 - barButtonGroup2.Name = "barButtonGroup2" - barButtonGroup2.Tag = "{433DA7F0-03E2-4650-9DB5-66DD92D16E39}" - ' - ' barButtonGroup3 - ' - barButtonGroup3.Id = 14 - barButtonGroup3.Name = "barButtonGroup3" - barButtonGroup3.Tag = "{DF8C5334-EDE3-47c9-A42C-FE9A9247E180}" - ' - ' paragraphRibbonPageGroup1 - ' - paragraphRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True - paragraphRibbonPageGroup1.Name = "paragraphRibbonPageGroup1" - ' - ' toggleBulletedListItem1 - ' - toggleBulletedListItem1.Id = 43 - toggleBulletedListItem1.Name = "toggleBulletedListItem1" + toggleBulletedListItem1.Id = 43 + toggleBulletedListItem1.Name = "toggleBulletedListItem1" ' ' toggleNumberingListItem1 ' @@ -534,6 +415,12 @@ toggleMultiLevelListItem1.Id = 45 toggleMultiLevelListItem1.Name = "toggleMultiLevelListItem1" ' + ' barButtonGroup5 + ' + barButtonGroup5.Id = 16 + barButtonGroup5.Name = "barButtonGroup5" + barButtonGroup5.Tag = "{4747D5AB-2BEB-4ea6-9A1D-8E4FB36F1B40}" + ' ' decreaseIndentItem1 ' decreaseIndentItem1.Id = 46 @@ -579,6 +466,12 @@ toggleParagraphRightToLeftItem1.Id = 54 toggleParagraphRightToLeftItem1.Name = "toggleParagraphRightToLeftItem1" ' + ' barButtonGroup6 + ' + barButtonGroup6.Id = 17 + barButtonGroup6.Name = "barButtonGroup6" + barButtonGroup6.Tag = "{8E89E775-996E-49a0-AADA-DE338E34732E}" + ' ' toggleParagraphAlignmentLeftItem1 ' toggleParagraphAlignmentLeftItem1.Id = 55 @@ -599,6 +492,17 @@ toggleParagraphAlignmentJustifyItem1.Id = 58 toggleParagraphAlignmentJustifyItem1.Name = "toggleParagraphAlignmentJustifyItem1" ' + ' toggleParagraphAlignmentArabicJustifyGroupItem1 + ' + toggleParagraphAlignmentArabicJustifyGroupItem1.Id = 59 + toggleParagraphAlignmentArabicJustifyGroupItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { + New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, toggleParagraphAlignmentArabicJustifyItem1, "", False, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard, "AJ", ""), + New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyLowItem1), + New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyMediumItem1), + New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyHighItem1) + }) + toggleParagraphAlignmentArabicJustifyGroupItem1.Name = "toggleParagraphAlignmentArabicJustifyGroupItem1" + ' ' toggleParagraphAlignmentArabicJustifyItem1 ' toggleParagraphAlignmentArabicJustifyItem1.Id = 60 @@ -619,17 +523,6 @@ toggleParagraphAlignmentJustifyHighItem1.Id = 63 toggleParagraphAlignmentJustifyHighItem1.Name = "toggleParagraphAlignmentJustifyHighItem1" ' - ' toggleParagraphAlignmentArabicJustifyGroupItem1 - ' - toggleParagraphAlignmentArabicJustifyGroupItem1.Id = 59 - toggleParagraphAlignmentArabicJustifyGroupItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { - New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, toggleParagraphAlignmentArabicJustifyItem1, "", False, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard, "AJ", ""), - New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyLowItem1), - New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyMediumItem1), - New DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyHighItem1) - }) - toggleParagraphAlignmentArabicJustifyGroupItem1.Name = "toggleParagraphAlignmentArabicJustifyGroupItem1" - ' ' toggleParagraphAlignmentDistributeItem1 ' toggleParagraphAlignmentDistributeItem1.Id = 64 @@ -645,6 +538,27 @@ toggleShowWhitespaceItem1.Id = 66 toggleShowWhitespaceItem1.Name = "toggleShowWhitespaceItem1" ' + ' barButtonGroup7 + ' + barButtonGroup7.Id = 18 + barButtonGroup7.Name = "barButtonGroup7" + barButtonGroup7.Tag = "{9A8DEAD8-3890-4857-A395-EC625FD02217}" + ' + ' changeParagraphLineSpacingItem1 + ' + changeParagraphLineSpacingItem1.Id = 67 + changeParagraphLineSpacingItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { + New DevExpress.XtraBars.LinkPersistInfo(setSingleParagraphSpacingItem1), + New DevExpress.XtraBars.LinkPersistInfo(setSesquialteralParagraphSpacingItem1), + New DevExpress.XtraBars.LinkPersistInfo(setDoubleParagraphSpacingItem1), + New DevExpress.XtraBars.LinkPersistInfo(showLineSpacingFormItem1), + New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, addSpacingBeforeParagraphItem1, "", False, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard, "B", ""), + New DevExpress.XtraBars.LinkPersistInfo(removeSpacingBeforeParagraphItem1), + New DevExpress.XtraBars.LinkPersistInfo(addSpacingAfterParagraphItem1), + New DevExpress.XtraBars.LinkPersistInfo(removeSpacingAfterParagraphItem1) + }) + changeParagraphLineSpacingItem1.Name = "changeParagraphLineSpacingItem1" + ' ' setSingleParagraphSpacingItem1 ' setSingleParagraphSpacingItem1.Id = 68 @@ -685,55 +599,11 @@ removeSpacingAfterParagraphItem1.Id = 75 removeSpacingAfterParagraphItem1.Name = "removeSpacingAfterParagraphItem1" ' - ' changeParagraphLineSpacingItem1 - ' - changeParagraphLineSpacingItem1.Id = 67 - changeParagraphLineSpacingItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() { - New DevExpress.XtraBars.LinkPersistInfo(setSingleParagraphSpacingItem1), - New DevExpress.XtraBars.LinkPersistInfo(setSesquialteralParagraphSpacingItem1), - New DevExpress.XtraBars.LinkPersistInfo(setDoubleParagraphSpacingItem1), - New DevExpress.XtraBars.LinkPersistInfo(showLineSpacingFormItem1), - New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, addSpacingBeforeParagraphItem1, "", False, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard, "B", ""), - New DevExpress.XtraBars.LinkPersistInfo(removeSpacingBeforeParagraphItem1), - New DevExpress.XtraBars.LinkPersistInfo(addSpacingAfterParagraphItem1), - New DevExpress.XtraBars.LinkPersistInfo(removeSpacingAfterParagraphItem1) - }) - changeParagraphLineSpacingItem1.Name = "changeParagraphLineSpacingItem1" - ' ' changeParagraphBackColorItem1 ' changeParagraphBackColorItem1.Id = 76 changeParagraphBackColorItem1.Name = "changeParagraphBackColorItem1" ' - ' barButtonGroup4 - ' - barButtonGroup4.Id = 15 - barButtonGroup4.Name = "barButtonGroup4" - barButtonGroup4.Tag = "{0B3A7A43-3079-4ce0-83A8-3789F5F6DC9F}" - ' - ' barButtonGroup5 - ' - barButtonGroup5.Id = 16 - barButtonGroup5.Name = "barButtonGroup5" - barButtonGroup5.Tag = "{4747D5AB-2BEB-4ea6-9A1D-8E4FB36F1B40}" - ' - ' barButtonGroup6 - ' - barButtonGroup6.Id = 17 - barButtonGroup6.Name = "barButtonGroup6" - barButtonGroup6.Tag = "{8E89E775-996E-49a0-AADA-DE338E34732E}" - ' - ' barButtonGroup7 - ' - barButtonGroup7.Id = 18 - barButtonGroup7.Name = "barButtonGroup7" - barButtonGroup7.Tag = "{9A8DEAD8-3890-4857-A395-EC625FD02217}" - ' - ' stylesRibbonPageGroup1 - ' - stylesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True - stylesRibbonPageGroup1.Name = "stylesRibbonPageGroup1" - ' ' galleryChangeStyleItem1 ' ' @@ -741,15 +611,10 @@ ' galleryChangeStyleItem1.Gallery.ColumnCount = 10 galleryChangeStyleItem1.Gallery.Groups.AddRange(New DevExpress.XtraBars.Ribbon.GalleryItemGroup() { galleryItemGroup1 }) - galleryChangeStyleItem1.Gallery.ImageSize = New Size(130, 92) + galleryChangeStyleItem1.Gallery.ImageSize = New Size(97, 70) galleryChangeStyleItem1.Id = 77 galleryChangeStyleItem1.Name = "galleryChangeStyleItem1" ' - ' editingRibbonPageGroup1 - ' - editingRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - editingRibbonPageGroup1.Name = "editingRibbonPageGroup1" - ' ' findItem1 ' findItem1.Id = 78 @@ -760,48 +625,21 @@ replaceItem1.Id = 79 replaceItem1.Name = "replaceItem1" ' - ' pagesRibbonPageGroup1 - ' - pagesRibbonPageGroup1.AllowTextClipping = False - pagesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - pagesRibbonPageGroup1.Name = "pagesRibbonPageGroup1" - ' - ' insertRibbonPage1 - ' - insertRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { pagesRibbonPageGroup1, tablesRibbonPageGroup1, illustrationsRibbonPageGroup1, linksRibbonPageGroup1, headerFooterRibbonPageGroup1, textRibbonPageGroup1, symbolsRibbonPageGroup1 }) - insertRibbonPage1.Name = "insertRibbonPage1" - ' ' insertPageBreakItem21 ' insertPageBreakItem21.Id = 80 insertPageBreakItem21.Name = "insertPageBreakItem21" ' - ' tablesRibbonPageGroup1 - ' - tablesRibbonPageGroup1.AllowTextClipping = False - tablesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - tablesRibbonPageGroup1.Name = "tablesRibbonPageGroup1" - ' ' insertTableItem1 ' insertTableItem1.Id = 81 insertTableItem1.Name = "insertTableItem1" ' - ' illustrationsRibbonPageGroup1 - ' - illustrationsRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - illustrationsRibbonPageGroup1.Name = "illustrationsRibbonPageGroup1" - ' ' insertFloatingPictureItem1 ' insertFloatingPictureItem1.Id = 82 insertFloatingPictureItem1.Name = "insertFloatingPictureItem1" ' - ' linksRibbonPageGroup1 - ' - linksRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - linksRibbonPageGroup1.Name = "linksRibbonPageGroup1" - ' ' insertBookmarkItem1 ' insertBookmarkItem1.Id = 83 @@ -812,11 +650,6 @@ insertHyperlinkItem1.Id = 84 insertHyperlinkItem1.Name = "insertHyperlinkItem1" ' - ' headerFooterRibbonPageGroup1 - ' - headerFooterRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - headerFooterRibbonPageGroup1.Name = "headerFooterRibbonPageGroup1" - ' ' editPageHeaderItem1 ' editPageHeaderItem1.Id = 85 @@ -837,11 +670,6 @@ insertPageCountItem1.Id = 88 insertPageCountItem1.Name = "insertPageCountItem1" ' - ' textRibbonPageGroup1 - ' - textRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False - textRibbonPageGroup1.Name = "textRibbonPageGroup1" - ' ' insertTextBoxItem1 ' insertTextBoxItem1.Id = 89 @@ -852,31 +680,223 @@ insertObjectItem1.Id = 90 insertObjectItem1.Name = "insertObjectItem1" ' + ' insertSymbolItem1 + ' + insertSymbolItem1.Id = 91 + insertSymbolItem1.Name = "insertSymbolItem1" + ' + ' fileRibbonPage1 + ' + fileRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { commonRibbonPageGroup1, infoRibbonPageGroup1 }) + fileRibbonPage1.Name = "fileRibbonPage1" + ' + ' commonRibbonPageGroup1 + ' + commonRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + commonRibbonPageGroup1.Name = "commonRibbonPageGroup1" + commonRibbonPageGroup1.Text = "" + ' + ' infoRibbonPageGroup1 + ' + infoRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + infoRibbonPageGroup1.Name = "infoRibbonPageGroup1" + infoRibbonPageGroup1.Text = "" + ' + ' homeRibbonPage1 + ' + homeRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { clipboardRibbonPageGroup1, fontRibbonPageGroup1, paragraphRibbonPageGroup1, stylesRibbonPageGroup1, editingRibbonPageGroup1 }) + homeRibbonPage1.Name = "homeRibbonPage1" + reduceOperation1.Behavior = DevExpress.XtraBars.Ribbon.ReduceOperationBehavior.UntilAvailable + reduceOperation1.GroupName = Nothing + reduceOperation1.ItemLinkIndex = 0 + reduceOperation1.ItemLinksCount = 0 + reduceOperation1.Operation = DevExpress.XtraBars.Ribbon.ReduceOperationType.Gallery + homeRibbonPage1.ReduceOperations.Add(reduceOperation1) + ' + ' clipboardRibbonPageGroup1 + ' + clipboardRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + clipboardRibbonPageGroup1.Name = "clipboardRibbonPageGroup1" + clipboardRibbonPageGroup1.Text = "" + ' + ' fontRibbonPageGroup1 + ' + fontRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True + fontRibbonPageGroup1.Name = "fontRibbonPageGroup1" + fontRibbonPageGroup1.Text = "" + ' + ' paragraphRibbonPageGroup1 + ' + paragraphRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True + paragraphRibbonPageGroup1.Name = "paragraphRibbonPageGroup1" + paragraphRibbonPageGroup1.Text = "" + ' + ' stylesRibbonPageGroup1 + ' + stylesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True + stylesRibbonPageGroup1.Name = "stylesRibbonPageGroup1" + stylesRibbonPageGroup1.Text = "" + ' + ' editingRibbonPageGroup1 + ' + editingRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + editingRibbonPageGroup1.Name = "editingRibbonPageGroup1" + editingRibbonPageGroup1.Text = "" + ' + ' insertRibbonPage1 + ' + insertRibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() { pagesRibbonPageGroup1, tablesRibbonPageGroup1, illustrationsRibbonPageGroup1, linksRibbonPageGroup1, headerFooterRibbonPageGroup1, textRibbonPageGroup1, symbolsRibbonPageGroup1 }) + insertRibbonPage1.Name = "insertRibbonPage1" + ' + ' pagesRibbonPageGroup1 + ' + pagesRibbonPageGroup1.AllowTextClipping = False + pagesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + pagesRibbonPageGroup1.Name = "pagesRibbonPageGroup1" + pagesRibbonPageGroup1.Text = "" + ' + ' tablesRibbonPageGroup1 + ' + tablesRibbonPageGroup1.AllowTextClipping = False + tablesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + tablesRibbonPageGroup1.Name = "tablesRibbonPageGroup1" + tablesRibbonPageGroup1.Text = "" + ' + ' illustrationsRibbonPageGroup1 + ' + illustrationsRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + illustrationsRibbonPageGroup1.Name = "illustrationsRibbonPageGroup1" + illustrationsRibbonPageGroup1.Text = "" + ' + ' linksRibbonPageGroup1 + ' + linksRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + linksRibbonPageGroup1.Name = "linksRibbonPageGroup1" + linksRibbonPageGroup1.Text = "" + ' + ' headerFooterRibbonPageGroup1 + ' + headerFooterRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + headerFooterRibbonPageGroup1.Name = "headerFooterRibbonPageGroup1" + headerFooterRibbonPageGroup1.Text = "" + ' + ' textRibbonPageGroup1 + ' + textRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False + textRibbonPageGroup1.Name = "textRibbonPageGroup1" + textRibbonPageGroup1.Text = "" + ' ' symbolsRibbonPageGroup1 ' symbolsRibbonPageGroup1.AllowTextClipping = False symbolsRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False symbolsRibbonPageGroup1.Name = "symbolsRibbonPageGroup1" + symbolsRibbonPageGroup1.Text = "" ' - ' insertSymbolItem1 + ' richEditBarController1 ' - insertSymbolItem1.Id = 91 - insertSymbolItem1.Name = "insertSymbolItem1" + richEditBarController1.BarItems.Add(undoItem1) + richEditBarController1.BarItems.Add(redoItem1) + richEditBarController1.BarItems.Add(fileNewItem1) + richEditBarController1.BarItems.Add(fileOpenItem1) + richEditBarController1.BarItems.Add(fileSaveItem1) + richEditBarController1.BarItems.Add(fileSaveAsItem1) + richEditBarController1.BarItems.Add(quickPrintItem1) + richEditBarController1.BarItems.Add(printItem1) + richEditBarController1.BarItems.Add(printPreviewItem1) + richEditBarController1.BarItems.Add(encryptDocumentItem1) + richEditBarController1.BarItems.Add(showDocumentPropertiesFormItem1) + richEditBarController1.BarItems.Add(pasteItem1) + richEditBarController1.BarItems.Add(cutItem1) + richEditBarController1.BarItems.Add(copyItem1) + richEditBarController1.BarItems.Add(pasteSpecialItem1) + richEditBarController1.BarItems.Add(changeFontNameItem1) + richEditBarController1.BarItems.Add(changeFontSizeItem1) + richEditBarController1.BarItems.Add(fontSizeIncreaseItem1) + richEditBarController1.BarItems.Add(fontSizeDecreaseItem1) + richEditBarController1.BarItems.Add(toggleFontBoldItem1) + richEditBarController1.BarItems.Add(toggleFontItalicItem1) + richEditBarController1.BarItems.Add(toggleFontUnderlineItem1) + richEditBarController1.BarItems.Add(toggleFontDoubleUnderlineItem1) + richEditBarController1.BarItems.Add(toggleFontStrikeoutItem1) + richEditBarController1.BarItems.Add(toggleFontDoubleStrikeoutItem1) + richEditBarController1.BarItems.Add(toggleFontSuperscriptItem1) + richEditBarController1.BarItems.Add(toggleFontSubscriptItem1) + richEditBarController1.BarItems.Add(changeFontColorItem1) + richEditBarController1.BarItems.Add(changeFontHighlightColorItem1) + richEditBarController1.BarItems.Add(makeTextUpperCaseItem1) + richEditBarController1.BarItems.Add(makeTextLowerCaseItem1) + richEditBarController1.BarItems.Add(capitalizeEachWordCaseItem1) + richEditBarController1.BarItems.Add(toggleTextCaseItem1) + richEditBarController1.BarItems.Add(changeTextCaseItem1) + richEditBarController1.BarItems.Add(clearFormattingItem1) + richEditBarController1.BarItems.Add(toggleBulletedListItem1) + richEditBarController1.BarItems.Add(toggleNumberingListItem1) + richEditBarController1.BarItems.Add(toggleMultiLevelListItem1) + richEditBarController1.BarItems.Add(decreaseIndentItem1) + richEditBarController1.BarItems.Add(increaseIndentItem1) + richEditBarController1.BarItems.Add(rtlToggleBulletedListItem1) + richEditBarController1.BarItems.Add(rtlToggleNumberingListItem1) + richEditBarController1.BarItems.Add(rtlToggleMultiLevelListItem1) + richEditBarController1.BarItems.Add(rtlDecreaseIndentItem1) + richEditBarController1.BarItems.Add(rtlIncreaseIndentItem1) + richEditBarController1.BarItems.Add(toggleParagraphLeftToRightItem1) + richEditBarController1.BarItems.Add(toggleParagraphRightToLeftItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentLeftItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentCenterItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentRightItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyLowItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyMediumItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyHighItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyGroupItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentDistributeItem1) + richEditBarController1.BarItems.Add(toggleParagraphAlignmentThaiDistributeItem1) + richEditBarController1.BarItems.Add(toggleShowWhitespaceItem1) + richEditBarController1.BarItems.Add(setSingleParagraphSpacingItem1) + richEditBarController1.BarItems.Add(setSesquialteralParagraphSpacingItem1) + richEditBarController1.BarItems.Add(setDoubleParagraphSpacingItem1) + richEditBarController1.BarItems.Add(showLineSpacingFormItem1) + richEditBarController1.BarItems.Add(addSpacingBeforeParagraphItem1) + richEditBarController1.BarItems.Add(removeSpacingBeforeParagraphItem1) + richEditBarController1.BarItems.Add(addSpacingAfterParagraphItem1) + richEditBarController1.BarItems.Add(removeSpacingAfterParagraphItem1) + richEditBarController1.BarItems.Add(changeParagraphLineSpacingItem1) + richEditBarController1.BarItems.Add(changeParagraphBackColorItem1) + richEditBarController1.BarItems.Add(galleryChangeStyleItem1) + richEditBarController1.BarItems.Add(findItem1) + richEditBarController1.BarItems.Add(replaceItem1) + richEditBarController1.BarItems.Add(insertPageBreakItem21) + richEditBarController1.BarItems.Add(insertTableItem1) + richEditBarController1.BarItems.Add(insertFloatingPictureItem1) + richEditBarController1.BarItems.Add(insertBookmarkItem1) + richEditBarController1.BarItems.Add(insertHyperlinkItem1) + richEditBarController1.BarItems.Add(editPageHeaderItem1) + richEditBarController1.BarItems.Add(editPageFooterItem1) + richEditBarController1.BarItems.Add(insertPageNumberItem1) + richEditBarController1.BarItems.Add(insertPageCountItem1) + richEditBarController1.BarItems.Add(insertTextBoxItem1) + richEditBarController1.BarItems.Add(insertObjectItem1) + richEditBarController1.BarItems.Add(insertSymbolItem1) + richEditBarController1.Control = richEditControl1 ' ' RichEditForm ' - AutoScaleDimensions = New SizeF(12F, 25F) + AutoScaleDimensions = New SizeF(9F, 19F) AutoScaleMode = AutoScaleMode.Font - ClientSize = New Size(1895, 1723) + ClientSize = New Size(1421, 1235) Controls.Add(richEditControl1) Controls.Add(ribbonControl1) + Margin = New Padding(2, 2, 2, 2) Name = "RichEditForm" + Ribbon = ribbonControl1 Text = "RichEditForm" - DirectCast(richEditBarController1, System.ComponentModel.ISupportInitialize).EndInit() - DirectCast(behaviorManager1, System.ComponentModel.ISupportInitialize).EndInit() DirectCast(ribbonControl1, System.ComponentModel.ISupportInitialize).EndInit() DirectCast(repositoryItemFontEditRichEdit1, System.ComponentModel.ISupportInitialize).EndInit() DirectCast(repositoryItemRichEditFontSizeEdit1, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(richEditBarController1, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(behaviorManager1, System.ComponentModel.ISupportInitialize).EndInit() ResumeLayout(False) PerformLayout() End Sub diff --git a/VB/winforms-ai-extensions/WinForms-AI-Extensions.vbproj b/VB/winforms-ai-extensions/WinForms-AI-Extensions.vbproj index b92cc6e..6171772 100644 --- a/VB/winforms-ai-extensions/WinForms-AI-Extensions.vbproj +++ b/VB/winforms-ai-extensions/WinForms-AI-Extensions.vbproj @@ -1,38 +1,35 @@  - - WinExe - net8.0-windows - - enable - true - enable - On - Binary - Off - On - + + WinExe + net8.0-windows + + enable + true + enable + On + Binary + Off + On + - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - Always - - + + + Always + + \ No newline at end of file diff --git a/VB/wpf-ai-extensions/App.xaml.vb b/VB/wpf-ai-extensions/App.xaml.vb index dff57ff..b092df5 100644 --- a/VB/wpf-ai-extensions/App.xaml.vb +++ b/VB/wpf-ai-extensions/App.xaml.vb @@ -36,7 +36,12 @@ Namespace WPF_AI_Extensions ApplicationThemeHelper.ApplicationThemeName = "Office2019Colorful" - AIExtensionsContainerDesktop.Default.RegisterChatClientOpenAIService(New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)), DeploymentName) + + '''To register Ollama + 'OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/api/chat", "llama3.1"); + + Dim azureOpenAIClient As New AzureOpenAIClient(New Uri(AzureOpenAIEndpoint), New System.ClientModel.ApiKeyCredential(AzureOpenAIKey)) + AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient.AsChatClient(DeploymentName)) End Sub End Class End Namespace diff --git a/VB/wpf-ai-extensions/MainWindow.xaml b/VB/wpf-ai-extensions/MainWindow.xaml index b2f287a..2341692 100644 --- a/VB/wpf-ai-extensions/MainWindow.xaml +++ b/VB/wpf-ai-extensions/MainWindow.xaml @@ -6,8 +6,7 @@ xmlns:local="clr-namespace:WPF_AI_Extensions" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" - xmlns:wpf="clr-namespace:DevExpress.AIIntegration.Wpf;assembly=DevExpress.AIIntegration.Wpf.v24.2" - xmlns:desktop="clr-namespace:DevExpress.AIIntegration.Desktop;assembly=DevExpress.AIIntegration.Desktop.v24.2" + xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> @@ -16,23 +15,25 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/VB/wpf-ai-extensions/RichEditWindow.xaml b/VB/wpf-ai-extensions/RichEditWindow.xaml index cab79ea..50251bf 100644 --- a/VB/wpf-ai-extensions/RichEditWindow.xaml +++ b/VB/wpf-ai-extensions/RichEditWindow.xaml @@ -5,27 +5,28 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WPF_AI_Extensions" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" - xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit" - xmlns:wpfo="clr-namespace:DevExpress.AIIntegration.Wpf.Office;assembly=DevExpress.AIIntegration.Wpf.v24.2" - xmlns:desktop="clr-namespace:DevExpress.AIIntegration.Desktop;assembly=DevExpress.AIIntegration.Desktop.v24.2" + xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit" + xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai" mc:Ignorable="d" Title="RichEditWindow" Height="450" Width="800"> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/VB/wpf-ai-extensions/WPF-AI-Extensions.vbproj b/VB/wpf-ai-extensions/WPF-AI-Extensions.vbproj index 0c3be2d..eed79b6 100644 --- a/VB/wpf-ai-extensions/WPF-AI-Extensions.vbproj +++ b/VB/wpf-ai-extensions/WPF-AI-Extensions.vbproj @@ -21,9 +21,10 @@ - - - + + + +