Ejemplo n.º 1
0
        public RenovationModal(HomeWindow home, List <AppointmentDTO> list)
        {
            InitializeComponent();
            this.DataContext     = this;
            this.Home            = home;
            this.AppointmentList = list;
            DateTime date;

            if (list == null || list.Count == 0)
            {
                date = DateTime.Now;
            }
            else
            {
                date = list.First().End;
                foreach (AppointmentDTO appointment in list)
                {
                    if (DateTime.Compare(appointment.End, date) > 0)
                    {
                        date = appointment.End;
                    }
                }
                date = date.AddDays(3);
            }
            DateTime endDate = date;

            endDate = endDate.AddDays(1);
            RenBegin.SelectedDate = date;
            RenEnd.SelectedDate   = endDate;
            Renovation            = new RenovationDTO();
        }
Ejemplo n.º 2
0
 public OrderMedicalConsumableModal(HomeWindow home, MedicalConsumableDTO medicalConsumable)
 {
     InitializeComponent();
     this.DataContext       = this;
     this.Home              = home;
     this.MedicalConsumable = medicalConsumable;
 }
Ejemplo n.º 3
0
        private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {
            SqlConnection sqlCon = new SqlConnection(Util.CONNECTION_STRING);

            try
            {
                if (sqlCon.State == ConnectionState.Closed)
                {
                    sqlCon.Open();
                }
                String     query  = "SELECT COUNT(1) FROM pacijenti WHERE jmbg=@jmbg AND lozinka=@lozinka and aktivan=1";
                SqlCommand sqlCmd = new SqlCommand(query, sqlCon);
                sqlCmd.CommandType = CommandType.Text;
                sqlCmd.Parameters.AddWithValue("@jmbg", txtUsername.Text);
                sqlCmd.Parameters.AddWithValue("@lozinka", txtPassword.Password);
                int count = Convert.ToInt32(sqlCmd.ExecuteScalar());
                if (count == 1)
                {
                    PacijentGlavna dashboard = new PacijentGlavna(txtUsername.Text);
                    dashboard.Show();
                    this.Close();
                }
                if (count != 1)
                {
                    String     query1  = "SELECT COUNT(1) FROM doktori WHERE jmbg=@jmbg AND lozinka=@lozinka and aktivan=1";
                    SqlCommand sqlCmd1 = new SqlCommand(query1, sqlCon);
                    sqlCmd1.CommandType = CommandType.Text;
                    sqlCmd1.Parameters.AddWithValue("@jmbg", txtUsername.Text);
                    sqlCmd1.Parameters.AddWithValue("@lozinka", txtPassword.Password);
                    int count1 = Convert.ToInt32(sqlCmd1.ExecuteScalar());
                    if (count1 == 1)
                    {
                        LekarGlavna dashboard = new LekarGlavna(txtUsername.Text);
                        dashboard.Show();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Username or password is incorrect.");
                    }
                }

                if (txtUsername.Text.Equals("admin") && txtPassword.Password.Equals("admin"))
                {
                    HomeWindow dashboard = new HomeWindow();
                    dashboard.Show();
                    this.Close();
                }
            }


            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                sqlCon.Close();
            }
        }
