コード例 #1
0
ファイル: PlanList.cs プロジェクト: swanestle/iXY
        private void tsbDetail_Click(object sender, EventArgs e)
        {
            if (container.BindingSource.Current == null)
            {
                MessageBox.Show("please choose one.");
                return;
            }

            PlanHeader header = (PlanHeader)container.BindingSource.Current;

            PlanEntry entry = new PlanEntry(container.UnityContainer, Common.UIState.ReadOnly, header.Id);

            entry.StartPosition = FormStartPosition.CenterParent;

            DialogResult result = entry.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                //container.BindingSource
                //BindingSource.EndEdit();
            }
            else
            {
                //BindingSource.CancelEdit();
            }

            entry.Close();
        }
コード例 #2
0
ファイル: PlanList.cs プロジェクト: swanestle/iXY
        private void tsbAdd_Click(object sender, EventArgs e)
        {
            PlanContainer planContainer = new PlanContainer(this.container.UnityContainer, UIState.New, new Plan());
            PlanEntry listForm = new PlanEntry(planContainer);
            listForm.ShowDialog(this);

            ICollection collection = container.BindingSource;

            //container.BindingSource.Add();
        }