Exemple #1
0
        /// <summary>
        /// 输出多行_文化信息.
        /// </summary>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        public static bool outl_static_CultureInfo(IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            Type tp = typeof(CultureInfo);

            if (!iw.Indent(tp))
            {
                return(false);
            }
            iw.WriteLine(string.Format("# <{0}>", tp.FullName));
            IndentedWriterMemberOptions options = IndentedWriterMemberOptions.AllowMethod | IndentedWriterMemberOptions.OnlyStatic;

            IndentedWriterUtil.ForEachMember(iw, null, tp, options, delegate(object sender, IndentedWriterMemberEventArgs e) {
                MethodInfo memberinfo = e.MemberInfo as MethodInfo;
                if (null != memberinfo)
                {
                    //if (!memberinfo.IsSpecialName) {
                    //    e.HasDefault = true;
                    //}
                    string name  = memberinfo.Name;
                    int cntparam = memberinfo.GetParameters().Length;
                    if (false)
                    {
                    }
#if (!NETFX_CORE)
                    else if (IndentedWriterUtil.StringComparer.Equals(name, "GetCultures"))
                    {
                        if (cntparam == 1)
                        {
                            e.IsCancel = true;
                            IndentedWriterUtil.WriteLineValue(iw, e.MemberName, e.Value, e.ValueOptions, e.AppendComment);
                            CultureInfo[] lst = null;
                            iw.Indent(null);
                            try {
                                object[] args = new object[1];
                                args[0]       = CultureTypes.AllCultures;
                                lst           = (CultureInfo[])memberinfo.Invoke(null, args);
                                // 显示短格式.
                                foreach (CultureInfo p in lst)
                                {
                                    int lcid = -1;
                                    iw.Write("{0}:\t", p.Name);
#if (!NETFX_PORTABLE)
                                    lcid = p.LCID;
#endif
                                    if (lcid != -1)
                                    {
                                        iw.Write("0x{0:X}", lcid);
                                    }
                                    iw.WriteLine("\t# {0}, {1}", p.EnglishName, p.NativeName);
                                }
                            }
                            catch {
                                // 忽略.
                            }
                            finally {
                                iw.Unindent();
                            }
                            // 显示详细.
                            if (ShowDetail)
                            {
                                IndentedWriterUtil.WriteLineValue(iw, e.MemberName, e.Value, e.ValueOptions, "Detail");
                                IndentedObjectFunctor.CommonProc(iw, lst, context);
                            }
                        }
                    }
#endif
                }
            }, context);
            iw.Unindent();
            return(true);
        }
Exemple #2
0
        /// <summary>
        /// 输出多行_图像编码信息.
        /// </summary>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        public static bool outl_static_ImageCodecInfo(IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            Type tp = typeof(ImageCodecInfo);

            if (!iw.Indent(tp))
            {
                return(false);
            }
            iw.WriteLine(string.Format("# <{0}>", tp.FullName));
            IndentedWriterMemberOptions options = IndentedWriterMemberOptions.AllowMethod | IndentedWriterMemberOptions.OnlyStatic;

            IndentedWriterUtil.ForEachMember(iw, null, tp, options, delegate(object sender, IndentedWriterMemberEventArgs e) {
                MethodInfo memberinfo = e.MemberInfo as MethodInfo;
                if (null != memberinfo)
                {
                    string name  = memberinfo.Name;
                    int cntparam = memberinfo.GetParameters().Length;
                    if (false)
                    {
                    }
                    else if (IndentedWriterUtil.StringComparer.Equals(name, "GetImageDecoders") ||
                             IndentedWriterUtil.StringComparer.Equals(name, "GetImageEncoders"))
                    {
                        if (cntparam == 0)
                        {
                            try {
                                e.Value = memberinfo.Invoke(null, null);
                                if (null == e.WriteProc)
                                {
                                    e.WriteProc = IndentedObjectFunctor.CommonProc;
                                }
                                e.HasDefault = true;
                            }
                            catch {
                                // 忽略.
                            }
                        }
                    }
                }
            }, context);
            iw.Unindent();
            return(true);
        }
