public void ProcessRequest(HttpContext context) { var path = context.Request.QueryString["p"]; if (string.IsNullOrEmpty(path)) { context.Response.Write("Please provide a valid path."); return; } var loader = new ComponentLoader(); var basePath = ConfigurationManager.AppSettings["flexigin:basePath"] ?? "~/"; basePath = context.Server.MapPath(basePath); var component = loader.GetComponent(basePath, path); context.Response.StatusCode = (int) component.StatusCode; context.Response.ContentType = component.ContentType; #if DEBUG context.Response.Cache.SetCacheability(HttpCacheability.NoCache); #else var cacheMinutes = Convert.ToInt16(ConfigurationManager.AppSettings["flexigin:cacheMinutes"]); context.Response.Cache.SetCacheability(HttpCacheability.Public); context.Response.Cache.SetExpires(DateTime.Now.AddMinutes(cacheMinutes)); context.Response.Cache.SetMaxAge(new TimeSpan(0, cacheMinutes, 0)); #endif context.Response.Write(component.Content); }
public static void RegisterTypes(IUnityContainer container) { //Component initialization via MEF ComponentLoader.LoadContainer(container, ".\\bin", "Servicio.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "BusinessServices.dll"); }
public string UserControl() { return(ComponentLoader.ToConfig("~/Examples/Loaders/_Shared/Items.ascx")); }
public static ComponentLoader GetInstance() { if (instance != null) { return(instance); } instance = new ComponentLoader(); instance.path = Path.Combine("Assets", "Resources"); instance.path = Path.Combine(instance.path, "SpellInfo"); instance.StartingSpellComponents = new UnLoadedSpellComponent[] { new UnLoadedSpellComponent("Paper", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Bamboo", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Basic", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("LeftHook", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("RightHook", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Boomerang", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Slipping Snake", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("AlphaStar", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("TwinBat", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Bomb", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("English", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("SootExtract", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Gold", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Insect", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("VampireBlood", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Ghastlish", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("GlurpleTongue", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Gnomish", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Hentch", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Vampiric", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Shadowskript", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Earth", SpellComponent.SubSpellComponentType.Ink) }; instance.UnlockableSpellComponents = new UnLoadedSpellComponent[] { new UnLoadedSpellComponent("Silk", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Papyrus", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Linen", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Silk", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Cotton", SpellComponent.SubSpellComponentType.Paper), new UnLoadedSpellComponent("Boomerang", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("LeftHook", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("RightHook", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("FrontBack", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("TwinBat", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Tortoise", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("AlphaStar", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Slipping Snake", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Basic", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Spore Burst", SpellComponent.SubSpellComponentType.Rune), new UnLoadedSpellComponent("Ghastlish", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("GlurpleTongue", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Gnomish", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Hentch", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Vampiric", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("Shadowskript", SpellComponent.SubSpellComponentType.language), new UnLoadedSpellComponent("FireWeedSap", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Slit-Faced Serum", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Spore Oil", SpellComponent.SubSpellComponentType.Ink), new UnLoadedSpellComponent("Moon Lace", SpellComponent.SubSpellComponentType.Ink) }; //SpellRune rune = new SpellRune(); //rune.toolTip = "Cast from mouse position shooting violent violents in all directions!"; //rune.title = "Bomb"; //rune.pattern = "BlowFishPattern"; //rune.damageMod = 1; //rune.cost = 3; //rune.thrown = true; //rune.subType = SpellComponent.SubSpellComponentType.Rune; //string jsonString = JsonUtility.ToJson(rune); //File.WriteAllText("Assets/Resources/Bomb.json", jsonString); return(instance); /* * Ink ink = new Ink(); * ink.cost = 1; * ink.toolTip = "tip"; * ink.title = "title"; * ink.color = Color.red; * ink.priority = 1; * ink.moveSpeed = 1; * ink.damageMod = 1; * ink.onHitEffectName = "fire"; * * string jsonString = JsonUtility.ToJson(ink); * File.WriteAllText("Assets/Resources/pageink23.json", jsonString); * * string second = File.ReadAllText("Assets/Resources/SpellInfo/Ink/FireWeedSap.json"); * Debug.Log(second); * Ink i = JsonUtility.FromJson<Ink>(second); * string myString = JsonUtility.ToJson(second); * //Debug.Log(page2.GetToolTip()); * Debug.Log(myString); */ }
public static string GetGrid(Dictionary <string, string> parameters) { string strCon = System.Configuration.ConfigurationManager.ConnectionStrings["SIA_ConnectionString"].ConnectionString; string JsonRecord = parameters["id"]; Dictionary <string, string>[] GridData = JSON.Deserialize <Dictionary <string, string>[]>(JsonRecord); string asignado; asignado = GridData[0]["asignado"]; string sql_detalle = ""; sql_detalle += " Select us.nombre,wf.correlativo,wf.plan_,wf.asegurado,wf.cantidadsolicitudes,CONVERT(date,wf.ingresado,101) ingresado,wf.estado, "; sql_detalle += " DATEDIFF(DAY,convert(date,ingresado,101),convert(date,getdate(),101)) dias "; sql_detalle += " from wf_seguimiento_95 wf "; sql_detalle += " inner join dbo.Usuarios us on us.usuario=wf.asignado "; sql_detalle += " where wf.cod_area in ('02','03') and wf.asignado=@asignado "; SqlConnection con = new SqlConnection(strCon); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.Text; cmd.CommandTimeout = 36000; cmd.CommandText = sql_detalle; cmd.Parameters.AddWithValue("@asignado", asignado); cmd.Connection = con; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = cmd; DataTable datatable = new DataTable(); da.Fill(datatable); con.Close(); GridPanel grid = new GridPanel { Layout = "FitLayout", RowLines = true, EnableColumnHide = false, Store = { new Store { Model = { new Model { Fields = { new ModelField("nombre"), new ModelField("correlativo"), new ModelField("plan_"), new ModelField("asegurado"), new ModelField("cantidadsolicitudes"), new ModelField("ingresado"), new ModelField("estado"), new ModelField("dias"), } } }, DataSource = datatable } }, ColumnModel = { Columns = { new Column { Text = "Nombre", DataIndex = "nombre", Width = 180 }, new Column { Text = "Referencia", DataIndex = "correlativo", Width = 100 }, new Column { Text = "Plan", DataIndex = "plan_", Width = 100 }, new Column { Text = "Asegurado", DataIndex = "asegurado", Width = 100 }, new Column { Text = "Cant. Solicitudes", DataIndex = "cantidadsolicitudes", Width = 100 }, new Column { Text = "Fecha de Ingreso.", DataIndex = "ingresado", Width = 100 }, new Column { Text = "Tarea", DataIndex = "estado", Width = 300 }, new Column { Text = "Indicador en Dias", DataIndex = "dias", Width = 150 }, } }, }; return(ComponentLoader.ToConfig(grid)); }
//通过加载如下两个程序集来注册其类型到Unity容器中 public static void RegisterTypes(IUnityContainer container) { ComponentLoader.LoadContainer(container, ".\\bin", "WebAPiFllowUp.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "AppicationServices.dll"); }
public static void RegisterTypes(IUnityContainer container) { //Component initialization via MEF ComponentLoader.LoadContainer(container, ".\\bin", "APIs.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "DataModel.dll"); }
void LangChanged(string language) { Language lang = ComponentLoader.GetInstance().LoadComponent(new ComponentLoader.UnLoadedSpellComponent(language, SpellComponent.SubSpellComponentType.language)) as Language; projSpellBookBuilder.lang = lang; }
public static string GetGrid(Dictionary <string, string> parameters) { string strCon = System.Configuration.ConfigurationManager.ConnectionStrings["SIA_ConnectionString"].ConnectionString; string JsonRecord = parameters["id"]; Dictionary <string, string>[] GridData = JSON.Deserialize <Dictionary <string, string>[]>(JsonRecord); string correlativo; correlativo = GridData[0]["correlativo"]; string sql_detalle = ""; sql_detalle += " SELECT det.correlativo,det.cod_area,det.req_cod,det.req_nombre,det.descripcion "; sql_detalle += " FROM dbo.wf_seguimiento_95 AS re "; sql_detalle += " INNER JOIN dbo.check_list_detalle_recpcion AS det ON det.correlativo = @correlativo "; sql_detalle += " Where re.correlativo = det.correlativo "; SqlConnection con = new SqlConnection(strCon); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.Text; cmd.CommandTimeout = 36000; cmd.CommandText = sql_detalle; cmd.Parameters.AddWithValue("@correlativo", correlativo); cmd.Connection = con; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = cmd; DataTable datatable = new DataTable(); da.Fill(datatable); con.Close(); GridPanel grid = new GridPanel { Layout = "FitLayout", RowLines = true, EnableColumnHide = false, Store = { new Store { Model = { new Model { Fields = { new ModelField("correlativo"), new ModelField("cod_area"), new ModelField("req_cod"), new ModelField("req_nombre"), new ModelField("descripcion"), } } }, DataSource = datatable } }, ColumnModel = { Columns = { new Column { Text = "correlativo", DataIndex = "correlativo", Width = 100 }, new Column { Text = "cod_area", DataIndex = "cod_area", Width = 100 }, new Column { Text = "req. Cod.", DataIndex = "req_cod", Width = 100 }, new Column { Text = "Req. Nombre", DataIndex = "req_nombre", Width = 300 }, new Column { Text = "descripcion", DataIndex = "descripcion", Width = 300 }, } }, Listeners = { //ItemDblClick = { Handler = "Ext.net.Notification.show({iconCls : 'icon-information',pinEvent :'click',title:record.data.descripcion});" } ItemDblClick = { Handler = "#{Panel2}.getLoader().load({url: 'imagen.aspx'});" } //ItemDblClick = {Handler = "var url_descrip = record.data.descripcion; #{Panel2}.getLoader().load({url: url_descrip });"} //ItemDblClick = { Handler = "Ext.net.Notification.show({iconCls : 'icon-information',pinEvent :'click',title:record.data.descripcion});" } //ItemDblClick = { Handler = "#{Panel2}.{Toolbar1}.{Panel1}.getLoader().Url = '../files/PROPUESTA.PDF'" } //ItemDblClick = { Handler = "Ext.net.Notification.show({iconCls : 'icon-information',pinEvent :'click',title:record.data.descripcion});" } //ItemDblClick = { Handler = "#{Ext:Panel#Panel2}.{Topbar}.{Ext:Toolbar#Toolbar1}.{Items}.{Ext:Panel#Panel1}.{Ext:Loader#Loader3}.Url = '../files/PROPUESTA.PDF');" } //ItemDblClick = { Handler = "#{Panel2}.{Topbar}.{Toolbar1}.{Items}.{Panel1}.{Loader3}.Url:record.data.descripcion);" } //ItemDblClick = { Handler = "#{WindowVisualizador}.getLoader().url = '../files/318i TwinPower Turbo Luxury (1).pdf')" } //ItemDblClick = { Handler = "#{Loader3}.show('Url=../files/318i TwinPower Turbo Luxury (1).pdf')" }, //ItemDblClick = { Handler = "record.data.descripcion" }, } }; return(ComponentLoader.ToConfig(grid)); }
public static void RegisterTypes(IUnityContainer container) { ComponentLoader.LoadContainer(container, ".\\bin", "WebApi.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "Prod.Services.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "Prod.DAL.dll"); }
public static void RegisterTypes(IUnityContainer container) { //Component initialization via MEF ComponentLoader.LoadContainer(container, ".\\bin", "NawafizApp.WebApi.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "NawafizApp.Services.dll"); }
public static void RegisterTypes(IUnityContainer container) { ComponentLoader.LoadContainer(container, ".\\bin", "UserProfileMgmtService.dll"); ComponentLoader.LoadContainer(container, ".\\bin", "UserProfileMgmtBusinessServices.dll"); }
void InkChanged(string grid) { Ink ink = ComponentLoader.GetInstance().LoadComponent(new ComponentLoader.UnLoadedSpellComponent(grid, SpellComponent.SubSpellComponentType.Ink)) as Ink; uiStuff.spellGrid.SetInk(ink); }
void PageChanged(string paper) { SpellPage page = ComponentLoader.GetInstance().LoadComponent(new ComponentLoader.UnLoadedSpellComponent(paper, SpellComponent.SubSpellComponentType.Paper)) as SpellPage; projSpellBookBuilder.page = page; }
public static void RegisterTypes(IUnityContainer container) { ComponentLoader.LoadContainer(container, ".\\bin", "R.BAL.dll"); }
public bool LoadComponent(string filePath) { _filePath = filePath; if (DesignMode) { return(false); } try { // initialize control pluginViewCtrl.PluginPath = filePath; // load component Pic.Plugin.Component component = null; using (ComponentLoader loader = new ComponentLoader()) { loader.SearchMethod = new ComponentSearchMethodDB(); component = loader.LoadComponent(filePath); } if (null == component) { return(false); } _componentGuid = component.Guid; // get parameters ParameterStack stack = null; stack = component.BuildParameterStack(null); // fill name/description if empty ComponentName = component.Name; ComponentDescription = component.Description; // build dict of double parameters ParamDefaultValues.Clear(); foreach (Parameter param in stack.ParameterList) { ParameterDouble paramDouble = param as ParameterDouble; if (null != paramDouble) { ParamDefaultValues[paramDouble.Name] = paramDouble.ValueDefault; } } // insert majoration label and textbox controls const int lblX = 16, lblY = 51; const int offsetX = 100, offsetY = 29; const int lbSizeX = 34, lbSizeY = 14; int tabIndex = comboBoxProfile.TabIndex; groupBoxMajorations.Controls.Clear(); bool hasMajorations = stack.HasMajorations; if (hasMajorations) { // add combo box / label again groupBoxMajorations.Controls.Add(lblProfile); groupBoxMajorations.Controls.Add(comboBoxProfile); int iCount = 0; foreach (Parameter param in stack) { if (!param.IsMajoration) { continue; } // label Label lbl = new Label(); lbl.Name = string.Format("lbl_{0}", param.Name); lbl.Text = param.Name; lbl.Location = new Point( lblX + (iCount / 4) * offsetX , lblY + (iCount % 4) * offsetY); lbl.Size = new Size(lbSizeX, lbSizeY); lbl.TabIndex = ++tabIndex; groupBoxMajorations.Controls.Add(lbl); // text box TextBox tb = new TextBox(); tb.Name = string.Format("tb_{0}", param.Name); tb.Text = string.Format("{0:0.##}", stack.GetDoubleParameterValue(param.Name)); tb.Location = new Point( lblX + (iCount / 4) * offsetX + lbl.Size.Width + 1 , lblY + (iCount % 4) * offsetY); tb.Size = new Size(50, 20); tb.TabIndex = ++tabIndex; groupBoxMajorations.Controls.Add(tb); // increment count ++iCount; } } groupBoxMajorations.Visible = hasMajorations; return(true); } catch (Exception ex) { _log.Error(ex.ToString()); return(false); } }
public static void RegisterTypes(IUnityContainer container) { ComponentLoader.LoadContainer(container, ".\\bin", "HoneyComb*.dll"); //ComponentLoader.LoadContainer(container, ".\\bin", "StatsSA.SystemArchitecture.Provider.dll"); //ComponentLoader.LoadContainer(container, ".\\bin", "StatsSA.SystemArchitecture.Manager.dll"); }