Ejemplo n.º 4
0
 public OrderEquipmentModal(HomeWindow home, EquipmentDTO equipment)
 {
     InitializeComponent();
     this.DataContext = this;
     this.Home        = home;
     this.Equipment   = equipment;
 }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            UserOperations operations = new UserOperations();
            LoginStatus    status     = operations.isValidUser(textBox1.Text, passwordBox1.Password);

            if (status.ValidUser)
            {
                label3.Visibility = Visibility.Hidden;
                if (status.FirstLogin)
                {
                    if (System.Windows.MessageBox.Show("You need to change your password.", "Change Password", MessageBoxButton.OK, MessageBoxImage.Information) == MessageBoxResult.OK)
                    {
                        ChangePassword change = new ChangePassword(textBox1.Text, passwordBox1.Password, status.Employee);
                        change.Show();
                        this.Close();
                    }
                }
                else
                {
                    HomeWindow hm = new HomeWindow(textBox1.Text, passwordBox1.Password, status.Employee);
                    hm.Show();
                    this.Close();
                }
            }
            else
            {
                label3.Visibility = Visibility.Visible;
            }
        }
 private void Update()
 {
     if (this.StartExec)
     {
         this.UpdatePendingParam();
     }
     else
     {
         if (!MonoSingleton <GameManager> .Instance.Player.CheckUnlock(UnlockTargets.MultiPlay) || !this.StartCheck || (!FlowNode_GetCurrentScene.IsAfterLogin() || Object.op_Equality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null)) || (string.IsNullOrEmpty(MonoSingleton <GameManager> .GetInstanceDirect().Player.Name) || Object.op_Equality((Object)EventSystem.get_current(), (Object)null) || (Object.op_Equality((Object)EventSystem.get_current().get_currentInputModule(), (Object)null) || !((Behaviour)EventSystem.get_current().get_currentInputModule()).get_enabled())) || (Network.IsConnecting || BlockInterrupt.IsBlocked(BlockInterrupt.EType.URL_SCHEME_LAUNCH) || (CriticalSection.IsActive || !GlobalVars.IsTutorialEnd)))
         {
             return;
         }
         if (GameUtility.GetCurrentScene() == GameUtility.EScene.HOME)
         {
             HomeWindow current = HomeWindow.Current;
             if (Object.op_Equality((Object)current, (Object)null) || !current.IsReadyInTown)
             {
                 return;
             }
         }
         if (!this.UpdatePendingParam())
         {
             return;
         }
         this.StartCheck = false;
         this.StartExec  = true;
         DebugUtility.Log("UrlScheme MultiPlayLINE start. CheckEnd!" + (object)(FlowNode_OnUrlSchemeLaunch.LINEParam_Pending != null));
         this.ActivateOutputLinks(1);
     }
 }
        public void LoadEmployee(HomeWindow parameter)
        {
            this.homeWindow = parameter;
            parameter.stkEmployee.Children.Clear();
            List <Employee> employees = EmployeeDAL.Instance.ConvertDBToList();

            foreach (Employee employee in employees)
            {
                EmployeeUc employeeUc = new EmployeeUc();
                employeeUc.txbID.Text        = employee.IdEmployee.ToString();
                employeeUc.txbName.Text      = employee.Name;
                employeeUc.txbPosition.Text  = employee.Position;
                employeeUc.txbTelephone.Text = employee.Telephone;
                employeeUc.txbStartDate.Text = employee.StartDate.ToString();
                parameter.stkEmployee.Children.Add(employeeUc);
            }
            //List<Employee> employees = EmployeeDAL.Instance.ConvertDBToList();
            //foreach (Employee employee in employees)
            //{
            //    EmployeeUc employeeUc = new EmployeeUc();
            //    employeeUc.txbID.Text = employee.IdEmployee.ToString();
            //    employeeUc.txbName.Text = employee.Name;
            //    employeeUc.txbPosition.Text = employee.Position;
            //    employeeUc.txbTelephone.Text = employee.Telephone;
            //    employeeUc.txbStartDate.Text = employee.StartDate.ToString();
            //    parameter.stkEmployee.Children.Add(employeeUc);
            //    MessageBox.Show("oke");
            //}
        }
Ejemplo n.º 8
0
        private void OpenImportProductwindow(HomeWindow para)
        {
            this.HomeWindow = para;
            ImportProductWindow window = new ImportProductWindow();

            this.imageFileName = null;
            try
            {
                string query = "SELECT MAX(ID) FROM Product " +
                               "UNION " +
                               "SELECT MAX(ID) FROM StockReceipt";

                List <Int32> temp = DataProvider.Instance.DB.Database.SqlQuery <Int32>(query).ToList();

                window.txtID.Text             = (temp[0] + 1).ToString();
                window.txtStockReceiptID.Text = (temp[1] + 1).ToString();
            }
            catch
            {
                window.txtID.Text             = "1";
                window.txtStockReceiptID.Text = "1";
            }
            finally
            {
                window.ShowDialog();
            }
        }
