diff --git a/DoorManager/DoorManagerViewModel.vb b/DoorManager/DoorManagerViewModel.vb index 83d33f7..fb9c9b3 100644 --- a/DoorManager/DoorManagerViewModel.vb +++ b/DoorManager/DoorManagerViewModel.vb @@ -326,7 +326,6 @@ Public Class DoorManagerViewModel EgtNewFile() EgtZoom(ZM.ALL) End If - MessageBox.Show(String.Format(EgtMsg(50117), RemoveDoorName), EgtMsg(50118), MessageBoxButton.OK, MessageBoxImage.Information) Else ' altrimenti salvo il file DdfFile.WriteDDF(DirectCast(m_rfMainWindowViewModel.DoorParameters.DataContext, DoorParametersViewModel).CurrDoor, m_SelectedDoor, True) diff --git a/DoorParameters/Door.vb b/DoorParameters/Door.vb index 36aa1f4..3670bce 100644 --- a/DoorParameters/Door.vb +++ b/DoorParameters/Door.vb @@ -217,9 +217,11 @@ Public Class Door Return m_IsCheckedWeight End Get Set(value As Visibility) - m_IsCheckedWeight = value - m_IsModifyDoor = True - SetTitle() + If m_IsCheckedWeight <> value Then + m_IsCheckedWeight = value + m_IsModifyDoor = True + SetTitle() + End If NotifyPropertyChanged("VisibilityWeight") End Set End Property @@ -339,6 +341,7 @@ Public Class Door Set(value As Boolean) m_TopMachining = value m_IsModifyDoor = True + SetTitle() End Set End Property @@ -349,10 +352,8 @@ Public Class Door End Get Set(value As Boolean) m_LockEdgeMachining = value - 'If SetChange <> 0 Then - ' SetChange += 1 - 'End If m_IsModifyDoor = True + SetTitle() End Set End Property @@ -363,10 +364,8 @@ Public Class Door End Get Set(value As Boolean) m_HingeEdgeMachining = value - 'If SetChange <> 0 Then - ' SetChange += 1 - 'End If m_IsModifyDoor = True + SetTitle() End Set End Property @@ -377,10 +376,8 @@ Public Class Door End Get Set(value As Boolean) m_BottomMachining = value - 'If SetChange <> 0 Then - ' SetChange += 1 - 'End If m_IsModifyDoor = True + SetTitle() End Set End Property diff --git a/MainWindow/MainWindowViewModel.vb b/MainWindow/MainWindowViewModel.vb index d71b5e9..05805fc 100644 --- a/MainWindow/MainWindowViewModel.vb +++ b/MainWindow/MainWindowViewModel.vb @@ -216,8 +216,11 @@ Public Class MainWindowViewModel If Not DdfFile.SetModify(Me) Then ' se la risposta รจ di non salavre non faccio nulla Dim QuestionSave As String = String.Format(EgtMsg(50152), Path.GetFileNameWithoutExtension(SelDoor)) - If MessageBox.Show(QuestionSave, EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then - Else + Dim Result As MessageBoxResult + Result = MessageBox.Show(QuestionSave, EgtMsg(50110), MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) + If Result = MessageBoxResult.Cancel Then + Return + ElseIf (Result = MessageBoxResult.Yes) Then ' altrimenti sovrascrivo il DDF DdfFile.WriteDDF(DirectCast(Me.DoorParameters.DataContext, DoorParametersViewModel).CurrDoor, SelDoor, True) End If @@ -228,9 +231,6 @@ Public Class MainWindowViewModel End If End If - If MessageBox.Show("Do you want to quit?", EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then Return - - EgtExit() '' Disabilito gestore Idle 'RemoveHandler Application.Idle, AddressOf Application_Idle diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index bb38bc1..b942774 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -72,5 +72,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index bdfdaea..3705102 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -123,23 +123,23 @@ Friend Module OptionModule ' Leggo le dimensioni della porta dal file Default.ini Dim Width As String = String.Empty - DefaultGetPrivateProfileString(S_SIZE, K_WIDTH_INI, "", Width) + DefaultGetPrivateProfileString(S_SIZE, K_WIDTH_INI, "33.125", Width) m_Width = Width Dim Height As String = String.Empty - DefaultGetPrivateProfileString(S_SIZE, K_HEIGHT_INI, "", Height) + DefaultGetPrivateProfileString(S_SIZE, K_HEIGHT_INI, "88.2656", Height) m_Height = Height Dim Thickness As String = String.Empty - DefaultGetPrivateProfileString(S_SIZE, K_THICKNESS_INI, "", Thickness) + DefaultGetPrivateProfileString(S_SIZE, K_THICKNESS_INI, "1.8125", Thickness) m_Thickness = Thickness ' carico i valori associati allo swing della porta Dim SwingTypeList As New List(Of String) DefaultGetPrivateProfileList(S_SIZE, K_SWING_LIST_INI, SwingTypeList) m_SwingTypeList = SwingTypeList Dim Swing As String = String.Empty - DefaultGetPrivateProfileString(S_SIZE, K_SWING_INI, "", Swing) + DefaultGetPrivateProfileString(S_SIZE, K_SWING_INI, "RH", Swing) m_Swing = Swing Dim Weight As String = String.Empty - DefaultGetPrivateProfileString(S_SIZE, K_WEIGHT_INI, "", Weight) + DefaultGetPrivateProfileString(S_SIZE, K_WEIGHT_INI, "25", Weight) m_Weight = Weight Dim WeightVisibility As Visibility = Visibility.Collapsed DefaultGetPrivateProfilesVisibility(S_SIZE, K_WEIGHTISCHECKED_INI, WeightVisibility) @@ -163,21 +163,21 @@ Friend Module OptionModule End If Next Dim HingeEdgeType As String = String.Empty - DefaultGetPrivateProfileString(S_EDGE, K_HINGEDGE_INI, "", HingeEdgeType) + DefaultGetPrivateProfileString(S_EDGE, K_HINGEDGE_INI, "SQ", HingeEdgeType) For Index = 0 To OptionsViewModel.EdgeTypeList.Count - 1 If OptionsViewModel.EdgeTypeList(Index).Name = HingeEdgeType Then m_HingeEdgeType = OptionsViewModel.EdgeTypeList(Index) End If Next Dim TopType As String = String.Empty - DefaultGetPrivateProfileString(S_EDGE, K_TOPEDGE_INI, "", TopType) + DefaultGetPrivateProfileString(S_EDGE, K_TOPEDGE_INI, "SQ", TopType) For Index = 0 To OptionsViewModel.EdgeTypeList.Count - 1 If OptionsViewModel.EdgeTypeList(Index).Name = TopType Then m_TopType = OptionsViewModel.EdgeTypeList(Index) End If Next Dim BottomType As String = String.Empty - DefaultGetPrivateProfileString(S_EDGE, K_BOTTOMEDGE_INI, "", BottomType) + DefaultGetPrivateProfileString(S_EDGE, K_BOTTOMEDGE_INI, "SQ", BottomType) For Index = 0 To OptionsViewModel.EdgeTypeList.Count - 1 If OptionsViewModel.EdgeTypeList(Index).Name = BottomType Then m_BottomType = OptionsViewModel.EdgeTypeList(Index)