コード例 #1
0
ファイル: Db2srcDataSet.UI.cs プロジェクト: calc33/PgTools
 public TreeNode(SchemaObject target)
 {
     Name           = target.DisplayName;
     StyleIndex     = 0;
     Hint           = target.CommentText;
     IsGrouped      = false;
     IsHidden       = false;
     ShowChildCount = false;
     TargetType     = target.GetType();
     Target         = target;
 }
コード例 #2
0
        public static ISchemaObjectWpfControl NewControl(SchemaObject target, TabControl parent)
        {
            Type t;

            if (!_schemaObjectToControl.TryGetValue(target.GetType(), out t))
            {
                return(null);
            }
            ISchemaObjectWpfControl ret = t.GetConstructor(new Type[0]).Invoke(null) as ISchemaObjectWpfControl;

            if (ret == null)
            {
                return(null);
            }
            ret.Target     = target;
            target.Control = ret;
            return(ret);
        }