Ejemplo n.º 9
0
        public CustomerVM()
        {
            foreach (Window win in Application.Current.Windows)
            {
                if (win.Title.Split(' ')[0] == Resources.WinHomeTitle)
                {
                    HomeWindow home = (HomeWindow)win;
                    foreach (Telerik.Windows.Controls.RadTabControl tb in FindVisualChildren <Telerik.Windows.Controls.RadTabControl>(win))
                    {
                        if (tb.Name == "VehicleLoc" || tb.Name == "tabControl")
                        {
                            IsPortStorage = 1;
                            //foreach (UIElement ui in home)
                            //{
                            //    AppWorks.UI.View.UserControls.Vehicle.PortStorageVehicalLocator vechileloc = (AppWorks.UI.View.UserControls.Vehicle.PortStorageVehicalLocator)ui;
                            //    if (vechileloc.Name == Resources.UControlPSVehicleLoc)
                            //    {
                            //        IsPortStorage = 1;
                            //    }
                            //}
                        }
                    }
                }
            }

            LoadCutomerType();
            DelegateEventCustomer.OnSetValueEvtTotalCountPagerCmd += new DelegateEventCustomer.SetValueTotalCountPager(GetTotalPageCount);
            DelegateEventCustomer.OnSetValuePageNumberCmd         += new DelegateEventCustomer.SetValuePageNumberClick(GetCurrentPageIndex);
            Application.Current.Properties["SearchCount"]          = 0;
        }
        public void LogOut(HomeWindow parameter)
        {
            SignInWindow signInWindow = new SignInWindow();

            signInWindow.Show();
            parameter.Close();
        }
Ejemplo n.º 11
0
        private void OpenFormHome(object sender, RoutedEventArgs e)
        {
            this.Hide();
            var homeWindow = new HomeWindow(IdUsuario, _tarefaService, _loginService, _usuarioService);

            homeWindow.Show();
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Double clicking on Grid would bind the current row in Port Storage Vehicle Detail tab
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdUserList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement originalSender = e.OriginalSource as FrameworkElement;

            var items = grdUserList.Items;

            if (originalSender != null)
            {
                var row = originalSender.ParentOfType <GridViewRow>();

                if (row != null)
                {
                    row.IsSelected = true;
                    foreach (Window win in Application.Current.Windows)
                    {
                        if (win.Title == Properties.Resources.WinHomeTitle)
                        {
                            HomeWindow home = (HomeWindow)win;
                            foreach (RadTabControl tc in FindVisualChildren <RadTabControl>(win))
                            {
                                tc.SelectedIndex = (int)Enums.PortStorageTabs.VehicleDetail;
                                break;
                            }
                        }
                    }
                }
            }
        }
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     //Submit
     if (oldPasswordBox.Password == password)
     {
         label4.Visibility = Visibility.Hidden;
         if (newPasswordBox.Password == confirmNewPassword.Password)
         {
             label5.Visibility = Visibility.Hidden;
             UserOperations operations = new UserOperations();
             operations.changePassword(userName, oldPasswordBox.Password, newPasswordBox.Password);
             HomeWindow hm = new HomeWindow(userName, password, emp);
             hm.Show();
             this.Close();
         }
         else
         {
             label5.Visibility = Visibility.Visible;
         }
     }
     else
     {
         label4.Visibility = Visibility.Visible;
     }
 }
Ejemplo n.º 14
0
        private void mainBtn_Click(object sender, RoutedEventArgs e)
        {
            HomeWindow window = new HomeWindow();

            window.Show();
            Close();
        }
