/// <summary> /// Constructor of the base listener for folder and file links /// </summary> /// <param name="folderLinkViewModel"> /// Only used if the request type is "TYPE_LOGIN" (login to folder) in case of a folder link. /// In other case the received value should be null. /// </param> public PublicLinkRequestListener(FolderLinkViewModel folderLinkViewModel = null) { // Only if the received parameter is not null, substitute the static class variable. if (_folderLinkViewModel == null || folderLinkViewModel != null) { _folderLinkViewModel = folderLinkViewModel; } }
public FetchNodesRequestListener(FolderLinkViewModel folderLinkViewModel) : base(folderLinkViewModel) { this._mainPageViewModel = null; this._cameraUploadsPageViewModel = null; createTimer(); }
public FolderLinkPage() { _folderLinkViewModel = new FolderLinkViewModel(SdkService.MegaSdkFolderLinks, App.AppInformation, this); this.DataContext = _folderLinkViewModel; InitializeComponent(); FolderLinkBreadCrumb.BreadCrumbTap += BreadCrumbControlOnOnBreadCrumbTap; FolderLinkBreadCrumb.HomeTap += BreadCrumbControlOnOnHomeTap; _folderLinkViewModel.CommandStatusChanged += (sender, args) => { if (ApplicationBar == null) { return; } UiService.ChangeAppBarStatus(ApplicationBar.Buttons, ApplicationBar.MenuItems, args.Status); }; }
public void SetApplicationBarData(bool isEnabled = true) { if (_folderLinkViewModel == null) { _folderLinkViewModel = new FolderLinkViewModel(SdkService.MegaSdkFolderLinks, App.AppInformation, this); } // Set the Application Bar to one of the available menu resources in this page SetAppbarResources(_folderLinkViewModel.FolderLink.CurrentDisplayMode); // Change and translate the current application bar _folderLinkViewModel.ChangeMenu(_folderLinkViewModel.FolderLink, this.ApplicationBar.Buttons, this.ApplicationBar.MenuItems); UiService.ChangeAppBarStatus(this.ApplicationBar.Buttons, this.ApplicationBar.MenuItems, isEnabled); // Button "cancel" should be enabled always if (_folderLinkViewModel.FolderLink.CurrentDisplayMode == DriveDisplayMode.FolderLink) { ((ApplicationBarIconButton)this.ApplicationBar.Buttons[2]).IsEnabled = true; } }
public LoginToFolderRequestListener(FolderLinkViewModel folderLinkViewModel) : base(folderLinkViewModel) { }