public override void Init() { if (RootPathType == RootPathType.Default) { if (RootPath == null) { RootPath = String.Format("data/data/{0}/", Package.Name); } else { if (RootPath[0] == '/') { RootPath = RootPath.Substring(1); } if (RootPath.Last() != '/') { RootPath += '/'; } } } else if (RootPathType == RootPathType.PathPrepare) { RootPathPrepareRegexes = Package.RootPathPrepares.First(c => c.Name == RootPath).PathRegexes; } }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.Title = NavigationTitle; if (RootPath.EndsWith(Path.AltDirectorySeparatorChar)) { RootPath.Substring(0, RootPath.Length - 1); } workingPath = RootPath; RefreshControl = new UIRefreshControl(); RefreshControl.ValueChanged += RefreshDirectory; CancelButton.Clicked += (o, e) => this.ShowDiscardConfirmation(); SaveButton.Clicked += SavePath; RefreshDirectory(this, EventArgs.Empty); }