Exemple #3
0
 /// <summary>
 /// 输出多行_主函数_内部.
 /// </summary>
 /// <param name="isfull">显示全部信息.</param>
 /// <param name="iw">带缩进输出者.</param>
 /// <param name="obj">object. Can be null.</param>
 /// <param name="context">State Object. Can be null.</param>
 /// <returns>返回是否成功输出.</returns>
 private static bool outl_main_core(bool isfull, IIndentedWriter iw, object obj, IndentedWriterContext context)
 {
     if (null == iw)
     {
         return(false);
     }
     iw.WriteLine("# zinfodraw");
     if (isfull)
     {
         iw.WriteLine("Brushes:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Brushes), context);
     }
     iw.WriteLine("BufferedGraphicsManager:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(BufferedGraphicsManager), context);
     // Font: 无静态属性. 可用 SystemFonts 枚举 .
     iw.WriteLine("FontFamily:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(FontFamily), context);
     if (isfull)
     {
         iw.WriteLine("Pens:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Pens), context);
         iw.WriteLine("StringFormat:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(StringFormat), context);
         iw.WriteLine("SystemBrushes:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemBrushes), context);
         iw.WriteLine("SystemColors:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemColors), context);
     }
     iw.WriteLine("SystemFonts:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemFonts), context);
     iw.WriteLine("SystemIcons:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemIcons), context);
     if (isfull)
     {
         iw.WriteLine("SystemPens:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemPens), context);
         iw.WriteLine("Color:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Color), context);
     }
     iw.WriteLine("Encoder:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Encoder), context);
     iw.WriteLine("FrameDimension:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(FrameDimension), context);
     iw.WriteLine("ImageCodecInfo:"); outl_static_ImageCodecInfo(iw, null, context);
     iw.WriteLine("ImageFormat:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(ImageFormat), context);
     iw.WriteLine("InstalledFontCollection:"); IndentedObjectFunctor.CommonProc(iw, new InstalledFontCollection(), context);             //IndentedWriterUtil.WriteTypeStatic(iw, typeof(InstalledFontCollection), context);
     return(true);
 }
        /// <summary>
        /// 刷新信息.
        /// </summary>
        private void RefreshInfo()
        {
            string name = cboAssembly.SelectedItem as string;

            if (null == name)
            {
                return;
            }
            // 重新获取程序集.
            if (!name.Equals(m_OldAssemblyName, StringComparison.Ordinal))
            {
                try {
                    m_CurAssembly     = InfoAssembly.LoadAssembly(name);
                    m_OldAssemblyName = name;
                    RefreshModeList();
                }
                catch (Exception ex) {
                    m_OldAssemblyName = null;
                    txtInfo.Text      = ex.ToString();
                }
            }
            if (null == m_CurAssembly)
            {
                return;
            }
            // 计算显示方式.
            InfoMode mode   = 0;
            Type     tp     = null;
            bool     isshow = false;
            object   obj    = cboMode.SelectedItem;

            if (obj is Type)
            {
                tp     = obj as Type;
                isshow = true;
            }
            else if (obj is InfoMode)
            {
                mode   = (InfoMode)obj;
                isshow = true;
            }
            if (!isshow)
            {
                return;
            }
            // 显示信息.
            StringBuilder         sb      = new StringBuilder();
            IIndentedWriter       iw      = new TextIndentedWriter(new StringWriter(sb));
            IndentedWriterContext context = new IndentedWriterContext();

            context.VisitOnce = (bool)chkVisitOnce.IsChecked;
            //this.UseWaitCursor = true;
            this.Cursor = Cursors.Wait;
            //Application.DoEvents();
            try {
                if (null != tp)
                {
                    IndentedWriterMemberOptions options = IndentedWriterMemberOptions.OnlyStatic;
                    if (chkMethod.IsChecked != false)
                    {
                        options |= IndentedWriterMemberOptions.AllowMethod;
                    }
                    InfoAssembly.WriteTypeStatic(iw, context, tp, options);
                }
                else
                {
                    InfoAssembly.WriteInfo(iw, context, m_CurAssembly, mode);
                }
            }
            catch (Exception ex) {
                sb.AppendLine(ex.ToString());
            }
            //this.UseWaitCursor = false;
            this.Cursor  = null;
            txtInfo.Text = sb.ToString();
        }
Exemple #5
0
 /// <summary>
 /// 输出多行_主函数_全部.
 /// </summary>
 /// <param name="iw">带缩进输出者.</param>
 /// <param name="obj">object. Can be null.</param>
 /// <param name="context">State Object. Can be null.</param>
 /// <returns>返回是否成功输出.</returns>
 public static bool outl_main_full(IIndentedWriter iw, object obj, IndentedWriterContext context)
 {
     return(outl_main_core(true, iw, obj, context));
 }
Exemple #6
0
        /// <summary>
        /// 输出多行_主函数_内部.
        /// </summary>
        /// <param name="isfull">显示全部信息.</param>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        private static bool outl_main_core(bool isfull, IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            if (null == context)
            {
                context = new IndentedWriterContext();
            }
            iw.WriteLine("# zinfobase");
#if (!NETFX_CORE && !NETFX_PORTABLE)
            iw.WriteLine("AppDomain:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(AppDomain), context);
            iw.WriteLine("Console:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Console), context);
#endif
            iw.WriteLine("GC:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(GC), context);
            iw.WriteLine("Math:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(Math), context);
#if (!NETFX_CORE && !NETFX_PORTABLE)
            iw.WriteLine("TimeZone:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TimeZone), context);
#endif
#if (DOTNET3A)
            iw.WriteLine("TimeZoneInfo:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TimeZoneInfo), context);
#endif
            iw.WriteLine("Uri:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(Uri), context);
            iw.WriteLine("DateTime:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(DateTime), context);
            iw.WriteLine("DateTimeOffset:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(DateTimeOffset), context);
            iw.WriteLine("TimeSpan:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TimeSpan), context);
            return(true);
        }
Exemple #7
0
 /// <summary>
 /// Output all.
 /// </summary>
 /// <param name="iw">The IIndentedWriter.</param>
 /// <param name="obj">object. Can be null.</param>
 /// <param name="context">State Object. Can be null.</param>
 /// <returns>Returns is ok.</returns>
 public static void OutputAll(IIndentedWriter iw, object obj, IndentedWriterContext context)
 {
     OutputSystem(iw, obj, context);
 }
Exemple #8
0
        /// <summary>
        /// 刷新信息.
        /// </summary>
        private void RefreshInfo()
        {
            if (null == cboAssembly)
            {
                return;
            }
            string name = cboAssembly.SelectedItem as string;

            if (null == name)
            {
                return;
            }
            // 重新获取程序集.
            if (!name.Equals(m_OldAssemblyName, StringComparison.Ordinal))
            {
                try {
                    m_CurAssembly     = InfoAssembly.LoadAssembly(name);
                    m_OldAssemblyName = name;
                    RefreshModeList();
                }
                catch (Exception ex) {
                    m_OldAssemblyName = null;
                    txtInfo.Text      = ex.ToString();
                    return;
                }
            }
            if (null == m_CurAssembly)
            {
                return;
            }
            // 计算显示方式.
            InfoMode mode   = 0;
            Type     tp     = null;
            bool     isshow = false;
            object   obj    = cboMode.SelectedItem;

            if (obj is Type)
            {
                tp     = obj as Type;
                isshow = true;
            }
            else if (obj is InfoMode)
            {
                mode   = (InfoMode)obj;
                isshow = true;
            }
            if (!isshow)
            {
                return;
            }
            // 显示信息.
            StringBuilder         sb      = new StringBuilder();
            IIndentedWriter       iw      = new TextIndentedWriter(new StringWriter(sb));
            IndentedWriterContext context = new IndentedWriterContext();

            context.VisitOnce = (bool)chkVisitOnce.IsChecked;
            //this.UseWaitCursor = true;
            //this.Cursor = Cursors.Wait;
            //Application.DoEvents();
            try {
                // test
                //if (false) {
                //	sb.AppendFormat("{0}:\n", m_CurAssembly.FullName);
                //	//IndentedObjectFunctor.CommonProc(iw, m_CurAssembly, null);
                //	Type tp1 = m_CurAssembly.GetType();
                //	foreach (PropertyInfo pi in tp1.GetRuntimeProperties()) {
                //		if (pi.CanRead && pi.GetIndexParameters().Length <= 0) {
                //			try {
                //				object o = pi.GetValue(m_CurAssembly);
                //				sb.AppendFormat("{0}:\t{1}\n", pi.Name, o);
                //			}
                //			catch (Exception ex) {
                //				sb.AppendFormat("{0}\n", ex);
                //			}
                //		}
                //	}
                //}
                // show
                if (true)
                {
                    if (null != tp)
                    {
                        IndentedWriterMemberOptions options = IndentedWriterMemberOptions.OnlyStatic;
                        if (chkMethod.IsChecked != false)
                        {
                            options |= IndentedWriterMemberOptions.AllowMethod;
                        }
                        InfoAssembly.WriteTypeStatic(iw, context, tp, options);
                    }
                    else
                    {
                        InfoAssembly.WriteInfo(iw, context, m_CurAssembly, mode);
                    }
                }
            }
            catch (Exception ex) {
                sb.AppendLine(ex.ToString());
            }
            //this.UseWaitCursor = false;
            //this.Cursor = null;
            txtInfo.Text = sb.ToString();
        }
Exemple #9
0
        /// <summary>
        /// 输出多行_环境.
        /// </summary>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        public static bool outl_Environment(IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            Type tp = typeof(System.Environment);

            if (!iw.Indent(tp))
            {
                return(false);
            }
            iw.WriteLine(string.Format("# <{0}>", tp.FullName));
            IndentedWriterMemberOptions options = IndentedWriterMemberOptions.AllowMethod | IndentedWriterMemberOptions.OnlyStatic;

            IndentedWriterUtil.ForEachMember(iw, null, tp, options, delegate(object sender, IndentedWriterMemberEventArgs e) {
                // http://msdn.microsoft.com/zh-cn/library/system.environment(v=vs.110).aspx
                MethodInfo memberinfo = e.MemberInfo as MethodInfo;
                if (null != memberinfo)
                {
                    //if (!memberinfo.IsSpecialName) {
                    //    e.HasDefault = true;
                    //}
                    string name  = memberinfo.Name;
                    int cntparam = memberinfo.GetParameters().Length;
                    if (false)
                    {
                    }
#if (!NETFX_CORE)
                    else if (IndentedWriterUtil.StringComparer.Equals(name, "GetFolderPath") && cntparam <= 1)
                    {
                        e.IsCancel = true;
                        IndentedWriterUtil.WriteLineValue(iw, e.MemberName, e.Value, e.ValueOptions, e.AppendComment);
                        object[] args = new object[1];
                        iw.Indent(null);
                        foreach (Environment.SpecialFolder p in TypeUtil.GetEnumValues(typeof(Environment.SpecialFolder)))
                        {
                            iw.Write("{0:d}(0x{0:X}, {0}):\t", p);
                            try {
                                //string s = Environment.GetFolderPath(p);
                                args[0]  = p;
                                string s = (string)memberinfo.Invoke(null, args);
                                iw.Write(s);
                            }
                            catch {
                            }
                            iw.WriteLine();
                        }
                        iw.Unindent();
                    }
#endif
                    else if (IndentedWriterUtil.StringComparer.Equals(name, "GetLogicalDrives"))
                    {
                        try {
                            //string[] arr = Environment.GetLogicalDrives();
                            string[] arr = (string[])memberinfo.Invoke(null, null);
                            e.Value      = string.Join(", ", arr);
                            e.HasDefault = true;
                        }
                        catch {
                            // 忽略.
                        }
                    }
                    else if (IndentedWriterUtil.StringComparer.Equals(name, "GetEnvironmentVariables"))
                    {
                        if (cntparam <= 0)
                        {
                            e.IsCancel = true;
                            IndentedWriterUtil.WriteLineValue(iw, e.MemberName, e.Value, e.ValueOptions, e.AppendComment);
                            iw.Indent(null);
                            try {
                                //IDictionary environmentVariables = Environment.GetEnvironmentVariables();
                                IDictionary environmentVariables = memberinfo.Invoke(null, null) as IDictionary;
                                List <object> lst = new List <object>();
                                foreach (object k in environmentVariables.Keys)
                                {
                                    lst.Add(k);
                                }
                                lst.Sort();
                                foreach (object k in lst)
                                {
                                    iw.WriteLine("{0}:\t{1}", k, environmentVariables[k]);
                                }
                            }
                            catch {
                                // 忽略.
                            }
                            finally {
                                iw.Unindent();
                            }
                        }
                    }
                }
            }, context);
            iw.Unindent();
            return(true);
        }
Exemple #10
0
        /// <summary>
        /// 输出多行_主函数.
        /// </summary>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        public static bool outl_main(IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            Assembly myAssembly;

#if (NETFX_CORE)
            Type     tp = typeof(MyInfo);
            TypeInfo ti = tp.GetTypeInfo();
            myAssembly = ti.Assembly;
#else
            myAssembly = Assembly.GetEntryAssembly();
#endif
            iw.WriteLine("# zinfoenvironment");
            // test.
            //iw.WriteLine("Hello!");
            //for (int i = 0; i < 3; ++i) {
            //    iw.WriteLine(i);
            //    iw.Indent();
            //}
            //iw.IndentLevel = 0;
            //IndentedWriterObjectLnProc lwo = outl_Version;
            //IndentedWriterObjectLnProc[] lwos = new IndentedWriterObjectLnProc[] { lwo };
            //IEnumerable<IndentedWriterObjectLnProc> lwoe = lwos;
            //foreach (IndentedWriterObjectLnProc p in lwoe) {
            //    p(iw, "");
            //}
            //lwo(iw, "");
            //lwo.Invoke(iw, "");
            //decimal? dec = new decimal(1);
            //IndentedWriterUtil.WriteLineValue(iw, "dec", dec, IndentedWriterValueOptions.Default);
            //IndentedObjectFunctor.CommonProc(iw, dec);
            //IndentedWriterUtil.WriteLineValue(iw, "enum", IndentedWriterValueOptions.ExistName, IndentedWriterValueOptions.Default, null);
            //IndentedWriterUtil.WriteLineValue(iw, "char", 'A', IndentedWriterValueOptions.Default, null);
            //IndentedWriterUtil.WriteLineValue(iw, "int", 255, IndentedWriterValueOptions.Default, null);
            //IndentedWriterUtil.WriteLineValue(iw, "string", Environment.NewLine, IndentedWriterValueOptions.Default, null);
            //IndentedWriterUtil.WriteLineValue(iw, "char(2)", '\t', IndentedWriterValueOptions.Default, null);
            //IndentedWriterUtil.WriteLineValue(iw, "string(2)", "\\\'\"", IndentedWriterValueOptions.Default, null);
            //iw.WriteLine(MemberInfoFormat.GetMemberName(typeof(KeyValuePair<int, object>), MemberNameOptions.All));
            //iw.WriteLine(MemberInfoFormat.GetMemberName(typeof(KeyValuePair<int, object>[]), MemberNameOptions.All));
            //iw.WriteLine(MemberInfoFormat.GetMemberName(typeof(List<KeyValuePair<int, object>>), MemberNameOptions.All));
            //IndentedObjectFunctor.CommonProc(iw, TypeUtil.GetEnumValues(typeof(Environment.SpecialFolder)) ,null);
            Dictionary <string, object> dict = new Dictionary <string, object>();
            dict.Add("a", "abc");
            dict.Add("b", "base");
            dict.Add("ver", myAssembly.GetName().Version);
            iw.WriteLine("Test Dictionary:");
            IndentedObjectFunctor.CommonProc(iw, dict, context);
            // show.
            iw.WriteLine("IntPtr:");
            outl_static_IntPtr(iw, null, context);
            iw.WriteLine("Environment:");
            //IndentedObjectFunctor.CommonProc(iw, Environment.OSVersion, context);
            outl_Environment(iw, null, context);
            //iw.WriteLine("Application Assembly:");
            //IndentedObjectFunctor.CommonProc(iw, myAssembly, context);
            iw.WriteLine("Application AssemblyName:");
            IndentedObjectFunctor.CommonProc(iw, myAssembly.GetName(), context);
            return(true);
        }
Exemple #11
0
        /// <summary>
        /// 输出多行_主函数_内部.
        /// </summary>
        /// <param name="isfull">显示全部信息.</param>
        /// <param name="iw">带缩进输出者.</param>
        /// <param name="obj">object. Can be null.</param>
        /// <param name="context">State Object. Can be null.</param>
        /// <returns>返回是否成功输出.</returns>
        private static bool outl_main_core(bool isfull, IIndentedWriter iw, object obj, IndentedWriterContext context)
        {
            if (null == iw)
            {
                return(false);
            }
            ASM_DISPLAY_FLAGS flags = isfull ? ASM_DISPLAY_FLAGS.ASM_DISPLAYF_FULL : ASM_DISPLAY_FLAGS.ASM_DISPLAYF_RETARGET;

            //flags = ASM_DISPLAY_FLAGS.ASM_DISPLAYF_FULL;
            iw.WriteLine("# zinfoassemblylist");
            foreach (string str in GacUtil.GacGetAssemblyNameList(flags, GacGetListOptions.AutoSort | GacGetListOptions.Fallback))
            {
                iw.WriteLine(str);
            }
            return(true);
        }
Exemple #12
0
 /// <summary>
 /// 输出多行_主函数_内部.
 /// </summary>
 /// <param name="isfull">显示全部信息.</param>
 /// <param name="iw">带缩进输出者.</param>
 /// <param name="obj">object. Can be null.</param>
 /// <param name="context">State Object. Can be null.</param>
 /// <returns>返回是否成功输出.</returns>
 private static bool outl_main_core(bool isfull, IIndentedWriter iw, object obj, IndentedWriterContext context)
 {
     if (null == iw)
     {
         return(false);
     }
     if (null == context)
     {
         context = new IndentedWriterContext();
     }
     if (null == context.Procs)
     {
         List <IndentedWriterObjectProc> lst = new List <IndentedWriterObjectProc>();
         lst.Add((new IndentedObjectFunctor(typeof(Form), IndentedObjectFunctorOptions.NotWrite)).WriterObject);
         context.Procs = lst;
     }
     iw.WriteLine("# zinfowinform");
     iw.WriteLine("Application:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Application), context);
     iw.WriteLine("ButtonRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(ButtonRenderer), context);
     iw.WriteLine("CheckBoxRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(CheckBoxRenderer), context);
     iw.WriteLine("Clipboard:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(Clipboard), context);
     iw.WriteLine("ComboBoxRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(ComboBoxRenderer), context);
     iw.WriteLine("ControlPaint:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(ControlPaint), context);
     iw.WriteLine("Cursor:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Cursor), context);
     iw.WriteLine("Cursors:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Cursors), context);
     iw.WriteLine("DataFormats:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(DataFormats), context);
     // FeatureSupport: 见 OSFeature.
     iw.WriteLine("GroupBoxRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(GroupBoxRenderer), context);
     iw.WriteLine("InputLanguage:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(InputLanguage), context);
     iw.WriteLine("OSFeature:"); outl_static_OSFeature(iw, null, context);
     iw.WriteLine("ProfessionalColors:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(ProfessionalColors), context);
     iw.WriteLine("ProgressBarRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(ProgressBarRenderer), context);
     iw.WriteLine("RadioButtonRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(RadioButtonRenderer), context);
     iw.WriteLine("Screen:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(Screen), context);
     iw.WriteLine("ScrollBarRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(ScrollBarRenderer), context);
     iw.WriteLine("SystemInformation:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(SystemInformation), context);
     iw.WriteLine("TabRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TabRenderer), context);
     iw.WriteLine("TextBoxRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TextBoxRenderer), context);
     iw.WriteLine("TrackBarRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(TrackBarRenderer), context);
     iw.WriteLine("VisualStyleInformation:"); IndentedWriterUtil.WriteTypeStatic(iw, typeof(VisualStyleInformation), context);
     iw.WriteLine("VisualStyleRenderer:"); IndentedWriterUtil.WriteTypeStaticM(iw, typeof(VisualStyleRenderer), context);
     // TextRenderer: 无信息成员.
     return(true);
 }