예제 #1
0
        public override object EditValue(
            System.ComponentModel.ITypeDescriptorContext context,
            System.IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                IWindowsFormsEditorService editorService =
                    provider.GetService(
                        typeof(IWindowsFormsEditorService))
                    as IWindowsFormsEditorService;


                if (editorService != null)
                {
                    Progress ctrl = (Progress)context.Instance;
                    ProgressValueDropDown selectionControl =
                        new ProgressValueDropDown(
                            (int)value, ctrl.Maximum,
                            editorService);

                    editorService.DropDownControl(selectionControl);

                    value = selectionControl.Value;
                }
            }
            return(value);
        }
예제 #2
0
		public override object EditValue(
			System.ComponentModel.ITypeDescriptorContext context,
			System.IServiceProvider provider, object value)
		{

			if (provider != null)
			{
				IWindowsFormsEditorService editorService =
					provider.GetService(
					typeof(IWindowsFormsEditorService))
					as IWindowsFormsEditorService;


				if (editorService != null)
				{
					Progress ctrl = (Progress)context.Instance;
					ProgressValueDropDown selectionControl =
						new ProgressValueDropDown(
						(int)value, ctrl.Maximum,
						editorService);

					editorService.DropDownControl(selectionControl);

					value = selectionControl.Value;
				}
			}
			return value;

		}