Ejemplo n.º 1
0
        public static ExtendedEditor CreateEditor(string title)
        {
            var stack = new System.Diagnostics.StackTrace();

            if (stack.FrameCount >= 1)
            {
                var mBase    = stack.GetFrame(1).GetMethod();
                var type     = mBase.DeclaringType;
                var instance = (ExtendedWindow)Activator.CreateInstance(type);
                return(ExtendedEditor.CreateEditor(title, instance));
            }
            else
            {
                throw new Exception("Unable to create editor");
            }
        }