public MoveFileFragment(List<TreeNode> foundDirectoryTreeNodes, TreeNode treeNodeToMove, HomeActivity parentActivity) { this.foundDirectoryTreeNodes = foundDirectoryTreeNodes; this.treeNodeToMove = treeNodeToMove; this.parentActivity = parentActivity; selectedTreeNodes = new List<TreeNode> (); }
//Default constructor for explorer public ExplorerFragment (TreeNode foundTreeNode, HomeActivity homeActivity) { foundTreeNodeChildren = foundTreeNode.Children; this.parentActivity = homeActivity; //Add favorite list item in root listview of local box if (openedDirectories.Count == 0) { foundTreeNodeChildren.Insert (0, new TreeNode (){ Name = "Lokale favorieten", Type = "favorite" }); } this.currentTreeNodePath = foundTreeNode.Path; favoriteFolderOpened = false; }
//Default constructor for explorer public ExplorerFragment(TreeNode foundTreeNode, HomeActivity homeActivity) { foundTreeNodeChildren = foundTreeNode.Children; this.parentActivity = homeActivity; //Add favorite list item in root listview of local box if (openedDirectories.Count == 0) { foundTreeNodeChildren.Insert(0, new TreeNode() { Name = "Lokale favorieten", Type = "favorite" }); } this.currentTreeNodePath = foundTreeNode.Path; favoriteFolderOpened = false; }
public override void OnListItemClick(ListView listView, View view, int position, long id) { HomeActivity homeActivity = (HomeActivity)Activity; if (position == 0) //Toevoegen aangeklikt { if (DataLayer.Instance.GetLocalBoxesSync().Count == 0) { homeActivity.ShowLoginDialog(); } else { homeActivity.ShowAddSitesDialog(); } } else if (position == 1) //Over de app aangeklikt { homeActivity.ShowAboutAppDialog(); } }
public DialogHelperForHomeActivity(HomeActivity homeActivity) { this.homeActivity = homeActivity; }
public DialogHelperForHomeActivity (HomeActivity homeActivity) { this.homeActivity = homeActivity; }
public LoginFragment(string pleioUrl, HomeActivity homeActivity) { PleioUrl = pleioUrl; homeActivity = homeActivity; }
public LoginFragment(string pleioUrl, HomeActivity homeActivity) { PleioUrl = pleioUrl; homeActivity = homeActivity; }
//Favorite constructor for explorer public ExplorerFragment (List<TreeNode> foundTreeNodes, HomeActivity homeActivity) { this.parentActivity = homeActivity; foundTreeNodeChildren = foundTreeNodes; favoriteFolderOpened = true; }
async void ListView_OnItemClick(object sender, AdapterView.ItemClickEventArgs e) { ResetUIToBeginState(false); SslValidator.CertificateErrorRaised = false; //Set selected local box Waardes.Instance.GeselecteerdeBox = foundLocalBoxes[e.Position].Id; //Reset certificate validation check to default behavior /* * ServicePointManager.ServerCertificateValidationCallback = null; * * if (foundLocalBoxes[e.Position].OriginalSslCertificate != null) { //Selected localbox does have a ssl certificate * //Set ssl validator for selected LocalBox * SslValidator sslValidator = new SslValidator (); * ServicePointManager.ServerCertificateValidationCallback = sslValidator.ValidateServerCertficate; * }*/ //Change action bar color to color of selected localbox if (DataLayer.Instance.GetSelectedOrDefaultBox().BackColor != null && DataLayer.Instance.GetSelectedOrDefaultBox().BackColor.StartsWith("#")) { HomeActivity.colorOfSelectedLocalBox = DataLayer.Instance.GetSelectedOrDefaultBox().BackColor; } else { HomeActivity.colorOfSelectedLocalBox = Constants.lightblue; } SetCustomActionBarColor(); //Change logo image to logo of selected local box if (DataLayer.Instance.GetSelectedOrDefaultBox().LogoUrl != null) { string logoUrl = DataLayer.Instance.GetSelectedOrDefaultBox().LogoUrl; string documentsPath = DocumentConstants.DocumentsPath; string pathToLogo = System.IO.Path.Combine(documentsPath, logoUrl.Substring(logoUrl.LastIndexOf("/") + 1)); if (File.Exists(pathToLogo)) { //Verander logo Android.Net.Uri uriLogo = Android.Net.Uri.Parse(pathToLogo); //imageViewLogo.SetImageURI (uriLogo); } else //Default logo { //imageViewLogo.SetImageResource (Resource.Drawable.beeldmerk_belastingdienst); } } //Update fragment data Android.Support.V4.App.FragmentTransaction fragmentTransaction = Activity.SupportFragmentManager.BeginTransaction(); fragmentTransaction.SetCustomAnimations(Resource.Animation.enter, Resource.Animation.exit); //Show progress dialog while loading ShowProgressDialog(Activity, null); try { HomeActivity homeActivity = (HomeActivity)Activity; ExplorerFragment explorerFragment = new ExplorerFragment(await DataLayer.Instance.GetFolder("/"), homeActivity); HomeActivity.openedExplorerFragments = new List <ExplorerFragment>(); HomeActivity.openedExplorerFragments.Add(explorerFragment); //Add new directory to opened directories list ExplorerFragment.openedDirectories = new List <string>(); ExplorerFragment.openedDirectories.Add("/"); fragmentTransaction.Replace(Resource.Id.fragment_container_explorer, explorerFragment, "explorerFragment"); //Clear fragment back stack int entryCount = Activity.SupportFragmentManager.BackStackEntryCount; while (entryCount > 0) { Activity.SupportFragmentManager.PopBackStackImmediate(); entryCount = Activity.SupportFragmentManager.BackStackEntryCount; } //Add fragment to stack - needed for back button functionality fragmentTransaction.AddToBackStack(null); // Start the animated transition. fragmentTransaction.Commit(); //Show hidden buttons RelativeLayout fragmentContainerExplorerBottom = Activity.FindViewById <RelativeLayout> (Resource.Id.fragment_container_explorer_blank); fragmentContainerExplorerBottom.Visibility = ViewStates.Visible; //Show shadow View shadowContainerExplorer = Activity.FindViewById <View> (Resource.Id.shadow_container_explorer); shadowContainerExplorer.Visibility = ViewStates.Visible; //Hide back button ImageButton buttonBackExplorer = Activity.FindViewById <ImageButton> (Resource.Id.button_back_explorer); buttonBackExplorer.Visibility = ViewStates.Invisible; HideProgressDialog(); } catch (Exception ex) { Insights.Report(ex); HideProgressDialog(); Toast.MakeText(Activity, "Er is iets fout gegaan", ToastLength.Short).Show(); } }
public MoveFileFragment(List <TreeNode> foundDirectoryTreeNodes, TreeNode treeNodeToMove, HomeActivity parentActivity) { this.foundDirectoryTreeNodes = foundDirectoryTreeNodes; this.treeNodeToMove = treeNodeToMove; this.parentActivity = parentActivity; selectedTreeNodes = new List <TreeNode> (); }
//Favorite constructor for explorer public ExplorerFragment(List <TreeNode> foundTreeNodes, HomeActivity homeActivity) { this.parentActivity = homeActivity; foundTreeNodeChildren = foundTreeNodes; favoriteFolderOpened = true; }