Пример #1
0
 public PgTrain(MainWindow parent, ClrBackend c)
 {
     InitializeComponent();
     parentWindow = parent;
     clr          = c;
     table        = new DataTable();
 }
Пример #2
0
        public MainWindow()
        {
            dicZH = new ResourceDictionary
            {
                Source = new Uri(@"Languages\ZH.xaml", UriKind.Relative)
            };
            dicEN = new ResourceDictionary
            {
                Source = new Uri(@"Languages\EN.xaml", UriKind.Relative)
            };

            try
            {
                StreamReader file = new StreamReader("lang.in");
                string       s    = file.ReadLine();
                if (s == "en")
                {
                    Application.Current.Resources.MergedDictionaries[0] = dicEN;
                }
                else
                {
                    Application.Current.Resources.MergedDictionaries[0] = dicZH;
                }
            }
            catch (Exception)
            {
                Application.Current.Resources.MergedDictionaries[0] = dicZH;
            }

            InitializeComponent();
            SetAnimation();

            if (Application.Current.Resources.MergedDictionaries[0] == dicZH)
            {
                lang.Content = "English";
            }
            else
            {
                lang.Content = "简体中文";
            }

            PreviewMouseMove += OnPreviewMouseMove;
            clr        = new ClrBackend();
            pgAdmin    = new PgAdmin(this, clr);
            pgLogin    = new PgLogin(this, clr);
            pgMyTicket = new PgMyTicket(this, clr);
            pgProfile  = new PgProfile(this, clr);
            pgQuery    = new PgQuery(this, clr);
            pgRegister = new PgRegister(this, clr);
            pgTrain    = new PgTrain(this, clr);
            pgTrains   = new PgTrains(this, clr);
            pgUser     = new PgUser(this, clr);
            pgUsers    = new PgUsers(this, clr);
            Logout();
            pageTransition.ShowPage(pgLogin);
        }
Пример #3
0
 public ListItem(Ticket t, ClrBackend c, int id, int m)
 {
     InitializeComponent();
     Mode    = m;
     clr     = c;
     userID  = id;
     stks[0] = stk1;
     stks[1] = stk2;
     stks[2] = stk3;
     stks[3] = stk4;
     stks[4] = stk5;
     stks[5] = stk6;
     stks[6] = stk7;
     stks[7] = stk8;
     stks[8] = stk9;
     stks[9] = stk10;
     ticket  = t;
     Reset();
 }
Пример #4
0
 public PgRegister(MainWindow parent, ClrBackend c)
 {
     InitializeComponent();
     parentWindow = parent;
     clr          = c;
 }
Пример #5
0
 public PgProfile(MainWindow parent, ClrBackend c)
 {
     InitializeComponent();
     parentWindow = parent;
     clr          = c;
 }
Пример #6
0
 public PgMyTicket(MainWindow parent, ClrBackend c)
 {
     InitializeComponent();
     parentWindow = parent;
     clr          = c;
 }