zoukankan      html  css  js  c++  java
  • DateChooser源码RevealTransitionEditor.cs

    using System;
    using System.ComponentModel;
    using System.Design;
    using System.Drawing;
    using System.Drawing.Design;
    using System.Windows.Forms;
    using System.Windows.Forms.Design;

    namespace CNBlogs.DCT.THIN.Design
    {
     /// <summary>
     /// RevealTransitionEditor 的摘要说明。 
     /// </summary>
     public class RevealTransitionEditor:UITypeEditor
     {
      public RevealTransitionEditor()
      {
       
      }
      public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
      {
       if (provider != null)
       {
        IWindowsFormsEditorService service1 = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService));
        if (service1 == null)
        {
         return value;
        }
        if (this.tranUI == null)
        {
         this.tranUI = new RevealTransitionUI();
        }
        this.tranUI.Start(service1, value);
        service1.DropDownControl(this.tranUI);
        value = this.tranUI.Value;
        this.tranUI.End();
       }
       return value;
      }

      public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
      {
       return UITypeEditorEditStyle.DropDown;
      }


      // Fields
      private RevealTransitionUI tranUI;


      
      
     }
    }

  • 相关阅读:
    this指针是什么?
    C++多态实现原理
    面试题2:实现Singleton模式
    面试题1:赋值运算符函数
    1.Two Sum
    朴素贝叶斯
    K近邻法
    感知机
    数据类型、用户交互、赋值运算
    蓝牙技术概述
  • 原文地址:https://www.cnblogs.com/think/p/170132.html
Copyright © 2011-2022 走看看