private async void RevealView1_SaveDashboard(object sender, DashboardSaveEventArgs args) { //Save file var data = await args.Serialize(); var path = @"..\..\Dashboards\Sales.rdash"; //using (var output = File.OpenWrite($"{args.Name}.rdash")) using (var output = File.OpenWrite(path)) { output.Write(data, 0, data.Length); } args.SaveFinished(); }
private async void RevealView1_SaveDashboard(object sender, DashboardSaveEventArgs args) { //Save file var data = await args.Serialize(); var path = @"..\..\Dashboards\Sales.rdash"; if (UserInfo.showGlobalFilter == true) { path = @"..\..\Dashboards\SalesWithGlobalFilter.rdash"; } //using (var output = File.OpenWrite($"{args.Name}.rdash")) File.Delete(path); using (var output = File.OpenWrite(path)) { output.Write(data, 0, data.Length); } args.SaveFinished(); }