private void BtnStyle_Click(object sender, System.EventArgs e)
        {
            if (this.Headers.SelCount <= 0)
            {
                MessageBox.Show("Please select the cell in the table below");
                return;
            }
            Webb.Utilities.PropertyForm proprtyForm = new Webb.Utilities.PropertyForm();

            HeaderCellStyle headerstyle = new HeaderCellStyle();

            this.Headers.SetInitStyle(headerstyle);

            proprtyForm.BindProperty(headerstyle);

            if (proprtyForm.ShowDialog() == DialogResult.OK)
            {
                this.Headers.UpdateCellStyle(headerstyle);
                this.paintAllCells();
            }
        }
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            object EditValue = value;

            if (value is ChartSummaryInformation)
            {
                EditValue = (value as ChartSummaryInformation).Copy();
            }

            if (value is Views.GroupAdvancedSetting)
            {
                EditValue = (value as Views.GroupAdvancedSetting).Copy();
            }

            if (value is GroupSummary)
            {
                EditValue = (value as GroupSummary).Copy();
            }

            if (value is GradingPostion)
            {
                EditValue = (value as GradingPostion).Copy();
            }

            if (edSvc != null)
            {
                Webb.Utilities.PropertyForm propertyForm = new Webb.Utilities.PropertyForm();

                propertyForm.BindProperty("Object Editor", EditValue);

                if (DialogResult.OK == edSvc.ShowDialog(propertyForm))
                {
                    return(propertyForm.Object);
                }
            }

            return(value);
        }
Beispiel #3
0
        private void EditItem()
        {
            int selectIndex = this.C_LBSelFields.SelectedIndex;

            object value = this.C_LBSelFields.SelectedItem;

            if (selectIndex < 0 || value == null)
            {
                return;
            }

            GradingPostion EditValue = (value as GradingPostion).Copy();

            Webb.Utilities.PropertyForm propertyForm = new Webb.Utilities.PropertyForm();

            propertyForm.BindProperty("Jersey Editor", EditValue);

            if (DialogResult.OK == propertyForm.ShowDialog())
            {
                this.C_LBSelFields.Items[selectIndex] = propertyForm.Object;
            }
        }