Ejemplo n.º 1
0
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (_activePage != null)
            {
                _activePage.Visible = false;
            }

            TreeNode     selectedNode = treeView1.SelectedNode;
            PropertyPage page         = (PropertyPage)selectedNode.Tag;

            _activePage = page;

            if (_activePage != null)
            {
                _activePage.Visible = true;
                try
                {
                    _activePage.OnSetActive();
                }
                catch (InfrastructureException ex)
                {
                    MessageDialogs.showError(ex.Message, this.Text);
                    Close();
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        private bool applyPage(PropertyPage page)
        {
            try
            {
                page.OnApply();
                return(true);
            }
            catch (BusinessException ex)
            {
                if (ex.Notification != null)
                {
                    NotificationMessage msg = ex.Notification.FirstMessage;
                    MessageDialogs.showMessage(msg.Message, this.Text);

                    // stavljanje fokusa nema efekta, jer fokus uvek ostaje na TreeView
                    //page.setFocus(msg.FieldName);
                }
                else if (!string.IsNullOrEmpty(ex.InvalidProperty))
                {
                    MessageDialogs.showMessage(ex.Message, this.Text);
                    //page.setFocus(ex.InvalidProperty);
                }
                else
                {
                    MessageDialogs.showMessage(ex.Message, this.Text);
                }
                return(false);
            }
        }
Ejemplo n.º 3
0
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (_activePage != null)
                _activePage.Visible = false;

            TreeNode selectedNode = treeView1.SelectedNode;
            PropertyPage page = (PropertyPage)selectedNode.Tag;
            _activePage = page;

            if (_activePage != null)
            {
                _activePage.Visible = true;
                try
                {
                    _activePage.OnSetActive();
                }
                catch (InfrastructureException ex)
                {
                    MessageDialogs.showError(ex.Message, this.Text);
                    Close();
                    return;
                }
            }
        }
Ejemplo n.º 4
0
        private bool applyPage(PropertyPage page)
        {
            try
            {
                page.OnApply();
                return true;
            }
            catch (BusinessException ex)
            {
                if (ex.Notification != null)
                {
                    NotificationMessage msg = ex.Notification.FirstMessage;
                    MessageDialogs.showMessage(msg.Message, this.Text);

                    // stavljanje fokusa nema efekta, jer fokus uvek ostaje na TreeView
                    //page.setFocus(msg.FieldName);
                }
                else if (!string.IsNullOrEmpty(ex.InvalidProperty))
                {
                    MessageDialogs.showMessage(ex.Message, this.Text);
                    //page.setFocus(ex.InvalidProperty);
                }
                else
                {
                    MessageDialogs.showMessage(ex.Message, this.Text);
                }
                return false;
            }
        }