public Main2Page_ViewModel()
        {
            toMathang_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Mathang view = new View.View_Thukho.Mathang();
                view.WindowState           = win.WindowState;
                view.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });


            toXuat_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Xuathang view = new View.View_Thukho.Xuathang();
                view.WindowState           = win.WindowState;
                view.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });

            toNhap_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Nhaphang view = new View.View_Thukho.Nhaphang();
                view.WindowState           = win.WindowState;
                view.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });

            toThongke_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Thongke view = new View.View_Thukho.Thongke();
                view.WindowState           = win.WindowState;
                view.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });

            toLoaimathang_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Loaimathang view = new View.View_Thukho.Loaimathang();
                view.WindowState           = win.WindowState;
                view.WindowStartupLocation = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });

            toDonvi_Command = new RelayCommand <Button>(p =>
            {
                return(true);
            }, p =>
            {
                Window win = getParent(p) as Window;

                View.View_Thukho.Donvi view = new View.View_Thukho.Donvi();
                view.WindowState            = win.WindowState;
                view.WindowStartupLocation  = WindowStartupLocation.CenterScreen;

                show_waitingwd();

                view.Show();

                win.Close();
            });
        }
        private void Select_Window(int i, WindowState wd, WindowStartupLocation wd_st)
        {
            switch (i)
            {
            case 1:
            {
                View.View_Thukho.Mathang view = new View.View_Thukho.Mathang();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 2:
            {
                View.View_Thukho.Loaimathang view = new View.View_Thukho.Loaimathang();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 3:
            {
                View.View_Thukho.Donvi view = new View.View_Thukho.Donvi();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 4:
            {
                View.View_Thukho.Xuathang view = new View.View_Thukho.Xuathang();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 5:
            {
                View.View_Thukho.Nhaphang view = new View.View_Thukho.Nhaphang();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 6:
            {
                View.View_Thukho.Thongke view = new View.View_Thukho.Thongke();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            case 7:
            {
                View.View_Thukho.Thungrac view = new View.View_Thukho.Thungrac();
                view.WindowState           = wd;
                view.WindowStartupLocation = wd_st;
                view.Show();
            }
            break;

            default:
                break;
            }
        }