From 73cd219b4f895ca4dfd5b72b868ec873d1cd7580 Mon Sep 17 00:00:00 2001 From: Khaja Nizamuddin Date: Wed, 30 Aug 2017 05:23:13 +0530 Subject: [PATCH 1/2] Button name added. Studio UX improved, Next Node, Prev Node Buttons, Node search added. Sticky mouse issue fixed. --- .../ButtonActionCommand.cs | 3 + ANAConversationSimulator/Styles/Custom.xaml | 10 +- .../ViewModels/MainPageViewModel.cs | 6 + .../ANAConversationStudio.csproj | 5 +- ANAConversationStudio/App.xaml | 2 +- ANAConversationStudio/Helpers/Utilities.cs | 54 ++++++- .../Models/Chat/BaseContent.cs | 14 ++ .../Models/Chat/BaseEntity.cs | 13 +- ANAConversationStudio/Models/Chat/Button.cs | 25 +++- .../Models/Chat/Sections/Section.cs | 2 +- .../Models/ChatFlowSearchItem.cs | 11 ++ .../Styles/EditorTemplates.xaml | 9 +- .../UIHelpers/IsStartNodeToBrushConverter.cs | 2 +- .../ViewModels/MainWindowViewModel.cs | 24 +++- .../ViewModels/NetworkViewModel.cs | 1 + .../ViewModels/NodeViewModel.cs | 3 + ANAConversationStudio/Views/MainWindow.xaml | 125 ++++++++++++---- .../Views/MainWindow.xaml.cs | 135 +++++++++++++----- 18 files changed, 349 insertions(+), 95 deletions(-) create mode 100644 ANAConversationStudio/Models/ChatFlowSearchItem.cs diff --git a/ANAConversationSimulator/Services/ChatInterfaceServices/ButtonActionCommand.cs b/ANAConversationSimulator/Services/ChatInterfaceServices/ButtonActionCommand.cs index 7ddec2b..014befc 100644 --- a/ANAConversationSimulator/Services/ChatInterfaceServices/ButtonActionCommand.cs +++ b/ANAConversationSimulator/Services/ChatInterfaceServices/ButtonActionCommand.cs @@ -32,6 +32,9 @@ public async void Execute(object parameter) if (Utils.IsSectionTypePresentInNode(parentNode, SectionTypeEnum.PrintOTP)) button.VariableValue = PrintOTPSection.OTP; + if (string.IsNullOrWhiteSpace(button.ButtonText)) + button.ButtonText = button.ButtonName; + var userData = new Dictionary(); switch (button.ButtonType) { diff --git a/ANAConversationSimulator/Styles/Custom.xaml b/ANAConversationSimulator/Styles/Custom.xaml index 10dd51e..cfb12e4 100644 --- a/ANAConversationSimulator/Styles/Custom.xaml +++ b/ANAConversationSimulator/Styles/Custom.xaml @@ -195,7 +195,7 @@ @@ -218,7 +218,7 @@ - + +