Пример #1
0
        protected AObjects(bool tmp)
        {
            Color   = new MyColor(0, 0, 0);
            matrixX = new MatrixX(0);
            matrixY = new MatrixY(0);
            matrixZ = new MatrixZ(0);

            if (!tmp)
            {
                Register(true);
            }
        }
Пример #2
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         service = (System.Windows.Forms.Design.IWindowsFormsEditorService)provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));
     }
     if (provider != null)
     {
         MyColor c = (MyColor)value;
         System.Windows.Forms.ColorDialog cd = new System.Windows.Forms.ColorDialog();
         cd.Color = Color.FromArgb(c.GetARGB());
         cd.ShowDialog();
         value = new MyColor(cd.Color.ToArgb());
     }
     return(value);
 }