public IViewContent LoadFile(string fileName) { // Create a new tab page. SharpSnippetCompilerControl snippetControl = new SharpSnippetCompilerControl(); snippetControl.Dock = DockStyle.Fill; SnippetTabPage tabPage = new SnippetTabPage(snippetControl); tabPage.Text = Path.GetFileName(fileName); fileTabControl.TabPages.Add(tabPage); // Load file snippetControl.LoadFile(fileName); snippetControl.Focus(); WorkbenchWindow window = new WorkbenchWindow(fileTabControl, tabPage); MainViewContent view = new MainViewContent(fileName, snippetControl, window); WorkbenchSingleton.Workbench.ShowView(view); UpdateActiveView(view); return(view); }
public IViewContent LoadFile(string fileName) { var window = new WorkbenchWindow(); var view = new MainViewContent(fileName, window); WorkbenchSingleton.Workbench.ShowView(view); UpdateActiveView(view); files.Add(view); return(view); }
/*Change FinderView and go to selected place*/ public async void Place_Tapped(object sender, ItemTappedEventArgs e) { Current.SelectedItem = (Place)e.Item; //Stores the selected place it's data in the variable Current.SelectedItem await Finder.TranslateTo(0, 400, 200); //Makes the content of the current page fade out in 125 ms await MainViewContent.FadeTo(0, 150); Current.FV.Children[0] = new RouteView(); //Changes the value of the grid FV to the new RouteView page Current.UpdateCamera = false; //Prevents the camera from updating when the postion changes Position LocationTappedPlace = new Position(Current.SelectedItem.Latitude, Current.SelectedItem.Longitude); await Current.CustomMap.AnimateCamera(CameraUpdateFactory.NewPositionZoom(LocationTappedPlace, 17.5), TimeSpan.FromSeconds(2.5)); //Animate the camera of the map to the selected position with a zoom of 17.5 and in a timespan of 2.5 seconds }