public PainelDetalhesConhecimento(UserControlCentro ucc, bool back)
        {
            InitializeComponent();
            PainelCentro = ucc;
            conhe        = new Conhecimento();
            anexo        = new Anexo();

            buttonsDetails = new Controls.ButtonsDetails();
            gridFundo.Children.Add(buttonsDetails);

            buttonsDetails.SaveClick   += new EventHandler(Add_Conhecimento);
            buttonsDetails.HomeClick   += new EventHandler(Home);
            buttonsDetails.DeleteClick += new EventHandler(DeleteConhecimento);

            treeView = new Controls.TreeView(this);
            gridPesquisa.Children.Add(treeView);
            propertyGridInfo = new Controls.PropertyGrid(this);
            gridPropertyInfo.Children.Add(propertyGridInfo);

            propertyGridComboBox.SelectedIndex = 2;

            textEditor.TextArea.TextEntering += textEditor_TextArea_TextEntering;
            textEditor.TextArea.TextEntered  += textEditor_TextArea_TextEntered;

            DispatcherTimer foldingUpdateTimer = new DispatcherTimer();

            foldingUpdateTimer.Interval = TimeSpan.FromSeconds(2);
            foldingUpdateTimer.Tick    += foldingUpdateTimer_Tick;
            foldingUpdateTimer.Start();
        }
        private void TabCentro_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (DetalhesProjeto.IsSelected == true)
            {
                if (addButtons == true)
                {
                    if (buttonsDetails == null)
                    {
                        buttonsDetails = new Controls.ButtonsDetails();
                    }

                    buttonsDetails.SaveClick   += new EventHandler(Add_Projeto);
                    buttonsDetails.HomeClick   += new EventHandler(Home);
                    buttonsDetails.DeleteClick += new EventHandler(DeleteProjeto);

                    gridFundo.Children.Remove(buttonsGeral);
                    gridFundo.Children.Add(buttonsDetails);

                    actualizaButton = true;
                    addButtons      = false;
                }
            }
            else
            {
                if (actualizaButton == true)
                {
                    if (buttonsGeral == null)
                    {
                        buttonsGeral = new Controls.ButtonsGeral();
                    }

                    gridFundo.Children.Remove(buttonsDetails);
                    gridFundo.Children.Add(buttonsGeral);
                    addButtons      = true;
                    actualizaButton = false;
                }

                if (tabDatabases.IsSelected == true)
                {
                    buttonsGeral.HomeClick    += new EventHandler(Home);
                    buttonsGeral.DeleteClick  += new EventHandler(DeleteBD);
                    buttonsGeral.EditClick    += new EventHandler(EditBD);
                    buttonsGeral.AddClick     += new EventHandler(AddNewBD);
                    buttonsGeral.RefreshClick += new EventHandler(RefreshBD);
                }
                else if (tabConhecimento.IsSelected == true)
                {
                    buttonsGeral.HomeClick    += new EventHandler(Home);
                    buttonsGeral.DeleteClick  += new EventHandler(DeleteConhecimento);
                    buttonsGeral.EditClick    += new EventHandler(EditConhecimento);
                    buttonsGeral.AddClick     += new EventHandler(AddNewConhecimento);
                    buttonsGeral.RefreshClick += new EventHandler(Refresh);
                }
            }
        }
예제 #3
0
        public PainelDetalhesUtilizadores(UserControlCentro controlCentro)
        {
            InitializeComponent();
            PainelCentro   = controlCentro;
            buttonsDetails = new Controls.ButtonsDetails();
            gridFundo.Children.Add(buttonsDetails);

            buttonsDetails.SaveClick   += new EventHandler(Add_Utilizador);
            buttonsDetails.HomeClick   += new EventHandler(Home);
            buttonsDetails.DeleteClick += new EventHandler(DeleteUser);
            PasswordUser.Visibility     = System.Windows.Visibility.Hidden;
            UsernameUser.BorderBrush    = PasswordUserPass.BorderBrush = PasswordUser.BorderBrush = NomeUser.BorderBrush = Brushes.Red;
        }
