Пример #1
0
 public SelectControl(LinkControl linkedControl)
 {
     InitializeComponent();
     this.linkedControl = linkedControl;
     gridView.Name = linkedControl.LinkType.Additional;
     view = Program.Context.ViewToGridManager.bindToView(gridView);
     this.Height = OKButton.Location.Y + OKButton.Height + 40;
     this.Width = CancelButton.Location.X + CancelButton.Width + 20;
 }
Пример #2
0
 public SelectControl(LinkControl linkedControl)
 {
     InitializeComponent();
     this.linkedControl = linkedControl;
     gridView.Name      = linkedControl.LinkType.Additional;
     view        = Program.Context.ViewToGridManager.bindToView(gridView);
     this.Height = OKButton.Location.Y + OKButton.Height + 40;
     this.Width  = CancelButton.Location.X + CancelButton.Width + 20;
 }
Пример #3
0
 public UpdateControl(string viewName, ViewControl viewControl)
 {
     contentManager = Program.Context.ContentManager;
     this.viewControl = viewControl;
     this.gridView = viewControl.GridView;
     this.view = viewControl.View;
     InitializeComponent();
     valueBoxes = contentManager.generateContent(this, gridView, view);
     SzpifControl last = valueBoxes[valueBoxes.Count-1];
     this.OKButton.Location = new Point(OKButton.Location.X, last.Location.Y + last.Size.Height);
     this.deleteButton.Location = new Point(deleteButton.Location.X, last.Location.Y + last.Size.Height);
     this.cancelButton.Location = new Point(cancelButton.Location.X, last.Location.Y + last.Size.Height);
     this.Height = OKButton.Location.Y + OKButton.Height + 40;
     this.Width = cancelButton.Location.X + cancelButton.Width + 20;
     if (view.Deletable == false) deleteButton.Visible = false;
 }
Пример #4
0
        public ViewControl(string viewName, int maxHeight)
        {
            InitializeComponent();
            this.gridView.Name = this.viewName = viewName;
            this.Edit.Text = "...";
            this.Edit.Width = 30;
            this.Edit.UseColumnTextForButtonValue = true;
            view = Program.Context.ViewToGridManager.bindToView(gridView);
            addForm = FormFactory.createAddForm(viewName, this);
            addForm.StartPosition = FormStartPosition.CenterParent;
            updateForm = FormFactory.createUpdateForm(viewName, this);
            updateForm.StartPosition = FormStartPosition.CenterParent;
            this.gridView.Height = maxHeight - 50;
            if (view.Insertable == false) this.Add.Visible = false;
            if (view.Updateable == false) this.Edit.Visible = false;
//            this.
        }
Пример #5
0
        public UpdateControl(string viewName, ViewControl viewControl)
        {
            contentManager   = Program.Context.ContentManager;
            this.viewControl = viewControl;
            this.gridView    = viewControl.GridView;
            this.view        = viewControl.View;
            InitializeComponent();
            valueBoxes = contentManager.generateContent(this, gridView, view);
            SzpifControl last = valueBoxes[valueBoxes.Count - 1];

            this.OKButton.Location     = new Point(OKButton.Location.X, last.Location.Y + last.Size.Height);
            this.deleteButton.Location = new Point(deleteButton.Location.X, last.Location.Y + last.Size.Height);
            this.cancelButton.Location = new Point(cancelButton.Location.X, last.Location.Y + last.Size.Height);
            this.Height = OKButton.Location.Y + OKButton.Height + 40;
            this.Width  = cancelButton.Location.X + cancelButton.Width + 20;
            if (view.Deletable == false)
            {
                deleteButton.Visible = false;
            }
        }
Пример #6
0
        public ViewControl(string viewName, int maxHeight)
        {
            InitializeComponent();
            this.gridView.Name = this.viewName = viewName;
            this.Edit.Text     = "...";
            this.Edit.Width    = 30;
            this.Edit.UseColumnTextForButtonValue = true;
            view    = Program.Context.ViewToGridManager.bindToView(gridView);
            addForm = FormFactory.createAddForm(viewName, this);
            addForm.StartPosition    = FormStartPosition.CenterParent;
            updateForm               = FormFactory.createUpdateForm(viewName, this);
            updateForm.StartPosition = FormStartPosition.CenterParent;
            this.gridView.Height     = maxHeight - 50;
            if (view.Insertable == false)
            {
                this.Add.Visible = false;
            }
            if (view.Updateable == false)
            {
                this.Edit.Visible = false;
            }
//            this.
        }
Пример #7
0
 private void ViewControl_VisibleChanged(object sender, EventArgs e)
 {
     view = Program.Context.ViewToGridManager.reconnect(gridView);
 }
Пример #8
0
 private void Reload_Click(object sender, EventArgs e)
 {
     view = Program.Context.ViewToGridManager.reconnect(gridView);
 }
Пример #9
0
		private void ViewControl_VisibleChanged(object sender, EventArgs e)
		{
			view = Program.Context.ViewToGridManager.reconnect(gridView);
		}
Пример #10
0
 private void Reload_Click(object sender, EventArgs e)
 {
     view = Program.Context.ViewToGridManager.reconnect(gridView);
 }