Ejemplo n.º 15
0
        private void LoadProduct(HomeWindow para)
        {
            this.HomeWindow = para;
            this.HomeWindow.stkProducts.Children.Clear();
            List <Product> products = new List <Product>();

            string query = "SELECT * FROM Product";

            products = DataProvider.Instance.DB.Products.SqlQuery(query).ToList();

            foreach (Product product in products)
            {
                if (product.IsDelete == false)
                {
                    ProductControlUC control = new ProductControlUC();
                    control.txbID.Text          = product.ID.ToString();
                    control.txbName.Text        = product.Name;
                    control.txbUnit.Text        = product.Unit;
                    control.txbImportPrice.Text = ConvertToString(product.ImportPrice);
                    control.txbPrice.Text       = ConvertToString(product.ExportPrice);
                    control.txbCount.Text       = ConvertToString(product.Count);

                    this.HomeWindow.stkProducts.Children.Add(control);
                }
            }
        }
        private void LoadSettingWindow(HomeWindow para)
        {
            this.HomeWindow = para;
            this.ListType   = DataProvider.Instance.DB.TypeOfAgencies.ToList <TypeOfAgency>();

            StreamReader sr = new StreamReader("../../cache.txt");

            this.cache = sr.ReadToEnd();
            sr.Close();

            string[] rulesSetting = this.cache.Split(' ');

            para.txtNumberType_Setting.Text             = rulesSetting[0];
            para.txtNumberAgencyinDistrict_Setting.Text = rulesSetting[1];
            para.txtNumberProduct_Setting.Text          = rulesSetting[2];
            para.txtNumberUnit_Setting.Text             = rulesSetting[3];

            for (int i = 0; i < this.ListType.Count; i++)
            {
                TypeOfAgencyUC uc = new TypeOfAgencyUC();

                uc.txbSTT.Text  = (i + 1).ToString();
                uc.txbName.Text = this.ListType[i].Name;
                uc.txbDebt.Text = SeparateThousands(this.ListType[i].MaxOfDebt.ToString());

                para.stkListType_Setting.Children.Add(uc);
            }

            Button bt = new Button();

            bt = (Button)para.stkListType_Setting.Children[0];
            para.stkListType_Setting.Children.RemoveAt(0);
            para.stkListType_Setting.Children.Add(bt);
        }
Ejemplo n.º 17
0
        private void Login(object sender, RoutedEventArgs e)
        {
            try
            {
                var findUser = _unitOfWork.User.ExistUser(txtUserName.Text.ToString().Trim(), txtPassword.Password.Trim().ToString());
                if (findUser == null)
                {
                    status.Text   = $"ইউসার নাম এবং পাসওয়ার্ড ভুল প্রদান করা হয়েছে।";
                    Dialog.IsOpen = true;
                    return;
                }
                if (findUser.Role.Name == "Admin")
                {
                    ApplicationState.SetValue("IsAdmin", true);
                }
                else
                {
                    ApplicationState.SetValue("IsAdmin", false);
                }

                ApplicationState.SetValue("UserInfo", findUser);

                HomeWindow homeWindow = new HomeWindow();
                homeWindow.Show();
                this.Close();
                return;
            }
            catch (System.Exception ex)
            {
                status.Text   = $"প্রোগ্রাম সম্পর্কিত সমস্যা: { ex.Message}";
                Dialog.IsOpen = true;
            }
        }
Ejemplo n.º 18
0
 public UpdateJournalControl(HomeWindow window, Patient patient, Journal journal)
 {
     _homeWindow   = window;
     _loadDatabase = new LoadDatabase();
     _saveDatabase = new SaveDatabase();
     _patient      = patient;
     _journal      = journal;
 }
Ejemplo n.º 19
0
        private void openTestTab(Operateurs op)
        {
            HomeWindow parentWindow = Window.GetWindow(this) as HomeWindow;

            parentWindow.GridCursor.Margin = new Thickness(10 + (180 * 1), 0, 0, 0);

            parentWindow.GridMain.Children.Clear();
            parentWindow.GridMain.Children.Add(new UserControlTest(op, formateur));
        }
Ejemplo n.º 20
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            HomeWindow window = new HomeWindow();
            UserVM     VM     = new UserVM();

            window.DataContext = VM;
            window.Show();
        }
Ejemplo n.º 21
0
        private void GoToNotes_Click(object sender, RoutedEventArgs e)
        {
            HomeWindow parentWindow = (HomeWindow)Window.GetWindow((DependencyObject)sender);

            if (parentWindow != null)
            {
                parentWindow.NavigationMenu.SelectedIndex = 4;
            }
        }
Ejemplo n.º 22
0
 public override void OnActivate(int pinID)
 {
     if (pinID != 1)
     {
         return;
     }
     HomeWindow.SetRestorePoint(this.RestorePoint);
     this.ActivateOutputLinks(10);
 }
Ejemplo n.º 23
0
        public void ResumeGame(object param)
        {
            HomeWindow    window = new HomeWindow();
            HomeViewModel homeVM = new HomeViewModel(user, true);

            window.DataContext = homeVM;
            App.Current.MainWindow.Close();
            App.Current.MainWindow = window;
            window.Show();
        }