예제 #4
0
        public PainelDetalhesTabelas(UserControlCentro ucc, bool back)
        {
            InitializeComponent();
            PainelCentro = ucc;
            tabela       = new Tabela();

            buttonsDetails = new Controls.ButtonsDetails();
            gridFundo.Children.Add(buttonsDetails);

            buttonsDetails.SaveClick   += new EventHandler(Add_Tabela);
            buttonsDetails.HomeClick   += new EventHandler(Home);
            buttonsDetails.DeleteClick += new EventHandler(DeleteTabela);

            propertyGridComboBox.SelectedIndex = 2;

            ActualizaDataGrid();

            try
            {
                var subtype = subtipo.getSubtipo();
                ComboListSubtipo.Add(" ");
                foreach (Subtipos st in subtype)
                {
                    ComboListSubtipo.Add(st.Nome);
                }

                types = tipo.getTipo();

                ListTipo.Add(" ");
                foreach (Tipos t in types)
                {
                    ListTipo.Add(t.Nome);
                }

                AutoComplete1.ItemsSource  = AutoComplete2.ItemsSource = ListTipo;
                combo_subtipos.ItemsSource = ComboListSubtipo;
            }
            catch { }

            textEditor.TextArea.TextEntering += textEditor_TextArea_TextEntering;
            textEditor.TextArea.TextEntered  += textEditor_TextArea_TextEntered;

            DispatcherTimer foldingUpdateTimer = new DispatcherTimer();

            foldingUpdateTimer.Interval = TimeSpan.FromSeconds(2);
            foldingUpdateTimer.Tick    += foldingUpdateTimer_Tick;
            foldingUpdateTimer.Start();
        }
        public PainelDetalhesPessoas(UserControlCentro controlCentro)
        {
            InitializeComponent();
            PainelCentro = controlCentro;
            Loaded      += OnLoaded;

            buttonsDetails = new Controls.ButtonsDetails();
            gridFundo.Children.Add(buttonsDetails);

            buttonsDetails.SaveClick   += new EventHandler(Add_Pessoa);
            buttonsDetails.HomeClick   += new EventHandler(Home);
            buttonsDetails.DeleteClick += new EventHandler(DeletePessoa);

            NomePessoa.BorderBrush     = Brushes.Red;
            AutoComplete1.BorderBrush  = Brushes.Red;
            tabConhecimento.Visibility = System.Windows.Visibility.Hidden;
        }
        public PainelDetalhesProjetos(UserControlCentro controlCentro, bool back)
        {
            InitializeComponent();
            retroceder            = back;
            PainelCentro          = controlCentro;
            projeto               = new Projeto();
            Loaded               += OnLoaded;
            PainelCentro.backward = true;

            buttonsDetails = new Controls.ButtonsDetails();

            tabConhecimento.Visibility = System.Windows.Visibility.Hidden;
            tabDatabases.Visibility    = System.Windows.Visibility.Hidden;

            DetalhesProjeto.IsSelected = true;

            NomeProjeto.BorderBrush   = Brushes.Red;
            AutoComplete1.BorderBrush = Brushes.Red;
        }
예제 #7
0
        public PainelDetalhesDatabases(UserControlCentro controlCentro)
        {
            InitializeComponent();
            PainelCentro = controlCentro;
            database     = new ViewModels.BasesdeDados();

            AutoComplete1.BorderBrush = PasswordBDPass.BorderBrush = DatabaseBD.BorderBrush = ServidorBD.BorderBrush = PasswordBD.BorderBrush = usernameBD.BorderBrush = Brushes.Red;

            PasswordBD.Visibility = System.Windows.Visibility.Hidden;

            buttonsDetails = new Controls.ButtonsDetails();
            gridFundo.Children.Add(buttonsDetails);

            buttonsDetails.SaveClick   += new EventHandler(Add_Database);
            buttonsDetails.HomeClick   += new EventHandler(Home);
            buttonsDetails.DeleteClick += new EventHandler(DeleteBD);

            Loaded += OnLoaded;
        }
예제 #8
0
        public PainelDetalhesEntidades(UserControlCentro controlCentro)
        {
            InitializeComponent();
            PainelCentro          = controlCentro;
            emp                   = new ViewModels.Entidade();
            PainelCentro.backward = true;

            buttonsDetails = new Controls.ButtonsDetails();
            //gridFundo.Children.Add(buttonsDetails);



            tabPessoas.Visibility      = System.Windows.Visibility.Hidden;
            tabProjetos.Visibility     = System.Windows.Visibility.Hidden;
            tabConhecimento.Visibility = System.Windows.Visibility.Hidden;
            tabDatabases.Visibility    = System.Windows.Visibility.Hidden;

            DetalhesEntidade.IsSelected = true;

            NomeEntidade.BorderBrush = Brushes.Red;
        }