@@ -35,6 +35,7 @@ public sealed partial class MainPage : Page
35
35
public string ScopeGroupAll = ResourceLoader . GetForCurrentView ( ) . GetString ( "PersonalWorkAccess" ) ;
36
36
public string ScopeGroupWork = ResourceLoader . GetForCurrentView ( ) . GetString ( "WorkAccess" ) ;
37
37
public string ScopeGroupWorkAdmin = ResourceLoader . GetForCurrentView ( ) . GetString ( "WorkAdminAccess" ) ;
38
+ public string ScopeGroupExcel = ResourceLoader . GetForCurrentView ( ) . GetString ( "ExcelGroup" ) ;
38
39
39
40
public List < StoryDefinition > StoryCollection { get ; private set ; }
40
41
public MainPage ( )
@@ -92,7 +93,6 @@ private void CreateStoryList()
92
93
StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "GetDirects" ) , ScopeGroup = ScopeGroupWork , RunStoryAsync = UserStories . TryGetDirectReportsAsync } ) ;
93
94
StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "GetPhoto" ) , ScopeGroup = ScopeGroupWork , RunStoryAsync = UserStories . TryGetCurrentUserPhotoAsync } ) ;
94
95
95
-
96
96
// Stories applicable only to work or school accounts with admin access
97
97
// NOTE: All of these snippets will fail for lack of permissions if you sign into the sample with a non-admin work account
98
98
// or any consumer account.
@@ -108,6 +108,27 @@ private void CreateStoryList()
108
108
StoryCollection . Add ( new StoryDefinition ( ) { GroupName = groupsGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "DeleteGroup" ) , ScopeGroup = ScopeGroupWorkAdmin , RunStoryAsync = GroupStories . TryDeleteGroupAsync } ) ;
109
109
StoryCollection . Add ( new StoryDefinition ( ) { GroupName = groupsGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "AddMember" ) , ScopeGroup = ScopeGroupWorkAdmin , RunStoryAsync = GroupStories . TryAddUserToGroup } ) ;
110
110
111
+ // Excel snippets. These stories are applicable only to work or school accounts.
112
+ // NOTE: All of these snippets will fail for lack of permissions if you sign into the sample with a personal (consumer) account
113
+
114
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "UploadXLFile" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryUploadExcelFileAsync } ) ;
115
+
116
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "CreateXLChart" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryCreateExcelChartFromTableAsync } ) ;
117
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "GetXLRange" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryGetExcelRangeAsync } ) ;
118
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "UpdateXLRange" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryUpdateExcelRangeAsync } ) ;
119
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "ChangeXLNumFormat" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryChangeExcelNumberFormatAsync } ) ;
120
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "XLABSFunction" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryAbsExcelFunctionAsync } ) ;
121
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "SetXLFormula" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TrySetExcelFormulaAsync } ) ;
122
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "AddXLTable" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryAddExcelTableToUsedRangeAsync } ) ;
123
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "AddXLTableRow" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryAddExcelRowToTableAsync } ) ;
124
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "SortXLTable" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TrySortExcelTableOnFirstColumnValueAsync } ) ;
125
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "FilterXLTable" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryFilterExcelTableValuesAsync } ) ;
126
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "ProtectWorksheet" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryProtectExcelWorksheetAsync } ) ;
127
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "UnprotectWorksheet" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryUnprotectExcelWorksheetAsync } ) ;
128
+
129
+ StoryCollection . Add ( new StoryDefinition ( ) { GroupName = usersGroupName , Title = ResourceLoader . GetForCurrentView ( ) . GetString ( "DeleteXLFile" ) , ScopeGroup = ScopeGroupExcel , RunStoryAsync = UserStories . TryDeleteExcelFileAsync } ) ;
130
+
131
+
111
132
112
133
var result = from story in StoryCollection group story by story . ScopeGroup into api orderby api . Key select api ;
113
134
StoriesByApi . Source = result ;
0 commit comments