Ejemplo n.º 24
0
        public void Logout(HomeWindow sender)
        {
            var result = MessageBox.Show("Je staat op het punt om uit te loggen, weet je dit zeker?", "Waarschuwing!", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                _loggedOut = true;
                new LoginWindow().Show();
                sender.Close();
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Method to Load Main Model after Login Successful.
        /// </summary>
        private async void LoadMainModel(string userRole)
        {
            await Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            {
                CommonSettings.logger.LogInfo(typeof(string),
                                              string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart,
                                                            DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(),
                                                            MethodBase.GetCurrentMethod().Name));
                try
                {
                    if (!string.IsNullOrEmpty(userRole))
                    {
                        Application.Current.Properties["LoggedInUserRole"] = userRole;

                        HomeWindow homeWindow = new HomeWindow();

                        // close the login window and show home window
                        foreach (Window window in Application.Current.Windows)
                        {
                            if (window.Title.Equals("login", StringComparison.OrdinalIgnoreCase))
                            {
                                window.Close();
                                homeWindow.Show();
                            }
                        }
                    }
                    else
                    {
                        clsValidationPopUp.ErrMsgPassword = Resources.ErrorNoRoleAsign;
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.LogErrorToDb(ex);
                    bool displayErrorOnUI = false;
                    CommonSettings.logger.LogError(this.GetType(), ex);
                    if (displayErrorOnUI)
                    {
                        throw;
                    }
                }
                finally
                {
                    CommonSettings.logger.LogInfo(typeof(string),
                                                  string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd,
                                                                DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(),
                                                                MethodBase.GetCurrentMethod().Name));
                }
            }));

            IsLogining = false;
        }
Ejemplo n.º 26
0
        public InventoryManagmentModal(HomeWindow home, List <AppointmentDTO> list, List <EquipmentDTO> roomEquipment)
        {
            InitializeComponent();
            app = App.Current as App;
            this.DataContext     = this;
            this.Home            = home;
            this.AppointmentList = list;
            DateTime date;

            if (list == null || list.Count == 0)
            {
                date = DateTime.Now;
            }
            else
            {
                date = list.First().End;
                foreach (AppointmentDTO appointment in list)
                {
                    if (DateTime.Compare(appointment.End, date) > 0)
                    {
                        date = appointment.End;
                    }
                }
                date = date.AddDays(3);
            }
            DateTime endDate = date;

            endDate = endDate.AddDays(1);
            ManBegin.SelectedDate = date;
            ManEnd.SelectedDate   = endDate;
            InventoryManagment    = new InventoryManagementDTO();

            /* ObservableCollection<EquipmentDTO> l1 = new ObservableCollection<EquipmentDTO>();
             * l1.Add(new EquipmentDTO() { Name = "Sto", Type = "namestaj" });
             * l1.Add(new EquipmentDTO() { Name = "Stolica", Type = "namestaj" });
             * l1.Add(new EquipmentDTO() { Name="Cekic", Type = "alat/oruzje"});
             *
             * ObservableCollection<EquipmentDTO> l2 = new ObservableCollection<EquipmentDTO>();
             * l2.Add(new EquipmentDTO() { Name = "Makaze", Type = "alat" });
             * l2.Add(new EquipmentDTO() { Name = "Cekic", Type = "alat" });
             * l2.Add(new EquipmentDTO() { Name = "Cekic", Type = "alat/oruzje" });*/


            //if(roomEquipment==null)
            //  RoomEquipment=new ObservableCollection<EquipmentDTO>();
            //else
            RoomEquipment = new ObservableCollection <EquipmentDTO>();
            Inventory     = new ObservableCollection <EquipmentDTO>(app.EquipmentController.GetAll().Where(eq => eq.Room.Id == 0));
            Moved         = new List <EquipmentDTO>();
        }
