private void InvokePage(Page page) { NavigationWindow window = new NavigationWindow(); window.Content = page; window.Show(); }
private void OpenDocumentOnClick(object sender, RoutedEventArgs e) { NavigationWindow win = new NavigationWindow(); win.Navigate(new DocumentStylesPage()); win.Show(); }
//private object urlkind; private void Button_Click(object sender, RoutedEventArgs e) { //Console.WriteLine("Connecting to MySQL..."); connection.Open(); MySqlCommand cmd = new MySqlCommand("SELECT `Username`, `Password` FROM `users` WHERE `Username` = '" + CommentTextBox.Text + "' AND `Password` = '" + PasswordBox.Password + "'", connection); MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count > 0) { //MessageBox.Show("Yes logged in"); NavigationWindow window = new NavigationWindow(); window.Source = new Uri("Home.xaml", UriKind.Relative); window.Show(); this.Close(); } else { // MessageBox.Show("Invalid Login please check username and password"); connection.Close(); Console.WriteLine("Done."); } }
/// <summary> /// 同步请求 /// </summary> /// <param name="busy"></param> /// <param name="methodid"></param> /// <param name="args"></param> /// <returns></returns> public static API.Result Request(RadBusyIndicator busy, int methodid, List <object> args) { if (busy == null) { busy = new RadBusyIndicator(); } busy.IsBusy = true; if (args == null) { args = new List <object>(); } if (methodid != 1) { if (!Store.IsLogin) { NavigationWindow window = new NavigationWindow(); window.Source = new Uri("Login.xaml", UriKind.Relative); window.Show(); } args.Insert(0, Store.CurrentUser == null ? new API.UserInfo() : Store.CurrentUser); } API.BMSServiceClient client = new API.BMSServiceClient(); client.Open(); API.Result ret = client.Execute(methodid, args); client.Close(); busy.IsBusy = false; return(ret); }
private void ResourcesFile_Click(object sender, RoutedEventArgs e) { NavigationWindow window = new NavigationWindow(); window.Source = new Uri("ResourcesFilePage.xaml", UriKind.Relative); window.Show(); }
private void Button_OnClick(object sender, RoutedEventArgs e) { NavigationWindow window = new NavigationWindow(); window.Source = new Uri("3DDemoPage.xaml", UriKind.Relative); window.Show(); }
public App() { NavigationWindow myWindow = new NavigationWindow(); myWindow.Content = new LoginPage(); myWindow.ShowsNavigationUI = false; myWindow.Show(); }
private void page(object sender, RoutedEventArgs e) { NavigationWindow window = new NavigationWindow(); window.Source = new Uri("/pages/PPage.xaml", UriKind.Relative); window.Show(); }
public static void NavigateTo(object navigationTarget, object navigationContext) { NavigationWindow win = (NavigationWindow)Application.Current.MainWindow; win.DataContext = navigationContext; win.Content = navigationTarget; win.Show(); }
// link open private void WebProfile(object sender, RoutedEventArgs e) { NavigationWindow window = new NavigationWindow(); Uri source = new Uri("http://www.c-sharpcorner.com/Default.aspx", UriKind.Absolute); window.Source = source; window.Show(); }
protected override void OnStartup(StartupEventArgs e) { NavigationWindow myWindow = new NavigationWindow(); myWindow.Content = new StoryboardExample(); MainWindow = myWindow; myWindow.Show(); }
public MainWindow() { InitializeComponent(); NavigationWindow win = new NavigationWindow(); win.Content = new StoryboardsExample(); win.Show(); }
private void OnNavigateUri(object sender, RequestNavigateEventArgs e) { var window = new NavigationWindow { Source = e.Uri }; window.Show(); }
private void button_Click(object sender, RoutedEventArgs e) { CommonValue.FOOD_PAY_ID = int.Parse(idPayBox.Text.ToString()); NavigationWindow window = new NavigationWindow(); window.Source = new Uri("OderDetailPage.xaml", UriKind.Relative); window.Show(); }
private void btnEmployees_Click(object sender, RoutedEventArgs e) { NavigationWindow nw = new NavigationWindow(); nw.Title = "DigitalX | Employees"; nw.Content = new Employees(); nw.Show(); }
private void btnOrders_Click(object sender, RoutedEventArgs e) { NavigationWindow nw = new NavigationWindow(); nw.Title = "DigitalX | Orders"; nw.Content = new Orders(); nw.Show(); }
private void Addd_Click(object sender, RoutedEventArgs e) { //_mainFrame.Navigate(new Added()); NavigationWindow window = new NavigationWindow(); window.Source = new Uri("Added.xaml", UriKind.Relative); window.Show(); }
void myAppStartup(object sender, StartupEventArgs e) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); NavigationWindow myNavigationWindow = new NavigationWindow(); myNavigationWindow.Navigate(new SampleViewer()); myNavigationWindow.Show(); }
private void BestRecordButton_Click(object sender, RoutedEventArgs e) { NavigationWindow windowR = new NavigationWindow(); windowR.Source = new Uri("BestRecord.xaml", UriKind.Relative); windowR.Height = 300; windowR.Width = 300; windowR.Show(); }
void backupLogin() { this.Visibility = Visibility.Collapsed; NavigationWindow nw = new NavigationWindow(); nw.Title = "DigitalX | Main Menu"; nw.Content = new MainPage(); nw.Show(); }
public MainWindow() { InitializeComponent(); NavigationWindow navWin = new NavigationWindow(); navWin.Content = new UserControl1(); navWin.ShowsNavigationUI = false; navWin.Show(); }
public App() { NavigationWindow window = new NavigationWindow(); window.Content = new LayoutView(); window.ShowsNavigationUI = false; window.Loaded += Window_loaded; window.Show(); }
private void btnAdmin_Click(object sender, RoutedEventArgs e) { NavigationWindow window = new NavigationWindow(); window.Content = new MainAdmin(); window.Height = 400; window.Width = 400; window.ResizeMode = ResizeMode.NoResize; window.Show(); }
private void Application_Startup(object sender, StartupEventArgs e) { navigationWindow = new NavigationWindow(); navigationWindow.Height = 850; navigationWindow.Width = 1200; var page = new LoginView(); navigationWindow.Navigate(page); navigationWindow.Show(); }
private void button1_Click(object sender, RoutedEventArgs e) { //FrameWithinGrid.Source = new Uri("http://Janes.ihs.com", UriKind.Absolute); NavigationWindow window = new NavigationWindow(); Uri source = new Uri("http://Janes.ihs.com", UriKind.Absolute); window.Source = source; window.Show(); }
private void btn_Login_Click(object sender, RoutedEventArgs e) { //FrmLogin frmLogin = new FrmLogin(); //frmLogin.ShowDialog(); NavigationWindow Window = new NavigationWindow(); Window.Source = new Uri(@"/WpfDemo;component/Views/FrmLogin.xaml", UriKind.Relative); Window.Show(); this.Close(); }
private void ShowChooseDialog(Entity selectedItem, myAction action) { var dialog = new DialogThreadPage(action, selectedItem); var win = new NavigationWindow() { Content = dialog, Width = 300, Height = 200 }; win.Show(); }
public static void NavigatePage(Object o) { //navigating from a Window to a page. Create a navigationwindow object which you can use to open the other pages NavigationWindow navPage = new NavigationWindow(); navPage.Navigate(o); navPage.WindowState = System.Windows.WindowState.Maximized; navPage.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; navPage.Show(); }
private void btnShow(object sender, RoutedEventArgs e) { if (winWait != null) { return; } winWait = new NavigationWindow(); winWait.Content = new PageWait(); winWait.Show(); }
private void eventWindowButtonLeftClick(object sender, RoutedEventArgs e) { testWindowCounter++; var myWindow = new NavigationWindow { Title = "Test title - " + testWindowCounter }; myWindow.Show(); }