Example #1
0
        private void BtnLogout_Click(object sender, RoutedEventArgs e)
        {
            WindowMain window = this;

            loggout = true;

            window.Close();
        }
 public MainWindow()
 {
     InitializeComponent();
     if (login.ManterConectado() && WindowMain.loggout == false)
     {
         MainWindow w      = this;
         WindowMain window = new WindowMain();
         w.Close();
         window.Show();
     }
 }
        public async void BemVindo()
        {
            NotificationInformation msg = new NotificationInformation();

            msg.Message = "Bem vindo!";
            msg.Icon    = "Login";

            await DialogHost.Show(msg, "RootDialog");

            MainWindow w      = this;
            WindowMain window = new WindowMain();

            w.Close();
            window.Show();
        }
Example #4
0
        public WindowMain()
        {
            window = this;
            InitializeComponent();
            loggout = false;
            stackPanelPrincipal.MaxWidth = 1000;
            troca = new trocaProp()
            {
                Usuario = StaticKeys.Usuario
            };
            this.DataContext     = troca;
            StaticKeys.Postagens = new PostagemCommands().getPostagens();
            stackPanelPrincipal.Children.Add(new Mural());
            if (StaticKeys.caminhoImagem == null)
            {
                Uri uri = new Uri("/assets/imageDefault.png", UriKind.Relative);
                imageButton.Source       = new BitmapImage(uri);
                StaticKeys.caminhoImagem = new BitmapImage(uri);
            }
            else
            {
                imageButton.Source = StaticKeys.caminhoImagem;
            }

            StaticKeys.Notas = new List <Nota>();
            StaticKeys.Notas = new NotaController().getNotas();

            calendarioControler calendarioControler = new calendarioControler();

            if (calendarioControler.selecionarCalendario(StaticKeys.id_func))
            {
                return;
            }

            else
            {
                MessageBox.Show("Ocorreu algum erro ao pegar as datas de compromissos...", "Erro", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Example #5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.page = ((PrjTreino.WindowMain)(target));

            #line 9 "..\..\..\View\WindowMain.xaml"
                this.page.Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.container = ((System.Windows.Controls.Grid)(target));

            #line 12 "..\..\..\View\WindowMain.xaml"
                this.container.MouseMove += new System.Windows.Input.MouseEventHandler(this.Container_MouseMove);

            #line default
            #line hidden
                return;

            case 3:

            #line 18 "..\..\..\View\WindowMain.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 24 "..\..\..\View\WindowMain.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);

            #line default
            #line hidden
                return;

            case 5:
                this.btnChat = ((System.Windows.Controls.Button)(target));

            #line 30 "..\..\..\View\WindowMain.xaml"
                this.btnChat.Click += new System.Windows.RoutedEventHandler(this.BtnChat_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.containerPrincipal = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 7:
                this.btnLogout = ((System.Windows.Controls.Button)(target));

            #line 45 "..\..\..\View\WindowMain.xaml"
                this.btnLogout.Click += new System.Windows.RoutedEventHandler(this.BtnLogout_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.btnUser = ((System.Windows.Controls.Button)(target));

            #line 59 "..\..\..\View\WindowMain.xaml"
                this.btnUser.Click += new System.Windows.RoutedEventHandler(this.BtnUser_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.imageButton = ((System.Windows.Controls.Image)(target));
                return;

            case 10:
                this.nome_func = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.stackPanelPrincipal = ((System.Windows.Controls.Grid)(target));
                return;
            }
            this._contentLoaded = true;
        }