diff --git a/Icarus/HelpPanel/HelpPanelV.xaml b/Icarus/HelpPanel/HelpPanelV.xaml new file mode 100644 index 0000000..a061d92 --- /dev/null +++ b/Icarus/HelpPanel/HelpPanelV.xaml @@ -0,0 +1,118 @@ + + + + 5 + 2 + -2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Icarus/HelpPanel/HelpPanelV.xaml.vb b/Icarus/HelpPanel/HelpPanelV.xaml.vb new file mode 100644 index 0000000..4e67c6b --- /dev/null +++ b/Icarus/HelpPanel/HelpPanelV.xaml.vb @@ -0,0 +1,3 @@ +Public Class HelpPanelV + +End Class diff --git a/Icarus/HelpPanel/HelpPanelVM.vb b/Icarus/HelpPanel/HelpPanelVM.vb new file mode 100644 index 0000000..4c5ca28 --- /dev/null +++ b/Icarus/HelpPanel/HelpPanelVM.vb @@ -0,0 +1,81 @@ +Imports EgtWPFLib5 + +Public Class HelpPanelVM + Inherits VMBase + + Public Enum HelpPages As Integer + NULL = 0 + ICON = 1 + PROJECTMANAGER = 2 + End Enum + + Private m_CurrHelpPage As HelpPages + Public ReadOnly Property CurrHelpPage As HelpPages + Get + Return m_CurrHelpPage + End Get + End Property + + Private m_Icon_Visibility As Boolean = False + Public ReadOnly Property Icon_Visibility As Visibility + Get + Return If(m_Icon_Visibility, Visibility.Visible, Visibility.Collapsed) + End Get + End Property + Public Property Icon_IsOpen As Boolean + Get + Return m_Icon_Visibility + End Get + Set(value As Boolean) + m_Icon_Visibility = value + End Set + End Property + Friend Sub SetIconVisibility(bValue As Boolean) + m_Icon_Visibility = bValue + NotifyPropertyChanged(NameOf(Icon_Visibility)) + NotifyPropertyChanged(NameOf(Icon_IsOpen)) + End Sub + + Private m_ProjectManager_Visibility As Boolean = False + Public ReadOnly Property ProjectManager_Visibility As Visibility + Get + Return If(m_ProjectManager_Visibility, Visibility.Visible, Visibility.Collapsed) + End Get + End Property + Public Property ProjectManager_IsOpen As Boolean + Get + Return m_ProjectManager_Visibility + End Get + Set(value As Boolean) + m_ProjectManager_Visibility = value + End Set + End Property + Friend Sub SetProjectManagerVisibility(bValue As Boolean) + m_ProjectManager_Visibility = bValue + NotifyPropertyChanged(NameOf(ProjectManager_Visibility)) + NotifyPropertyChanged(NameOf(ProjectManager_IsOpen)) + End Sub + + Sub New() + Map.SetRefHelpPanelVM(Me) + End Sub + + Friend Sub SelHelpPage(SelHelpPage As HelpPages) + Select Case m_CurrHelpPage + Case HelpPages.ICON + SetIconVisibility(False) + Case HelpPages.PROJECTMANAGER + SetProjectManagerVisibility(False) + End Select + m_CurrHelpPage = SelHelpPage + Select Case m_CurrHelpPage + Case HelpPages.NULL + SetProjectManagerVisibility(False) + Case HelpPages.ICON + SetIconVisibility(True) + Case HelpPages.PROJECTMANAGER + SetProjectManagerVisibility(True) + End Select + End Sub + +End Class diff --git a/Icarus/HelpPanel/Icon_Tooltip.xaml b/Icarus/HelpPanel/Icon_Tooltip.xaml new file mode 100644 index 0000000..cfc132b --- /dev/null +++ b/Icarus/HelpPanel/Icon_Tooltip.xaml @@ -0,0 +1,12 @@ + + + Icon + The software logo icon. + If clicked opens the AboutBox. + + diff --git a/Icarus/HelpPanel/Icon_Tooltip.xaml.vb b/Icarus/HelpPanel/Icon_Tooltip.xaml.vb new file mode 100644 index 0000000..bbea85c --- /dev/null +++ b/Icarus/HelpPanel/Icon_Tooltip.xaml.vb @@ -0,0 +1,3 @@ +Public Class Icon_Tooltip + +End Class diff --git a/Icarus/HelpPanel/ProjectManager_Tooltip.xaml b/Icarus/HelpPanel/ProjectManager_Tooltip.xaml new file mode 100644 index 0000000..1fb2559 --- /dev/null +++ b/Icarus/HelpPanel/ProjectManager_Tooltip.xaml @@ -0,0 +1,29 @@ + + + Project Manager + This space permit to manage the project. + The commands available are : + + + New + + + Open + + + Save + + + Save As + + + Import + + + + diff --git a/Icarus/HelpPanel/ProjectManager_Tooltip.xaml.vb b/Icarus/HelpPanel/ProjectManager_Tooltip.xaml.vb new file mode 100644 index 0000000..74d27a5 --- /dev/null +++ b/Icarus/HelpPanel/ProjectManager_Tooltip.xaml.vb @@ -0,0 +1,3 @@ +Public Class ProjectManager_Tooltip + +End Class diff --git a/Icarus/HelpWnd/HelpWndV.xaml b/Icarus/HelpWnd/HelpWndV.xaml new file mode 100644 index 0000000..a085362 --- /dev/null +++ b/Icarus/HelpWnd/HelpWndV.xaml @@ -0,0 +1,71 @@ + + + + + + + Icarus Manual + + + + + + Software Structure + + + + + + + Icon + + + + + + + Project Manager Bar + + + + + View Bar + + + Status Bar + + + Top Panel + + + Slice Manager + + + + + ListItem 2 + + + ListItem 3 + + + + + + + + diff --git a/Icarus/HelpWnd/HelpWndV.xaml.vb b/Icarus/HelpWnd/HelpWndV.xaml.vb new file mode 100644 index 0000000..20b3c81 --- /dev/null +++ b/Icarus/HelpWnd/HelpWndV.xaml.vb @@ -0,0 +1,18 @@ +Public Class HelpWndV + + Private WithEvents m_HelpWndVM As HelpWndVM + + Sub New(Owner As Window, HelpWndVM As HelpWndVM) + MyBase.New(Owner) + ' This call is required by the designer. + InitializeComponent() + Me.DataContext = HelpWndVM + ' Assegno al riferimento locale al VM il VM preso dal DataContext + m_HelpWndVM = HelpWndVM + End Sub + + Private Sub CloseWindow(bDialogResult As Boolean) Handles m_HelpWndVM.m_CloseWindow + Me.Close() + End Sub + +End Class diff --git a/Icarus/HelpWnd/HelpWndVM.vb b/Icarus/HelpWnd/HelpWndVM.vb new file mode 100644 index 0000000..4162c39 --- /dev/null +++ b/Icarus/HelpWnd/HelpWndVM.vb @@ -0,0 +1,108 @@ +Imports System.Collections.ObjectModel +Imports System.Drawing +Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip +Imports EgtWPFLib5 + +Public Class HelpWndVM + +#Region "FIELDS & PROPERTIES" + + Friend Event m_CloseWindow(bDialogResult As Boolean) + +#Region "Messages" + + Public ReadOnly Property Title_Msg As String + Get + Return "Help" + End Get + End Property + +#End Region ' Messages + + ' Definizione comandi + Private m_cmdSoftwareStructure As ICommand + Private m_cmdIcon As ICommand + Private m_cmdProjectManagerBar As ICommand + Private m_cmdClose As ICommand + +#End Region ' FIELDS & PROPERTIES + + Sub New() + Map.SetRefHelpWndVM(Me) + End Sub + +#Region "COMMANDS" + +#Region "SoftwareStructure" + + Public ReadOnly Property SoftwareStructure_Command As ICommand + Get + If m_cmdSoftwareStructure Is Nothing Then + m_cmdSoftwareStructure = New Command(AddressOf SoftwareStructure) + End If + Return m_cmdSoftwareStructure + End Get + End Property + + Public Sub SoftwareStructure() + + End Sub + +#End Region ' SoftwareStructure + +#Region "Icon" + + Public ReadOnly Property Icon_Command As ICommand + Get + If m_cmdIcon Is Nothing Then + m_cmdIcon = New Command(AddressOf Icon) + End If + Return m_cmdIcon + End Get + End Property + + Public Sub Icon() + Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.ICON) + End Sub + +#End Region ' Icon + +#Region "ProjectManagerBar" + + Public ReadOnly Property ProjectManagerBar_Command As ICommand + Get + If m_cmdProjectManagerBar Is Nothing Then + m_cmdProjectManagerBar = New Command(AddressOf ProjectManagerBar) + End If + Return m_cmdProjectManagerBar + End Get + End Property + + Public Sub ProjectManagerBar() + Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.PROJECTMANAGER) + End Sub + +#End Region ' ProjectManagerBar + +#Region "Close" + + Public ReadOnly Property Close_Command As ICommand + Get + If m_cmdClose Is Nothing Then + m_cmdClose = New Command(AddressOf Close) + End If + Return m_cmdClose + End Get + End Property + + Public Sub Close() + Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.NULL) + Map.SetRefHelpWndVM(Nothing) + RaiseEvent m_CloseWindow(True) + End Sub + +#End Region ' Close + +#End Region ' COMMANDS + +End Class diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj index ce431f1..543ce9a 100644 --- a/Icarus/Icarus.vbproj +++ b/Icarus/Icarus.vbproj @@ -158,6 +158,20 @@ FilledSolidParamPanelV.xaml + + HelpPanelV.xaml + + + + Icon_Tooltip.xaml + + + ProjectManager_Tooltip.xaml + + + HelpWndV.xaml + + ImportExportMachiningPanelV.xaml @@ -370,6 +384,22 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer XamlIntelliSenseFileGenerator diff --git a/Icarus/ProjManager/ProjManagerV.xaml b/Icarus/ProjManager/ProjManagerV.xaml index 8433dd3..37df586 100644 --- a/Icarus/ProjManager/ProjManagerV.xaml +++ b/Icarus/ProjManager/ProjManagerV.xaml @@ -86,5 +86,12 @@ + diff --git a/Icarus/ProjManager/ProjManagerVM.vb b/Icarus/ProjManager/ProjManagerVM.vb index 5fa3046..297ca60 100644 --- a/Icarus/ProjManager/ProjManagerVM.vb +++ b/Icarus/ProjManager/ProjManagerVM.vb @@ -63,6 +63,7 @@ Public Class ProjManagerVM Private m_cmdExport As ICommand Private m_cmdOptions As ICommand Private m_cmdSendFeedback As ICommand + Private m_cmdHelp As ICommand #Region "ToolTip" @@ -385,7 +386,7 @@ Public Class ProjManagerVM Map.refSceneHostVM.SaveProject() End If EgtGetCurrFilePath(sCurrProject) - ' se modificato, chiedo se si vuole salvare + ' se modificato, chiedo se si vuole salvare Else If EgtGetModified() Then If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then @@ -483,6 +484,30 @@ Public Class ProjManagerVM #End Region ' SendFeedback +#Region "Help" + + ''' + ''' Returns a command that do SendFeedback. + ''' + Public ReadOnly Property Help_Command As ICommand + Get + If m_cmdHelp Is Nothing Then + m_cmdHelp = New Command(AddressOf Help) + End If + Return m_cmdHelp + End Get + End Property + + ''' + ''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand. + ''' + Public Sub Help(ByVal param As Object) + Dim HelpWnd As New HelpWndV(Application.Current.MainWindow, New HelpWndVM()) + HelpWnd.Show() + End Sub + +#End Region ' Help + #End Region ' Commands End Class diff --git a/Icarus/SecondaryWindow/SecondaryWindowV.xaml b/Icarus/SecondaryWindow/SecondaryWindowV.xaml index deead99..fdc9113 100644 --- a/Icarus/SecondaryWindow/SecondaryWindowV.xaml +++ b/Icarus/SecondaryWindow/SecondaryWindowV.xaml @@ -15,6 +15,9 @@ + + + @@ -26,5 +29,4 @@ - diff --git a/Icarus/Utility/Dictionary.xaml b/Icarus/Utility/Dictionary.xaml index 3b0087f..bef8c45 100644 --- a/Icarus/Utility/Dictionary.xaml +++ b/Icarus/Utility/Dictionary.xaml @@ -52,6 +52,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4701,6 +4838,17 @@ --> + + + + + + + + diff --git a/Icarus/Utility/Map.vb b/Icarus/Utility/Map.vb index f00f69c..6976ce9 100644 --- a/Icarus/Utility/Map.vb +++ b/Icarus/Utility/Map.vb @@ -35,6 +35,8 @@ Module Map Private m_refManagePartPanelVM As ManagePartPanelVM Private m_refMachineViewPanelVM As MachineViewPanelVM Private m_refImportLoadingWndVM As ImportLoadingWndVM + Private m_refHelpPanelVM As HelpPanelVM + Private m_refHelpWndVM As HelpWndVM #Region "Get" @@ -247,6 +249,18 @@ Module Map End Get End Property + Public ReadOnly Property refHelpPanelVM As HelpPanelVM + Get + Return m_refHelpPanelVM + End Get + End Property + + Public ReadOnly Property refHelpWndVM As HelpWndVM + Get + Return m_refHelpWndVM + End Get + End Property + #End Region ' Get #Region "Set" @@ -415,6 +429,16 @@ Module Map Return Not IsNothing(m_refImportLoadingWndVM) End Function + Friend Function SetRefHelpPanelVM(HelpPanelVM As HelpPanelVM) As Boolean + m_refHelpPanelVM = HelpPanelVM + Return Not IsNothing(m_refHelpPanelVM) + End Function + + Friend Function SetRefHelpWndVM(HelpWndVM As HelpWndVM) As Boolean + m_refHelpWndVM = HelpWndVM + Return Not IsNothing(m_refHelpWndVM) + End Function + #End Region ' Set #Region "Init"