Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Merge dev changes into the master branch #95

Merged
merged 45 commits into from
Dec 19, 2017
Merged

Merge dev changes into the master branch #95

merged 45 commits into from
Dec 19, 2017

Conversation

justingaffney
Copy link
Collaborator

  • Decoupled all relevant view model classes except CertificateApplicationViewModel from their respective view classes and moved them into a separate .NET standard 2.0 project
  • Removed all static method calls from view model classes to allow unit tests to be written to test them
  • Moved all code not specific to WPF or Windows (besides the view model classes) into separate .NET standard 2.0 project named Neo.Gui.Base
  • Extracted wallet and blockchain logic from view model classes and moved into separate controller classes in Neo.Gui.Base project
  • Added Neo.Gui.ViewModels.Tests project for testing view model classes

aboimpinto and others added 30 commits November 14, 2017 21:08
* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.
…#36)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor
* Fixed wallet password changing, fixed restore accounts, fixed HomeView menu items not enabling when wallet is opened

* Added input binding to open the wallet in OpenWalletView when the enter key is pressed
…kChainController.cs (#51)

Also added a very basic splash screen, which needs a lot of work
…art, added basic IDialogHelper implementation (#47)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44
* Small splash screen improvements

* Moved logo icon file to Resources directory, added logo to splash screen
Replaced Program.Main method with an auto-generated Main method inside App
Replaced references with IBlockChainController method calls
…er (#57)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController
This compile tag was accidentally removed from the .csproj file
…tsViewModel, AssetsViewModel and TransactionsViewModel (#60)
…ler, small UI changes (#61)

* Refactored private WalletController method names to help clarify what they do

* Cleaned up wallet status updating code, added RemoteBlockChainController, small UI changes
* Fixes for various problems

* Renamed Neo.Gui.Helpers project to Neo.Gui.Base, move some interfaces to Neo.Gui.Base, renamed neo-gui project to Neo.Gui.Wpf

* Updated name of Neo.Gui.Base directory

* Converted static VersionHelper class to an injectable class and added IVersionHelper interface to Neo.Gui.Base

* Fixed error with VersionHelper in App.xaml.cs

* Added newer version checking back

* Replaced IApplicationContext instance with static IoC container lifetime scope setter method in DialogHelper

* Deleted PeerState.cs and moved logic into LocalBlockChainController

* Moved a few classes to Neo.Gui.Base

* Moved sharable theming logic to Neo.Gui.Base

* Moved classes into Neo.Gui.Base project

* Changed directory structure for some classes
* Refactored namespaces in Neo.Gui.Base to reflect changes in directory structure

* Refactored namespaces in Neo.Gui.Wpf project
* Added Neo.Gui.ViewModels project, fixed resource paths

* Extracted System.Drawing.Color to System.Windows.Media.Color conversion to a separate extensions class

* Moved remaining messaging classes and interfaces to Neo.Gui.Base, moved all registration module classes to one directory

* Moved dialog result classes to Neo.Gui.Base, removed references to views from view model classes

* Removed all remaining direct references to Neo.Core.Blockchain class from view models and replaced with IBlockChainController calls

* Moved message classes to Neo.Gui.Base

* Modified namespaces of message classes to reflect new location
* Changed Blockchain.PersistCompleted event handler add and remove wrapper methods to an event

* Moved collection item class to Neo.Gui.Base project

* Refactoring and UI changes
* Moved CertificateQueryService to base project, added BaseRegistrationModule

* Changed CertificateQueryService to internal
…sses (#69)

* Removed most references to IBlockChainController from view model classes, removed Neo.Gui.Wpf references from IWalletController

* Moved WalletController to Neo.Gui.Base project
… references with MvvmLight equivalent class (#70)
…yCommand references with MvvmLight equivalent class (#70)"

This reverts commit 07c5150.
…model classes (#71)

* Removed all remaining references to IBlockChainController from view models

* Added IMessageSubscriber.Unsubscribe() calls to view models that were subscribing to messages

* Refactored controller class namespaces
…ing LocalBlockChainController to base project (#72)

* Moved root certificate installation from LocalBlockChainController to App

* Moved RemoteBlockChainController to base project
aboimpinto and others added 14 commits December 4, 2017 18:44
…models (#75)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>
* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82
* Refactored class names to separate them into either Helper, Service or Manager classes

* Added injectable ClipboardManager class

* Replaced Clipboard references with IClipboardManager references

* Added settings manager interface and implementation class files

* Replaced some references to Neo.Gui.Wpf.Properties.Settings with ISettingsManager

* Moved LocalBlockchainController to Neo.Gui.Base project

* Abstracted some settings to ISettingsManager, added ToAddress and ToScriptHash wrapper method in IWalletController to remove more NEO lib references from view models

* Fixed typo, abstracted all remaining settings used by view models into ISettingsViewModel

* Fixed merge errors

* Moved abstracted settings logic to ISettingManager
* Abstracted most file operations out of view models

* Added ICompressedFileManager to abstract compressed file operations from view models, moved file manager implementation classes to base project
…replaced with method calls to IDialogManager (#86)
* Removed references of InputBox and InformationBox controls from all view models and replaced with calls to IDialogManager methods, cleaned up application intialization logic

* Moved NeoWindow style to newly added StyleResources resource dictionary file

* Replaced usages of MahApps dialog management library with IDialogManager.ShowMessageDialog method calls
* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82

* First unit tests for HomeViewModel

#46

* Add testes to MessageHandlers

* Delete SettingsHelper.cs

* Delete ISettingsHelper.cs
…ct (#90)

Also updated Neo nuget package version to 2.4.1
* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82

* First unit tests for HomeViewModel

#46

* Add testes to MessageHandlers

* Delete SettingsHelper.cs

* Delete ISettingsHelper.cs

* All public methods in HomeViewModel is fully tested

#46

* Fix references due the change of the ViewModels to their own project

#46

* AssetsViewModelTests class created and GUI reference removed from the Tests Project

#46
* Updated Neo nuget package version to 2.5.0

* Removed RestoreAccount dialog

* Merged changes from neo-project/neo-gui

* Fix bug of not saving wallet file

* Updated Neo nuget packages

* Added GetStandardAccounts method to IWalletController to reduce duplicate code

* Fixed bug with not clearing the flag that indicates whether wallet balance has changed

* Removed old leftover neo-gui directory

* Fixed error from merge

* Code cleanup, added missing NEP-6 wallet Save method calls
…tion generation logic into WalletController (#94)

* Code cleanup, added missing NEP-6 wallet Save method calls

* Removed unused exception class file

* Moved certificate viewing logic to CertficateService, moved transaction generation logic to WalletController. Moved BulkPayViewModel, PayToViewModel and SigningViewModel to Neo.Gui.ViewModels project

* Replaced RelayCommand and ViewModelBase implementations with MvvmLight library implementations

* Add #if DEBUG statements to prevent application from loading update XML document when running a debug build

* Cleaned up namespaces to reflect current directory structure
@justingaffney
Copy link
Collaborator Author

@aboimpinto

@justingaffney justingaffney merged commit 62b18d8 into master Dec 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants