Ejemplo n.º 1
0
        public ContentApp(Window window)

        {
            HOME = new Command(() => {
                page = new welcomme();
                prev = null;
            });
            account = new Command(() => {
                page = new ViewAcount();
                prev = null;
            });
            logout = new Command(() => {
                login login = new login();
                login.Show();
                App.Current.MainWindow.Close();
                App.Current.MainWindow = login;

                Ico.getValue <db>().GetUnivdb().users.ToList().Where(c => c.id == Ico.getValue <user>().id).ToList().FirstOrDefault().date_gust = DateTime.Now;

                Ico.getValue <db>().savedb();
                Ico.Delete <user>();
                ;
            });
            clients = new Command(() => {
                page = new ViewClient();
                prev = null;
            });
            processes = new Command(() => {
                page = new PCrad();
                prev = null;
            });
            this.btnmenu = new Command(() => {
                this.vismenu = Visibility.Visible;
                contentWidth = window.Width - 250;
                this.visbtn  = Visibility.Hidden;
            });
            this.btnclose = new Command(() => {
                this.vismenu = Visibility.Hidden;
                contentWidth = window.Width;
                this.visbtn  = Visibility.Visible;
            });
            this.window         = window;
            contentHeigth       = window.Height;
            contentWidth        = window.Width - 250;
            window.SizeChanged += SizeChanged;
            this.vismenu        = Visibility.Collapsed;
            this.visbtn         = Visibility.Visible;
        }
Ejemplo n.º 2
0
        public ContentApp(Window window)

        {
            HOME = new Command(() => {
                page = new welcomme();
                prev = null;
            });
            account = new Command(() => {
                page = new ViewAcount();
                prev = null;
            });
            logout = new Command(() => {
                login login = new login();
                login.Show();
                App.Current.MainWindow.Close();
                App.Current.MainWindow = login;
                Ico.Delete <user>();
                ;
            });
            clients = new Command(() => {
                page = new ViewClient();
                prev = null;
            });
            processes = new Command(() => {
                page = new PCrad();
                prev = null;
            });
            this.btnmenu = new Command(() => {
                this.vismenu = Visibility.Visible;
                contentWidth = window.Width - 250;
                this.visbtn  = Visibility.Hidden;
            });
            this.btnclose = new Command(() => {
                this.vismenu = Visibility.Hidden;
                contentWidth = window.Width;
                this.visbtn  = Visibility.Visible;
            });
            this.window         = window;
            contentHeigth       = window.Height;
            contentWidth        = window.Width - 250;
            window.SizeChanged += SizeChanged;
            this.vismenu        = Visibility.Collapsed;
            this.visbtn         = Visibility.Visible;
        }