void NavigationSetup() { Messenger.Default.Register <NavigateArgs>(this, (x) => { Frame1.Navigate(new Uri(x.Url, UriKind.Relative)); }); }
private void navigationview1_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) { string alamleht = args.InvokedItem.ToString(); if (alamleht != null) { switch (alamleht) { case "Pealeht": Frame1.Navigate(typeof(Pealeht)); break; case "Tunniplaan": Frame1.Navigate(typeof(Tunniplaan)); break; case "Kontakt": Frame1.Navigate(typeof(kontakt)); break; case "Järelvastamine": Frame1.Navigate(typeof(järelvastamine)); break; case "Bussiajad": Frame1.Navigate(typeof(bussiajad)); break; } } }
public MainWindow() { InitializeComponent(); Page1 page1 = new Page1(this); Frame1.Navigate(page1); }
public MainWindow() { InitializeComponent(); InitializeList(); MainPage mainPage = new MainPage(ref btnToMap, UpdateXml, ref sensors); Frame1.Navigate(mainPage); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //Generate a random puzzle at the start RandomPuzzle(); //Load the home page homePage = new SolverHome(); Frame1.Navigate(homePage); }
private void search_button_Click(object sender, RoutedEventArgs e) { bool isValid = searchbox.Text.Length >= 3; if (isValid) { Frame1.Navigate(typeof(Pages.SearchResults), searchbox.Text); } }
public MainPage() { this.InitializeComponent(); Frame1.Navigate((typeof(Home))); if (SikonSingleton == null) { Frame.Navigate(typeof(MainPage)); } }
private void NavigationSetup() { Messenger.Default.Register <NavigateArgs>(this, (x) => { if (!x.Url.Contains("Select")) { Frame1.Navigate(new Uri(x.Url, UriKind.Relative)); } }); }
public MainWindow() { InitializeComponent(); Frame1.Navigate(new Menu(Frame1)); /*DispatcherTimer DTimer = new DispatcherTimer(); * DTimer.Interval = TimeSpan.FromMilliseconds(300); * DTimer.Tick += (s, args) => Timer_Tick(); * DTimer.Start();*/ }
private void UserPage_OnClick(object sender, RoutedEventArgs e) { if (SikonSingleton.LoggedAccount != null) { Frame1.Navigate(typeof(UserPage)); } else { Frame1.Navigate(typeof(OpretBruger)); } }
private void Button_Click_3(object sender, RoutedEventArgs e) { if (!Frame1.CanGoBack) { Frame1.Navigate(new View.Pages.ReturnCassete(this)); } else { System.GC.Collect(); Frame1.Content = null; Frame1.RemoveBackEntry(); Frame1.Navigate(new View.Pages.ReturnCassete(this)); } }
private async void Login_OnClick(object sender, RoutedEventArgs e) { if (SikonSingleton.LoggedAccount == null) { Frame1.Navigate(typeof(Login)); } else { SikonSingleton.LoggedAccount = null; Frame.Navigate(typeof(MainPage)); ContentDialog dialog = new ContentDialog() { Content = "Du er nu logget ud!", CloseButtonText = "Ok" }; dialog.ShowAsync(); } }
/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. /// This parameter is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { //Better Geolocation Test if (locator == null) { locator = new Geolocator(); } if (locator != null) { locator.MovementThreshold = 3; locator.PositionChanged += new TypedEventHandler <Geolocator, PositionChangedEventArgs>(locator_PositionChanged); } //StartGPS(); ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings; Debug.WriteLine("FLAG= " + localSettings.Values["FIRST_RUN_FLAG"].Equals("false")); if (localSettings.Values["FIRST_RUN_FLAG"].Equals("false")) { appBar.Visibility = Visibility.Collapsed; searchpanel.Visibility = Visibility.Collapsed; Frame1.Navigate(typeof(Pages.FirstRun), this); } else { Frame1.Navigate(typeof(Pages.MainMenu), this); } Translate(); // TODO: If your application contains multiple pages, ensure that you are // handling the hardware Back button by registering for the // Windows.Phone.UI.Input.HardwareButtons.BackPressed event. // If you are using the NavigationHelper provided by some templates, // this event is handled for you. }
private void Home_OnClick(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Home)); }
private void Kort_OnClick(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Kort)); }
protected override void OnNavigatedTo(NavigationEventArgs e) { rootPage = e.Parameter as MainPage; Frame1.Navigate(typeof(Page1), this); }
private void Update_Click(object sender, RoutedEventArgs e) { Pages.UpdatePage updatePage = new Pages.UpdatePage(); Frame1.Navigate(updatePage); }
private void AppBarButton_Click(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Pages.MainMenu), this); }
public void NavigateTo(object o) { Frame1.Navigate(o); }
public MainWindow() { if (App.CurrentApp.Browser == null) { App.CurrentApp.Browser = new OpenQA.Selenium.Chrome.ChromeDriver(); App.CurrentApp.Browser.Manage().Window.Maximize(); App.CurrentApp.Browser.Manage().Window.FullScreen(); } InitializeComponent(); FileStream FS = new FileStream("NameOfPrinter.txt", FileMode.OpenOrCreate); StreamReader Str = new StreamReader(FS); string PrinterName = Str.ReadLine(); FS.Close(); Str.Close(); var server = new LocalPrintServer(); server.Refresh(); var queue = server.GetPrintQueues(); var neededQueue = queue.FirstOrDefault(f => f.Name == PrinterName?.Trim()); if (neededQueue != null) { neededQueue?.Refresh(); if (neededQueue?.NumberOfJobs != 0) { var g = neededQueue?.GetPrintJobInfoCollection(); foreach (var ku in g) { ku.Cancel(); } //neededQueue.Purge(); } } Frame1.NavigationService.Navigate(new Chose_Page(), UriKind.Relative); var myID = Process.GetCurrentProcess(); Widthh = SystemParameters.PrimaryScreenWidth; Heightt = SystemParameters.PrimaryScreenHeight; //this.Cursor = Cursors.None; Process process = Process.Start(new ProcessStartInfo { FileName = "taskkill", Arguments = "/F /IM explorer.exe", CreateNoWindow = true, UseShellExecute = false, WindowStyle = ProcessWindowStyle.Hidden }); process?.WaitForExit(); Closing += (e, a) => { Process.Start(Path.Combine(Environment.GetEnvironmentVariable("windir"), "explorer.exe")); }; DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(3); timer.Tick += (sender, args) => { if (UserInactivity.GetSeconds() >= 90) { if (App.CurrentApp.Kw != null) { try { App.CurrentApp.Kw.Topmost = false; App.CurrentApp.Kw.Close(); } catch (Exception e) { } } if (!(Frame1.Content is Chose_Page)) { Frame1.Navigate(new Chose_Page()); App.CurrentApp.Browser.Manage().Window.Minimize(); } } }; timer.Start(); }
private void Settings_Button_Click(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Pages.Definicoes), this); }
private void Info_OnClick(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Info)); }
private void load_items() { Frame1.Navigate(typeof(Pealeht)); }
private void List_Click(object sender, RoutedEventArgs e) { Pages.ViewPage viewPage = new Pages.ViewPage(); Frame1.Navigate(viewPage); }
public ClientWindow() { InitializeComponent(); DataContext = new ViewModel.ClientWindowViewModel(); Frame1.Navigate(new View.Pages.CassetesList(this)); }
private void Kurser_Click(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Kurser)); }
private void Btn_Page3_Click(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(Page3)); }
private void Program_Click(object sender, RoutedEventArgs e) { Frame1.Navigate(typeof(ProgramView)); }
public MainPage() { this.InitializeComponent(); Frame1.Navigate(typeof(MasterPage)); }
private void Delete_Click(object sender, RoutedEventArgs e) { Pages.DeletePage deletePage = new Pages.DeletePage(); Frame1.Navigate(deletePage); }