Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WinForms/VB/LayoutMainDemo/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WinForms/VB/LayoutMainDemo/Modules/Multilanguage.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Data
Imports System.Windows.Forms

Namespace DevExpress.XtraLayout.Demos
	''' <summary>
	''' Summary description for Multilanguage.
	''' </summary>
	Public Partial Class Multilanguage
		Inherits DevExpress.XtraLayout.Demos.TutorialControl
		Public Sub New()
			' This call is required by the Windows.Forms Form Designer.
			InitializeComponent()

			' TODO: Add any initialization after the InitForm call

		End Sub

		Private oldCulture As System.Globalization.CultureInfo
		Private Sub simpleButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles simpleButton1.Click
			ShowForm("en")
		End Sub

		Protected Sub SaveCulture()
			oldCulture = System.Threading.Thread.CurrentThread.CurrentUICulture
		End Sub
		Protected Sub RestoreCulture()
            System.Threading.Thread.CurrentThread.CurrentUICulture = oldCulture
		End Sub
		Protected Sub ShowForm(ByVal culture As String)
			SaveCulture()
			System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo(culture)
			Dim form As Form = New MultilanguageForm()
			form.ShowDialog()
			RestoreCulture()
		End Sub
		Private Sub simpleButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles simpleButton2.Click
			ShowForm("de-DE")
		End Sub
	End Class
End Namespace