Page.xaml.cs
上传用户:jxqhsy
上传日期:2020-12-31
资源大小:1793k
文件大小:2k
源码类别:

SilverLight

开发平台:

HTML/CSS

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using System.Windows.Interop;
  13. namespace SFGS
  14. {
  15.     public partial class Page : UserControl
  16.     {
  17.         public Page()
  18.         {
  19.             InitializeComponent();            
  20.         }        
  21.         private void hbHome_Click(object sender, RoutedEventArgs e)
  22.         {
  23.             Welcome welcom = new Welcome();
  24.             welcom.Width = 960;
  25.             welcom.Height = 700;
  26.             containerCanvas.Children.Clear();
  27.             containerCanvas.Children.Add(welcom);           
  28.         }
  29.         private void hbContact_Click(object sender, RoutedEventArgs e)
  30.         {
  31.             ContactUs cu = new ContactUs();
  32.             cu.Width = 960;
  33.             cu.Height = 700;
  34.             containerCanvas.Children.Clear();
  35.             containerCanvas.Children.Add(cu);
  36.         }
  37.         private void hbAbout_Click(object sender, RoutedEventArgs e)
  38.         {
  39.             About about = new About();
  40.             about.Width = 960;
  41.             about.Height = 700;
  42.             containerCanvas.Children.Clear();
  43.             containerCanvas.Children.Add(about);
  44.         }
  45.         private void hbAdmin_Click(object sender, RoutedEventArgs e)
  46.         {
  47.             Admin admin = new Admin();
  48.             Login login = new Login();
  49.             login.Width = 960;
  50.             login.Height = 700;
  51.             admin.Width = 960;
  52.             admin.Height = 700;
  53.             containerCanvas.Children.Clear();
  54.             if (Global.IsLogin)
  55.             {                
  56.                 containerCanvas.Children.Add(admin);
  57.             }
  58.             else
  59.             {
  60.                 containerCanvas.Children.Add(login);
  61.             }
  62.         }        
  63.     }
  64. }