Пример #1
0
 /* Returns instance of QPage */
 public static QPage getInstance(bool init = false)
 {
     if (_instance == null || init)
     {
         _instance = new QPage();
     }
     return(_instance);
 }
Пример #2
0
        public static object convert(object data, string fromFormat, string toFormat, string toType, Dict args)
        {
            Type myType = QPage.getInstance().loadConverter(fromFormat, toFormat, toType);

            try {
                MethodInfo method = myType.GetMethod("convert");
                if (method == null)
                {
                    throw new Exception("Function convert not found in converter " + fromFormat);
                }
                var myInstance = Activator.CreateInstance(myType);
                return(method.Invoke(myInstance, new object[] { data, args }));
            } catch (Exception ex) {
                return("Exception: " + ex.InnerException.Message + " at " + ex.InnerException.Source + "\n" + String.Join("\n", ex.InnerException.StackTrace));
            }
        }
Пример #3
0
 /** Class Constructor */
 public QModule(QPage page)
 {
     this._page  = page;
     this._ds    = this.page().ds();
     this._stage = this.page().stage();
 }
Пример #4
0
 public Component(string name, string heading)
 {
     this._page    = QPage.getInstance();
     this._name    = name;
     this._heading = heading;
 }
Пример #5
0
 public Component(string name)
 {
     this._page = QPage.getInstance();
     this._name = name;
 }
Пример #6
0
 public Component()
 {
     this._page = QPage.getInstance();
 }
Пример #7
0
 public object convert(string toType)
 {
     return(convert(QPage.getInstance().outputFormat(), toType, "", new Dict()));
 }
Пример #8
0
		public void page(QPage page)
		{
			if (_page != null) throw new Exception("Error: page is already set in \"" + this.GetType() + "\" DataStore");
			_page = page;
		}