Ejemplo n.º 27
0
        public void LoginButtonIsPressed(string SSN, string Password)
        {
            if (_validateLogin.CheckSSN(SSN))
            {
                if (_loadDatabase.ValidateLogin(SSN, Password))
                {
                    //ALT HERFRA TIL _HOMEWINDOW TÆNKER VI ER GODT
                    //Spørgsmålet er, hvorvidt det skal placeres her, eller i homewindow eller et andet sted, så det kommer
                    //med videre rundt i forløbet i programmet. :)

                    _patient = _loadDatabase.LoadPatientInfo(SSN);
                    //foreach (var item in _patient.PackageList)
                    //{
                    //    _exercisePackage = _loadDatabase.LoadPackageInfo(item.ExercisePackageID);
                    //    _packageList.Add(_exercisePackage);
                    //}


                    //foreach (var item in _packageList)
                    //{
                    //    foreach (var exercise in item.ExerciseList)
                    //    {
                    //        _exercise = _loadDatabase.LoadExerciseInfo(exercise.ExerciseID);
                    //        _exerciseList.Add(_exercise);
                    //    }
                    //}



                    _homeWindow = new HomeWindow(_patient);
                    _homeWindow.Show();
                    _loginWindow.Close();
                }
                else
                {
                    _loginWindow.LoginErrorMessage();
                    _loginWindow.cprTB.Clear();
                    _loginWindow.pwTB.Clear();
                    _loginWindow.cprTB.Focus();
                }
            }
            else
            {
                _loginWindow.SSNErrorMessage();
                _loginWindow.cprTB.Clear();
                _loginWindow.pwTB.Clear();
                _loginWindow.cprTB.Focus();
            }
        }
Ejemplo n.º 28
0
        void Login(LoginWindow parameter)
        {
            if (parameter == null)
            {
                return;
            }
            //check username
            if (String.IsNullOrEmpty(parameter.txtUser.Text))
            {
                MessageBox.Show("Vui lòng nhập tên đăng nhập!", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
                parameter.txtUser.Focus();
                return;
            }
            //check password
            if (String.IsNullOrEmpty(parameter.txtPassword.Text))
            {
                MessageBox.Show("Vui lòng nhập mật khẩu!", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
                parameter.txtPassword.Focus();
                return;
            }

            string codedPassword = MD5Hash(parameter.txtPassword.Text);
            var    checkACC      = DataProvider.Instance.DB.Accounts.Where(x => x.Username == parameter.txtUser.Text && x.Password == codedPassword).Count();

            if (checkACC > 0)
            {
                HomeWindow homeWindow = new HomeWindow();
                CurrentAccount.Instance.ConvertAccToCurrentAcc(parameter.txtUser.Text);
                parameter.Hide();

                ImageBrush imageBrush = new ImageBrush();
                imageBrush.ImageSource                 = Converter.Instance.ConvertByteToBitmapImage(CurrentAccount.Image);
                homeWindow.grdAcc_Image.Background     = imageBrush;
                homeWindow.menu_Acc_DisplayName.Header = CurrentAccount.DisplayName;

                if (homeWindow.grdAcc_Image.Children.Count != 0)
                {
                    homeWindow.grdAcc_Image.Children.Remove(homeWindow.grdAcc_Image.Children[0]);
                }

                homeWindow.ShowDialog();
                parameter.txtPassword.Text = "";
                parameter.Show();
            }
            else
            {
                MessageBox.Show("Sai tên đăng nhập hoặc mật khẩu!", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
 private void ChangeWayShowAgency(HomeWindow para)
 {
     if (para.cbbStore_Store.SelectedIndex == 0)
     {
         LoadListAgency();
         para.grdListStore_Store.Visibility = Visibility.Visible;
         para.grdList3Store_Store.Visibility = Visibility.Hidden;
     }
     else
     {
         Load3Stores(this.HomeWindow, ListStores, PageNumber);
         para.grdListStore_Store.Visibility = Visibility.Hidden;
         para.grdList3Store_Store.Visibility = Visibility.Visible;
     }
 }
Ejemplo n.º 30
0
        public void CategorySelected(Category category)
        {
            user.GameProperty.CategoryProperty = category;
            user.GameProperty.LevelProperty    = 1;
            user.GameProperty.MistakesProperty = 0;
            user.GameProperty.WordOnDisplay    = "";
            user.GameProperty.WordToGuess      = "";
            HomeWindow    window = new HomeWindow();
            HomeViewModel homeVM = new HomeViewModel(user);

            window.DataContext = homeVM;
            App.Current.MainWindow.Close();
            App.Current.MainWindow = window;
            window.Show();
        }