├── Source
├── ProviderLauncher
│ ├── Providers.xml
│ ├── dropbox.ico
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
│ ├── App.config
│ ├── Program.cs
│ ├── app.manifest
│ └── AddProvider.cs
├── DfBAdminToolkit
│ ├── Install Config
│ │ ├── Providers.xml
│ │ └── DfBAdminToolkit.exe.config
│ ├── Templates
│ │ ├── TeamFolderTemplate.csv
│ │ ├── ProvisioningTemplate.csv
│ │ ├── FilterOnMemberEventsTemplate.csv
│ │ ├── GroupsBulkAddTemplate.csv
│ │ ├── UpdateMembersTemplate.csv
│ │ └── GroupsBulkAddMembersTemplate.csv
│ ├── dropbox.ico
│ ├── Misc
│ │ └── dropbox.ico
│ ├── Model
│ │ ├── ILegalModel.cs
│ │ ├── IMainModel.cs
│ │ ├── IModel.cs
│ │ ├── MainModel.cs
│ │ ├── LegalModel.cs
│ │ ├── IDataMigrationModel.cs
│ │ ├── IPaperModel.cs
│ │ ├── ITeamAuditingModel.cs
│ │ ├── ITeamFoldersModel.cs
│ │ ├── ISettingsModel.cs
│ │ ├── IDevicesModel.cs
│ │ ├── IGroupsModel.cs
│ │ ├── ITextSearchModel.cs
│ │ ├── IDumpUserContentModel.cs
│ │ ├── PaperModel.cs
│ │ ├── TeamFoldersHeaderRecord.cs
│ │ ├── IProvisioningModel.cs
│ │ ├── TeamAuditingModel.cs
│ │ ├── DevicesModel.cs
│ │ ├── DataMigrationModel.cs
│ │ ├── TeamFoldersModel.cs
│ │ ├── GroupsModel.cs
│ │ ├── DumpUserContentModel.cs
│ │ ├── TeamFoldersMembersHeaderRecord.cs
│ │ ├── DevicesHeaderRecord.cs
│ │ ├── ITeamHealthModel.cs
│ │ ├── SettingsModel.cs
│ │ ├── PaperHeaderRecord.cs
│ │ ├── TeamHealthListViewItemModel.cs
│ │ ├── ProvisioningModel.cs
│ │ ├── GroupInfoHeaderRecord.cs
│ │ ├── DataMigrationHeaderRecord.cs
│ │ ├── TeamFoldersListViewItemModel.cs
│ │ ├── TeamAuditingHeaderMap.cs
│ │ ├── TeamHealthModel.cs
│ │ ├── GroupPermsHeaderRecord.cs
│ │ ├── FileListViewItemModel.cs
│ │ ├── GroupListViewItemModel.cs
│ │ ├── TextSearchModel.cs
│ │ ├── PaperListViewItemModel.cs
│ │ ├── TeamFoldersPermsItemModel.cs
│ │ ├── DeviceListViewItemModel.cs
│ │ ├── TeamListViewItemModel.cs
│ │ ├── TeamAuditingListViewItemModel.cs
│ │ ├── GroupInfoItemModel.cs
│ │ ├── MemberListViewItemModel.cs
│ │ ├── ContentDisplayListViewItemModel.cs
│ │ └── GroupPermsItemModel.cs
│ ├── Referenced Dlls
│ │ ├── AGauge.dll
│ │ ├── RestSharp.dll
│ │ ├── CustomTabControl.dll
│ │ ├── MRG.Controls.UI.dll
│ │ └── Newtonsoft.Json.dll
│ ├── Presenter
│ │ ├── ILegalPresenter.cs
│ │ ├── IPaperPresenter.cs
│ │ ├── IGroupsPresenter.cs
│ │ ├── ITeamHealthPresenter.cs
│ │ ├── ITextSearchPresenter.cs
│ │ ├── IDataMigrationPresenter.cs
│ │ ├── IProvisioningPresenter.cs
│ │ ├── ITeamAuditingPresenter.cs
│ │ ├── ITeamFoldersPresenter.cs
│ │ ├── ISettingsPresenter.cs
│ │ ├── IDevicesPresenter.cs
│ │ ├── IDumpUserContentPresenter.cs
│ │ ├── IPresenter.cs
│ │ ├── IMainPresenter.cs
│ │ ├── LegalPresenter.cs
│ │ └── MainPresenter.cs
│ ├── View
│ │ ├── ILegalView.cs
│ │ ├── ITeamHealthView.cs
│ │ ├── Overlay
│ │ │ └── MemberInfoOverlay.cs
│ │ ├── IMainView.cs
│ │ ├── IView.cs
│ │ ├── IDataMigrationView.cs
│ │ ├── ISettingsView.cs
│ │ ├── ITextSearchView.cs
│ │ ├── IPaperView.cs
│ │ ├── ITeamAuditingView.cs
│ │ ├── IDevicesView.cs
│ │ ├── IGroupsView.cs
│ │ ├── ITeamFoldersView.cs
│ │ ├── IDumpUserContentView.cs
│ │ ├── IProvisioningView.cs
│ │ ├── VersionWindow.cs
│ │ ├── LegalView.cs
│ │ └── SettingsView.cs
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
│ ├── packages.config
│ ├── app.manifest
│ ├── Tooltips.cs
│ ├── Services
│ │ └── GitHubService.cs
│ ├── Program.cs
│ ├── ConfigBackup
│ │ └── DfBAdminToolkit.exe.config
│ └── App.config
├── DfBAdminToolkit.Common
│ ├── Services
│ │ ├── IData.cs
│ │ ├── IDataResponse.cs
│ │ ├── IServiceResponse.cs
│ │ ├── ServiceResponse.cs
│ │ ├── DataResponse.cs
│ │ ├── IMemberData.cs
│ │ └── MemberData.cs
│ ├── packages.config
│ ├── DataExchange
│ │ └── DataUpdatedEventArgs.cs
│ ├── Utils
│ │ ├── TimerUtils.cs
│ │ ├── RegistryUtils.cs
│ │ ├── SimpleResolver.cs
│ │ └── MessageBoxUtil.cs
│ ├── Component
│ │ ├── ButtonEx.Designer.cs
│ │ ├── TextBoxEx.Designer.cs
│ │ ├── FormEx.cs
│ │ └── TextBoxEx.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Extensions
│ │ └── StringExtension.cs
│ └── DfBAdminToolkit.Common.csproj
├── packages
│ ├── RestSharp.105.2.3
│ │ ├── lib
│ │ │ ├── net4
│ │ │ │ └── RestSharp.dll
│ │ │ ├── sl5
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net35
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net45
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net451
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net452
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net46
│ │ │ │ └── RestSharp.dll
│ │ │ ├── MonoTouch10
│ │ │ │ └── RestSharp.dll
│ │ │ ├── net4-client
│ │ │ │ └── RestSharp.dll
│ │ │ ├── MonoAndroid10
│ │ │ │ └── RestSharp.dll
│ │ │ ├── Xamarin.iOS10
│ │ │ │ └── RestSharp.dll
│ │ │ ├── windowsphone8
│ │ │ │ └── RestSharp.dll
│ │ │ └── windowsphone81
│ │ │ │ └── RestSharp.dll
│ │ ├── RestSharp.105.2.3.nupkg
│ │ └── readme.txt
│ ├── CsvHelper.2.13.5.0
│ │ ├── CsvHelper.2.13.5.0.nupkg
│ │ └── lib
│ │ │ ├── net20
│ │ │ ├── CsvHelper.dll
│ │ │ └── CsvHelper.pdb
│ │ │ ├── net35-client
│ │ │ ├── CsvHelper.dll
│ │ │ └── CsvHelper.pdb
│ │ │ ├── net40-client
│ │ │ ├── CsvHelper.dll
│ │ │ └── CsvHelper.pdb
│ │ │ └── portable-net40+sl5+win8+wpa+wp8
│ │ │ ├── CsvHelper.dll
│ │ │ └── CsvHelper.pdb
│ ├── Newtonsoft.Json.7.0.1
│ │ ├── Newtonsoft.Json.7.0.1.nupkg
│ │ ├── lib
│ │ │ ├── net20
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── net35
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── net40
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── net45
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── portable-net40+sl5+wp80+win8+wpa81
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ └── portable-net45+wp80+win8+wpa81+dnxcore50
│ │ │ │ └── Newtonsoft.Json.dll
│ │ └── tools
│ │ │ └── install.ps1
│ └── ObjectListView.Official.2.9.0
│ │ ├── lib
│ │ └── net20
│ │ │ └── ObjectListView.dll
│ │ └── ObjectListView.Official.2.9.0.nupkg
└── DfBAdminToolkit.sln
├── Installer
└── DBAdminToolkit.zip
├── Dropbox_Business_Admin_Toolkit_Admin_Guide.pdf
├── .gitignore
└── README.md
/Source/ProviderLauncher/Providers.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Install Config/Providers.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/TeamFolderTemplate.csv:
--------------------------------------------------------------------------------
1 | Test1016
2 | Test1018
3 | Test1020
4 |
--------------------------------------------------------------------------------
/Installer/DBAdminToolkit.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Installer/DBAdminToolkit.zip
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/ProvisioningTemplate.csv:
--------------------------------------------------------------------------------
1 | jbanks@email.com,Joe,Banks
2 | jdoe@email.com,Jane,Doe
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/FilterOnMemberEventsTemplate.csv:
--------------------------------------------------------------------------------
1 | user1@dropbox.com
2 | user2@dropbox.com
3 | user3@dropbox.com
4 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/GroupsBulkAddTemplate.csv:
--------------------------------------------------------------------------------
1 | TestGroup1,user_managed
2 | TestGroup2,user_managed
3 | TestGroup3,user_managed
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/dropbox.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/dropbox.ico
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/IData.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 | public interface IData {
3 | }
4 | }
--------------------------------------------------------------------------------
/Source/ProviderLauncher/dropbox.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/ProviderLauncher/dropbox.ico
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Misc/dropbox.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Misc/dropbox.ico
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ILegalModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 | public interface ILegalModel
3 | : IModel {
4 | }
5 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IMainModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 | public interface IMainModel
3 | : IModel {
4 | }
5 | }
--------------------------------------------------------------------------------
/Dropbox_Business_Admin_Toolkit_Admin_Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Dropbox_Business_Admin_Toolkit_Admin_Guide.pdf
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/UpdateMembersTemplate.csv:
--------------------------------------------------------------------------------
1 | jbanks@gmail.com,jbanks@gmail-dev.com,17393722876
2 | jdoe@@gmail.com,jbanks@gmail-dev.com,
3 |
4 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Referenced Dlls/AGauge.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Referenced Dlls/AGauge.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ILegalPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface ILegalPresenter
3 | : IPresenter {
4 | }
5 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Referenced Dlls/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Referenced Dlls/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net4/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net4/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/sl5/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/sl5/RestSharp.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Referenced Dlls/CustomTabControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Referenced Dlls/CustomTabControl.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Referenced Dlls/MRG.Controls.UI.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Referenced Dlls/MRG.Controls.UI.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Referenced Dlls/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/DfBAdminToolkit/Referenced Dlls/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/CsvHelper.2.13.5.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/CsvHelper.2.13.5.0.nupkg
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net20/CsvHelper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net20/CsvHelper.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net20/CsvHelper.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net20/CsvHelper.pdb
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/RestSharp.105.2.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/RestSharp.105.2.3.nupkg
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net35/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net35/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net45/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net45/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net451/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net451/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net452/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net452/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net46/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net46/RestSharp.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 | public interface IModel {
3 |
4 | void Initialize();
5 |
6 | void CleanUp();
7 | }
8 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Templates/GroupsBulkAddMembersTemplate.csv:
--------------------------------------------------------------------------------
1 | TestGroup1,g:20f0f9fa5a8bf93000000000000e67c5,user1@yahoo.com
2 | TestGroup1,g:20f0f9fa5a8bf93000000000000e67c5,myemail@gmail.com
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/MonoTouch10/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/MonoTouch10/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/net4-client/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/net4-client/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net35-client/CsvHelper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net35-client/CsvHelper.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net35-client/CsvHelper.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net35-client/CsvHelper.pdb
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net40-client/CsvHelper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net40-client/CsvHelper.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/net40-client/CsvHelper.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/net40-client/CsvHelper.pdb
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/Newtonsoft.Json.7.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/Newtonsoft.Json.7.0.1.nupkg
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/MonoAndroid10/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/MonoAndroid10/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/Xamarin.iOS10/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/Xamarin.iOS10/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/windowsphone8/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/windowsphone8/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/lib/windowsphone81/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/RestSharp.105.2.3/lib/windowsphone81/RestSharp.dll
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/net35/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/net35/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/net40/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/net40/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IPaperPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IPaperPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IGroupsPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IGroupsPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/packages/ObjectListView.Official.2.9.0/lib/net20/ObjectListView.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/ObjectListView.Official.2.9.0/lib/net20/ObjectListView.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ITeamHealthPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface ITeamHealthPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ITextSearchPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface ITextSearchPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/IDataResponse.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 | public interface IDataResponse
3 | : IServiceResponse {
4 | object Data { get; set; }
5 | }
6 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IDataMigrationPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IDataMigrationPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IProvisioningPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IProvisioningPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ITeamAuditingPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface ITeamAuditingPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ITeamFoldersPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface ITeamFoldersPresenter
3 | : IPresenter {
4 |
5 | void UpdateSettings();
6 | }
7 | }
--------------------------------------------------------------------------------
/Source/packages/ObjectListView.Official.2.9.0/ObjectListView.Official.2.9.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/ObjectListView.Official.2.9.0/ObjectListView.Official.2.9.0.nupkg
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.dll
--------------------------------------------------------------------------------
/Source/packages/CsvHelper.2.13.5.0/lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/CsvHelper.2.13.5.0/lib/portable-net40+sl5+win8+wpa+wp8/CsvHelper.pdb
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/ISettingsPresenter.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 |
3 | namespace DfBAdminToolkit.Presenter {
4 | public interface ISettingsPresenter {
5 |
6 | void ShowSettings(IWin32Window owner);
7 | }
8 | }
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IDevicesPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IDevicesPresenter
3 | : IPresenter {
4 | string[] ContextMenuItemText { get; set; }
5 |
6 | void UpdateSettings();
7 | }
8 | }
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dropbox/DropboxBusinessAdminTool/master/Source/packages/Newtonsoft.Json.7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IDumpUserContentPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IDumpUserContentPresenter
3 | : IPresenter {
4 | string[] ContextMenuItemText { get; set; }
5 |
6 | void UpdateSettings();
7 | }
8 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ILegalView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using System;
4 |
5 | public interface ILegalView
6 | : IView
7 | {
8 | event EventHandler CommandDecline;
9 | event EventHandler CommandAccept;
10 | }
11 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/IServiceResponse.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 |
3 | using System.Net;
4 |
5 | public interface IServiceResponse {
6 | HttpStatusCode StatusCode { get; set; }
7 |
8 | string Message { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 |
3 | using System.Threading;
4 |
5 | public interface IPresenter {
6 | bool IsViewEventsWired { get; set; }
7 |
8 | SynchronizationContext SyncContext { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Source/ProviderLauncher/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/MainModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | public class MainModel
4 | : IMainModel {
5 |
6 | public MainModel() {
7 | }
8 |
9 | public void Initialize() {
10 | }
11 |
12 | public void CleanUp() {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/LegalModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | public class LegalModel
4 | : ILegalModel {
5 |
6 | public LegalModel() {
7 | }
8 |
9 | public void Initialize() {
10 | }
11 |
12 | public void CleanUp() {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Source/ProviderLauncher/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IDataMigrationModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface IDataMigrationModel
6 | : IModel {
7 | List Contents { get; set; }
8 | string AccessToken { get; set; }
9 | string OutputFileName { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IPaperModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface IPaperModel
6 | : IModel {
7 |
8 | string AccessToken { get; set; }
9 |
10 | string TeamFoldersInputFilePath { get; set; }
11 |
12 | List Paper { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ITeamAuditingModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface ITeamAuditingModel
6 | : IModel {
7 |
8 | string AccessToken { get; set; }
9 |
10 | string MemberInputFilePath { get; set; }
11 |
12 | List TeamAuditing { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ITeamHealthView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface ITeamHealthView
8 | : IView
9 | {
10 | event EventHandler CommandRefresh;
11 |
12 | string AccessToken { get; set; }
13 |
14 | void RefreshAccessToken();
15 |
16 | void LoadViewHealthItems(ITeamHealthModel model);
17 |
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ITeamFoldersModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface ITeamFoldersModel
6 | : IModel {
7 |
8 | string AccessToken { get; set; }
9 |
10 | string TeamFoldersInputFilePath { get; set; }
11 |
12 | List TeamFolders { get; set; }
13 |
14 | List TeamFoldersPerms { get; set; }
15 | }
16 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/Overlay/MemberInfoOverlay.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DfBAdminToolkit.View.Overlay
3 | {
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using BrightIdeasSoftware;
10 | using System.Drawing;
11 | using System.Windows.Forms;
12 | public class MemberInfoOverlay
13 | : AbstractOverlay {
14 | //TODO: support custom overlay
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ISettingsModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 | public interface ISettingsModel
3 | : IModel {
4 | string DefaultAccessToken { get; set; }
5 | string DefaultProvisionToken { get; set; }
6 | int SearchDefaultLimit { get; set; }
7 | string ApiBaseUrl { get; set; }
8 | string ApiContentBaseUrl { get; set; }
9 | string ApiVersion { get; set; }
10 | bool SuppressFilenamesInStatus { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/ServiceResponse.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 |
3 | using System.Net;
4 |
5 | public class ServiceResponse
6 | : IServiceResponse {
7 |
8 | public ServiceResponse(
9 | HttpStatusCode code, string msg) {
10 | StatusCode = code;
11 | Message = msg;
12 | }
13 |
14 | public HttpStatusCode StatusCode { get; set; }
15 |
16 | public string Message { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IMainView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using System;
4 |
5 | public interface IMainView
6 | : IView
7 | {
8 | void EnableLoadingSpinner(bool enable);
9 |
10 | void EnableView(bool enable);
11 |
12 | void UpdateTitleBarTeamStats();
13 |
14 | void UpdateProgressText(string text);
15 |
16 | void ShowErrorMessage(string message, string title);
17 |
18 | void ShowInfoMessage(string message);
19 | }
20 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IDevicesModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface IDevicesModel
6 | : IModel {
7 | string UserAccessToken { get; set; }
8 |
9 | string Filter { get; set; }
10 |
11 | string FilterType { get; set; }
12 |
13 | string FilterCriteria { get; set; }
14 |
15 | string OutputFileName { get; set; }
16 |
17 | List DeviceList { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/IMainPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 | public interface IMainPresenter
3 | : IPresenter {
4 |
5 | void ShowView();
6 |
7 | void ActivateSpinner(bool activate);
8 |
9 | void EnableControl(bool enable);
10 |
11 | void UpdateProgressInfo(string text);
12 |
13 | void ShowErrorMessage(string text, string title);
14 |
15 | void ShowInfoMessage(string text);
16 |
17 | void UpdateTitleBarStats();
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 |
3 | {
4 | using System;
5 | using System.Threading;
6 |
7 | public interface IView
8 | {
9 | event EventHandler DataChanged;
10 |
11 | SynchronizationContext SyncContext { get; set; }
12 |
13 | bool ComponentEventsWired { get; set; }
14 |
15 | void WireComponentEvents();
16 |
17 | void UnWireComponentEvents();
18 |
19 | void Initialize();
20 |
21 | void ShowView();
22 |
23 | void HideView();
24 | }
25 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IGroupsModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface IGroupsModel
6 | : IModel {
7 |
8 | string AccessToken { get; set; }
9 |
10 | string GroupInputFilePath { get; set; }
11 |
12 | string GroupMemberInputFilePath { get; set; }
13 |
14 | List Groups { get; set; }
15 |
16 | List GroupInfo { get; set; }
17 |
18 | List GroupPerms { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IDataMigrationView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View {
2 |
3 | using System;
4 |
5 | public interface IDataMigrationView
6 | : IView {
7 | event EventHandler CommandDisplayContent;
8 | event EventHandler CommandExportContent;
9 | event EventHandler CommandExportContentExcel;
10 |
11 | string OutputFileName { get; set; }
12 |
13 | void RenderContentSearchResult();
14 |
15 | void EnableExportControl(bool enable);
16 |
17 | void EnableExportButton(bool enable);
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/DataResponse.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 |
3 | using System.Net;
4 |
5 | public class DataResponse
6 | : IDataResponse {
7 |
8 | public DataResponse(
9 | HttpStatusCode code, string msg, object data) {
10 | StatusCode = code;
11 | Message = msg;
12 | Data = data;
13 | }
14 |
15 | public HttpStatusCode StatusCode { get; set; }
16 |
17 | public string Message { get; set; }
18 |
19 | public object Data { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ITextSearchModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface ITextSearchModel
6 | : IModel {
7 | List MemberList { get; set; }
8 |
9 | List SearchModeList { get; set; }
10 |
11 | string AccessToken { get; set; }
12 |
13 | string QueryString { get; set; }
14 |
15 | string SelectedSearchMode { get; set; }
16 |
17 | int SearchResultsLimit { get; set; }
18 |
19 | string GetSearchModeForService();
20 | }
21 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IDumpUserContentModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public interface IDumpUserContentModel
6 | : IModel {
7 | string UserAccessToken { get; set; }
8 |
9 | List MemberList { get; set; }
10 |
11 | string OutputFolder { get; set; }
12 |
13 | bool ZipFiles { get; set; }
14 |
15 | bool SuspendUser { get; set; }
16 |
17 | bool DeleteUser { get; set; }
18 |
19 | bool KeepAccount { get; set; }
20 |
21 | bool RemoveSharing { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Source/ProviderLauncher/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace ProviderLauncher
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Main());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/DataExchange/DataUpdatedEventArgs.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.DataExchange {
2 |
3 | using System;
4 |
5 | public class DataUpdatedEventArgs
6 | : EventArgs {
7 | private object[] _data;
8 |
9 | public object Data {
10 | get { return _data[0]; }
11 | }
12 |
13 | public object[] DataPack {
14 | get { return _data; }
15 | }
16 |
17 | public DataUpdatedEventArgs(object data) {
18 | _data = new object[] { data };
19 | }
20 |
21 | public DataUpdatedEventArgs(object[] data) {
22 | _data = data;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/PaperModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public class PaperModel
6 | : IPaperModel {
7 |
8 | public string AccessToken { get; set; }
9 |
10 | public string TeamFoldersInputFilePath { get; set; }
11 |
12 | public List Paper { get; set; }
13 |
14 | public PaperModel() {
15 | Initialize();
16 | }
17 |
18 | public void Initialize() {
19 | Paper = new List();
20 | AccessToken = ApplicationResource.DefaultProvisionToken;
21 | }
22 |
23 | public void CleanUp() {
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamFoldersHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 |
6 | public class TeamFoldersHeaderRecord
7 | {
8 | public string TeamFolderName { get; set; }
9 | public string TeamFolderId { get; set; }
10 | public string TeamFolderStatus { get; set; }
11 | }
12 |
13 | public class TeamFoldersHeaderMap : CsvClassMap
14 | {
15 | public TeamFoldersHeaderMap()
16 | {
17 | Map(m => m.TeamFolderName).Name("TeamFolderName");
18 | Map(m => m.TeamFolderId).Name("TeamFolderId");
19 | Map(m => m.TeamFolderStatus).Name("Status");
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ISettingsView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View {
2 |
3 | using System;
4 | using System.Windows.Forms;
5 |
6 | public interface ISettingsView
7 | : IView {
8 | event EventHandler CommandApplySettings;
9 | event EventHandler CommandCancelSettings;
10 |
11 | string DefaultAccessToken { get; set; }
12 | string DefaultProvisionToken { get; set; }
13 | int SearchDefaultLimit { get; set; }
14 | string ApiBaseUrl { get; set; }
15 | string ApiContentBaseUrl { get; set; }
16 | string ApiVersion { get; set; }
17 | bool SuppressFilenamesInStatus { get; set; }
18 |
19 | void LoadSettingValues();
20 | void ShowView(IWin32Window owner);
21 | }
22 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/IProvisioningModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 | using System;
5 |
6 | public interface IProvisioningModel
7 | : IModel {
8 | bool SendWelcomeEmail { get; set; }
9 |
10 | string AccessToken { get; set; }
11 |
12 | string InputFilePath { get; set; }
13 |
14 | string SelectedRole { get; set; }
15 |
16 | bool KeepAccount { get; set; }
17 |
18 | bool RemoveSharing { get; set; }
19 |
20 | string NewEmail { get; set; }
21 |
22 | string NewExternalId { get; set; }
23 |
24 | string ProvisionStatus { get; set; }
25 |
26 | DateTime JoinedOn { get; set; }
27 |
28 | List Members { get; set; }
29 | }
30 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamAuditingModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public class TeamAuditingModel
6 | : ITeamAuditingModel {
7 |
8 | public string AccessToken { get; set; }
9 |
10 | public string MemberInputFilePath { get; set; }
11 |
12 | public List TeamAuditing { get; set; }
13 |
14 | public TeamAuditingModel()
15 | {
16 | Initialize();
17 | }
18 |
19 | public void Initialize()
20 | {
21 | TeamAuditing = new List();
22 | AccessToken = ApplicationResource.DefaultProvisionToken;
23 | }
24 |
25 | public void CleanUp()
26 | {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DevicesModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public class DevicesModel
6 | : IDevicesModel {
7 | public string UserAccessToken { get; set; }
8 |
9 | public string Filter { get; set; }
10 |
11 | public string FilterType { get; set; }
12 |
13 | public string FilterCriteria { get; set; }
14 |
15 | public string OutputFileName { get; set; }
16 |
17 | public List DeviceList { get; set; }
18 |
19 | public DevicesModel() {
20 | UserAccessToken = ApplicationResource.DefaultAccessToken;
21 | DeviceList = new List();
22 | }
23 |
24 | public void Initialize() {
25 | }
26 |
27 | public void CleanUp() {
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DataMigrationModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 | using System.IO;
5 |
6 | public class DataMigrationModel
7 | : IDataMigrationModel {
8 | public List Contents { get; set; }
9 | public string AccessToken { get; set; }
10 | public string OutputFileName { get; set; }
11 |
12 | public DataMigrationModel() {
13 | Initialize();
14 | }
15 |
16 | public void CleanUp() {
17 | }
18 |
19 | public void Initialize() {
20 | // TODO: any necessary initialization here
21 | Contents = new List();
22 | AccessToken = ApplicationResource.DefaultAccessToken;
23 | OutputFileName = Directory.GetCurrentDirectory();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamFoldersModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public class TeamFoldersModel
6 | : ITeamFoldersModel {
7 |
8 | public string AccessToken { get; set; }
9 |
10 | public string TeamFoldersInputFilePath { get; set; }
11 |
12 | public List TeamFolders { get; set; }
13 |
14 | public List TeamFoldersPerms { get; set; }
15 |
16 | public TeamFoldersModel() {
17 | Initialize();
18 | }
19 |
20 | public void Initialize() {
21 | TeamFolders = new List();
22 | TeamFoldersPerms = new List();
23 | AccessToken = ApplicationResource.DefaultProvisionToken;
24 | }
25 |
26 | public void CleanUp() {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ITextSearchView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using DfBAdminToolkit.Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface ITextSearchView
8 | : IView
9 | {
10 | List MemberList { get; set; }
11 |
12 | List SearchModeList { get; set; }
13 |
14 | string AccessToken { get; set; }
15 |
16 | string QueryString { get; set; }
17 |
18 | string SelectedSearchMode { get; set; }
19 |
20 | int SearchResultsLimit { get; set; }
21 |
22 | event EventHandler CommandMemberSearch;
23 | event EventHandler CommandClear;
24 |
25 | void ClearMemberList();
26 |
27 | void RefreshAccessToken();
28 |
29 | void RenderMembersSearchResult();
30 |
31 | void RenderSearchModeSelections();
32 |
33 | void SetSearchResultLimit(int limit);
34 |
35 | void RenderComponents();
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IPaperView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface IPaperView
8 | : IView
9 | {
10 | event EventHandler DataChanged;
11 | event EventHandler CommandGetPaper;
12 | event EventHandler CommandDownloadPaper;
13 | event EventHandler CommandDeletePaper;
14 | event EventHandler CommandExportToCSV;
15 |
16 | string AccessToken { get; set; }
17 |
18 | void RefreshAccessToken();
19 |
20 | void EnableDownloadButton(bool enable);
21 |
22 | string PaperName { get; set; }
23 |
24 | string PaperId { get; set; }
25 |
26 | bool ArchiveSetting { get; set; }
27 |
28 | bool PermanentSetting { get; set; }
29 |
30 | string UserEmail { get; set; }
31 |
32 | string OutputFolder { get; set; }
33 |
34 | void RenderPaperList();
35 |
36 | PaperModel GetPaperIds();
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/packages/RestSharp.105.2.3/readme.txt:
--------------------------------------------------------------------------------
1 | *** IMPORTANT CHANGE IN RESTSHARP VERSION 103 ***
2 |
3 | In 103.0, JSON.NET was removed as a dependency.
4 |
5 | If this is still installed in your project and no other libraries depend on
6 | it you may remove it from your installed packages.
7 |
8 | There is one breaking change: the default Json*Serializer* is no longer
9 | compatible with Json.NET. To use Json.NET for serialization, copy the code
10 | from https://github.com/restsharp/RestSharp/blob/86b31f9adf049d7fb821de8279154f41a17b36f7/RestSharp/Serializers/JsonSerializer.cs
11 | and register it with your client:
12 |
13 | var client = new RestClient();
14 | client.JsonSerializer = new YourCustomSerializer();
15 |
16 | The default Json*Deserializer* is mostly compatible, but it does not support
17 | all features which Json.NET has (like the ability to support a custom [JsonConverter]
18 | by decorating a certain property with an attribute). If you need these features, you
19 | must take care of the deserialization yourself to get it working.
20 |
21 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupsModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 |
5 | public class GroupsModel
6 | : IGroupsModel {
7 |
8 | public string AccessToken { get; set; }
9 |
10 | public string GroupInputFilePath { get; set; }
11 |
12 | public string GroupMemberInputFilePath { get; set; }
13 |
14 | public List Groups { get; set; }
15 |
16 | public List GroupInfo { get; set; }
17 |
18 | public List GroupPerms { get; set; }
19 |
20 | public GroupsModel() {
21 | Initialize();
22 | }
23 |
24 | public void Initialize() {
25 | Groups = new List();
26 | GroupInfo = new List();
27 | GroupPerms = new List();
28 | AccessToken = ApplicationResource.DefaultProvisionToken;
29 | }
30 |
31 | public void CleanUp() {
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Utils/TimerUtils.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Utils {
2 |
3 | using System;
4 |
5 | public class TimerUtils {
6 | private long _startTick;
7 | private long _endTick;
8 | private volatile bool _started;
9 |
10 | public TimerUtils() {
11 | _startTick = 0;
12 | _endTick = 0;
13 | _started = false;
14 | }
15 |
16 | public void Start() {
17 | if (!_started) {
18 | _started = true;
19 | _startTick = DateTime.Now.Ticks;
20 | }
21 | }
22 |
23 | public TimeSpan Stop() {
24 | long diff = 0;
25 | if (_started) {
26 | _endTick = DateTime.Now.Ticks;
27 | diff = _endTick - _startTick;
28 | _started = false;
29 | }
30 | return TimeSpan.FromTicks(diff);
31 | }
32 |
33 | public static string ToTimeStamp(TimeSpan span) {
34 | return span.ToString("g");
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ITeamAuditingView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface ITeamAuditingView
8 | : IView
9 | {
10 | event EventHandler CommandLoadTeamEvents;
11 | event EventHandler CommandLoadCSV;
12 | event EventHandler CommandExportToCSV;
13 | event EventHandler CommandFilterMembers;
14 |
15 | string AccessToken { get; set; }
16 |
17 | DateTime StartTime { get; set; }
18 |
19 | DateTime EndTime { get; set; }
20 |
21 | void RefreshAccessToken();
22 |
23 | string TeamAuditingInputFilePath { get; set; }
24 |
25 | string EventCategory { get; set; }
26 |
27 | void RenderTeamAuditingList(List TeamAuditing);
28 |
29 | List RenderTeamAuditingFilteredMemberList(List members, List TeamAuditing, List newAudit);
30 | }
31 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DumpUserContentModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 | using System.IO;
5 |
6 | public class DumpUserContentModel
7 | : IDumpUserContentModel {
8 | public string UserAccessToken { get; set; }
9 |
10 | public List MemberList { get; set; }
11 |
12 | public string OutputFolder { get; set; }
13 |
14 | public bool ZipFiles { get; set; }
15 |
16 | public bool SuspendUser { get; set; }
17 |
18 | public bool DeleteUser { get; set; }
19 |
20 | public bool KeepAccount { get; set; }
21 |
22 | public bool RemoveSharing { get; set; }
23 |
24 | public DumpUserContentModel() {
25 | UserAccessToken = ApplicationResource.DefaultAccessToken;
26 | MemberList = new List();
27 | }
28 |
29 | public void Initialize() {
30 | OutputFolder = Directory.GetCurrentDirectory();
31 | }
32 |
33 | public void CleanUp() {
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Utils/RegistryUtils.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Utils {
2 |
3 | using Microsoft.Win32;
4 |
5 | public static class RegistryUtils {
6 |
7 | public static RegistryKey CreateKey(string registryEntry) {
8 | return Registry.CurrentUser.CreateSubKey(@registryEntry);
9 | }
10 |
11 | public static RegistryKey FindKey(string lookupKey) {
12 | RegistryKey key = Registry.CurrentUser.OpenSubKey(@lookupKey);
13 | return key;
14 | }
15 |
16 | public static void SetKeyValue(RegistryKey key, string keyParam, string valueParam) {
17 | if (key != null && !string.IsNullOrEmpty(keyParam)) {
18 | key.SetValue(keyParam, valueParam);
19 | key.Close();
20 | }
21 | }
22 |
23 | public static string GetKeyValue(RegistryKey key, string keyParam) {
24 | string value = null;
25 | if (key != null) {
26 | value = key.GetValue(keyParam).ToString();
27 | }
28 | return value;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamFoldersMembersHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 | public class TeamFoldersMembersHeaderRecord
6 | {
7 | public string TeamFolderName { get; set; }
8 | public string TeamFolderPath { get; set; }
9 | public string TeamFolderMember { get; set; }
10 | public string TeamFolderMemberId { get; set; }
11 | public string TeamFolderAccessType { get; set; }
12 | public string MemberCount { get; set; }
13 | }
14 |
15 | public class TeamFoldersMembersHeaderMap : CsvClassMap
16 | {
17 | public TeamFoldersMembersHeaderMap()
18 | {
19 | Map(m => m.TeamFolderName).Name("TeamFolderName");
20 | Map(m => m.TeamFolderPath).Name("Path");
21 | Map(m => m.TeamFolderMember).Name("Member");
22 | Map(m => m.TeamFolderMemberId).Name("Id");
23 | Map(m => m.TeamFolderAccessType).Name("AccessType");
24 | Map(m => m.MemberCount).Name("MemberCount");
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Source/ProviderLauncher/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IDevicesView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using DfBAdminToolkit.Common.DataExchange;
4 | using DfBAdminToolkit.Model;
5 | using System;
6 | using System.Collections.Generic;
7 |
8 | public interface IDevicesView
9 | : IView
10 | {
11 | event EventHandler CommandGetDevices;
12 | event EventHandler CommandDumpDevices;
13 | event EventHandler CommandExportDevices;
14 |
15 | string UserAccessToken { get; set; }
16 |
17 | string Filter { get; set; }
18 |
19 | string FilterType { get; set; }
20 |
21 | string FilterCriteria { get; set; }
22 |
23 | string OutputFileName { get; set; }
24 |
25 | bool RemoteWipe { get; set; }
26 |
27 | List DeviceList { get; set; }
28 |
29 | void RefreshAccessToken();
30 |
31 | void RenderDeviceSearchResult();
32 |
33 | void EnableDeviceControl(bool enable);
34 |
35 | void EnableDeviceButton(bool enable);
36 |
37 | void EnableExportButton(bool enable);
38 |
39 | void ShowGroups(bool show);
40 | }
41 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DevicesHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 | public class DevicesHeaderRecord
6 | {
7 | public string Created { get; set; }
8 | public string Updated { get; set; }
9 | public string Email { get; set; }
10 | public string TeamId { get; set; }
11 | public string DeviceName { get; set; }
12 | public string IpAddress { get; set; }
13 | public string SessionId { get; set; }
14 | public string ClientType { get; set; }
15 | }
16 |
17 | public class DevicesHeaderMap : CsvClassMap
18 | {
19 | public DevicesHeaderMap()
20 | {
21 | Map(m => m.Created).Name("Created");
22 | Map(m => m.Updated).Name("Updated");
23 | Map(m => m.Email).Name("Email");
24 | Map(m => m.TeamId).Name("TeamId");
25 | Map(m => m.DeviceName).Name("DeviceName");
26 | Map(m => m.IpAddress).Name("Item Name");
27 | Map(m => m.SessionId).Name("SessionId");
28 | Map(m => m.ClientType).Name("ClientType");
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ITeamHealthModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System;
4 |
5 | public interface ITeamHealthModel
6 | : IModel {
7 |
8 | string AccessToken { get; set; }
9 |
10 | DateTime RefreshDateTime { get; set; }
11 |
12 | string TeamName { get; set; }
13 |
14 | string LicensedUsers { get; set; }
15 |
16 | string ProvisionedUsers { get; set; }
17 |
18 | string TotalUsage { get; set; }
19 |
20 | string SharedUsage { get; set; }
21 |
22 | string UnsharedUsage { get; set; }
23 |
24 | string SharedFolders { get; set; }
25 |
26 | string ActiveSharedFolders7Day { get; set; }
27 |
28 | string ActiveUsers7Day { get; set; }
29 |
30 | string Adds { get; set; }
31 |
32 | string Edits { get; set; }
33 |
34 | string Deletes { get; set; }
35 |
36 | string windows { get; set; }
37 |
38 | string macos { get; set; }
39 |
40 | string linux { get; set; }
41 |
42 | string ios { get; set; }
43 |
44 | string android { get; set; }
45 |
46 | string other { get; set; }
47 |
48 | string total { get; set; }
49 | }
50 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DfBAdminToolkit.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Source/ProviderLauncher/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ProviderLauncher.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Component/ButtonEx.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Component
2 | {
3 | partial class ButtonEx
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Component/TextBoxEx.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Component
2 | {
3 | partial class TextBoxEx
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/SettingsModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | public class SettingsModel
4 | : ISettingsModel {
5 |
6 | public SettingsModel() {
7 | Initialize();
8 | }
9 |
10 | public string DefaultAccessToken { get; set; }
11 | public string DefaultProvisionToken { get; set; }
12 | public int SearchDefaultLimit { get; set; }
13 | public string ApiBaseUrl { get; set; }
14 | public string ApiContentBaseUrl { get; set; }
15 | public string ApiVersion { get; set; }
16 | public bool SuppressFilenamesInStatus { get; set; }
17 |
18 | public void Initialize() {
19 | DefaultAccessToken = ApplicationResource.DefaultAccessToken;
20 | DefaultProvisionToken = ApplicationResource.DefaultProvisionToken;
21 | SearchDefaultLimit = ApplicationResource.SearchDefaultLimit;
22 | ApiBaseUrl = ApplicationResource.BaseUrl;
23 | ApiContentBaseUrl = ApplicationResource.ContentUrl;
24 | ApiVersion = ApplicationResource.ApiVersion;
25 | SuppressFilenamesInStatus = ApplicationResource.SuppressFilenamesInStatus;
26 | }
27 |
28 | public void CleanUp() {
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/PaperHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 |
6 | public class PaperHeaderRecord
7 | {
8 | public string PaperName { get; set; }
9 | public string PaperId { get; set; }
10 | public string FolderPath { get; set; }
11 | public string Status { get; set; }
12 | public string Owner { get; set; }
13 | public string CreatedDate { get; set; }
14 | public string LastUpdatedDate { get; set; }
15 | public string LastEditor { get; set; }
16 | public string Revision { get; set; }
17 | }
18 |
19 | public class PaperHeaderMap : CsvClassMap
20 | {
21 | public PaperHeaderMap()
22 | {
23 | Map(m => m.PaperName).Name("PaperName");
24 | Map(m => m.PaperId).Name("PaperId");
25 | Map(m => m.FolderPath).Name("FolderPath");
26 | Map(m => m.Status).Name("Status");
27 | Map(m => m.Owner).Name("Owner");
28 | Map(m => m.CreatedDate).Name("CreatedDate");
29 | Map(m => m.LastUpdatedDate).Name("LastUpdatedDate");
30 | Map(m => m.LastEditor).Name("LastEditor");
31 | Map(m => m.Revision).Name("Revision");
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamHealthListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 | using System;
5 |
6 | public class TeamHealthListViewItemModel
7 | : INotifyPropertyChanged, IModel {
8 | private string _usage;
9 | private string _provisionedUsers;
10 | private string _status;
11 |
12 | public string Usage {
13 | get { return _usage; }
14 | set {
15 | _usage = value;
16 | OnPropertyChanged("Usage");
17 | }
18 | }
19 |
20 | public string ProvisionedUsers
21 | {
22 | get { return _provisionedUsers; }
23 | set {
24 | _provisionedUsers = value;
25 | OnPropertyChanged("ProvisionedUsers");
26 | }
27 | }
28 |
29 | public string Status {
30 | get { return _status; }
31 | set {
32 | _status = value;
33 | OnPropertyChanged("Status");
34 | }
35 | }
36 |
37 | public event PropertyChangedEventHandler PropertyChanged;
38 |
39 | public TeamHealthListViewItemModel() {
40 | }
41 |
42 | public void Initialize() {
43 | }
44 |
45 | public void CleanUp() {
46 | }
47 |
48 | private void OnPropertyChanged(string propName) {
49 | PropertyChangedEventHandler handler = PropertyChanged;
50 | if (handler != null) {
51 | handler(this, new PropertyChangedEventArgs(propName));
52 | }
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IGroupsView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using DfBAdminToolkit.Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface IGroupsView
8 | : IView
9 | {
10 | event EventHandler CommandGetGroups;
11 | event EventHandler CommandCreateGroup;
12 | event EventHandler CommandExportGroups;
13 | event EventHandler CommandExportGroupPerms;
14 | event EventHandler CommandAddMember;
15 | event EventHandler CommandDeleteMember;
16 | event EventHandler CommandLoadGroupsInputFile;
17 | event EventHandler CommandLoadGroupsMembersInputFile;
18 |
19 | string AccessToken { get; set; }
20 |
21 | void RefreshAccessToken();
22 |
23 | string GroupName { get; set; }
24 |
25 | string GroupType { get; set; }
26 |
27 | string UserEmail { get; set; }
28 |
29 | string AddStatus { get; set; }
30 |
31 | string GroupInputFilePath { get; set; }
32 |
33 | string GroupMemberInputFilePath { get; set; }
34 |
35 | void RenderGroupList(List groups);
36 |
37 | void RenderGroupsStatus(List groups);
38 |
39 | bool MultiGroupCreateCheck();
40 |
41 | bool MultiGroupMemberCreateCheck();
42 | }
43 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/ITeamFoldersView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface ITeamFoldersView
8 | : IView
9 | {
10 | event EventHandler DataChanged;
11 | event EventHandler CommandGetTeamFolders;
12 | event EventHandler CommandCreateTeamFolder;
13 | event EventHandler CommandSetFolderStatus;
14 | event EventHandler CommandSetFolderSyncSetting;
15 | event EventHandler CommandLoadTeamFolders;
16 | event EventHandler CommandExportTeamFolders;
17 | event EventHandler CommandExportTeamFoldersPerms;
18 |
19 | string AccessToken { get; set; }
20 |
21 | void RefreshAccessToken();
22 |
23 | bool MultiTeamFoldersCreateCheck();
24 |
25 | string TeamFolderName { get; set; }
26 |
27 | string TeamFolderId { get; set; }
28 |
29 | string TeamFoldersInputFilePath { get; set; }
30 |
31 | bool SyncSetting { get; set; }
32 |
33 | bool ActiveSetting { get; set; }
34 |
35 | string UserEmail { get; set; }
36 |
37 | void RenderTeamFoldersList();
38 |
39 | void RenderTeamFoldersListFromCSV(List teamFolders);
40 |
41 | TeamFoldersModel GetTeamFolderIds();
42 | }
43 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ProvisioningModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.Collections.Generic;
4 | using System;
5 |
6 | public class ProvisioningModel
7 | : IProvisioningModel {
8 | public bool SendWelcomeEmail { get; set; }
9 |
10 | public string AccessToken { get; set; }
11 |
12 | public string InputFilePath { get; set; }
13 |
14 | public string SelectedRole { get; set; }
15 |
16 | public bool KeepAccount { get; set; }
17 |
18 | public bool RemoveSharing { get; set; }
19 |
20 | public string NewEmail { get; set; }
21 |
22 | public string NewExternalId { get; set; }
23 |
24 | public string ProvisionStatus { get; set; }
25 |
26 | public DateTime JoinedOn { get; set; }
27 |
28 | public List Members { get; set; }
29 |
30 | public ProvisioningModel() {
31 | Initialize();
32 | }
33 |
34 | public void Initialize() {
35 | Members = new List();
36 | AccessToken = ApplicationResource.DefaultProvisionToken;
37 | SelectedRole = string.Empty;
38 | SendWelcomeEmail = true;
39 | ProvisionStatus = string.Empty;
40 | KeepAccount = false;
41 | }
42 |
43 | public void CleanUp() {
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IDumpUserContentView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using DfBAdminToolkit.Common.DataExchange;
4 | using DfBAdminToolkit.Model;
5 | using System;
6 | using System.Collections.Generic;
7 |
8 | public interface IDumpUserContentView
9 | : IView
10 | {
11 | event EventHandler CommandListMembers;
12 | event EventHandler CommandDumpFiles;
13 | event EventHandler CommandContextMenuClicked;
14 |
15 | string UserAccessToken { get; set; }
16 |
17 | List MemberList { get; set; }
18 |
19 | string OutputFolder { get; set; }
20 |
21 | string[] ContextMenuItemText { get; set; }
22 |
23 | void RefreshAccessToken();
24 |
25 | void RenderMembersSearchResult();
26 |
27 | void RenderMembersFileSearchResult();
28 |
29 | void EnableDumpControl(bool enable);
30 |
31 | void EnableDumpButton(bool enable);
32 |
33 | void SetContextMenuItemText(string[] menuItemsText);
34 |
35 | void LazyInitializeContextMenu();
36 |
37 | void EnableContextMenuItems(bool enable);
38 |
39 | void ShowGroups(bool show);
40 |
41 | bool ZipFiles { get; set; }
42 |
43 | bool SuspendUser { get; set; }
44 |
45 | bool DeleteUser { get; set; }
46 |
47 | bool KeepAccount { get; set; }
48 | }
49 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupInfoHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 |
6 | public class GroupInfoHeaderRecord
7 | {
8 | public string GroupName { get; set; }
9 | public string GroupId { get; set; }
10 | public string GroupType { get; set; }
11 | public string TeamMemberId { get; set; }
12 | public string Email { get; set; }
13 | public string EmailVerified { get; set; }
14 | public string Status { get; set; }
15 | public string MembershipType { get; set; }
16 | public string JoinedOn { get; set; }
17 | public string AccessType { get; set; }
18 | }
19 |
20 | public class GroupInfoHeaderMap : CsvClassMap
21 | {
22 | public GroupInfoHeaderMap()
23 | {
24 | Map(m => m.GroupName).Name("GroupName");
25 | Map(m => m.GroupId).Name("GroupId");
26 | Map(m => m.GroupType).Name("GroupManagementType");
27 | Map(m => m.TeamMemberId).Name("TeamMemberId");
28 | Map(m => m.Email).Name("Email");
29 | Map(m => m.EmailVerified).Name("EmailVerified");
30 | Map(m => m.Status).Name("Status");
31 | Map(m => m.MembershipType).Name("MembershipType");
32 | Map(m => m.JoinedOn).Name("JoinedOn");
33 | Map(m => m.AccessType).Name("AccessType");
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DataMigrationHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model {
4 |
5 | public class DataMigrationHeaderRecord {
6 | public string OwnerName { get; set; }
7 | public string OwnerLogin { get; set; }
8 | public string Path { get; set; }
9 | public string PathId { get; set; }
10 | public string ItemName { get; set; }
11 | public string ItemId { get; set; }
12 | public string ItemType { get; set; }
13 | public string Size { get; set; }
14 | public string Created { get; set; }
15 | public string LastModified { get; set; }
16 | public string Uploaded { get; set; }
17 | }
18 |
19 | public class DataMigrationHeaderMap : CsvClassMap {
20 |
21 | public DataMigrationHeaderMap() {
22 | Map(m => m.OwnerName).Name("Owner Name");
23 | Map(m => m.OwnerLogin).Name("Owner Login");
24 | Map(m => m.Path).Name("Path");
25 | Map(m => m.PathId).Name("Path ID");
26 | Map(m => m.ItemName).Name("Item Name");
27 | Map(m => m.ItemId).Name("Item ID");
28 | Map(m => m.ItemType).Name("Item Type");
29 | Map(m => m.Size).Name("Size");
30 | Map(m => m.Created).Name("Created");
31 | Map(m => m.LastModified).Name("Last Modified");
32 | Map(m => m.Uploaded).Name("Uploaded");
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamFoldersListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class TeamFoldersListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private string _teamFolderName;
8 | private string _teamFolderId;
9 | private string _status;
10 | private bool _isChecked;
11 |
12 | public string TeamFolderName {
13 | get { return _teamFolderName; }
14 | set {
15 | _teamFolderName = value;
16 | OnPropertyChanged("TeamFolderName");
17 | }
18 | }
19 |
20 | public string TeamFolderId {
21 | get { return _teamFolderId; }
22 | set {
23 | _teamFolderId = value;
24 | OnPropertyChanged("TeamFolderId");
25 | }
26 | }
27 |
28 | public string Status {
29 | get { return _status; }
30 | set {
31 | _status = value;
32 | OnPropertyChanged("Status");
33 | }
34 | }
35 |
36 | public bool IsChecked {
37 | get { return _isChecked; }
38 | set {
39 | _isChecked = value;
40 | OnPropertyChanged("IsChecked");
41 | }
42 | }
43 |
44 | public event PropertyChangedEventHandler PropertyChanged;
45 |
46 | public TeamFoldersListViewItemModel() {
47 | }
48 |
49 | public void Initialize() {
50 | }
51 |
52 | public void CleanUp() {
53 | }
54 |
55 | private void OnPropertyChanged(string propName) {
56 | PropertyChangedEventHandler handler = PropertyChanged;
57 | if (handler != null) {
58 | handler(this, new PropertyChangedEventArgs(propName));
59 | }
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Utils/SimpleResolver.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Utils {
2 |
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | public class SimpleResolver {
7 | public static readonly SimpleResolver Instance = new SimpleResolver();
8 | private readonly Dictionary _container;
9 | private readonly Dictionary _singleton;
10 | private static readonly object _lock = new object();
11 |
12 | private SimpleResolver() {
13 | _container = new Dictionary();
14 | _singleton = new Dictionary();
15 | }
16 |
17 | public void Bind(Type implementer) {
18 | lock (_lock) {
19 | _container.Add(typeof(ContractType), implementer);
20 | }
21 | }
22 |
23 | public ContractType Get(params object[] args) {
24 | lock (_lock) {
25 | if (!_singleton.ContainsKey(typeof(ContractType))) {
26 | ContractType obj = (ContractType)Activator.CreateInstance(_container[typeof(ContractType)], args);
27 | _singleton.Add(typeof(ContractType), obj);
28 | }
29 | return (ContractType)_singleton[typeof(ContractType)];
30 | }
31 | }
32 |
33 | public void Dispose() {
34 | lock (_lock) {
35 | _singleton.Clear();
36 | _container.Clear();
37 | }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamAuditingHeaderMap.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 | public class TeamAuditingHeaderRecord
6 | {
7 | public string Timestamp { get; set; }
8 | public string ActorType { get; set; }
9 | public string Email { get; set; }
10 | public string Context { get; set; }
11 | public string EventType { get; set; }
12 | public string Origin { get; set; }
13 | public string IpAddress { get; set; }
14 | public string City { get; set; }
15 | public string Region { get; set; }
16 | public string Country { get; set; }
17 | public string Participants { get; set; }
18 | public string Assets { get; set; }
19 | }
20 |
21 | public class TeamAuditingHeaderMap : CsvClassMap
22 | {
23 | public TeamAuditingHeaderMap()
24 | {
25 | Map(m => m.Timestamp).Name("Timestamp");
26 | Map(m => m.ActorType).Name("ActorType");
27 | Map(m => m.Email).Name("Actor");
28 | Map(m => m.Context).Name("Context");
29 | Map(m => m.EventType).Name("EventType");
30 | Map(m => m.Origin).Name("Origin");
31 | Map(m => m.IpAddress).Name("IpAddress");
32 | Map(m => m.City).Name("City");
33 | Map(m => m.Region).Name("Region");
34 | Map(m => m.Country).Name("Country");
35 | Map(m => m.Participants).Name("Participants");
36 | Map(m => m.Assets).Name("Assets");
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DfBAdminToolkit.Common")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Dropbox Enterprise Services")]
12 | [assembly: AssemblyProduct("DfBAdminToolkit.Common")]
13 | [assembly: AssemblyCopyright("Copyright © 2016-2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1091b7c4-f32c-4219-b04a-a25bd4d0b928")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("6.1.2.0")]
36 | [assembly: AssemblyFileVersion("6.1.2.0")]
37 |
--------------------------------------------------------------------------------
/Source/ProviderLauncher/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ProviderLauncher")]
9 | [assembly: AssemblyDescription("Launchpad for Providers")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Dropbox Enterprise Services")]
12 | [assembly: AssemblyProduct("ProviderLauncher")]
13 | [assembly: AssemblyCopyright("Copyright © 2016-2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("a2eebf5f-c3c9-44b5-a594-1d06e305aff9")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("6.1.2.0")]
36 | [assembly: AssemblyFileVersion("6.1.2.0")]
37 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Dropbox Business Admin Toolkit")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Dropbox Enterprise Services")]
12 | [assembly: AssemblyProduct("Dropbox Business Admin Toolkit")]
13 | [assembly: AssemblyCopyright("Copyright © 2016-2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("ec2e5feb-36f2-46e3-959b-cff92360c202")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("6.1.2.0")]
36 | [assembly: AssemblyFileVersion("6.1.2.0")]
37 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamHealthModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System;
4 |
5 | public class TeamHealthModel
6 | : ITeamHealthModel {
7 |
8 | public string AccessToken { get; set; }
9 |
10 | public DateTime RefreshDateTime { get; set; }
11 |
12 | //get_info
13 | public string TeamName { get; set; }
14 |
15 | public string LicensedUsers { get; set; }
16 |
17 | public string ProvisionedUsers { get; set; }
18 |
19 | //get_storage
20 | public string TotalUsage { get; set; }
21 |
22 | public string SharedUsage { get; set; }
23 |
24 | public string UnsharedUsage { get; set; }
25 |
26 | public string SharedFolders { get; set; }
27 |
28 | //get_activity
29 | public string ActiveSharedFolders7Day { get; set; }
30 |
31 | public string ActiveUsers7Day { get; set; }
32 |
33 | public string Adds { get; set; }
34 |
35 | public string Edits { get; set; }
36 |
37 | public string Deletes { get; set; }
38 |
39 | //get_devices
40 | public string windows { get; set; }
41 |
42 | public string macos { get; set; }
43 |
44 | public string linux { get; set; }
45 |
46 | public string ios { get; set; }
47 |
48 | public string android { get; set; }
49 |
50 | public string other { get; set; }
51 |
52 | public string total { get; set; }
53 |
54 | public TeamHealthModel() {
55 | Initialize();
56 | }
57 |
58 | public void Initialize() {
59 | AccessToken = ApplicationResource.DefaultAccessToken;
60 | }
61 |
62 | public void CleanUp() {
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupPermsHeaderRecord.cs:
--------------------------------------------------------------------------------
1 | using CsvHelper.Configuration;
2 |
3 | namespace DfBAdminToolkit.Model
4 | {
5 |
6 | public class GroupPermsHeaderRecord
7 | {
8 | public string GroupName { get; set; }
9 | public string GroupId { get; set; }
10 | public string GroupManagementType { get; set; }
11 | public string GroupType { get; set; }
12 | public string SharedFolderName { get; set; }
13 | public string SharedFolderId { get; set; }
14 | public string AccessType { get; set; }
15 | public string IsMember { get; set; }
16 | public string IsOwner { get; set; }
17 | public string IsInherited { get; set; }
18 | public string IsTeamFolder { get; set; }
19 | public string IsInsideTeamFolder { get; set; }
20 | }
21 |
22 | public class GroupPermsHeaderMap : CsvClassMap
23 | {
24 | public GroupPermsHeaderMap()
25 | {
26 | Map(m => m.GroupName).Name("GroupName");
27 | Map(m => m.GroupId).Name("GroupId");
28 | Map(m => m.GroupManagementType).Name("GroupManagementType");
29 | Map(m => m.GroupType).Name("GroupType");
30 | Map(m => m.SharedFolderName).Name("SharedFolderName");
31 | Map(m => m.SharedFolderId).Name("SharedFolderId");
32 | Map(m => m.IsMember).Name("IsMember");
33 | Map(m => m.IsOwner).Name("IsOwner");
34 | Map(m => m.AccessType).Name("AccessType");
35 | Map(m => m.IsInherited).Name("IsInherited");
36 | Map(m => m.IsTeamFolder).Name("IsTeamFolder");
37 | Map(m => m.IsInsideTeamFolder).Name("IsInsideTeamFolder");
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/IProvisioningView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using DfBAdminToolkit.Model;
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | public interface IProvisioningView
8 | : IView
9 | {
10 | event EventHandler CommandProvision;
11 | event EventHandler CommandDeprovision;
12 | event EventHandler CommandSuspend;
13 | event EventHandler CommandUnsuspend;
14 | event EventHandler CommandUpdateProfile;
15 | event EventHandler CommandLoadInputFile;
16 | event EventHandler CommandLoadUpdateInputFile;
17 | event EventHandler CommandCreateCSV;
18 | event EventHandler CommandGetUsage;
19 | event EventHandler CommandRecover;
20 |
21 | bool SendWelcomeEmail { get; set; }
22 |
23 | string AccessToken { get; set; }
24 |
25 | string InputFilePath { get; set; }
26 |
27 | string SelectedRole { get; set; }
28 |
29 | bool KeepAccount { get; set; }
30 |
31 | bool RemoveSharing { get; set; }
32 |
33 | void EnableProvisionButton(bool enable);
34 |
35 | void EnableDeprovisionButton(bool enable);
36 |
37 | void EnableSuspendButton(bool enable);
38 |
39 | void EnableUnSuspendButton(bool enable);
40 |
41 | void EnableLoadInputFileButton(bool enable);
42 |
43 | void EnableUpdateProfileButton(bool enable);
44 |
45 | void EnableRecoverButton(bool enable);
46 |
47 | void RefreshAccessToken();
48 |
49 | void RenderMemberList(List members);
50 |
51 | void RenderUpdateMemberList(List members);
52 |
53 | void RenderProvisioningStatus(List members);
54 | }
55 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Utils/MessageBoxUtil.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Utils {
2 |
3 | using DfBAdminToolkit.Common.Component;
4 | using System.Windows.Forms;
5 |
6 | public static class MessageBoxUtil {
7 |
8 | public static void ShowInfo(
9 | IWin32Window owner,
10 | string msg) {
11 | MessageBoxEx.Show(
12 | owner,
13 | msg,
14 | "Information",
15 | MessageBoxButtons.OK,
16 | MessageBoxIcon.Information
17 | );
18 | }
19 |
20 | public static void ShowWarning(
21 | IWin32Window owner,
22 | string msg)
23 | {
24 | MessageBoxEx.Show(
25 | owner,
26 | msg,
27 | "Warning",
28 | MessageBoxButtons.OK,
29 | MessageBoxIcon.Warning
30 | );
31 | }
32 |
33 | public static DialogResult ShowConfirm(
34 | IWin32Window owner,
35 | string msg) {
36 | return MessageBoxEx.Show(owner,
37 | msg,
38 | "Please Confirm",
39 | MessageBoxButtons.YesNo,
40 | MessageBoxIcon.Exclamation
41 | );
42 | }
43 |
44 | ///
45 | ///
46 | ///
47 | ///
48 | ///
49 | public static void ShowError(IWin32Window owner, string msg, string title = "Critical Error") {
50 | MessageBoxEx.Show(owner,
51 | msg,
52 | title,
53 | MessageBoxButtons.OK,
54 | MessageBoxIcon.Error
55 | );
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/FileListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class FileListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private string _filePath;
8 | private string _fileName;
9 | private string _fileSize;
10 | private bool _isChecked;
11 |
12 | public string FilePath {
13 | get { return _filePath; }
14 | set {
15 | _filePath = value;
16 | OnPropertyChanged("FilePath");
17 | }
18 | }
19 |
20 | public string FileName {
21 | get { return _fileName; }
22 | set {
23 | _fileName = value;
24 | OnPropertyChanged("FileName");
25 | }
26 | }
27 |
28 | public string FileSize {
29 | get { return _fileSize; }
30 | set {
31 | _fileSize = value;
32 | OnPropertyChanged("FileSize");
33 | }
34 | }
35 |
36 | public bool IsChecked {
37 | get { return _isChecked; }
38 | set {
39 | _isChecked = value;
40 | OnPropertyChanged("IsChecked");
41 | }
42 | }
43 |
44 | public event PropertyChangedEventHandler PropertyChanged;
45 |
46 | public FileListViewItemModel() {
47 | }
48 |
49 | public void Initialize() {
50 | }
51 |
52 | public void CleanUp() {
53 | }
54 |
55 | private void OnPropertyChanged(string propName) {
56 | PropertyChangedEventHandler handler = PropertyChanged;
57 | if (handler != null) {
58 | handler(this, new PropertyChangedEventArgs(propName));
59 | }
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/VersionWindow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DfBAdminToolkit.Services;
11 |
12 | namespace DfBAdminToolkit.View
13 | {
14 | public partial class VersionWindow : Form
15 | {
16 | private GitHubRelease _release;
17 |
18 | public VersionWindow(GitHubRelease release)
19 | {
20 | _release = release;
21 | InitializeComponent();
22 | versionAlertText.Text = String.Format(@"Version {0} of the Admin Toolkit is now available!", _release.version.ToString());
23 | versionDetails.Text = String.Format(@"Release Notes:{0}{1}", Environment.NewLine, _release.description);
24 | if (_release.downloadUri != null)
25 | {
26 | downloadButton.Text = @"Download Release";
27 | }
28 | else
29 | {
30 | downloadButton.Text = @"View Details";
31 | }
32 | downloadButton.Focus();
33 | }
34 |
35 | private void downloadButton_Clicked(object sender, EventArgs e)
36 | {
37 | if (_release.downloadUri != null)
38 | {
39 | System.Diagnostics.Process.Start(_release.downloadUri.ToString());
40 | Application.Exit();
41 | }
42 | else
43 | {
44 | System.Diagnostics.Process.Start(_release.releaseUri.ToString());
45 | }
46 | this.Close();
47 | }
48 |
49 | private void dismissButton_Click(object sender, EventArgs e)
50 | {
51 | this.Close();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Extensions/StringExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Security.Cryptography;
4 |
5 | namespace DfBAdminToolkit.Common.Extensions
6 | {
7 | public static class StringExtension
8 | {
9 | public static string Encrypt(
10 | this string clearText,
11 | string optionalEntropy = null,
12 | DataProtectionScope scope = DataProtectionScope.LocalMachine)
13 | {
14 | if (clearText == null)
15 | throw new ArgumentNullException("Clear text is null");
16 | byte[] clearBytes = Encoding.UTF8.GetBytes(clearText);
17 | byte[] entropyBytes = string.IsNullOrEmpty(optionalEntropy)
18 | ? null
19 | : Encoding.UTF8.GetBytes(optionalEntropy);
20 | byte[] encryptedBytes = ProtectedData.Protect(clearBytes, entropyBytes, scope);
21 | string encryptedString = "encrypted-" + Convert.ToBase64String(encryptedBytes);
22 | return encryptedString;
23 | }
24 |
25 | public static string Decrypt(
26 | this string encryptedText,
27 | string optionalEntropy = null,
28 | DataProtectionScope scope = DataProtectionScope.LocalMachine)
29 | {
30 | if (encryptedText == null)
31 | throw new ArgumentNullException("Encrypted text is null");
32 | //remove encrypted- tag from beginning
33 | encryptedText = encryptedText.Remove(0, 10);
34 | byte[] encryptedBytes = Convert.FromBase64String(encryptedText);
35 | byte[] entropyBytes = string.IsNullOrEmpty(optionalEntropy)
36 | ? null
37 | : Encoding.UTF8.GetBytes(optionalEntropy);
38 | byte[] clearBytes = ProtectedData.Unprotect(encryptedBytes, entropyBytes, scope);
39 | return Encoding.UTF8.GetString(clearBytes);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/IMemberData.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 | public interface IMemberData
3 | : IData {
4 |
5 | #region Provision
6 |
7 | string Email { get; set; }
8 |
9 | string FirstName { get; set; }
10 |
11 | string LastName { get; set; }
12 |
13 | string PersistentId { get; set; }
14 |
15 | bool SendWelcomeEmail { get; set; }
16 |
17 | string MemberId { get; set; }
18 |
19 | string RoleName { get; set; }
20 |
21 | string Usage { get; set; }
22 |
23 | bool KeepAccount { get; set; }
24 |
25 | bool RemoveSharing { get; set; }
26 |
27 | string NewEmail { get; set; }
28 |
29 | string NewExternalId { get; set; }
30 |
31 | string ProvisionStatus { get; set; }
32 |
33 | #endregion Provision
34 |
35 | #region Groups
36 |
37 | string GroupName { get; set; }
38 |
39 | string GroupId { get; set; }
40 |
41 | string MemberCount { get; set; }
42 |
43 | string GroupType { get; set; }
44 |
45 | string GroupEmail { get; set; }
46 |
47 | string GroupAddStatus { get; set; }
48 |
49 | #endregion Groups
50 |
51 | #region Search Text
52 |
53 | string SearchText { get; set; }
54 |
55 | int? SearchLimit { get; set; }
56 |
57 | string SearchMode { get; set; }
58 |
59 | string Cursor { get; set; }
60 |
61 | bool HasMore { get; set; }
62 |
63 | #endregion Search Text
64 |
65 | #region Dump related
66 |
67 | string Path { get; set; }
68 |
69 | string FileName { get; set; }
70 |
71 | bool ZipFiles { get; set; }
72 |
73 | bool SuspendUser { get; set; }
74 |
75 | bool DeleteUser { get; set; }
76 |
77 | #endregion Dump related
78 |
79 | #region Device related
80 |
81 | string SessionId { get; set; }
82 |
83 | string ClientType { get; set; }
84 |
85 | #endregion Device related
86 | }
87 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Tooltips.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit
2 | {
3 | public static class Tooltips
4 | {
5 | public static readonly string PROVISION_MEMBER_ONLY = "User is not an admin of the team.";
6 | public static readonly string PROVISION_USER_MGMT_ADMIN = "User can do most user provisioning, de-provisioning and management.";
7 | public static readonly string PROVISION_SUPPORT_ADMIN = "User can do a limited set of common support tasks for existing users.";
8 | public static readonly string PROVISION_TEAM_ADMIN = "User is administrator of the team - has all permissions.";
9 |
10 | public static readonly string TOTAL_USAGE = " Sum of the shared, unshared, and datastore usages (TB). Stats shown reflect last logged day in Dropbox";
11 | public static readonly string SHARED_USAGE = "Combined size (TB) of team members shared folders.";
12 | public static readonly string UNSHARED_USAGE = "Combined size (TB) of team members' root namespaces.";
13 | public static readonly string SHARED_FOLDERS = "Number of shared folders owned by team members.";
14 | public static readonly string ACTIVE_SHARED_FOLDERS = "Number of shared folders with some activity in the last week.";
15 | public static readonly string ACTIVE_USERS = "Number of users who have been active in the last week.";
16 | public static readonly string FILE_ADDS = "Total number of adds (files and folders) by team members. .";
17 | public static readonly string FILE_DELETES = " Total number of deletes (files and folders) by team members.";
18 | public static readonly string FILE_EDITS = "Number of edits (files and folders) by team members. If the same user edits the same file multiple times this is counted as a single edit.";
19 | public static readonly string ACTIVE_DEVICES = "Report of the number of devices active in the last 7 days. Stats shown reflect last logged day in Dropbox.";
20 | public static readonly string USERS = "Total users provioned against total number of licenses.";
21 | }
22 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Component/FormEx.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Windows.Forms;
3 |
4 | namespace DfBAdminToolkit.Common.Component {
5 |
6 | public class FormEx : Form {
7 | private FormExStyle m_settings;
8 |
9 | private const int CP_NOCLOSE_BUTTON = 0x200;
10 |
11 | public enum FormExStyle : int {
12 | CENTERED_WINDOW = 0x1,
13 | IGNORE_USER_CLOSING = 0x2,
14 | }
15 |
16 | public FormEx() {
17 | }
18 |
19 | public FormEx(FormExStyle settings)
20 | : base() {
21 | m_settings = settings;
22 | }
23 |
24 | protected override void OnLoad(System.EventArgs e) {
25 | if ((m_settings & FormExStyle.CENTERED_WINDOW) == FormExStyle.CENTERED_WINDOW) {
26 | this.StartPosition = FormStartPosition.Manual;
27 | this.Location = new Point(
28 | this.Owner.Location.X + (this.Owner.Width - this.Width) / 2,
29 | this.Owner.Location.Y + (this.Owner.Height - this.Height) / 2
30 | );
31 | }
32 | base.OnLoad(e);
33 | }
34 |
35 | protected override void OnVisibleChanged(System.EventArgs e) {
36 | if ((m_settings & FormExStyle.CENTERED_WINDOW) == FormExStyle.CENTERED_WINDOW) {
37 | this.StartPosition = FormStartPosition.Manual;
38 | this.Location = new Point(
39 | this.Owner.Location.X + (this.Owner.Width - this.Width) / 2,
40 | this.Owner.Location.Y + (this.Owner.Height - this.Height) / 2
41 | );
42 | }
43 | base.OnVisibleChanged(e);
44 | }
45 |
46 | protected override CreateParams CreateParams {
47 | get {
48 | CreateParams myCp = base.CreateParams;
49 | if ((m_settings & FormExStyle.IGNORE_USER_CLOSING) == FormExStyle.IGNORE_USER_CLOSING) {
50 | myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON;
51 | }
52 | return myCp;
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Services/GitHubService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using System.Net;
4 | using RestSharp;
5 | using Newtonsoft.Json;
6 |
7 | namespace DfBAdminToolkit.Services
8 | {
9 | public class GitHubService
10 | {
11 |
12 | private readonly RestClient _client;
13 |
14 | public GitHubService()
15 | {
16 |
17 | _client = new RestClient(@"https://api.github.com/");
18 | }
19 |
20 | public async Task LatestRelease()
21 | {
22 | GitHubRelease release = new GitHubRelease();
23 | string releasesPath = @"repos/dropbox/DropboxBusinessAdminTool/releases";
24 | RestRequest request = new RestRequest(releasesPath, Method.GET);
25 | IRestResponse response = await _client.ExecuteTaskAsync(request);
26 | if (response.StatusCode == HttpStatusCode.OK)
27 | {
28 | dynamic jsonData = JsonConvert.DeserializeObject(response.Content);
29 | release.version = new Version(jsonData[0]["tag_name"].ToString());
30 | release.name = jsonData[0]["name"];
31 | release.description = jsonData[0]["body"];
32 | release.releaseUri = new Uri(jsonData[0]["html_url"].ToString());
33 | release.releaseDate = Convert.ToDateTime(jsonData[0]["published_at"].ToString());
34 | // Look for a zip attachment that contains just the pre-built exe.
35 | foreach (var asset in jsonData[0]["assets"])
36 | {
37 | if (asset["content_type"] == "application/x-zip-compressed")
38 | {
39 | release.downloadUri = asset["browser_download_url"];
40 | }
41 | }
42 | }
43 | else
44 | {
45 | release.version = new Version(0, 0, 0, 0);
46 | }
47 | return release;
48 | }
49 | }
50 |
51 | public class GitHubRelease
52 | {
53 | public string name;
54 | public string description;
55 | public Version version;
56 | public DateTime releaseDate;
57 | public Uri releaseUri;
58 | public Uri downloadUri;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Services/MemberData.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Services {
2 |
3 | public class MemberData
4 | : IMemberData {
5 |
6 | #region Provision
7 |
8 | public string Email { get; set; }
9 |
10 | public string FirstName { get; set; }
11 |
12 | public string LastName { get; set; }
13 |
14 | public string PersistentId { get; set; }
15 |
16 | public bool SendWelcomeEmail { get; set; }
17 |
18 | public string MemberId { get; set; }
19 |
20 | public string RoleName { get; set; }
21 |
22 | public string Usage { get; set; }
23 |
24 | public bool KeepAccount { get; set; }
25 |
26 | public bool RemoveSharing { get; set; }
27 |
28 | public string NewEmail { get; set; }
29 |
30 | public string NewExternalId { get; set; }
31 |
32 | public string ProvisionStatus { get; set; }
33 |
34 | #endregion Provision
35 |
36 | #region Search Text
37 |
38 | public string SearchText { get; set; }
39 |
40 | public int? SearchLimit { get; set; }
41 |
42 | public string SearchMode { get; set; }
43 |
44 | public string Cursor { get; set; }
45 |
46 | public bool HasMore { get; set; }
47 |
48 | #endregion Search Text
49 |
50 | #region Groups
51 |
52 | public string GroupName { get; set; }
53 |
54 | public string GroupId { get; set; }
55 |
56 | public string MemberCount { get; set; }
57 |
58 | public string GroupType { get; set; }
59 |
60 | public string GroupEmail { get; set; }
61 |
62 | public string GroupAddStatus { get; set; }
63 |
64 | #endregion Groups
65 |
66 | #region Dump related
67 |
68 | public string Path { get; set; }
69 |
70 | public string FileName { get; set; }
71 |
72 | public bool ZipFiles { get; set; }
73 |
74 | public bool SuspendUser { get; set; }
75 |
76 | public bool DeleteUser { get; set; }
77 |
78 | #endregion Dump related
79 |
80 | #region Device related
81 |
82 | public string SessionId { get; set; }
83 |
84 | public string ClientType { get; set; }
85 |
86 | #endregion Device related
87 |
88 | public MemberData() {
89 | SendWelcomeEmail = false;
90 | RoleName = "member_only";
91 | }
92 | }
93 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/LegalView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View
2 | {
3 | using System;
4 | using System.Threading;
5 | using System.Windows.Forms;
6 |
7 | public partial class LegalView
8 | : Form, ILegalView
9 | {
10 | public event EventHandler CommandDecline;
11 | public event EventHandler CommandAccept;
12 | public event EventHandler DataChanged;
13 |
14 | public SynchronizationContext SyncContext { get; set; }
15 |
16 | public bool ComponentEventsWired { get; set; }
17 |
18 | public LegalView()
19 | {
20 | InitializeComponent();
21 | Initialize();
22 | WireComponentEvents();
23 | }
24 |
25 | ~LegalView()
26 | {
27 | UnWireComponentEvents();
28 | }
29 |
30 | public void WireComponentEvents()
31 | {
32 | if (!ComponentEventsWired)
33 | {
34 | buttonEx_LegalDecline.Click += BtnDecline_Click;
35 | buttonEx_LegalAccept.Click += BtnAccept_Click;
36 | ComponentEventsWired = true;
37 | }
38 | }
39 |
40 | public void UnWireComponentEvents()
41 | {
42 | if (ComponentEventsWired)
43 | {
44 | buttonEx_LegalDecline.Click -= BtnDecline_Click;
45 | buttonEx_LegalAccept.Click -= BtnAccept_Click;
46 | ComponentEventsWired = false;
47 | }
48 | }
49 |
50 | public void Initialize()
51 | {
52 | ComponentEventsWired = false;
53 | SyncContext = SynchronizationContext.Current;
54 | }
55 |
56 | public void ShowView()
57 | {
58 | this.Show();
59 | }
60 |
61 | public void HideView()
62 | {
63 | this.Hide();
64 | }
65 |
66 | #region Events
67 |
68 | private void BtnDecline_Click(object sender, EventArgs e)
69 | {
70 | if (CommandDecline != null)
71 | {
72 | CommandDecline(sender, e);
73 | }
74 | }
75 |
76 | private void BtnAccept_Click(object sender, EventArgs e)
77 | {
78 | if (CommandAccept != null)
79 | {
80 | CommandAccept(sender, e);
81 | }
82 | }
83 |
84 | #endregion Events
85 | }
86 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 14
3 | VisualStudioVersion = 14.0.25420.1
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DfBAdminToolkit", "DfBAdminToolkit\DfBAdminToolkit.csproj", "{EC2E5FEB-36F2-46E3-959B-CFF92360C202}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DfBAdminToolkit.Common", "DfBAdminToolkit.Common\DfBAdminToolkit.Common.csproj", "{1091B7C4-F32C-4219-B04A-A25BD4D0B928}"
8 | EndProject
9 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProviderLauncher", "ProviderLauncher\ProviderLauncher.csproj", "{A2EEBF5F-C3C9-44B5-A594-1D06E305AFF9}"
10 | EndProject
11 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "DBAdminToolkit.Setup", "DBAdminToolkit.Setup\DBAdminToolkit.Setup.vdproj", "{D65AFD2A-C126-4394-84C1-FCA6C74E435B}"
12 | EndProject
13 | Global
14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
15 | Debug|Any CPU = Debug|Any CPU
16 | Release|Any CPU = Release|Any CPU
17 | EndGlobalSection
18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
19 | {EC2E5FEB-36F2-46E3-959B-CFF92360C202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 | {EC2E5FEB-36F2-46E3-959B-CFF92360C202}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 | {EC2E5FEB-36F2-46E3-959B-CFF92360C202}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {EC2E5FEB-36F2-46E3-959B-CFF92360C202}.Release|Any CPU.Build.0 = Release|Any CPU
23 | {1091B7C4-F32C-4219-B04A-A25BD4D0B928}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24 | {1091B7C4-F32C-4219-B04A-A25BD4D0B928}.Debug|Any CPU.Build.0 = Debug|Any CPU
25 | {1091B7C4-F32C-4219-B04A-A25BD4D0B928}.Release|Any CPU.ActiveCfg = Release|Any CPU
26 | {1091B7C4-F32C-4219-B04A-A25BD4D0B928}.Release|Any CPU.Build.0 = Release|Any CPU
27 | {A2EEBF5F-C3C9-44B5-A594-1D06E305AFF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28 | {A2EEBF5F-C3C9-44B5-A594-1D06E305AFF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
29 | {A2EEBF5F-C3C9-44B5-A594-1D06E305AFF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 | {A2EEBF5F-C3C9-44B5-A594-1D06E305AFF9}.Release|Any CPU.Build.0 = Release|Any CPU
31 | {D65AFD2A-C126-4394-84C1-FCA6C74E435B}.Debug|Any CPU.ActiveCfg = Debug
32 | {D65AFD2A-C126-4394-84C1-FCA6C74E435B}.Debug|Any CPU.Build.0 = Debug
33 | {D65AFD2A-C126-4394-84C1-FCA6C74E435B}.Release|Any CPU.ActiveCfg = Release
34 | {D65AFD2A-C126-4394-84C1-FCA6C74E435B}.Release|Any CPU.Build.0 = Release
35 | EndGlobalSection
36 | GlobalSection(SolutionProperties) = preSolution
37 | HideSolutionNode = FALSE
38 | EndGlobalSection
39 | EndGlobal
40 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class GroupListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private string _groupName;
8 | private string _groupType;
9 | private string _groupId;
10 | private string _memberCount;
11 | private string _email;
12 | private string _addStatus;
13 | private bool _isChecked;
14 |
15 | public string GroupName {
16 | get { return _groupName; }
17 | set {
18 | _groupName = value;
19 | OnPropertyChanged("GroupName");
20 | }
21 | }
22 |
23 | public string GroupType
24 | {
25 | get { return _groupType; }
26 | set
27 | {
28 | _groupType = value;
29 | OnPropertyChanged("GroupType");
30 | }
31 | }
32 |
33 | public string GroupId {
34 | get { return _groupId; }
35 | set {
36 | _groupId = value;
37 | OnPropertyChanged("GroupId");
38 | }
39 | }
40 |
41 | public string MemberCount {
42 | get { return _memberCount; }
43 | set {
44 | _memberCount = value;
45 | OnPropertyChanged("MemberCount");
46 | }
47 | }
48 |
49 | public string Email
50 | {
51 | get { return _email; }
52 | set
53 | {
54 | _email = value;
55 | OnPropertyChanged("Email");
56 | }
57 | }
58 |
59 | public string AddStatus
60 | {
61 | get { return _addStatus; }
62 | set
63 | {
64 | _addStatus = value;
65 | OnPropertyChanged("AddStatus");
66 | }
67 | }
68 |
69 | public bool IsChecked {
70 | get { return _isChecked; }
71 | set {
72 | _isChecked = value;
73 | OnPropertyChanged("IsChecked");
74 | }
75 | }
76 |
77 | public event PropertyChangedEventHandler PropertyChanged;
78 |
79 | public GroupListViewItemModel() {
80 | }
81 |
82 | public void Initialize() {
83 | }
84 |
85 | public void CleanUp() {
86 | }
87 |
88 | private void OnPropertyChanged(string propName) {
89 | PropertyChangedEventHandler handler = PropertyChanged;
90 | if (handler != null) {
91 | handler(this, new PropertyChangedEventArgs(propName));
92 | }
93 | }
94 | }
95 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TextSearchModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | public class TextSearchModel
7 | : ITextSearchModel {
8 | private TextSearchMode _searchMode;
9 |
10 | public List MemberList { get; set; }
11 |
12 | public List SearchModeList { get; set; }
13 |
14 | public string AccessToken { get; set; }
15 |
16 | public string QueryString { get; set; }
17 |
18 | public int SearchResultsLimit { get; set; }
19 |
20 | public string SelectedSearchMode {
21 | get { return _searchMode.ToString().Replace("_", " "); }
22 | set {
23 | if (!string.IsNullOrEmpty(value)) {
24 | string replaced = value.Replace(" ", "_");
25 | if (!Enum.TryParse(replaced, out _searchMode)) {
26 | _searchMode = TextSearchMode.Filename_only;
27 | }
28 | }
29 | }
30 | }
31 |
32 | public enum TextSearchMode : int {
33 | Filename_only = 0,
34 | Filename_and_Content = 1,
35 | Deleted_Filename = 2
36 | }
37 |
38 | public TextSearchModel() {
39 | Initialize();
40 | }
41 |
42 | public void Initialize() {
43 | MemberList = new List();
44 | //ResultList = new List();
45 | AccessToken = ApplicationResource.DefaultAccessToken;
46 | _searchMode = TextSearchMode.Filename_only;
47 | SearchModeList = new List();
48 | foreach (TextSearchMode mode in Enum.GetValues(typeof(TextSearchMode))) {
49 | SearchModeList.Add(mode.ToString().Replace("_", " "));
50 | }
51 | SearchResultsLimit = ApplicationResource.SearchDefaultLimit;
52 | }
53 |
54 | public void CleanUp() {
55 | }
56 |
57 | public string GetSearchModeForService() {
58 | string converted = string.Empty;
59 | switch (_searchMode) {
60 | case TextSearchMode.Filename_only:
61 | converted = "filename";
62 | break;
63 |
64 | case TextSearchMode.Filename_and_Content:
65 | converted = "filename_and_content";
66 | break;
67 |
68 | case TextSearchMode.Deleted_Filename:
69 | converted = "deleted_filename";
70 | break;
71 |
72 | default:
73 | throw new IndexOutOfRangeException();
74 | }
75 | return converted;
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DfBAdminToolkit.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DfBAdminToolkit.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Source/ProviderLauncher/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ProviderLauncher.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProviderLauncher.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/PaperListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 | using System;
5 |
6 | public class PaperListViewItemModel
7 | : INotifyPropertyChanged, IModel {
8 | private string _paperName;
9 | private string _paperId;
10 | private string _folderPath;
11 | private string _status;
12 | private string _owner;
13 | private DateTime _createdDate;
14 | private DateTime _lastUpdatedDate;
15 | private string _lastEditor;
16 | private UInt64 _revision;
17 | private string _memberId;
18 | private bool _isChecked;
19 |
20 | public string PaperName
21 | {
22 | get { return _paperName; }
23 | set {
24 | _paperName = value;
25 | OnPropertyChanged("PaperName");
26 | }
27 | }
28 |
29 | public string PaperId
30 | {
31 | get { return _paperId; }
32 | set {
33 | _paperId = value;
34 | OnPropertyChanged("PaperId");
35 | }
36 | }
37 |
38 | public string FolderPath
39 | {
40 | get { return _folderPath; }
41 | set
42 | {
43 | _folderPath = value;
44 | OnPropertyChanged("FolderPath");
45 | }
46 | }
47 |
48 | public string Status {
49 | get { return _status; }
50 | set {
51 | _status = value;
52 | OnPropertyChanged("Status");
53 | }
54 | }
55 |
56 | public string Owner
57 | {
58 | get { return _owner; }
59 | set
60 | {
61 | _owner = value;
62 | OnPropertyChanged("Owner");
63 | }
64 | }
65 |
66 | public DateTime CreatedDate
67 | {
68 | get { return _createdDate; }
69 | set
70 | {
71 | _createdDate = value;
72 | OnPropertyChanged("CreatedDate");
73 | }
74 | }
75 |
76 | public DateTime LastUpdatedDate
77 | {
78 | get { return _lastUpdatedDate; }
79 | set
80 | {
81 | _lastUpdatedDate = value;
82 | OnPropertyChanged("LastUpdatedDate");
83 | }
84 | }
85 |
86 | public string LastEditor
87 | {
88 | get { return _lastEditor; }
89 | set
90 | {
91 | _lastEditor = value;
92 | OnPropertyChanged("LastEditor");
93 | }
94 | }
95 |
96 | public UInt64 Revision
97 | {
98 | get { return _revision; }
99 | set
100 | {
101 | _revision = value;
102 | OnPropertyChanged("Revision");
103 | }
104 | }
105 |
106 | public string MemberId
107 | {
108 | get { return _memberId; }
109 | set
110 | {
111 | _memberId = value;
112 | OnPropertyChanged("MemberId");
113 | }
114 | }
115 |
116 | public bool IsChecked {
117 | get { return _isChecked; }
118 | set {
119 | _isChecked = value;
120 | OnPropertyChanged("IsChecked");
121 | }
122 | }
123 |
124 | public event PropertyChangedEventHandler PropertyChanged;
125 |
126 | public PaperListViewItemModel() {
127 | }
128 |
129 | public void Initialize() {
130 | }
131 |
132 | public void CleanUp() {
133 | }
134 |
135 | private void OnPropertyChanged(string propName) {
136 | PropertyChangedEventHandler handler = PropertyChanged;
137 | if (handler != null) {
138 | handler(this, new PropertyChangedEventArgs(propName));
139 | }
140 | }
141 | }
142 | }
--------------------------------------------------------------------------------
/Source/ProviderLauncher/AddProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 | using DfBAdminToolkit.Common.Extensions;
12 |
13 | namespace ProviderLauncher
14 | {
15 | public partial class AddProvider : Form
16 | {
17 | public static string appName = "Dropbox Partner Launchpad for Admin Toolkit";
18 |
19 | public AddProvider()
20 | {
21 | InitializeComponent();
22 | StartPosition = FormStartPosition.CenterScreen;
23 | }
24 |
25 | private void buttonSave_Click(object sender, EventArgs e)
26 | {
27 | if (textBoxFileAccessToken.Text != string.Empty && textBoxManagementToken.Text != string.Empty && textBoxName.Text != string.Empty)
28 | {
29 | try
30 | {
31 | //add code to save to xml and refresh listbox on launcher
32 | string filename = "Providers.xml";
33 |
34 | //create new instance of XmlDocument
35 | XmlDocument doc = new XmlDocument();
36 |
37 | //load from file
38 | doc.Load(filename);
39 |
40 | //create node and add value
41 | XmlNode node = doc.CreateNode(XmlNodeType.Element, "Provider", null);
42 |
43 | //create XML nodes
44 | XmlNode nodeName = doc.CreateElement("Name");
45 | nodeName.InnerText = textBoxName.Text.Trim();
46 |
47 | XmlNode nodeFileAccessToken = doc.CreateElement("FileAccessToken");
48 | nodeFileAccessToken.InnerText = textBoxFileAccessToken.Text.Trim().Encrypt();
49 |
50 | XmlNode nodeManagementToken = doc.CreateElement("ManagementToken");
51 | nodeManagementToken.InnerText = textBoxManagementToken.Text.Trim().Encrypt();
52 |
53 | //add to parent node
54 | node.AppendChild(nodeName);
55 | node.AppendChild(nodeFileAccessToken);
56 | node.AppendChild(nodeManagementToken);
57 |
58 | //add to elements collection
59 | doc.DocumentElement.AppendChild(node);
60 |
61 | //save xml file
62 | doc.Save(filename);
63 |
64 | //hide form
65 | this.Hide();
66 |
67 | //new instance of main to have refreshed listbox
68 | Form newMain = new Main();
69 | newMain.Show();
70 | }
71 | catch(Exception ex)
72 | {
73 | MessageBox.Show(ex.Message, appName);
74 | }
75 | }
76 | else
77 | {
78 | MessageBox.Show("You must provide a name, and both tokens for your new customer entry.", appName);
79 | textBoxName.Focus();
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamFoldersPermsItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model
2 | {
3 | using System.ComponentModel;
4 |
5 | public class TeamFoldersPermsItemModel
6 | : INotifyPropertyChanged, IModel
7 | {
8 | private string _teamFolderName;
9 | private string _teamFolderPath;
10 | private string _teamFolderMember;
11 | private string _teamFolderMemberId;
12 | private string _accessType;
13 | private string _memberCount;
14 | private bool _isChecked;
15 |
16 | public string TeamFolderName
17 | {
18 | get { return _teamFolderName; }
19 | set
20 | {
21 | _teamFolderName = value;
22 | OnPropertyChanged("TeamFolderName");
23 | }
24 | }
25 |
26 | public string TeamFolderPath
27 | {
28 | get { return _teamFolderPath; }
29 | set
30 | {
31 | _teamFolderPath = value;
32 | OnPropertyChanged("TeamFolderPath");
33 | }
34 | }
35 |
36 | public string TeamFolderMember
37 | {
38 | get { return _teamFolderMember; }
39 | set
40 | {
41 | _teamFolderMember = value;
42 | OnPropertyChanged("TeamFolderMember");
43 | }
44 | }
45 |
46 | public string TeamFolderMemberId
47 | {
48 | get { return _teamFolderMemberId; }
49 | set
50 | {
51 | _teamFolderMemberId = value;
52 | OnPropertyChanged("TeamFolderMemberId");
53 | }
54 | }
55 |
56 | public string AccessType
57 | {
58 | get { return _accessType; }
59 | set
60 | {
61 | _accessType = value;
62 | OnPropertyChanged("AccessType");
63 | }
64 | }
65 |
66 | public string MemberCount
67 | {
68 | get { return _memberCount; }
69 | set
70 | {
71 | _memberCount = value;
72 | OnPropertyChanged("MemberCount");
73 | }
74 | }
75 |
76 | public bool IsChecked
77 | {
78 | get { return _isChecked; }
79 | set
80 | {
81 | _isChecked = value;
82 | OnPropertyChanged("IsChecked");
83 | }
84 | }
85 |
86 | public event PropertyChangedEventHandler PropertyChanged;
87 |
88 | public TeamFoldersPermsItemModel()
89 | {
90 | }
91 |
92 | public void Initialize()
93 | {
94 | }
95 |
96 | public void CleanUp()
97 | {
98 | }
99 |
100 | private void OnPropertyChanged(string propName)
101 | {
102 | PropertyChangedEventHandler handler = PropertyChanged;
103 | if (handler != null)
104 | {
105 | handler(this, new PropertyChangedEventArgs(propName));
106 | }
107 | }
108 | }
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/LegalPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 |
3 | using DfBAdminToolkit.Common.Utils;
4 | using DfBAdminToolkit.Model;
5 | using DfBAdminToolkit.View;
6 | using Microsoft.Win32;
7 | using System.Windows.Forms;
8 |
9 | public class LegalPresenter
10 | : PresenterBase, ILegalPresenter {
11 |
12 | public LegalPresenter(ILegalModel model, ILegalView view)
13 | : base(model, view) {
14 | }
15 |
16 | protected override void Initialize() {
17 | // read data from model
18 | ILegalView view = base._view as ILegalView;
19 | ILegalModel model = base._model as ILegalModel;
20 | PresenterBase.SetViewPropertiesFromModel(
21 | ref view, model
22 | );
23 | }
24 |
25 | protected override void WireViewEvents() {
26 | if (!IsViewEventsWired) {
27 | ILegalView view = base._view as ILegalView;
28 | view.DataChanged += OnDataChanged;
29 | view.CommandAccept += OnCommandAccept;
30 | view.CommandDecline += OnCommandDecline;
31 | IsViewEventsWired = true;
32 | }
33 | }
34 |
35 | protected override void UnWireViewEvents() {
36 | if (IsViewEventsWired) {
37 | ILegalView view = base._view as ILegalView;
38 | view.DataChanged -= OnDataChanged;
39 | view.CommandAccept -= OnCommandAccept;
40 | view.CommandDecline -= OnCommandDecline;
41 | IsViewEventsWired = false;
42 | }
43 | }
44 |
45 | protected override void CleanUp() {
46 | }
47 |
48 | #region Events
49 |
50 | private void OnDataChanged(object sender, System.EventArgs e) {
51 | ILegalView view = base._view as ILegalView;
52 | ILegalModel model = base._model as ILegalModel;
53 | PresenterBase.SetModelPropertiesFromView(
54 | ref model, view
55 | );
56 | }
57 |
58 | private void OnCommandDecline(object sender, System.EventArgs e) {
59 | Application.Exit();
60 | }
61 |
62 | private void OnCommandAccept(object sender, System.EventArgs e) {
63 | RegistryKey key = RegistryUtils.CreateKey(ApplicationResource.RegistryEntryPoint);
64 | RegistryUtils.SetKeyValue(key, ApplicationResource.RegistryKey, bool.TrueString);
65 |
66 | IView view = base._view;
67 | if (SyncContext != null) {
68 | SyncContext.Post(delegate {
69 | // hide legal view
70 | view.HideView();
71 |
72 | // show main view
73 | IMainPresenter presenter = SimpleResolver.Instance.Get(
74 | new object[] {
75 | new MainModel(), new MainView()
76 | });
77 | presenter.ShowView();
78 | }, null);
79 | }
80 | //now encrypt AppSettings to not make tokens visible (all appSettings encrypted)
81 | FileUtil.EncryptAppSettings("appSettings");
82 | }
83 |
84 | #endregion Events
85 | }
86 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/DeviceListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class DeviceListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private System.DateTime _created;
8 | private System.DateTime _updated;
9 | private string _email;
10 | private string _teamId;
11 | private string _deviceName;
12 | private string _ipAddress;
13 | private string _sessionId;
14 | private string _clientType;
15 | private bool _isChecked;
16 |
17 | public System.DateTime Created {
18 | get { return _created; }
19 | set {
20 | _created = value;
21 | OnPropertyChanged("Created");
22 | }
23 | }
24 |
25 | public System.DateTime Updated
26 | {
27 | get { return _updated; }
28 | set
29 | {
30 | _updated = value;
31 | OnPropertyChanged("Updated");
32 | }
33 | }
34 |
35 | public string Email
36 | {
37 | get { return _email; }
38 | set
39 | {
40 | _email = value;
41 | OnPropertyChanged("Email");
42 | }
43 | }
44 |
45 | public string TeamId
46 | {
47 | get { return _teamId; }
48 | set {
49 | _teamId = value;
50 | OnPropertyChanged("TeamId");
51 | }
52 | }
53 |
54 | public string DeviceName {
55 | get { return _deviceName; }
56 | set {
57 | _deviceName = value;
58 | OnPropertyChanged("DeviceName");
59 | }
60 | }
61 |
62 | public string IpAddress {
63 | get { return _ipAddress; }
64 | set {
65 | _ipAddress = value;
66 | OnPropertyChanged("IpAddress");
67 | }
68 | }
69 |
70 | public string SessionId {
71 | get { return _sessionId; }
72 | set {
73 | _sessionId = value;
74 | OnPropertyChanged("SessionId");
75 | }
76 | }
77 |
78 | public string ClientType {
79 | get { return _clientType; }
80 | set {
81 | _clientType = value;
82 | OnPropertyChanged("ClientType");
83 | }
84 | }
85 |
86 | public bool IsChecked {
87 | get { return _isChecked; }
88 | set {
89 | _isChecked = value;
90 | OnPropertyChanged("IsChecked");
91 | }
92 | }
93 |
94 | public event PropertyChangedEventHandler PropertyChanged;
95 |
96 | public DeviceListViewItemModel() {
97 | }
98 |
99 | public void Initialize() {
100 | }
101 |
102 | public void CleanUp() {
103 | }
104 |
105 | private void OnPropertyChanged(string propName) {
106 | PropertyChangedEventHandler handler = PropertyChanged;
107 | if (handler != null) {
108 | handler(this, new PropertyChangedEventArgs(propName));
109 | }
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class TeamListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private string _email;
8 | private string _teamId;
9 | private string _filePath;
10 | private string _fileName;
11 | private string _fileSize;
12 | private string _status;
13 | private string _firstName;
14 | private string _lastName;
15 | private string _role;
16 | private bool _isChecked;
17 |
18 | public string Email {
19 | get { return _email; }
20 | set {
21 | _email = value;
22 | OnPropertyChanged("Email");
23 | }
24 | }
25 |
26 | public string TeamId {
27 | get { return _teamId; }
28 | set {
29 | _teamId = value;
30 | OnPropertyChanged("TeamId");
31 | }
32 | }
33 |
34 | public string FilePath {
35 | get { return _filePath; }
36 | set {
37 | _filePath = value;
38 | OnPropertyChanged("FilePath");
39 | }
40 | }
41 |
42 | public string FileName {
43 | get { return _fileName; }
44 | set {
45 | _fileName = value;
46 | OnPropertyChanged("FileName");
47 | }
48 | }
49 |
50 | public string FileSize {
51 | get { return _fileSize; }
52 | set {
53 | _fileSize = value;
54 | OnPropertyChanged("FileSize");
55 | }
56 | }
57 |
58 | public string Status {
59 | get { return _status; }
60 | set {
61 | _status = value;
62 | OnPropertyChanged("Status");
63 | }
64 | }
65 |
66 | public string FirstName {
67 | get { return _firstName; }
68 | set {
69 | _firstName = value;
70 | OnPropertyChanged("FirstName");
71 | }
72 | }
73 |
74 | public string LastName {
75 | get { return _lastName; }
76 | set {
77 | _lastName = value;
78 | OnPropertyChanged("LastName");
79 | }
80 | }
81 |
82 | public string Role {
83 | get { return _role; }
84 | set {
85 | _role = value;
86 | OnPropertyChanged("Role");
87 | }
88 | }
89 |
90 | public bool IsChecked {
91 | get { return _isChecked; }
92 | set {
93 | _isChecked = value;
94 | OnPropertyChanged("IsChecked");
95 | }
96 | }
97 |
98 | public event PropertyChangedEventHandler PropertyChanged;
99 |
100 | public TeamListViewItemModel() {
101 | }
102 |
103 | public void Initialize() {
104 | }
105 |
106 | public void CleanUp() {
107 | }
108 |
109 | private void OnPropertyChanged(string propName) {
110 | PropertyChangedEventHandler handler = PropertyChanged;
111 | if (handler != null) {
112 | handler(this, new PropertyChangedEventArgs(propName));
113 | }
114 | }
115 | }
116 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Program.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit {
2 |
3 | using DfBAdminToolkit.Common.Utils;
4 | using DfBAdminToolkit.Model;
5 | using DfBAdminToolkit.Presenter;
6 | using DfBAdminToolkit.View;
7 | using Microsoft.Win32;
8 | using System;
9 | using System.Windows.Forms;
10 |
11 | internal static class Program {
12 |
13 | ///
14 | /// The main entry point for the application.
15 | ///
16 | [STAThread]
17 | private static void Main() {
18 | Application.EnableVisualStyles();
19 | Application.SetCompatibleTextRenderingDefault(false);
20 |
21 | Bind();
22 |
23 | // check legal acceptance status
24 | // if user hasn't accepted license term yet, force user to land on legal page first.
25 | bool userPreviouslyAcceptedLegalTerm = false;
26 | RegistryKey key = RegistryUtils.FindKey(ApplicationResource.RegistryEntryPoint);
27 | if (key != null) {
28 | // check acceptance status
29 | string value = RegistryUtils.GetKeyValue(key, ApplicationResource.RegistryKey);
30 | bool.TryParse(value, out userPreviouslyAcceptedLegalTerm);
31 | }
32 | if (userPreviouslyAcceptedLegalTerm) {
33 | IMainView appView = new MainView();
34 | IMainModel appModel = new MainModel();
35 | IMainPresenter presenter = SimpleResolver.Instance.Get(
36 | new object[] { appModel, appView }
37 | );
38 | Application.Run(appView as MainView);
39 | } else {
40 | // show legal view
41 | ILegalView legalView = new LegalView();
42 | ILegalModel legalModel = new LegalModel();
43 | ILegalPresenter presenter = SimpleResolver.Instance.Get(
44 | new object[] { legalModel, legalView }
45 | );
46 | Application.Run(legalView as LegalView);
47 | }
48 | Unbind();
49 | }
50 |
51 | private static void Bind() {
52 | SimpleResolver.Instance.Bind(typeof(MainPresenter));
53 | SimpleResolver.Instance.Bind(typeof(LegalPresenter));
54 | SimpleResolver.Instance.Bind(typeof(TextSearchPresenter));
55 | SimpleResolver.Instance.Bind(typeof(DumpUserContentPresenter));
56 | SimpleResolver.Instance.Bind(typeof(ProvisioningPresenter));
57 | SimpleResolver.Instance.Bind(typeof(GroupsPresenter));
58 | SimpleResolver.Instance.Bind(typeof(TeamFoldersPresenter));
59 | SimpleResolver.Instance.Bind(typeof(PaperPresenter));
60 | SimpleResolver.Instance.Bind(typeof(DevicesPresenter));
61 | SimpleResolver.Instance.Bind(typeof(TeamHealthPresenter));
62 | SimpleResolver.Instance.Bind(typeof(TeamAuditingPresenter));
63 | SimpleResolver.Instance.Bind(typeof(DataMigrationPresenter));
64 | SimpleResolver.Instance.Bind(typeof(SettingsPresenter));
65 | }
66 |
67 | private static void Unbind() {
68 | SimpleResolver.Instance.Dispose();
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/Component/TextBoxEx.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Common.Component {
2 |
3 | using System;
4 | using System.ComponentModel;
5 | using System.IO;
6 | using System.Windows.Forms;
7 |
8 | public partial class TextBoxEx : TextBox {
9 | private string[] _fileFilters;
10 |
11 | public event EventHandler OnDragDropEnd;
12 | public event EventHandler OnTextPasted;
13 |
14 | public TextBoxEx() {
15 | InitializeComponent();
16 | InitEvent();
17 | }
18 |
19 | public TextBoxEx(IContainer container) {
20 | InitializeComponent();
21 | container.Add(this);
22 | InitEvent();
23 | }
24 |
25 | private void InitEvent() {
26 | this.DragDrop += new DragEventHandler(TextBoxEx_DragDrop);
27 | this.DragEnter += new DragEventHandler(TextBoxEx_DragEnter);
28 | }
29 |
30 | private void TextBoxEx_DragEnter(object sender, DragEventArgs e) {
31 | e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.All : DragDropEffects.None;
32 | }
33 |
34 | protected override void WndProc(ref Message m) {
35 | switch (m.Msg) {
36 | case 0x302:
37 | if (OnTextPasted != null) {
38 | string text = (string)m.GetLParam(m.GetType());
39 | base.WndProc(ref m);
40 | OnTextPasted.Invoke(this, new EventArgs());
41 | } else {
42 | string text = (string)m.GetLParam(m.GetType());
43 | base.WndProc(ref m);
44 | }
45 | break;
46 |
47 | default:
48 | base.WndProc(ref m);
49 | break;
50 | }
51 | }
52 |
53 | private void TextBoxEx_DragDrop(object sender, DragEventArgs e) {
54 | string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
55 | foreach (string file in files) {
56 | bool isFile = false;
57 | try {
58 | FileInfo fileInfo = new FileInfo(file);
59 | if (_fileFilters.Length == 0) {
60 | this.Text = fileInfo.FullName;
61 | } else {
62 | foreach (string filter in _fileFilters) {
63 | if (fileInfo.Extension.ToLower() == filter.ToLower()) {
64 | this.Text = fileInfo.FullName;
65 | // for now, we only supports single file.
66 | // we can easily extend this to support multi files.
67 | break;
68 | }
69 | }
70 | }
71 | isFile = true;
72 | } catch (Exception ex) {
73 | Console.WriteLine(ex.Message);
74 | }
75 | if (!isFile) {
76 | DirectoryInfo dirInfo = new DirectoryInfo(file);
77 | this.Text = dirInfo.FullName;
78 | }
79 | }
80 | OnDragDropEnd.Invoke(this, new EventArgs());
81 | }
82 |
83 | #region Properties
84 |
85 | public string[] FileFilter {
86 | get { return _fileFilters; }
87 | set { _fileFilters = value; }
88 | }
89 |
90 | #endregion Properties
91 | }
92 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/TeamAuditingListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 | using System;
5 |
6 | public class TeamAuditingListViewItemModel
7 | : INotifyPropertyChanged, IModel {
8 | private DateTime _timestamp;
9 | private string _actorType;
10 | private string _email;
11 | private string _context;
12 | private string _eventType;
13 | private string _origin;
14 | private string _ipAddress;
15 | private string _city;
16 | private string _region;
17 | private string _country;
18 | private string _participants;
19 | private string _assets;
20 | private bool _isChecked;
21 |
22 | public DateTime Timestamp {
23 | get { return _timestamp; }
24 | set {
25 | _timestamp = value;
26 | OnPropertyChanged("Timestamp");
27 | }
28 | }
29 |
30 | public string ActorType
31 | {
32 | get { return _actorType; }
33 | set
34 | {
35 | _actorType = value;
36 | OnPropertyChanged("ActorType");
37 | }
38 | }
39 |
40 | public string Email {
41 | get { return _email; }
42 | set {
43 | _email = value;
44 | OnPropertyChanged("Email");
45 | }
46 | }
47 |
48 | public string Context {
49 | get { return _context; }
50 | set {
51 | _context = value;
52 | OnPropertyChanged("Context");
53 | }
54 | }
55 |
56 | public string EventType
57 | {
58 | get { return _eventType; }
59 | set
60 | {
61 | _eventType = value;
62 | OnPropertyChanged("EventType");
63 | }
64 | }
65 |
66 | public string Origin
67 | {
68 | get { return _origin; }
69 | set
70 | {
71 | _origin = value;
72 | OnPropertyChanged("Origin");
73 | }
74 | }
75 |
76 | public string IpAddress
77 | {
78 | get { return _ipAddress; }
79 | set
80 | {
81 | _ipAddress = value;
82 | OnPropertyChanged("IpAddress");
83 | }
84 | }
85 |
86 | public string City
87 | {
88 | get { return _city; }
89 | set
90 | {
91 | _city = value;
92 | OnPropertyChanged("City");
93 | }
94 | }
95 |
96 | public string Region
97 | {
98 | get { return _region; }
99 | set
100 | {
101 | _region = value;
102 | OnPropertyChanged("Region");
103 | }
104 | }
105 |
106 | public string Country
107 | {
108 | get { return _country; }
109 | set
110 | {
111 | _country = value;
112 | OnPropertyChanged("Country");
113 | }
114 | }
115 |
116 | public string Participants
117 | {
118 | get { return _participants; }
119 | set
120 | {
121 | _participants = value;
122 | OnPropertyChanged("Participants");
123 | }
124 | }
125 |
126 | public string Assets
127 | {
128 | get { return _assets; }
129 | set
130 | {
131 | _assets = value;
132 | OnPropertyChanged("Assets");
133 | }
134 | }
135 |
136 | public bool IsChecked {
137 | get { return _isChecked; }
138 | set {
139 | _isChecked = value;
140 | OnPropertyChanged("IsChecked");
141 | }
142 | }
143 |
144 | public event PropertyChangedEventHandler PropertyChanged;
145 |
146 | public TeamAuditingListViewItemModel() {
147 | }
148 |
149 | public void Initialize() {
150 | }
151 |
152 | public void CleanUp() {
153 | }
154 |
155 | private void OnPropertyChanged(string propName) {
156 | PropertyChangedEventHandler handler = PropertyChanged;
157 | if (handler != null) {
158 | handler(this, new PropertyChangedEventArgs(propName));
159 | }
160 | }
161 | }
162 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Presenter/MainPresenter.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Presenter {
2 |
3 | using DfBAdminToolkit.Model;
4 | using DfBAdminToolkit.View;
5 |
6 | public class MainPresenter
7 | : PresenterBase, IMainPresenter {
8 |
9 | public MainPresenter()
10 | : this(new MainModel(), new MainView()) {
11 | }
12 |
13 | public MainPresenter(IMainModel model, IMainView view)
14 | : base(model, view) {
15 | }
16 |
17 | protected override void Initialize() {
18 | // TODO:
19 | // any main view related components will be synced from
20 | // model here
21 | }
22 |
23 | protected override void WireViewEvents() {
24 | if (!IsViewEventsWired) {
25 | // TODO:
26 | // wire up main view events
27 | }
28 | }
29 |
30 | protected override void UnWireViewEvents() {
31 | if (IsViewEventsWired) {
32 | // TODO:
33 | // unwire main view events
34 | }
35 | }
36 |
37 | protected override void CleanUp() {
38 | }
39 |
40 | #region Signals
41 |
42 | public void ShowView() {
43 | if (SyncContext != null) {
44 | SyncContext.Post(delegate {
45 | base._view.ShowView();
46 | }, null);
47 | }
48 | }
49 |
50 | public void ActivateSpinner(bool activate) {
51 | IMainView view = base._view as IMainView;
52 | if (SyncContext != null) {
53 | SyncContext.Post(delegate {
54 | view.EnableLoadingSpinner(activate);
55 | }, null);
56 | }
57 | }
58 |
59 | public void EnableControl(bool enable) {
60 | IMainView view = base._view as IMainView;
61 | if (SyncContext != null) {
62 | SyncContext.Post(delegate {
63 | view.EnableView(enable);
64 | }, null);
65 | }
66 | }
67 |
68 | public void UpdateProgressInfo(string text) {
69 | IMainView view = base._view as IMainView;
70 | if (SyncContext != null) {
71 | SyncContext.Post(delegate {
72 | view.UpdateProgressText(text);
73 | }, null);
74 | }
75 | }
76 |
77 | public void ShowErrorMessage(string text, string title) {
78 | IMainView view = base._view as IMainView;
79 | if (SyncContext != null) {
80 | SyncContext.Post(delegate {
81 | view.ShowErrorMessage(text, title);
82 | }, null);
83 | }
84 | }
85 |
86 | public void UpdateTitleBarStats()
87 | {
88 | IMainView view = base._view as IMainView;
89 | if (SyncContext != null)
90 | {
91 | SyncContext.Post(delegate {
92 | view.UpdateTitleBarTeamStats();
93 | }, null);
94 | }
95 | }
96 |
97 | public void ShowInfoMessage(string text) {
98 | IMainView view = base._view as IMainView;
99 | if (SyncContext != null) {
100 | SyncContext.Post(delegate {
101 | view.ShowInfoMessage(text);
102 | }, null);
103 | }
104 | }
105 |
106 | #endregion Signals
107 | }
108 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 | .vs/
39 |
40 | # User-specific files
41 | *.suo
42 | *.user
43 | *.sln.docstates
44 |
45 | # Build results
46 |
47 | [Dd]ebug/
48 | [Rr]elease/
49 | x64/
50 | build/
51 | [Bb]in/
52 | [Oo]bj/
53 |
54 | # MSTest test Results
55 | [Tt]est[Rr]esult*/
56 | [Bb]uild[Ll]og.*
57 |
58 | *_i.c
59 | *_p.c
60 | *.ilk
61 | *.meta
62 | *.obj
63 | *.pch
64 | *.pdb
65 | *.pgc
66 | *.pgd
67 | *.rsp
68 | *.sbr
69 | *.tlb
70 | *.tli
71 | *.tlh
72 | *.tmp
73 | *.tmp_proj
74 | *.log
75 | *.vspscc
76 | *.vssscc
77 | .builds
78 | *.pidb
79 | *.log
80 | *.scc
81 |
82 | # Visual C++ cache files
83 | ipch/
84 | *.aps
85 | *.ncb
86 | *.opensdf
87 | *.sdf
88 | *.cachefile
89 |
90 | # Visual Studio profiler
91 | *.psess
92 | *.vsp
93 | *.vspx
94 |
95 | # Guidance Automation Toolkit
96 | *.gpState
97 |
98 | # ReSharper is a .NET coding add-in
99 | _ReSharper*/
100 | *.[Rr]e[Ss]harper
101 |
102 | # TeamCity is a build add-in
103 | _TeamCity*
104 |
105 | # DotCover is a Code Coverage Tool
106 | *.dotCover
107 |
108 | # NCrunch
109 | *.ncrunch*
110 | .*crunch*.local.xml
111 |
112 | # Installshield output folder
113 | [Ee]xpress/
114 |
115 | # DocProject is a documentation generator add-in
116 | DocProject/buildhelp/
117 | DocProject/Help/*.HxT
118 | DocProject/Help/*.HxC
119 | DocProject/Help/*.hhc
120 | DocProject/Help/*.hhk
121 | DocProject/Help/*.hhp
122 | DocProject/Help/Html2
123 | DocProject/Help/html
124 |
125 | # Click-Once directory
126 | publish/
127 |
128 | # Publish Web Output
129 | *.Publish.xml
130 | *.pubxml
131 | *.publishproj
132 |
133 | # NuGet Packages Directory
134 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
135 | #packages/
136 |
137 | # Windows Azure Build Output
138 | csx
139 | *.build.csdef
140 |
141 | # Windows Store app package directory
142 | AppPackages/
143 |
144 | # Others
145 | sql/
146 | *.Cache
147 | ClientBin/
148 | [Ss]tyle[Cc]op.*
149 | ~$*
150 | *~
151 | *.dbmdl
152 | *.[Pp]ublish.xml
153 | *.pfx
154 | *.publishsettings
155 |
156 | # RIA/Silverlight projects
157 | Generated_Code/
158 |
159 | # Backup & report files from converting an old project file to a newer
160 | # Visual Studio version. Backup files are not needed, because we have git ;-)
161 | _UpgradeReport_Files/
162 | Backup*/
163 | UpgradeLog*.XML
164 | UpgradeLog*.htm
165 |
166 | # SQL Server files
167 | App_Data/*.mdf
168 | App_Data/*.ldf
169 |
170 | #############
171 | ## Windows detritus
172 | #############
173 |
174 | # Windows image file caches
175 | Thumbs.db
176 | ehthumbs.db
177 |
178 | # Folder config file
179 | Desktop.ini
180 |
181 | # Recycle Bin used on file shares
182 | $RECYCLE.BIN/
183 |
184 | # Mac crap
185 | .DS_Store
186 |
187 |
188 | #############
189 | ## Python
190 | #############
191 |
192 | *.py[cod]
193 |
194 | # Packages
195 | *.egg
196 | *.egg-info
197 | dist/
198 | build/
199 | eggs/
200 | parts/
201 | var/
202 | sdist/
203 | develop-eggs/
204 | .installed.cfg
205 |
206 | # Installer logs
207 | pip-log.txt
208 |
209 | # Unit test / coverage reports
210 | .coverage
211 | .tox
212 |
213 | #Translations
214 | *.mo
215 |
216 | #Mr Developer
217 | .mr.developer.cfg
218 |
219 |
--------------------------------------------------------------------------------
/Source/packages/Newtonsoft.Json.7.0.1/tools/install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | # open json.net splash page on package install
4 | # don't open if json.net is installed as a dependency
5 |
6 | try
7 | {
8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
10 |
11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
12 | {
13 | # user is installing from VS NuGet console
14 | # get reference to the window, the console host and the input history
15 | # show webpage if "install-package newtonsoft.json" was last input
16 |
17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
18 |
19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
20 | [System.Reflection.BindingFlags]::NonPublic)
21 |
22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
23 | if ($prop -eq $null) { return }
24 |
25 | $hostInfo = $prop.GetValue($consoleWindow)
26 | if ($hostInfo -eq $null) { return }
27 |
28 | $history = $hostInfo.WpfConsole.InputHistory.History
29 |
30 | $lastCommand = $history | select -last 1
31 |
32 | if ($lastCommand)
33 | {
34 | $lastCommand = $lastCommand.Trim().ToLower()
35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
36 | {
37 | $dte2.ItemOperations.Navigate($url) | Out-Null
38 | }
39 | }
40 | }
41 | else
42 | {
43 | # user is installing from VS NuGet dialog
44 | # get reference to the window, then smart output console provider
45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
46 |
47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
48 | [System.Reflection.BindingFlags]::NonPublic)
49 |
50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
51 | [System.Reflection.BindingFlags]::NonPublic)
52 |
53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return }
54 |
55 | $instance = $instanceField.GetValue($null)
56 |
57 | if ($instance -eq $null) { return }
58 |
59 | $consoleProvider = $consoleField.GetValue($instance)
60 | if ($consoleProvider -eq $null) { return }
61 |
62 | $console = $consoleProvider.CreateOutputConsole($false)
63 |
64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
65 | [System.Reflection.BindingFlags]::NonPublic)
66 | if ($messagesField -eq $null) { return }
67 |
68 | $messages = $messagesField.GetValue($console)
69 | if ($messages -eq $null) { return }
70 |
71 | $operations = $messages -split "=============================="
72 |
73 | $lastOperation = $operations | select -last 1
74 |
75 | if ($lastOperation)
76 | {
77 | $lastOperation = $lastOperation.ToLower()
78 |
79 | $lines = $lastOperation -split "`r`n"
80 |
81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
82 |
83 | if ($installMatch)
84 | {
85 | $dte2.ItemOperations.Navigate($url) | Out-Null
86 | }
87 | }
88 | }
89 | }
90 | catch
91 | {
92 | try
93 | {
94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
95 |
96 | $selection = $pmPane.TextDocument.Selection
97 | $selection.StartOfDocument($false)
98 | $selection.EndOfDocument($true)
99 |
100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
101 | {
102 | $dte2.ItemOperations.Navigate($url) | Out-Null
103 | }
104 | }
105 | catch
106 | {
107 | # stop potential errors from bubbling up
108 | # worst case the splash page won't open
109 | }
110 | }
111 |
112 | # still yolo
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupInfoItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model
2 | {
3 | using System.ComponentModel;
4 |
5 | public class GroupInfoItemModel
6 | : INotifyPropertyChanged, IModel
7 | {
8 | private string _groupName;
9 | private string _groupId;
10 | private string _groupType;
11 | private string _teamMemberId;
12 | private string _email;
13 | private string _emailVerified;
14 | private string _status;
15 | private string _membershipType;
16 | private string _accessType;
17 | private string _joinedOn;
18 | private bool _isChecked;
19 |
20 | public string GroupName
21 | {
22 | get { return _groupName; }
23 | set
24 | {
25 | _groupName = value;
26 | OnPropertyChanged("GroupName");
27 | }
28 | }
29 |
30 | public string GroupId
31 | {
32 | get { return _groupId; }
33 | set
34 | {
35 | _groupId = value;
36 | OnPropertyChanged("GroupId");
37 | }
38 | }
39 |
40 | public string GroupType
41 | {
42 | get { return _groupType; }
43 | set
44 | {
45 | _groupType = value;
46 | OnPropertyChanged("GroupType");
47 | }
48 | }
49 |
50 | public string TeamMemberId
51 | {
52 | get { return _teamMemberId; }
53 | set
54 | {
55 | _teamMemberId = value;
56 | OnPropertyChanged("TeamMemberId");
57 | }
58 | }
59 |
60 | public string Email
61 | {
62 | get { return _email; }
63 | set
64 | {
65 | _email = value;
66 | OnPropertyChanged("Email");
67 | }
68 | }
69 |
70 | public string EmailVerified
71 | {
72 | get { return _emailVerified; }
73 | set
74 | {
75 | _emailVerified = value;
76 | OnPropertyChanged("EmailVerified");
77 | }
78 | }
79 |
80 | public string Status
81 | {
82 | get { return _status; }
83 | set
84 | {
85 | _status = value;
86 | OnPropertyChanged("Status");
87 | }
88 | }
89 |
90 | public string MembershipType
91 | {
92 | get { return _membershipType; }
93 | set
94 | {
95 | _membershipType = value;
96 | OnPropertyChanged("MembershipType");
97 | }
98 | }
99 |
100 | public string AccessType
101 | {
102 | get { return _accessType; }
103 | set
104 | {
105 | _accessType = value;
106 | OnPropertyChanged("AccessType");
107 | }
108 | }
109 |
110 | public string JoinedOn
111 | {
112 | get { return _joinedOn; }
113 | set
114 | {
115 | _joinedOn = value;
116 | OnPropertyChanged("JoinedOn");
117 | }
118 | }
119 |
120 | public bool IsChecked
121 | {
122 | get { return _isChecked; }
123 | set
124 | {
125 | _isChecked = value;
126 | OnPropertyChanged("IsChecked");
127 | }
128 | }
129 |
130 | public event PropertyChangedEventHandler PropertyChanged;
131 |
132 | public GroupInfoItemModel()
133 | {
134 | }
135 |
136 | public void Initialize()
137 | {
138 | }
139 |
140 | public void CleanUp()
141 | {
142 | }
143 |
144 | private void OnPropertyChanged(string propName)
145 | {
146 | PropertyChangedEventHandler handler = PropertyChanged;
147 | if (handler != null)
148 | {
149 | handler(this, new PropertyChangedEventArgs(propName));
150 | }
151 | }
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/MemberListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 | using System;
5 |
6 | public class MemberListViewItemModel
7 | : INotifyPropertyChanged, IModel {
8 | private string _email;
9 | private string _memberId;
10 | private string _path;
11 | private string _firstName;
12 | private string _lastName;
13 | private string _persistentId;
14 | private string _status;
15 | private string _role;
16 | private decimal _usage;
17 | private string _newEmail;
18 | private string _newExternalId;
19 | private string _provisionStatus;
20 | private DateTime _joinedOn;
21 | private bool _isChecked;
22 |
23 | public string Email {
24 | get { return _email; }
25 | set {
26 | _email = value;
27 | OnPropertyChanged("Email");
28 | }
29 | }
30 |
31 | public string MemberId {
32 | get { return _memberId; }
33 | set {
34 | _memberId = value;
35 | OnPropertyChanged("MemberId");
36 | }
37 | }
38 |
39 | public string Path {
40 | get { return _path; }
41 | set {
42 | _path = value;
43 | OnPropertyChanged("Path");
44 | }
45 | }
46 |
47 | public string FirstName {
48 | get { return _firstName; }
49 | set {
50 | _firstName = value;
51 | OnPropertyChanged("FirstName");
52 | }
53 | }
54 |
55 | public string LastName {
56 | get { return _lastName; }
57 | set {
58 | _lastName = value;
59 | OnPropertyChanged("LastName");
60 | }
61 | }
62 |
63 | public string PersistentId {
64 | get { return _persistentId; }
65 | set
66 | {
67 | _persistentId = value;
68 | OnPropertyChanged("PersistentId");
69 | }
70 | }
71 |
72 | public string Role {
73 | get { return _role; }
74 | set {
75 | _role = value;
76 | OnPropertyChanged("Role");
77 | }
78 | }
79 |
80 | public string Status {
81 | get { return _status; }
82 | set {
83 | _status = value;
84 | OnPropertyChanged("Status");
85 | }
86 | }
87 |
88 | public decimal Usage
89 | {
90 | get { return _usage; }
91 | set
92 | {
93 | _usage = value;
94 | OnPropertyChanged("Usage");
95 | }
96 | }
97 |
98 | public string NewEmail
99 | {
100 | get { return _newEmail; }
101 | set
102 | {
103 | _newEmail = value;
104 | OnPropertyChanged("NewEmail");
105 | }
106 | }
107 |
108 | public string NewExternalId
109 | {
110 | get { return _newExternalId; }
111 | set
112 | {
113 | _newExternalId = value;
114 | OnPropertyChanged("NewExternalId");
115 | }
116 | }
117 |
118 | public string ProvisionStatus
119 | {
120 | get { return _provisionStatus; }
121 | set
122 | {
123 | _provisionStatus = value;
124 | OnPropertyChanged("ProvisionStatus");
125 | }
126 | }
127 |
128 | public DateTime JoinedOn
129 | {
130 | get { return _joinedOn; }
131 | set
132 | {
133 | _joinedOn = value;
134 | OnPropertyChanged("JoinedOn");
135 | }
136 | }
137 |
138 | public bool IsChecked {
139 | get { return _isChecked; }
140 | set {
141 | _isChecked = value;
142 | OnPropertyChanged("IsChecked");
143 | }
144 | }
145 |
146 | public event PropertyChangedEventHandler PropertyChanged;
147 |
148 | public MemberListViewItemModel() {
149 | }
150 |
151 | public void Initialize() {
152 | }
153 |
154 | public void CleanUp() {
155 | }
156 |
157 | private void OnPropertyChanged(string propName) {
158 | PropertyChangedEventHandler handler = PropertyChanged;
159 | if (handler != null) {
160 | handler(this, new PropertyChangedEventArgs(propName));
161 | }
162 | }
163 | }
164 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/ContentDisplayListViewItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model {
2 |
3 | using System.ComponentModel;
4 |
5 | public class ContentDisplayListViewItemModel
6 | : INotifyPropertyChanged, IModel {
7 | private string _email; // login
8 | private string _firstName;
9 | private string _lastName;
10 | private string _memberId;
11 | private string _itemPath;
12 | private string _itemPathId;
13 | private string _itemName;
14 | private string _itemId;
15 | private string _itemType;
16 | private string _itemSize;
17 | private string _created;
18 | private string _lastModified;
19 | private string _uploaded;
20 | private string _itemPathDisplay;
21 | private long _itemSizeByte;
22 |
23 | public string Email {
24 | get { return _email; }
25 | set {
26 | _email = value;
27 | OnPropertyChanged("Email");
28 | }
29 | }
30 |
31 | public string OwnerName {
32 | get { return string.Format("{0} {1}", _firstName, _lastName); }
33 | }
34 |
35 | public string FirstName {
36 | get { return _firstName; }
37 | set {
38 | _firstName = value;
39 | OnPropertyChanged("FirstName");
40 | }
41 | }
42 |
43 | public string LastName {
44 | get { return _lastName; }
45 | set {
46 | _lastName = value;
47 | OnPropertyChanged("LastName");
48 | }
49 | }
50 |
51 | public string MemberId {
52 | get { return _memberId; }
53 | set {
54 | _memberId = value;
55 | OnPropertyChanged("MemberId");
56 | }
57 | }
58 |
59 | public string ItemPath {
60 | get { return _itemPath; }
61 | set {
62 | _itemPath = value;
63 | OnPropertyChanged("ItemPath");
64 | }
65 | }
66 |
67 | public string ItemPathId {
68 | get { return _itemPathId; }
69 | set {
70 | _itemPathId = value;
71 | OnPropertyChanged("ItemPathId");
72 | }
73 | }
74 |
75 | public string ItemName {
76 | get { return _itemName; }
77 | set {
78 | _itemName = value;
79 | OnPropertyChanged("ItemName");
80 | }
81 | }
82 |
83 | public string ItemId {
84 | get { return _itemId; }
85 | set {
86 | _itemId = value;
87 | OnPropertyChanged("ItemId");
88 | }
89 | }
90 |
91 | public string ItemType {
92 | get { return _itemType; }
93 | set {
94 | _itemType = value;
95 | OnPropertyChanged("ItemType");
96 | }
97 | }
98 |
99 | public string ItemSize {
100 | get { return _itemSize; }
101 | set {
102 | _itemSize = value;
103 | OnPropertyChanged("ItemSize");
104 | }
105 | }
106 |
107 | public long ItemSizeByte {
108 | get { return _itemSizeByte; }
109 | set { _itemSizeByte = value; }
110 | }
111 |
112 | public string ItemPathDisplay {
113 | get { return _itemPathDisplay; }
114 | set {
115 | _itemPathDisplay = value;
116 | OnPropertyChanged("ItemPathDisplay");
117 | }
118 | }
119 |
120 | public string Created {
121 | get { return _created; }
122 | set {
123 | _created = value;
124 | OnPropertyChanged("Created");
125 | }
126 | }
127 |
128 | public string LastModified {
129 | get { return _lastModified; }
130 | set {
131 | _lastModified = value;
132 | OnPropertyChanged("LastModified");
133 | }
134 | }
135 |
136 | public string Uploaded {
137 | get { return _uploaded; }
138 | set {
139 | _uploaded = value;
140 | OnPropertyChanged("Uploaded");
141 | }
142 | }
143 |
144 | public void CleanUp() {
145 | }
146 |
147 | public void Initialize() {
148 | }
149 |
150 | public event PropertyChangedEventHandler PropertyChanged;
151 |
152 | private void OnPropertyChanged(string propName) {
153 | PropertyChangedEventHandler handler = PropertyChanged;
154 | if (handler != null) {
155 | handler(this, new PropertyChangedEventArgs(propName));
156 | }
157 | }
158 | }
159 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/View/SettingsView.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.View {
2 |
3 | using DfBAdminToolkit.Common.Component;
4 | using System;
5 | using System.Threading;
6 | using System.Windows.Forms;
7 |
8 | public partial class SettingsView
9 | : FormEx, ISettingsView {
10 | public SynchronizationContext SyncContext { get; set; }
11 | public bool ComponentEventsWired { get; set; }
12 |
13 | public event EventHandler DataChanged;
14 | public event EventHandler CommandApplySettings;
15 | public event EventHandler CommandCancelSettings;
16 |
17 | public string DefaultAccessToken { get; set; }
18 | public string DefaultProvisionToken { get; set; }
19 | public int SearchDefaultLimit { get; set; }
20 | public string ApiBaseUrl { get; set; }
21 | public string ApiContentBaseUrl { get; set; }
22 | public string ApiVersion { get; set; }
23 | public bool SuppressFilenamesInStatus { get; set; }
24 |
25 | public SettingsView()
26 | : base(FormExStyle.CENTERED_WINDOW) {
27 | InitializeComponent();
28 | Initialize();
29 | WireComponentEvents();
30 | labelStatus.Text = "";
31 | }
32 |
33 | ~SettingsView() {
34 | UnWireComponentEvents();
35 | }
36 |
37 | public void Initialize() {
38 | ComponentEventsWired = false;
39 | SyncContext = SynchronizationContext.Current;
40 | }
41 |
42 | public void WireComponentEvents() {
43 | if (!ComponentEventsWired) {
44 | buttonEx_SettingsSave.Click += ButtonEx_SettingsSave_Click;
45 | buttonEx_SettingsCancel.Click += ButtonEx_SettingsCancel_Click;
46 | ComponentEventsWired = true;
47 | }
48 | }
49 |
50 | public void UnWireComponentEvents() {
51 | if (ComponentEventsWired) {
52 | buttonEx_SettingsSave.Click -= ButtonEx_SettingsSave_Click;
53 | buttonEx_SettingsCancel.Click -= ButtonEx_SettingsCancel_Click;
54 | ComponentEventsWired = false;
55 | }
56 | }
57 |
58 | public void ShowView() {
59 | this.ShowDialog();
60 | }
61 |
62 | public void ShowView(IWin32Window owner) {
63 | this.ShowDialog(owner);
64 | }
65 |
66 | public void HideView() {
67 | this.Hide();
68 | }
69 |
70 | #region Slots
71 |
72 | public void LoadSettingValues() {
73 | this.textBoxApiVersion.Text = this.ApiVersion;
74 | this.textBoxBaseUrl.Text = this.ApiBaseUrl;
75 | this.textBoxContentUrl.Text = this.ApiContentBaseUrl;
76 | this.numericUpDown_SettingSearchLimit.Value = this.SearchDefaultLimit;
77 | this.textBoxDefaultAccess.Text = this.DefaultAccessToken;
78 | this.textBoxDefaultProvision.Text = this.DefaultProvisionToken;
79 | if (this.SuppressFilenamesInStatus)
80 | {
81 | this.checkBoxSuppressFilenameStatusBar.Checked = true;
82 | }
83 | if (!this.SuppressFilenamesInStatus)
84 | {
85 | this.checkBoxSuppressFilenameStatusBar.Checked = false;
86 | }
87 | }
88 |
89 | public void UpdateSettingValues() {
90 | this.ApiVersion = this.textBoxApiVersion.Text;
91 | this.ApiBaseUrl = this.textBoxBaseUrl.Text;
92 | this.ApiContentBaseUrl = this.textBoxContentUrl.Text;
93 | this.SearchDefaultLimit = Convert.ToInt32(this.numericUpDown_SettingSearchLimit.Value);
94 | this.DefaultAccessToken = this.textBoxDefaultAccess.Text;
95 | this.DefaultProvisionToken = this.textBoxDefaultProvision.Text;
96 | if (this.checkBoxSuppressFilenameStatusBar.Checked)
97 | {
98 | this.SuppressFilenamesInStatus = true;
99 | }
100 | if (!this.checkBoxSuppressFilenameStatusBar.Checked)
101 | {
102 | this.SuppressFilenamesInStatus = false;
103 | }
104 | }
105 |
106 | protected override void OnLoad(EventArgs e) {
107 | base.OnLoad(e);
108 | this.textBoxDefaultAccess.Focus();
109 | }
110 |
111 | #endregion Slots
112 |
113 | #region Events
114 |
115 | private void ButtonEx_SettingsSave_Click(object sender, EventArgs e) {
116 | if (CommandApplySettings != null) {
117 | UpdateSettingValues();
118 | CommandApplySettings(this, e);
119 | }
120 | }
121 |
122 | private void ButtonEx_SettingsCancel_Click(object sender, EventArgs e) {
123 | if(CommandCancelSettings != null) {
124 | CommandCancelSettings(this, e);
125 | }
126 | }
127 |
128 | #endregion Events
129 | }
130 | }
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Model/GroupPermsItemModel.cs:
--------------------------------------------------------------------------------
1 | namespace DfBAdminToolkit.Model
2 | {
3 | using System.ComponentModel;
4 |
5 | public class GroupPermsItemModel
6 | : INotifyPropertyChanged, IModel
7 | {
8 | private string _groupName;
9 | private string _groupId;
10 | private string _groupManagementType;
11 | private string _groupType;
12 | private string _isMember;
13 | private string _isOwner;
14 | private string _accessType;
15 | private string _sharedFolderName;
16 | private string _sharedFolderId;
17 | private string _isInherited;
18 | private string _isTeamFolder;
19 | private string _isInsideTeamFolder;
20 | private bool _isChecked;
21 |
22 | public string GroupName
23 | {
24 | get { return _groupName; }
25 | set
26 | {
27 | _groupName = value;
28 | OnPropertyChanged("GroupName");
29 | }
30 | }
31 |
32 | public string GroupId
33 | {
34 | get { return _groupId; }
35 | set
36 | {
37 | _groupId = value;
38 | OnPropertyChanged("GroupId");
39 | }
40 | }
41 |
42 | public string GroupManagementType
43 | {
44 | get { return _groupManagementType; }
45 | set
46 | {
47 | _groupManagementType = value;
48 | OnPropertyChanged("GroupManagementType");
49 | }
50 | }
51 |
52 | public string GroupType
53 | {
54 | get { return _groupType; }
55 | set
56 | {
57 | _groupType = value;
58 | OnPropertyChanged("GroupType");
59 | }
60 | }
61 |
62 | public string IsMember
63 | {
64 | get { return _isMember; }
65 | set
66 | {
67 | _isMember = value;
68 | OnPropertyChanged("IsMember");
69 | }
70 | }
71 |
72 | public string IsOwner
73 | {
74 | get { return _isOwner; }
75 | set
76 | {
77 | _isOwner = value;
78 | OnPropertyChanged("IsOwner");
79 | }
80 | }
81 |
82 | public string AccessType
83 | {
84 | get { return _accessType; }
85 | set
86 | {
87 | _accessType = value;
88 | OnPropertyChanged("AccessType");
89 | }
90 | }
91 |
92 | public string SharedFolderName
93 | {
94 | get { return _sharedFolderName; }
95 | set
96 | {
97 | _sharedFolderName = value;
98 | OnPropertyChanged("SharedFolderName");
99 | }
100 | }
101 |
102 | public string SharedFolderId
103 | {
104 | get { return _sharedFolderId; }
105 | set
106 | {
107 | _sharedFolderId = value;
108 | OnPropertyChanged("SharedFolderId");
109 | }
110 | }
111 |
112 | public string IsInherited
113 | {
114 | get { return _isInherited; }
115 | set
116 | {
117 | _isInherited = value;
118 | OnPropertyChanged("IsInherited");
119 | }
120 | }
121 |
122 | public string IsTeamFolder
123 | {
124 | get { return _isTeamFolder; }
125 | set
126 | {
127 | _isTeamFolder = value;
128 | OnPropertyChanged("IsTeamFolder");
129 | }
130 | }
131 |
132 | public string IsInsideTeamFolder
133 | {
134 | get { return _isInsideTeamFolder; }
135 | set
136 | {
137 | _isInsideTeamFolder = value;
138 | OnPropertyChanged("IsInsideTeamFolder");
139 | }
140 | }
141 |
142 | public bool IsChecked
143 | {
144 | get { return _isChecked; }
145 | set
146 | {
147 | _isChecked = value;
148 | OnPropertyChanged("IsChecked");
149 | }
150 | }
151 |
152 | public event PropertyChangedEventHandler PropertyChanged;
153 |
154 | public GroupPermsItemModel()
155 | {
156 | }
157 |
158 | public void Initialize()
159 | {
160 | }
161 |
162 | public void CleanUp()
163 | {
164 | }
165 |
166 | private void OnPropertyChanged(string propName)
167 | {
168 | PropertyChangedEventHandler handler = PropertyChanged;
169 | if (handler != null)
170 | {
171 | handler(this, new PropertyChangedEventArgs(propName));
172 | }
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | ## Release 6.1
4 |
5 | ## Features
6 |
7 | - [x] Search for content across the entire Dropbox Business team by name or full text search
8 | - [x] Download and save content from any team members Dropbox for holding or audit purposes while taking action on their account (suspend, delete)
9 | - [x] Quickly access CSV templates from file menu
10 | - [x] Expeditiously provision, deprovision in bulk from CSV
11 | - [x] View accurate Dropbox usage numbers for the entire team while exporting member users, status and member type
12 | - [x] Create group(s) and provision multiple members to a single group
13 | - [x] Bulk provision groups and bulk provision members to groups
14 | - [x] Export group relationships by user, folder, and team folder
15 | - [x] Downgrade user to basic type, and remove access / shares for any content where user was a member**
16 | - [x] Export team folder membership to CSV
17 | - [x] Bulk create team folder(s) or view your existing team folders and their state
18 | - [x] Bulk recover users, in case of accidental deletion*
19 | - [x] Report (and search) on Device usage associated Dropbox
20 | - [x] Take actions on Devices attached to your Dropbox team (remote wipe)
21 | - [x] Export list of Devices on your Dropbox team
22 | - [x] Report on all files in your Dropbox team
23 | - [x] Export full team member list with status
24 | - [x] Export team's Paper docs to CSV, as well as bulk download all Paper docs.
25 | - [x] Get teams auditing events, based on timestamp range as well as member filtering on the list.
26 | - [x] Get important team data (reporting data) in Team Health tab.
27 | - [x] Manage multiple Dropbox accounts using the Admin Toolkit from a single UI
28 | * if user was not downgraded, does not have basic account with same email address
29 | ** downgraded user will retain ownership
30 |
31 | ## Requirements
32 |
33 | - Windows 7+ (8, 8.1, 10)
34 |
35 | ## Notes
36 |
37 | The Admin toolkit is a showcase of the Dropbox Business and Dropbox Core API's. It should be seen as an example of what is possible rather than an end to end solution (frankly it only scratches the surface of API capabilities). If you are a Dropbox Business or Enterprise customer please talk to your Dropbox representative about ideas for custom solutions for your Dropbox team. The custom solution development team are able to assist with advisory or full solution work to help you leverage Dropbox as a platform in your business.
38 |
39 | ## Licensing
40 |
41 | All code within this folder is covered by the Apache License as described in LICENSE.txt.
42 |
43 | Please carefully note:
44 |
45 | "Disclaimer of Warranty. [...] the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License."
46 |
47 | ## Images
48 |
49 | Full Text Search:
50 |
51 | 
52 |
53 | Download User Contents:
54 |
55 | 
56 |
57 | Bulk Provisioning and Reporting:
58 | (dependent on radio button selection)
59 |
60 | 
61 |
62 | Group Creation, Edit and Audit
63 |
64 | 
65 |
66 | Team Folder Creation, Edit and Audit
67 |
68 | 
69 |
70 | Paper Auditing And Archival
71 |
72 | 
74 |
75 | Device Management:
76 |
77 | 
78 |
79 | Team Activity Audit:
80 |
81 | 
83 |
84 | Team Health:
85 |
86 | 
88 |
89 | Team Content Audit:
90 |
91 | 
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit.Common/DfBAdminToolkit.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {1091B7C4-F32C-4219-B04A-A25BD4D0B928}
8 | Library
9 | Properties
10 | DfBAdminToolkit.Common
11 | DfBAdminToolkit.Common
12 | v4.5.2
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 | ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
36 | True
37 |
38 |
39 | ..\packages\RestSharp.105.2.3\lib\net452\RestSharp.dll
40 | True
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Component
61 |
62 |
63 | ButtonEx.cs
64 |
65 |
66 | Form
67 |
68 |
69 |
70 | Component
71 |
72 |
73 | TextBoxEx.cs
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
105 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/ConfigBackup/DfBAdminToolkit.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/Source/DfBAdminToolkit/Install Config/DfBAdminToolkit.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------