void ToggleEntryView(EntryOption option) { switch (option) { case EntryOption.Register: { lblWelcome.IsVisible = false; layoutChoose.IsVisible = false; layoutLogin.IsVisible = false; layoutRegister.IsVisible = true; break; } case EntryOption.Returning: { lblWelcome.IsVisible = false; layoutChoose.IsVisible = false; layoutRegister.IsVisible = false; layoutLogin.IsVisible = true; break; } case EntryOption.Cancel: { lblWelcome.IsVisible = true; layoutChoose.IsVisible = true; layoutRegister.IsVisible = false; layoutLogin.IsVisible = false; break; } } }
public IEnumerable <string> GetFileSystemEntries(string path, string searchPattern, EntryOption enumerationOptions) { // TODO ILocalFileSystemEntrySet 対応、アーカイブを検索 try { return(Directory.GetFileSystemEntries(path, searchPattern) .Where(x => enumerationOptions == EntryOption.All || enumerationOptions == EntryOption.File && !Directory.Exists(x) || enumerationOptions == EntryOption.File && Directory.Exists(x))); } catch (DirectoryNotFoundException) { return(new string[] { }); } catch (Exception) { return(new string[] { }); } }