EgtWPFLib 1.6l5 :
- primo rilascio.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<UserControl x:Class="EgtCalculator"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
Height="320" Width="341.3" Background="Transparent" Focusable="False" >
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="EgtWPFLibDictionary.xaml"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="DarkGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="4.5*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1" TextAlignment="Right" FontSize="20"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="SevenBtn" Grid.Column="0" Grid.Row="0" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="7"/>
|
||||
<Button Name="EightBtn" Grid.Column="1" Grid.Row="0" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="8"/>
|
||||
<Button Name="NineBtn" Grid.Column="2" Grid.Row="0" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="9"/>
|
||||
<Button Name="MinusBtn" Grid.Column="3" Grid.Row="0" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="-"/>
|
||||
<Button Name="BackspaceBtn" Grid.Column="4" Grid.Row="0">
|
||||
<Image Source="/Resources/EgtCalculator/DeleteArrow.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="FourBtn" Grid.Column="0" Grid.Row="1" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="4"/>
|
||||
<Button Name="FiveBtn" Grid.Column="1" Grid.Row="1" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="5"/>
|
||||
<Button Name="SixBtn" Grid.Column="2" Grid.Row="1" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="6"/>
|
||||
<Button Name="PlusBtn" Grid.Column="3" Grid.Row="1" Grid.RowSpan="2"
|
||||
FontSize="{DynamicResource EgtCalculator_FontSize}" Content="+"/>
|
||||
<Button Name="TimesBtn" Grid.Column="4" Grid.Row="1" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="*"/>
|
||||
<Button Name="OneBtn" Grid.Column="0" Grid.Row="2" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="1"/>
|
||||
<Button Name="TwoBtn" Grid.Column="1" Grid.Row="2" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="2"/>
|
||||
<Button Name="ThreeBtn" Grid.Column="2" Grid.Row="2" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="3"/>
|
||||
<Button Name="DividedBtn" Grid.Column="4" Grid.Row="2" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="/"/>
|
||||
<Button Name="ZeroBtn" Grid.Column="0" Grid.Row="3" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="0"/>
|
||||
<Button Name="DotBtn" Grid.Column="1" Grid.Row="3" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="."/>
|
||||
<Button Name="EqualsBtn" Grid.Column="2" Grid.Row="3" FontSize="{DynamicResource EgtCalculator_FontSize}"
|
||||
Content="="/>
|
||||
<Button Name="OkBtn" Grid.Column="3" Grid.Row="3" >
|
||||
<Image Source="/Resources/EgtCalculator/V.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="4" Grid.Row="3" >
|
||||
<Image Source="/Resources/EgtCalculator/X.png" Style="{StaticResource ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,182 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2014-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : EgtCalculator.xaml.vb Data : 28.12.15 Versione : 1
|
||||
' Contenuto : Calcolatrice touch per EgtWPFLib.
|
||||
'
|
||||
' Creato da : Emmanuele Sassi
|
||||
' Modificato da :
|
||||
'
|
||||
' Modifiche :
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class EgtCalculator
|
||||
|
||||
Private Const ASPECTRATIO = 1
|
||||
Private Const WIDTHFONTRATIO = 22 / 426.5
|
||||
Private Const BUTTONIMAGERATIO = 65 / 85.3
|
||||
|
||||
' Variabile statica che indica se è già aperta una tastiera
|
||||
Private Shared bIsActive As Boolean = False
|
||||
|
||||
' Riferimento alla TxBx che ha attivato la tastiera
|
||||
Private m_SourceTxBx As Primitives.TextBoxBase
|
||||
|
||||
' Stringa che contiene il messaggio d'errore della calcolatrice
|
||||
Private m_sErrorString As String = String.Empty
|
||||
|
||||
' Flag che indica se c'è stato un errore
|
||||
Private m_bErrorState As Boolean = False
|
||||
|
||||
' Variabile che conserva l'espressione prima di valutarla per poterla riscrivere nel caso generi un errore
|
||||
Private m_sBeforeEvaluate As String = String.Empty
|
||||
|
||||
' Variabile che contiene il risultato numerico
|
||||
Public m_DoubleResult As Double
|
||||
' Evento che indica la chiusura della tastiera
|
||||
Public Event EgtClosed As EventHandler
|
||||
|
||||
'Funzione che restituisce il valore di bIsActive per usarlo all'esterno della libreria
|
||||
Public Shared Function GetbIsActive()
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
#Region "Constructors and support functions"
|
||||
|
||||
Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window)
|
||||
InitializeComponent()
|
||||
'Me.Owner = Owner
|
||||
bIsActive = True
|
||||
m_SourceTxBx = TextBoxBase
|
||||
Me.Width = Owner.ActualWidth / 4
|
||||
Me.Height = Me.Width * (1 / ASPECTRATIO)
|
||||
Dim FontSize As Double = Width * WIDTHFONTRATIO
|
||||
Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
'Me.Top = Owner.Top + (Owner.Height / 2 - Me.Height / 2)
|
||||
'Me.Left = Owner.Left + (Owner.Width / 2 - Me.Width / 2)
|
||||
End Sub
|
||||
|
||||
Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window, Width As Double)
|
||||
InitializeComponent()
|
||||
'Me.Owner = Owner
|
||||
bIsActive = True
|
||||
m_SourceTxBx = TextBoxBase
|
||||
Me.Width = Width
|
||||
Me.Height = Width * (1 / ASPECTRATIO)
|
||||
Dim FontSize As Double = Width * WIDTHFONTRATIO
|
||||
Me.Resources("EgtCalculator_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
Dim IconWidth As Double = Width / 5 * BUTTONIMAGERATIO
|
||||
Me.Resources("EgtCalculator_IconWidth") = New FontSizeConverter().ConvertFrom(CStr(IconWidth))
|
||||
'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub NumericKeyboardWD_Initialized(sender As Object, e As EventArgs)
|
||||
m_sErrorString = EgtMsg(10200 + 1)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub AddCharacter(KeyCharacter As String)
|
||||
ValueTxBx.Focus()
|
||||
Dim EventArgs = New TextCompositionEventArgs(Keyboard.PrimaryDevice, New TextComposition(InputManager.Current, Keyboard.FocusedElement, KeyCharacter))
|
||||
EventArgs.RoutedEvent = TextInputEvent
|
||||
InputManager.Current.ProcessInput(EventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub NumberBtn_Click(sender As Object, e As RoutedEventArgs) Handles OneBtn.Click, TwoBtn.Click, ThreeBtn.Click, FourBtn.Click, FiveBtn.Click, SixBtn.Click, SevenBtn.Click, EightBtn.Click, NineBtn.Click, ZeroBtn.Click,
|
||||
PlusBtn.Click, MinusBtn.Click, DotBtn.Click, TimesBtn.Click, DividedBtn.Click
|
||||
If m_bErrorState Then
|
||||
m_bErrorState = False
|
||||
ValueTxBx.Foreground = Brushes.Black
|
||||
ValueTxBx.TextAlignment = TextAlignment.Right
|
||||
ValueTxBx.Text = m_sErrorString
|
||||
End If
|
||||
Dim KeyButton As Button = e.Source
|
||||
Dim Key As String = String.Empty
|
||||
If ReturnKeyNumber(KeyButton, Key) Then
|
||||
AddCharacter(Key)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReturnKeyNumber(KeyButton As Button, ByRef Key As String)
|
||||
Select Case KeyButton.Name
|
||||
Case OneBtn.Name
|
||||
Key = "1"
|
||||
Return True
|
||||
Case TwoBtn.Name
|
||||
Key = "2"
|
||||
Return True
|
||||
Case ThreeBtn.Name
|
||||
Key = "3"
|
||||
Return True
|
||||
Case FourBtn.Name
|
||||
Key = "4"
|
||||
Return True
|
||||
Case FiveBtn.Name
|
||||
Key = "5"
|
||||
Return True
|
||||
Case SixBtn.Name
|
||||
Key = "6"
|
||||
Return True
|
||||
Case SevenBtn.Name
|
||||
Key = "7"
|
||||
Return True
|
||||
Case EightBtn.Name
|
||||
Key = "8"
|
||||
Return True
|
||||
Case NineBtn.Name
|
||||
Key = "9"
|
||||
Return True
|
||||
Case ZeroBtn.Name
|
||||
Key = "0"
|
||||
Return True
|
||||
Case PlusBtn.Name
|
||||
Key = "+"
|
||||
Return True
|
||||
Case MinusBtn.Name
|
||||
Key = "-"
|
||||
Return True
|
||||
Case DotBtn.Name
|
||||
Key = "."
|
||||
Return True
|
||||
Case TimesBtn.Name
|
||||
Key = "*"
|
||||
Return True
|
||||
Case DividedBtn.Name
|
||||
Key = "/"
|
||||
Return True
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub BackspaceBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackspaceBtn.Click
|
||||
ValueTxBx.Focus()
|
||||
Dim eventArgs As New KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Back)
|
||||
|
||||
eventArgs.RoutedEvent = Keyboard.KeyDownEvent
|
||||
|
||||
InputManager.Current.ProcessInput(eventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Evaluate()
|
||||
m_sBeforeEvaluate = ValueTxBx.Text
|
||||
Dim bOk As Boolean = EgtUILib.EgtLuaEvalNumExpr(ValueTxBx.Text, m_DoubleResult)
|
||||
If bOk Then
|
||||
ValueTxBx.Text = m_DoubleResult.ToString(CultureInfo.InvariantCulture)
|
||||
m_sBeforeEvaluate = String.Empty
|
||||
Else
|
||||
m_bErrorState = True
|
||||
ValueTxBx.Foreground = Brushes.Red
|
||||
ValueTxBx.TextAlignment = TextAlignment.Left
|
||||
ValueTxBx.Text = m_sErrorString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,137 @@
|
||||
<UserControl x:Class="EgtKeyboard"
|
||||
x:Name="EgtKeyboard"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
Height="426.5" Width="1024" Background="Transparent" Focusable="False" >
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="EgtWPFLibDictionary.xaml"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="DarkGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Grid Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackslashBtn" Grid.Column="0" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="\"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="10" >
|
||||
<Button Name="OneBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="1"/>
|
||||
<Button Name="TwoBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="2"/>
|
||||
<Button Name="ThreeBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="3"/>
|
||||
<Button Name="FourBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="4"/>
|
||||
<Button Name="FiveBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="5"/>
|
||||
<Button Name="SixBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="6"/>
|
||||
<Button Name="SevenBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="7"/>
|
||||
<Button Name="EightBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="8"/>
|
||||
<Button Name="NineBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="9"/>
|
||||
<Button Name="ZeroBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="BackspaceBtn" Grid.Column="4" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Backspace"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Grid.Row="1" Columns="12">
|
||||
<Button Name="TabBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Tab"/>
|
||||
<Button Name="qBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="q"/>
|
||||
<Button Name="wBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="w"/>
|
||||
<Button Name="eBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="e"/>
|
||||
<Button Name="rBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="r"/>
|
||||
<Button Name="tBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="t"/>
|
||||
<Button Name="yBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="y"/>
|
||||
<Button Name="uBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="u"/>
|
||||
<Button Name="iBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="i"/>
|
||||
<Button Name="oBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="o"/>
|
||||
<Button Name="pBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="p"/>
|
||||
<Button Name="Enter1Btn" FontSize="{DynamicResource EgtKeyboard_FontSize}" BorderThickness="1,1,1,0" />
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Grid.Row="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="CapsLockBtn" Grid.Column="0" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Caps Lock"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="10" >
|
||||
<Button Name="aBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="a" Focusable="False"/>
|
||||
<Button Name="sBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="s"/>
|
||||
<Button Name="dBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="d"/>
|
||||
<Button Name="fBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="f"/>
|
||||
<Button Name="gBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="g"/>
|
||||
<Button Name="hBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="h"/>
|
||||
<Button Name="jBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="j"/>
|
||||
<Button Name="kBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="k"/>
|
||||
<Button Name="lBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="l"/>
|
||||
<Button Name="PlusBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" BorderThickness="1,2,1,1" Margin="0,-1,0,0" Content="+"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="Enter2Btn" Grid.Column="2" FontSize="{DynamicResource EgtKeyboard_FontSize}" BorderThickness="1,0,1,1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="3" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
<ColumnDefinition Width="2.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Shift1Btn" Grid.Column="0" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Shift" />
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="9" >
|
||||
<Button Name="MinorBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="<"/>
|
||||
<Button Name="zBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="z"/>
|
||||
<Button Name="xBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="x"/>
|
||||
<Button Name="cBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="c"/>
|
||||
<Button Name="vBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="v"/>
|
||||
<Button Name="bBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="b"/>
|
||||
<Button Name="nBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="n"/>
|
||||
<Button Name="mBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="m"/>
|
||||
<Button Name="MinusBtn" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="-"/>
|
||||
</UniformGrid>
|
||||
|
||||
<ToggleButton Name="Shift2Btn" Grid.Column="2" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Shift"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5.4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="DotBtn" Grid.Column="1" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="."/>
|
||||
<Button Name="CommaBtn" Grid.Column="2" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content=","/>
|
||||
<ToggleButton Name="AltBtn" Grid.Column="3" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Alt"/>
|
||||
<Button Name="SpaceBtn" Grid.Column="4" FontSize="{DynamicResource EgtKeyboard_FontSize}" />
|
||||
<ToggleButton Name="ClearBtn" Grid.Column="5" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Clear"/>
|
||||
<Button Name="CancBtn" Grid.Column="6" FontSize="{DynamicResource EgtKeyboard_FontSize}" Content="Canc"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,647 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2014-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : EgtKeyboard.xaml.vb Data : 13.12.15 Versione : 1
|
||||
' Contenuto : Tastiera alfanumerica ridotta touch per EgtWPFLib.
|
||||
'
|
||||
' Creato da : Emmanuele Sassi
|
||||
' Modificato da :
|
||||
'
|
||||
' Modifiche :
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Public Class EgtKeyboard
|
||||
|
||||
Private Const ASPECTRATIO = 12 / 5
|
||||
Private Const WIDTHFONTRATIO = 22 / 1024
|
||||
Private Const OFFSET = 3 'Offset per non mostrare la tastiera attaccata alla TextboxBase
|
||||
|
||||
' Variabile statica che indica se è già aperta una tastiera
|
||||
Private Shared bIsActive As Boolean = False
|
||||
|
||||
' Riferimento alla TxBx che ha attivato la tastiera
|
||||
Private m_SourceTxBx As Primitives.TextBoxBase
|
||||
|
||||
' Variabili di posizionamento
|
||||
Private m_Position As Positions = Positions.CenteredInOwner
|
||||
Private m_RelativeToSourcePosition As RelativeToSourcePositions = RelativeToSourcePositions.Bottom
|
||||
Private m_SourceTop As Double = 0
|
||||
Private m_SourceLeft As Double = 0
|
||||
|
||||
' Variabili che contengono lo stato dei tasti Shift, Alt e Caps Lock
|
||||
Private m_bShift As Boolean = False
|
||||
Private m_bAlt As Boolean = False
|
||||
Private m_bCapsLock As Boolean = False
|
||||
|
||||
' Evento che indica la chiusura della tastiera
|
||||
Public Event EgtClosed As EventHandler
|
||||
|
||||
'Funzione che restituisce il valore di bIsActive per usarlo all'esterno della libreria
|
||||
Public Shared Function GetbIsActive()
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
#Region "Constructors and support functions"
|
||||
|
||||
Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window)
|
||||
InitializeComponent()
|
||||
'Me.Owner = Owner
|
||||
bIsActive = True
|
||||
m_SourceTxBx = TextBoxBase
|
||||
Me.Width = Owner.ActualWidth / 2
|
||||
Me.Height = Me.Width * (1 / ASPECTRATIO)
|
||||
Dim FontSize As Double = Width * WIDTHFONTRATIO
|
||||
Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
'Me.Top = Owner.Top + (Owner.Height / 2 - Me.Height / 2)
|
||||
'Me.Left = Owner.Left + (Owner.Width / 2 - Me.Width / 2)
|
||||
End Sub
|
||||
|
||||
Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window, Width As Double)
|
||||
InitializeComponent()
|
||||
'Me.Owner = Owner
|
||||
bIsActive = True
|
||||
m_SourceTxBx = TextBoxBase
|
||||
Me.Width = Width
|
||||
Me.Height = Width * (1 / ASPECTRATIO)
|
||||
Dim FontSize As Double = Width * WIDTHFONTRATIO
|
||||
Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
End Sub
|
||||
|
||||
Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window, Width As Double, FontSize As Double)
|
||||
InitializeComponent()
|
||||
'Me.Owner = Owner
|
||||
bIsActive = True
|
||||
m_SourceTxBx = TextBoxBase
|
||||
Me.Width = Width
|
||||
Me.Height = Width * (1 / ASPECTRATIO)
|
||||
Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
End Sub
|
||||
|
||||
#Region "Costruttori e funzioni con posizionamento utili nel caso la tastiera sia una finestra"
|
||||
|
||||
'Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window, Position As Positions, RelativeToSourcePosition As RelativeToSourcePositions, Top As Double, Left As Double)
|
||||
' InitializeComponent()
|
||||
' 'Me.Owner = Owner
|
||||
' bIsActive = True
|
||||
' m_SourceTxBx = TextBoxBase
|
||||
' Me.Width = Owner.ActualWidth / 2
|
||||
' Me.Height = Me.Width * (1 / ASPECTRATIO)
|
||||
' Dim FontSize As Double = Width * WIDTHFONTRATIO
|
||||
' Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
' Me.m_RelativeToSourcePosition = RelativeToSourcePosition
|
||||
' Me.m_SourceTop = Top
|
||||
' Me.m_SourceLeft = Left
|
||||
' Select Case Position
|
||||
' Case Positions.CenteredInOwner
|
||||
' 'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
' 'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
' Case Positions.RelativeToSource
|
||||
' ' Se nessuna delle quattro posizioni relative alla textbox è valida, la posiziono centrata nell'owner
|
||||
' If Not CalculateRelativeToSourcePosition() Then
|
||||
' 'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
' 'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
' End If
|
||||
' Case Positions.Custom
|
||||
' 'Me.Top = Top
|
||||
' 'Me.Left = Left
|
||||
' End Select
|
||||
'End Sub
|
||||
|
||||
'Sub New(TextBoxBase As Primitives.TextBoxBase, Owner As Window, Width As Double, FontSize As Double, Position As Positions, RelativeToSourcePosition As RelativeToSourcePositions, Top As Double, Left As Double)
|
||||
' InitializeComponent()
|
||||
' 'Me.Owner = Owner
|
||||
' bIsActive = True
|
||||
' m_SourceTxBx = TextBoxBase
|
||||
' Me.Width = Width
|
||||
' Me.Height = Width * (1 / ASPECTRATIO)
|
||||
' Me.Resources("EgtKeyboard_FontSize") = New FontSizeConverter().ConvertFrom(CStr(FontSize))
|
||||
' Me.m_RelativeToSourcePosition = RelativeToSourcePosition
|
||||
' Me.m_SourceTop = Top
|
||||
' Me.m_SourceLeft = Left
|
||||
' Select Case Position
|
||||
' Case Positions.CenteredInOwner
|
||||
' 'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
' 'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
' Case Positions.RelativeToSource
|
||||
' ' Se nessuna delle quattro posizioni relative alla textbox è valida, la posiziono centrata nell'owner
|
||||
' If Not CalculateRelativeToSourcePosition() Then
|
||||
' 'Me.Top = Owner.Top + (Owner.Height / 2 - Height / 2)
|
||||
' 'Me.Left = Owner.Left + (Owner.Width / 2 - Width / 2)
|
||||
' End If
|
||||
' Case Positions.Custom
|
||||
' 'Me.Top = Top
|
||||
' 'Me.Left = Left
|
||||
' End Select
|
||||
'End Sub
|
||||
|
||||
'Private Function CalculateRelativeToSourcePosition()
|
||||
' Select Case m_RelativeToSourcePosition
|
||||
' Case RelativeToSourcePositions.Top
|
||||
' If Not VerifyRelativeToSourcePosition(RelativeToSourcePositions.Top, RelativeToSourcePositions.Bottom, RelativeToSourcePositions.Right, RelativeToSourcePositions.Left) Then
|
||||
' Return False
|
||||
' End If
|
||||
' Case RelativeToSourcePositions.Bottom
|
||||
' If Not VerifyRelativeToSourcePosition(RelativeToSourcePositions.Bottom, RelativeToSourcePositions.Top, RelativeToSourcePositions.Right, RelativeToSourcePositions.Left) Then
|
||||
' Return False
|
||||
' End If
|
||||
' Case RelativeToSourcePositions.Left
|
||||
' If Not VerifyRelativeToSourcePosition(RelativeToSourcePositions.Left, RelativeToSourcePositions.Bottom, RelativeToSourcePositions.Top, RelativeToSourcePositions.Right) Then
|
||||
' Return False
|
||||
' End If
|
||||
' Case RelativeToSourcePositions.Right
|
||||
' If Not VerifyRelativeToSourcePosition(RelativeToSourcePositions.Right, RelativeToSourcePositions.Bottom, RelativeToSourcePositions.Top, RelativeToSourcePositions.Left) Then
|
||||
' Return False
|
||||
' End If
|
||||
' End Select
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
'Private Function VerifyRelativeToSourcePosition(FirstPosition As RelativeToSourcePositions, SecondPosition As RelativeToSourcePositions, ThirdPosition As RelativeToSourcePositions, FourthPosition As RelativeToSourcePositions)
|
||||
' If Not CalculatePosition(FirstPosition) Then
|
||||
' If Not CalculatePosition(SecondPosition) Then
|
||||
' If Not CalculatePosition(ThirdPosition) Then
|
||||
' If Not CalculatePosition(FourthPosition) Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
'Private Function CalculatePosition(RelativeToSourcePosition As RelativeToSourcePositions)
|
||||
' Dim dKeyboardTop As Double
|
||||
' Dim dKeyboardLeft As Double
|
||||
' Select Case RelativeToSourcePosition
|
||||
' Case RelativeToSourcePositions.Top
|
||||
' dKeyboardTop = Me.m_SourceTop - Me.Height - OFFSET
|
||||
' dKeyboardLeft = Me.m_SourceLeft - (Me.Width / 2 - m_SourceTxBx.ActualWidth / 2)
|
||||
' Case RelativeToSourcePositions.Bottom
|
||||
' dKeyboardTop = Me.m_SourceTop + m_SourceTxBx.ActualHeight + OFFSET
|
||||
' dKeyboardLeft = Me.m_SourceLeft - (Me.Width / 2 - m_SourceTxBx.ActualWidth / 2)
|
||||
' Case RelativeToSourcePositions.Left
|
||||
' dKeyboardTop = Me.m_SourceTop + m_SourceTxBx.ActualHeight / 2 - Me.Height / 2
|
||||
' dKeyboardLeft = Me.m_SourceLeft - Me.Width - OFFSET
|
||||
' Case RelativeToSourcePositions.Right
|
||||
' dKeyboardTop = Me.m_SourceTop + m_SourceTxBx.ActualHeight / 2 - Me.Height / 2
|
||||
' dKeyboardLeft = Me.m_SourceLeft + m_SourceTxBx.ActualWidth + OFFSET
|
||||
' End Select
|
||||
' 'If Not (dKeyboardTop > Me.Owner.Top And (dKeyboardTop + Me.Height) < (Me.Owner.Top + Me.Owner.ActualHeight) And dKeyboardLeft > Me.Owner.Left And (dKeyboardLeft + Me.Width) < (Me.Owner.Left + Me.Owner.ActualWidth)) Then
|
||||
' ' Return False
|
||||
' 'End If
|
||||
' 'Me.Top = Me.Owner.Top + dKeyboardTop
|
||||
' 'Me.Left = Me.Owner.Left + dKeyboardLeft
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Window lifetime events"
|
||||
|
||||
'Private Sub EgtKeyboard_Loaded(sender As Object, e As EventArgs) Handles EgtKeyboard.Loaded
|
||||
' m_SourceTxBx.Focus()
|
||||
' m_SourceTxBx.SelectAll()
|
||||
'End Sub
|
||||
|
||||
Private Sub EgtKeyboard_Unloaded(sender As Object, e As EventArgs) Handles EgtKeyboard.Unloaded
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Button events and support functions"
|
||||
|
||||
Private Sub UpperLowerCase(Value As Boolean)
|
||||
If Value Then
|
||||
qBtn.Content = "Q"
|
||||
wBtn.Content = "W"
|
||||
eBtn.Content = "E"
|
||||
rBtn.Content = "R"
|
||||
tBtn.Content = "T"
|
||||
yBtn.Content = "Y"
|
||||
uBtn.Content = "U"
|
||||
iBtn.Content = "I"
|
||||
oBtn.Content = "O"
|
||||
pBtn.Content = "P"
|
||||
aBtn.Content = "A"
|
||||
sBtn.Content = "S"
|
||||
dBtn.Content = "D"
|
||||
fBtn.Content = "F"
|
||||
gBtn.Content = "G"
|
||||
hBtn.Content = "H"
|
||||
jBtn.Content = "J"
|
||||
kBtn.Content = "K"
|
||||
lBtn.Content = "L"
|
||||
zBtn.Content = "Z"
|
||||
xBtn.Content = "X"
|
||||
cBtn.Content = "C"
|
||||
vBtn.Content = "V"
|
||||
bBtn.Content = "B"
|
||||
nBtn.Content = "N"
|
||||
mBtn.Content = "M"
|
||||
Else
|
||||
qBtn.Content = "q"
|
||||
wBtn.Content = "w"
|
||||
eBtn.Content = "e"
|
||||
rBtn.Content = "r"
|
||||
tBtn.Content = "t"
|
||||
yBtn.Content = "y"
|
||||
uBtn.Content = "u"
|
||||
iBtn.Content = "i"
|
||||
oBtn.Content = "o"
|
||||
pBtn.Content = "p"
|
||||
aBtn.Content = "a"
|
||||
sBtn.Content = "s"
|
||||
dBtn.Content = "d"
|
||||
fBtn.Content = "f"
|
||||
gBtn.Content = "g"
|
||||
hBtn.Content = "h"
|
||||
jBtn.Content = "j"
|
||||
kBtn.Content = "k"
|
||||
lBtn.Content = "l"
|
||||
zBtn.Content = "z"
|
||||
xBtn.Content = "x"
|
||||
cBtn.Content = "c"
|
||||
vBtn.Content = "v"
|
||||
bBtn.Content = "b"
|
||||
nBtn.Content = "n"
|
||||
mBtn.Content = "m"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Tasti azione
|
||||
Private Sub ShiftBtn_Click(sender As Object, e As RoutedEventArgs) Handles Shift1Btn.Click, Shift2Btn.Click
|
||||
If m_bShift Then
|
||||
m_bShift = False
|
||||
UpperLowerCase(False)
|
||||
Shift1Btn.IsChecked = False
|
||||
Shift2Btn.IsChecked = False
|
||||
Else
|
||||
m_bShift = True
|
||||
If m_bCapsLock Then
|
||||
UpperLowerCase(False)
|
||||
Else
|
||||
UpperLowerCase(True)
|
||||
End If
|
||||
Shift1Btn.IsChecked = True
|
||||
Shift2Btn.IsChecked = True
|
||||
End If
|
||||
m_SourceTxBx.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub CapsLockBtn_Click(sender As Object, e As RoutedEventArgs) Handles CapsLockBtn.Click
|
||||
If m_bCapsLock Then
|
||||
If m_bShift Then
|
||||
UpperLowerCase(True)
|
||||
Else
|
||||
UpperLowerCase(False)
|
||||
End If
|
||||
m_bCapsLock = False
|
||||
CapsLockBtn.IsChecked = False
|
||||
Else
|
||||
If m_bShift Then
|
||||
m_bShift = False
|
||||
Shift1Btn.IsChecked = False
|
||||
Shift2Btn.IsChecked = False
|
||||
End If
|
||||
m_bCapsLock = True
|
||||
UpperLowerCase(True)
|
||||
CapsLockBtn.IsChecked = True
|
||||
End If
|
||||
m_SourceTxBx.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub AltBtn_Click(sender As Object, e As RoutedEventArgs) Handles AltBtn.Click
|
||||
'Per il momento non fa' nulla
|
||||
m_SourceTxBx.Focus()
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce il click di una lettera
|
||||
Private Sub LetterClick(Uppercase As Char, Lowercase As Char)
|
||||
If m_bCapsLock Then
|
||||
If m_bShift Then
|
||||
AddCharacter(Lowercase)
|
||||
m_bShift = False
|
||||
UpperLowerCase(True)
|
||||
Shift1Btn.IsChecked = False
|
||||
Shift2Btn.IsChecked = False
|
||||
Else
|
||||
AddCharacter(Uppercase)
|
||||
End If
|
||||
Else
|
||||
If m_bShift Then
|
||||
AddCharacter(Uppercase)
|
||||
m_bShift = False
|
||||
UpperLowerCase(False)
|
||||
Shift1Btn.IsChecked = False
|
||||
Shift2Btn.IsChecked = False
|
||||
Else
|
||||
AddCharacter(Lowercase)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce il click di numeri e simboli
|
||||
Private Sub NumberClick(Uppercase As Char, Lowercase As Char)
|
||||
If m_bShift Then
|
||||
If m_bCapsLock Then
|
||||
UpperLowerCase(True)
|
||||
Else
|
||||
UpperLowerCase(False)
|
||||
End If
|
||||
AddCharacter(Uppercase)
|
||||
m_bShift = False
|
||||
Shift1Btn.IsChecked = False
|
||||
Shift2Btn.IsChecked = False
|
||||
Else
|
||||
AddCharacter(Lowercase)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AddCharacter(KeyCharacter As String)
|
||||
m_SourceTxBx.Focus()
|
||||
Dim EventArgs = New TextCompositionEventArgs(Keyboard.PrimaryDevice, New TextComposition(InputManager.Current, Keyboard.FocusedElement, KeyCharacter))
|
||||
EventArgs.RoutedEvent = TextInputEvent
|
||||
InputManager.Current.ProcessInput(EventArgs)
|
||||
End Sub
|
||||
|
||||
Private Sub CharacterBtn_Click(sender As Object, e As RoutedEventArgs) Handles qBtn.Click, wBtn.Click, eBtn.Click, rBtn.Click, tBtn.Click, yBtn.Click, uBtn.Click, iBtn.Click, oBtn.Click, pBtn.Click, aBtn.Click, sBtn.Click, dBtn.Click, fBtn.Click,
|
||||
gBtn.Click, hBtn.Click, jBtn.Click, kBtn.Click, lBtn.Click, zBtn.Click, xBtn.Click, cBtn.Click, vBtn.Click, bBtn.Click, nBtn.Click, mBtn.Click
|
||||
Dim KeyButton As Button = e.Source
|
||||
Dim UpperCaseKey As String = String.Empty
|
||||
Dim LowerCaseKey As String = String.Empty
|
||||
If ReturnKeyCharacter(KeyButton, UpperCaseKey, LowerCaseKey) Then
|
||||
LetterClick(UpperCaseKey, LowerCaseKey)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NumberBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackslashBtn.Click, OneBtn.Click, TwoBtn.Click, ThreeBtn.Click, FourBtn.Click, FiveBtn.Click, SixBtn.Click, SevenBtn.Click, EightBtn.Click, NineBtn.Click, ZeroBtn.Click,
|
||||
TabBtn.Click, PlusBtn.Click, MinorBtn.Click, MinusBtn.Click, DotBtn.Click, CommaBtn.Click
|
||||
Dim KeyButton As Button = e.Source
|
||||
Dim UpperCaseKey As String = String.Empty
|
||||
Dim LowerCaseKey As String = String.Empty
|
||||
If ReturnKeyNumber(KeyButton, UpperCaseKey, LowerCaseKey) Then
|
||||
NumberClick(UpperCaseKey, LowerCaseKey)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReturnKeyCharacter(KeyButton As Button, ByRef UpperCaseKey As String, ByRef LowerCaseKey As String)
|
||||
Select Case KeyButton.Name
|
||||
Case qBtn.Name
|
||||
UpperCaseKey = "Q"
|
||||
LowerCaseKey = "q"
|
||||
Return True
|
||||
Case wBtn.Name
|
||||
UpperCaseKey = "W"
|
||||
LowerCaseKey = "w"
|
||||
Return True
|
||||
Case eBtn.Name
|
||||
UpperCaseKey = "E"
|
||||
LowerCaseKey = "e"
|
||||
Return True
|
||||
Case rBtn.Name
|
||||
UpperCaseKey = "R"
|
||||
LowerCaseKey = "r"
|
||||
Return True
|
||||
Case tBtn.Name
|
||||
UpperCaseKey = "T"
|
||||
LowerCaseKey = "t"
|
||||
Return True
|
||||
Case yBtn.Name
|
||||
UpperCaseKey = "Y"
|
||||
LowerCaseKey = "y"
|
||||
Return True
|
||||
Case uBtn.Name
|
||||
UpperCaseKey = "U"
|
||||
LowerCaseKey = "u"
|
||||
Return True
|
||||
Case iBtn.Name
|
||||
UpperCaseKey = "I"
|
||||
LowerCaseKey = "i"
|
||||
Return True
|
||||
Case oBtn.Name
|
||||
UpperCaseKey = "O"
|
||||
LowerCaseKey = "o"
|
||||
Return True
|
||||
Case pBtn.Name
|
||||
UpperCaseKey = "P"
|
||||
LowerCaseKey = "p"
|
||||
Return True
|
||||
Case aBtn.Name
|
||||
UpperCaseKey = "A"
|
||||
LowerCaseKey = "a"
|
||||
Return True
|
||||
Case sBtn.Name
|
||||
UpperCaseKey = "S"
|
||||
LowerCaseKey = "s"
|
||||
Return True
|
||||
Case dBtn.Name
|
||||
UpperCaseKey = "D"
|
||||
LowerCaseKey = "d"
|
||||
Return True
|
||||
Case fBtn.Name
|
||||
UpperCaseKey = "F"
|
||||
LowerCaseKey = "f"
|
||||
Return True
|
||||
Case gBtn.Name
|
||||
UpperCaseKey = "G"
|
||||
LowerCaseKey = "g"
|
||||
Return True
|
||||
Case hBtn.Name
|
||||
UpperCaseKey = "H"
|
||||
LowerCaseKey = "h"
|
||||
Return True
|
||||
Case jBtn.Name
|
||||
UpperCaseKey = "J"
|
||||
LowerCaseKey = "j"
|
||||
Return True
|
||||
Case kBtn.Name
|
||||
UpperCaseKey = "K"
|
||||
LowerCaseKey = "k"
|
||||
Return True
|
||||
Case lBtn.Name
|
||||
UpperCaseKey = "L"
|
||||
LowerCaseKey = "l"
|
||||
Return True
|
||||
Case zBtn.Name
|
||||
UpperCaseKey = "Z"
|
||||
LowerCaseKey = "z"
|
||||
Return True
|
||||
Case xBtn.Name
|
||||
UpperCaseKey = "X"
|
||||
LowerCaseKey = "x"
|
||||
Return True
|
||||
Case cBtn.Name
|
||||
UpperCaseKey = "C"
|
||||
LowerCaseKey = "c"
|
||||
Return True
|
||||
Case vBtn.Name
|
||||
UpperCaseKey = "V"
|
||||
LowerCaseKey = "v"
|
||||
Return True
|
||||
Case bBtn.Name
|
||||
UpperCaseKey = "B"
|
||||
LowerCaseKey = "b"
|
||||
Return True
|
||||
Case nBtn.Name
|
||||
UpperCaseKey = "N"
|
||||
LowerCaseKey = "n"
|
||||
Return True
|
||||
Case mBtn.Name
|
||||
UpperCaseKey = "M"
|
||||
LowerCaseKey = "m"
|
||||
Return True
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ReturnKeyNumber(KeyButton As Button, ByRef UpperCaseKey As String, ByRef LowerCaseKey As String)
|
||||
Select Case KeyButton.Name
|
||||
Case BackslashBtn.Name
|
||||
UpperCaseKey = "|"
|
||||
LowerCaseKey = "\"
|
||||
Return True
|
||||
Case OneBtn.Name
|
||||
UpperCaseKey = "!"
|
||||
LowerCaseKey = "1"
|
||||
Return True
|
||||
Case TwoBtn.Name
|
||||
UpperCaseKey = """"
|
||||
LowerCaseKey = "2"
|
||||
Return True
|
||||
Case ThreeBtn.Name
|
||||
UpperCaseKey = "£"
|
||||
LowerCaseKey = "3"
|
||||
Return True
|
||||
Case FourBtn.Name
|
||||
UpperCaseKey = "$"
|
||||
LowerCaseKey = "4"
|
||||
Return True
|
||||
Case FiveBtn.Name
|
||||
UpperCaseKey = "%"
|
||||
LowerCaseKey = "5"
|
||||
Return True
|
||||
Case SixBtn.Name
|
||||
UpperCaseKey = "&"
|
||||
LowerCaseKey = "6"
|
||||
Return True
|
||||
Case SevenBtn.Name
|
||||
UpperCaseKey = "/"
|
||||
LowerCaseKey = "7"
|
||||
Return True
|
||||
Case EightBtn.Name
|
||||
UpperCaseKey = "("
|
||||
LowerCaseKey = "8"
|
||||
Return True
|
||||
Case NineBtn.Name
|
||||
UpperCaseKey = ")"
|
||||
LowerCaseKey = "9"
|
||||
Return True
|
||||
Case TabBtn.Name
|
||||
UpperCaseKey = " "
|
||||
LowerCaseKey = " "
|
||||
Return True
|
||||
Case ZeroBtn.Name
|
||||
UpperCaseKey = "="
|
||||
LowerCaseKey = "0"
|
||||
Return True
|
||||
Case PlusBtn.Name
|
||||
UpperCaseKey = "*"
|
||||
LowerCaseKey = "+"
|
||||
Return True
|
||||
Case MinorBtn.Name
|
||||
UpperCaseKey = ">"
|
||||
LowerCaseKey = "<"
|
||||
Return True
|
||||
Case MinusBtn.Name
|
||||
UpperCaseKey = "_"
|
||||
LowerCaseKey = "-"
|
||||
Return True
|
||||
Case DotBtn.Name
|
||||
UpperCaseKey = ":"
|
||||
LowerCaseKey = "."
|
||||
Return True
|
||||
Case CommaBtn.Name
|
||||
UpperCaseKey = ";"
|
||||
LowerCaseKey = ","
|
||||
Return True
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub BackspaceBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackspaceBtn.Click
|
||||
m_SourceTxBx.Focus()
|
||||
Dim eventArgs As New KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Back)
|
||||
|
||||
eventArgs.RoutedEvent = Keyboard.KeyDownEvent
|
||||
|
||||
InputManager.Current.ProcessInput(eventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CancBtn_Click(sender As Object, e As RoutedEventArgs) Handles CancBtn.Click
|
||||
m_SourceTxBx.Focus()
|
||||
Dim eventArgs As New KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Delete)
|
||||
|
||||
eventArgs.RoutedEvent = Keyboard.KeyDownEvent
|
||||
|
||||
InputManager.Current.ProcessInput(eventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SpaceBtn_Click(sender As Object, e As RoutedEventArgs) Handles SpaceBtn.Click
|
||||
m_SourceTxBx.Focus()
|
||||
Dim eventArgs As New KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Space)
|
||||
|
||||
eventArgs.RoutedEvent = Keyboard.KeyDownEvent
|
||||
|
||||
InputManager.Current.ProcessInput(eventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EnterBtn_Click(sender As Object, e As RoutedEventArgs) Handles Enter1Btn.Click, Enter2Btn.Click
|
||||
bIsActive = False
|
||||
Keyboard.ClearFocus()
|
||||
RaiseEvent EgtClosed(sender, e)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Funzioni aggiuntive non attive"
|
||||
|
||||
' '' Codice che permette di mantenere le proporzioni(Aspect Ratio) della finestra dopo l'ingrandimento o il rimpicciolimento della stessa
|
||||
|
||||
''Public Const ASPECTRATIO As Double = 12 / 5
|
||||
|
||||
''Protected Overrides Sub OnSourceInitialized(e As EventArgs)
|
||||
'' MyBase.OnSourceInitialized(e)
|
||||
'' Dim source As HwndSource = TryCast(HwndSource.FromVisual(Me), HwndSource)
|
||||
'' If source IsNot Nothing Then
|
||||
'' source.AddHook(New HwndSourceHook(AddressOf WinProc))
|
||||
'' End If
|
||||
''End Sub
|
||||
|
||||
''Public Const WM_EXITSIZEMOVE As Integer = &H232
|
||||
|
||||
''Private Function WinProc(hwnd As IntPtr, msg As Int32, wParam As IntPtr, lParam As IntPtr, ByRef handled As [Boolean]) As IntPtr
|
||||
'' Dim result As IntPtr = IntPtr.Zero
|
||||
'' Select Case msg
|
||||
'' Case WM_EXITSIZEMOVE
|
||||
'' If True Then
|
||||
'' Me.Width = Me.Height * ASPECTRATIO
|
||||
'' Exit Select
|
||||
'' End If
|
||||
'' End Select
|
||||
'' Return result
|
||||
''End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,8 @@
|
||||
<TextBox x:Class="EgtTextBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="20" d:DesignWidth="100">
|
||||
</TextBox>
|
||||
@@ -0,0 +1,198 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2014-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : EgtTextBox.xaml.vb Data : 23.12.15 Versione : 1
|
||||
' Contenuto : TextBox con tastiera e calcolatrice integrate per EgtWPFLib.
|
||||
'
|
||||
' Creato da : Emmanuele Sassi
|
||||
' Modificato da :
|
||||
'
|
||||
' Modifiche :
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Controls.Primitives
|
||||
|
||||
Public Class EgtTextBox
|
||||
Inherits TextBox
|
||||
|
||||
Private Const OFFSET = 3 'Offset per non mostrare la tastiera attaccata alla TextboxBase
|
||||
|
||||
' Riferimento al PopUp ed alla Keyboard, usati nel caso in cui la tastiera sia attiva
|
||||
Private WithEvents m_KeyboardPopUp As Popup
|
||||
Private WithEvents m_Keyboard As EgtWPFLib.EgtKeyboard
|
||||
|
||||
' Riferimento al PopUp ed alla calcolatrice, usati nel caso in cui la calcolatrice sia attiva
|
||||
Private WithEvents m_CalculatorPopUp As Popup
|
||||
Private WithEvents m_Calculator As EgtWPFLib.EgtCalculator
|
||||
|
||||
' Riferimento alla finestra in cui si trova la EgtTxBx
|
||||
Private m_Owner As Window
|
||||
|
||||
' Flag che segnala se la tastiera è stata appena aperta
|
||||
Private Shared m_bKeyboardFirstOpen As Boolean = True
|
||||
|
||||
' Flag che segnala se la calcolatrice è stata appena aperta
|
||||
Private Shared m_bCalculatorFirstOpen As Boolean = True
|
||||
|
||||
' Evento che indica la chiusura della tastiera o della calcolatrice
|
||||
Public Event EgtClosed As EventHandler
|
||||
|
||||
'
|
||||
Public Enum KeyboardType As Short
|
||||
Alphanumeric
|
||||
Calculator
|
||||
Null
|
||||
End Enum
|
||||
|
||||
' Lato di riferimento per posizionare la tastiera o la calcolatrice
|
||||
Public Enum Positions As Short
|
||||
Top
|
||||
Right
|
||||
Bottom
|
||||
Left
|
||||
End Enum
|
||||
|
||||
' DependencyProperty aggiuntive per gestire la tastiera
|
||||
Public Shared ReadOnly KeyboardProperty As DependencyProperty = DependencyProperty.Register("Keyboard", GetType(KeyboardType), GetType(EgtTextBox), New PropertyMetadata(KeyboardType.Null))
|
||||
|
||||
Public Shared Function GetKeyboard(element As UIElement) As KeyboardType
|
||||
Return CShort(element.GetValue(KeyboardProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetKeyboard(element As UIElement, value As KeyboardType)
|
||||
element.SetValue(KeyboardProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly KeyboardPositionProperty As DependencyProperty = DependencyProperty.Register("KeyboardPosition", GetType(Positions), GetType(EgtTextBox), New PropertyMetadata(Positions.Bottom))
|
||||
|
||||
Public Shared Function GetKeyboardPosition(element As UIElement) As Positions
|
||||
Return CShort(element.GetValue(KeyboardPositionProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetKeyboardPosition(element As UIElement, value As Positions)
|
||||
element.SetValue(KeyboardPositionProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly KeyboardDimensionProperty As DependencyProperty = DependencyProperty.Register("KeyboardDimension", GetType(Double), GetType(EgtTextBox), New PropertyMetadata(500.0))
|
||||
|
||||
Public Shared Function GetKeyboardDimension(element As UIElement) As Double
|
||||
Return CDbl(element.GetValue(KeyboardDimensionProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetKeyboardDimension(element As UIElement, value As Double)
|
||||
element.SetValue(KeyboardDimensionProperty, value)
|
||||
End Sub
|
||||
|
||||
' Evento che, se richiesto, lancia la tastiera quando viene clickata la TextBox
|
||||
Private Sub Me_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseDown
|
||||
Select Case GetKeyboard(Me)
|
||||
Case KeyboardType.Null
|
||||
'Non devo fare alcunchè
|
||||
Case KeyboardType.Alphanumeric
|
||||
If Not EgtWPFLib.EgtKeyboard.GetbIsActive Then
|
||||
Dim TxBx As TextBox = CType(e.Source, TextBox)
|
||||
Dim Owner As FrameworkElement = TxBx
|
||||
While Not TypeOf Owner Is Window
|
||||
Owner = Owner.Parent
|
||||
End While
|
||||
m_Owner = Owner
|
||||
m_KeyboardPopUp = New Popup
|
||||
m_Keyboard = New EgtWPFLib.EgtKeyboard(TxBx, Owner, GetKeyboardDimension(Me))
|
||||
m_KeyboardPopUp.Child = m_Keyboard
|
||||
m_KeyboardPopUp.PlacementTarget = TxBx
|
||||
m_KeyboardPopUp.Placement = PlacementMode.Custom
|
||||
m_KeyboardPopUp.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placeKeyboardPopup)
|
||||
m_KeyboardPopUp.IsOpen = True
|
||||
End If
|
||||
Case KeyboardType.Calculator
|
||||
If Not EgtWPFLib.EgtKeyboard.GetbIsActive Then
|
||||
Dim TxBx As TextBox = CType(e.Source, TextBox)
|
||||
Dim Owner As FrameworkElement = TxBx
|
||||
While Not TypeOf Owner Is Window
|
||||
Owner = Owner.Parent
|
||||
End While
|
||||
m_Owner = Owner
|
||||
m_CalculatorPopUp = New Popup
|
||||
m_Calculator = New EgtWPFLib.EgtCalculator(TxBx, Owner, GetKeyboardDimension(Me))
|
||||
m_CalculatorPopUp.Child = m_Calculator
|
||||
m_CalculatorPopUp.PlacementTarget = TxBx
|
||||
m_CalculatorPopUp.Placement = PlacementMode.Custom
|
||||
m_CalculatorPopUp.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placeCalculatorPopup)
|
||||
m_CalculatorPopUp.IsOpen = True
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
' Funzione che permette di posizionare il PopUp con la tastiera
|
||||
Public Function placeKeyboardPopup(ByVal popupSize As Size, ByVal targetSize As Size, ByVal offset As Point) As CustomPopupPlacement()
|
||||
|
||||
Dim BottomPlacement As New CustomPopupPlacement(New Point(-m_Keyboard.ActualWidth / 2 + Me.ActualWidth / 2, Me.ActualHeight + EgtTextBox.OFFSET), PopupPrimaryAxis.Horizontal)
|
||||
Dim TopPlacement As New CustomPopupPlacement(New Point(-m_Keyboard.ActualWidth / 2 + Me.ActualWidth / 2, -m_Keyboard.ActualHeight - EgtTextBox.OFFSET), PopupPrimaryAxis.Horizontal)
|
||||
Dim LeftPlacement As New CustomPopupPlacement(New Point(-m_Keyboard.ActualWidth - EgtTextBox.OFFSET, -m_Keyboard.ActualHeight / 2 + Me.ActualHeight / 2), PopupPrimaryAxis.Vertical)
|
||||
Dim RightPlacement As New CustomPopupPlacement(New Point(Me.ActualWidth + EgtTextBox.OFFSET, -m_Keyboard.ActualHeight / 2 + Me.ActualHeight / 2), PopupPrimaryAxis.Vertical)
|
||||
|
||||
Dim ttplaces() As CustomPopupPlacement
|
||||
|
||||
Select Case GetKeyboardPosition(Me)
|
||||
Case Positions.Left
|
||||
ttplaces = {LeftPlacement, RightPlacement, BottomPlacement, TopPlacement}
|
||||
Case Positions.Right
|
||||
ttplaces = {RightPlacement, LeftPlacement, BottomPlacement, TopPlacement}
|
||||
Case Positions.Top
|
||||
ttplaces = {TopPlacement, BottomPlacement, LeftPlacement, RightPlacement}
|
||||
Case Else
|
||||
ttplaces = {BottomPlacement, TopPlacement, LeftPlacement, RightPlacement}
|
||||
End Select
|
||||
|
||||
Return ttplaces
|
||||
|
||||
End Function
|
||||
|
||||
' Funzione che permette di posizionare il PopUp con la calcolatrice
|
||||
Public Function placeCalculatorPopup(ByVal popupSize As Size, ByVal targetSize As Size, ByVal offset As Point) As CustomPopupPlacement()
|
||||
|
||||
Dim BottomPlacement As New CustomPopupPlacement(New Point(-m_Calculator.ActualWidth / 2 + Me.ActualWidth / 2, Me.ActualHeight + EgtTextBox.OFFSET), PopupPrimaryAxis.Horizontal)
|
||||
Dim TopPlacement As New CustomPopupPlacement(New Point(-m_Calculator.ActualWidth / 2 + Me.ActualWidth / 2, -m_Calculator.ActualHeight - EgtTextBox.OFFSET), PopupPrimaryAxis.Horizontal)
|
||||
Dim LeftPlacement As New CustomPopupPlacement(New Point(-m_Calculator.ActualWidth - EgtTextBox.OFFSET, -m_Calculator.ActualHeight / 2 + Me.ActualHeight / 2), PopupPrimaryAxis.Vertical)
|
||||
Dim RightPlacement As New CustomPopupPlacement(New Point(Me.ActualWidth + EgtTextBox.OFFSET, -m_Calculator.ActualHeight / 2 + Me.ActualHeight / 2), PopupPrimaryAxis.Vertical)
|
||||
|
||||
Dim ttplaces() As CustomPopupPlacement
|
||||
|
||||
Select Case GetKeyboardPosition(Me)
|
||||
Case Positions.Left
|
||||
ttplaces = {LeftPlacement, RightPlacement, BottomPlacement, TopPlacement}
|
||||
Case Positions.Right
|
||||
ttplaces = {RightPlacement, LeftPlacement, BottomPlacement, TopPlacement}
|
||||
Case Positions.Top
|
||||
ttplaces = {TopPlacement, BottomPlacement, LeftPlacement, RightPlacement}
|
||||
Case Else
|
||||
ttplaces = {BottomPlacement, TopPlacement, LeftPlacement, RightPlacement}
|
||||
End Select
|
||||
|
||||
Return ttplaces
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
' Evento che permette di selezionare il testo alla prima apertura della tastiera
|
||||
Private Sub Me_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseUp
|
||||
If GetKeyboard(Me) = KeyboardType.Alphanumeric And m_bKeyboardFirstOpen Then
|
||||
Me.Focus()
|
||||
Me.SelectAll()
|
||||
m_bKeyboardFirstOpen = False
|
||||
ElseIf GetKeyboard(Me) = KeyboardType.Calculator And m_bCalculatorFirstOpen Then
|
||||
Me.Focus()
|
||||
Me.SelectAll()
|
||||
m_bCalculatorFirstOpen = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub m_Keyboard_EgtClosed(sender As Object, e As EventArgs) Handles m_Keyboard.EgtClosed
|
||||
m_KeyboardPopUp.IsOpen = False
|
||||
m_bKeyboardFirstOpen = True
|
||||
RaiseEvent EgtClosed(sender, e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.40629.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtWPFLib", "EgtWPFLib.vbproj", "{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<RootNamespace>EgtWPFLib</RootNamespace>
|
||||
<AssemblyName>EgtWPFLib</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<ProjectGuid>{60A6B107-8EA9-47C2-B2F8-A1FA4B813273}</ProjectGuid>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EgtWPFLib.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EgtWPFLib.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="EgtCalculator.xaml.vb">
|
||||
<DependentUpon>EgtCalculator.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtKeyboard.xaml.vb">
|
||||
<DependentUpon>EgtKeyboard.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtTextBox.xaml.vb">
|
||||
<DependentUpon>EgtTextBox.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Utility.vb" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="EgtCalculator.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtKeyboard.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtTextBox.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtWPFLibDictionary.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtCalculator\DeleteArrow.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtCalculator\V.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtCalculator\X.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Dll32\EgtWPFLib.dll
|
||||
IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Dll64\EgtWPFLib.dll
|
||||
IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\DllD32\EgtWPFLib.dll
|
||||
IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\DllD64\EgtWPFLib.dll</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,24 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<!--Variabili impostate da codice-->
|
||||
<system:Double x:Key="EgtKeyboard_FontSize">22</system:Double>
|
||||
<system:Double x:Key="EgtCalculator_FontSize">22</system:Double>
|
||||
<system:Double x:Key="EgtCalculator_IconWidth">65</system:Double>
|
||||
|
||||
<!--Image-->
|
||||
|
||||
<!--Style dell'immagine all'interno di un Button-->
|
||||
<Style x:Key="ButtonIcon" TargetType="{x:Type Image}" >
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="{StaticResource EgtCalculator_IconWidth}"/>
|
||||
<Setter Property="Height" Value="{StaticResource EgtCalculator_IconWidth}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,59 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Globalization
|
||||
Imports System.Resources
|
||||
Imports System.Windows
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("EgtWPFLib")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("EgtWPFLib")>
|
||||
<Assembly: AssemblyCopyright("Copyright @ 2015")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
'In order to begin building localizable applications, set
|
||||
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
|
||||
'inside a <PropertyGroup>. For example, if you are using US english
|
||||
'in your source files, set the <UICulture> to "en-US". Then uncomment the
|
||||
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
|
||||
'below to match the UICulture setting in the project file.
|
||||
|
||||
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
|
||||
|
||||
|
||||
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
|
||||
'1st parameter: where theme specific resource dictionaries are located
|
||||
'(used if a resource is not found in the page,
|
||||
' or application resource dictionaries)
|
||||
|
||||
'2nd parameter: where the generic resource dictionary is located
|
||||
'(used if a resource is not found in the page,
|
||||
'app, and any theme specific resource dictionaries)
|
||||
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||
|
||||
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("d8363237-2c72-4a13-8cd0-14e2cb759eb0")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.12.5")>
|
||||
<Assembly: AssemblyFileVersion("1.6.12.5")>
|
||||
Generated
+63
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34209
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EgtWPFLib.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Generated
+71
@@ -0,0 +1,71 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34209
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.EgtWPFLib.MySettings
|
||||
Get
|
||||
Return Global.EgtWPFLib.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 624 B |
Binary file not shown.
|
After Width: | Height: | Size: 652 B |
Binary file not shown.
|
After Width: | Height: | Size: 548 B |
+22
@@ -0,0 +1,22 @@
|
||||
Public Module Utility
|
||||
|
||||
#Region "<!--EgtKeyboard-->"
|
||||
|
||||
' Posizione della tastiera
|
||||
Public Enum Positions
|
||||
CenteredInOwner
|
||||
RelativeToSource
|
||||
Custom
|
||||
End Enum
|
||||
|
||||
' Lato di riferimento per posizionare la tastiera quando impostato a RelativeToSource
|
||||
Public Enum RelativeToSourcePositions
|
||||
Top
|
||||
Right
|
||||
Bottom
|
||||
Left
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
|
||||
End Module
|
||||
Reference in New Issue
Block a user