// Use this for initialization void Start() { if (SVGFile != null) { Stopwatch w = new Stopwatch(); w.Reset(); w.Start(); ISVGDevice device; if(useFastButBloatedRenderer) device = new SVGDeviceFast(); else device = new SVGDeviceSmall(); m_implement = new Implement(this.SVGFile, device); w.Stop(); long c = w.ElapsedMilliseconds; w.Reset(); w.Start(); m_implement.StartProcess(); w.Stop(); long p = w.ElapsedMilliseconds; w.Reset(); w.Start(); renderer.material.mainTexture = m_implement.GetTexture(); w.Stop(); long r = w.ElapsedMilliseconds; UnityEngine.Debug.Log("Construction: " + Format(c) + ", Processing: " + Format(p) + ", Rendering: " + Format(r)); Vector2 ts = renderer.material.mainTextureScale; ts.x *= -1; renderer.material.mainTextureScale = ts; renderer.material.mainTexture.filterMode = FilterMode.Trilinear; } }
private void Start() { //yield return new WaitForSeconds(0.1f); if (SVGFile != null) { Stopwatch w = new Stopwatch(); w.Reset(); w.Start(); ISVGDevice device; if (fastRenderer) { device = new SVGDeviceFast(); } else { device = new SVGDeviceSmall(); } var implement = new Implement(SVGFile, device); w.Stop(); long c = w.ElapsedMilliseconds; w.Reset(); w.Start(); implement.StartProcess(); w.Stop(); long p = w.ElapsedMilliseconds; w.Reset(); w.Start(); var myRenderer = GetComponent <Renderer>(); var result = implement.GetTexture(); result.wrapMode = wrapMode; result.filterMode = filterMode; result.anisoLevel = anisoLevel; myRenderer.material.mainTexture = result; w.Stop(); long r = w.ElapsedMilliseconds; UnityEngine.Debug.LogFormat("Construction: {0} ms, Processing: {1} ms, Rendering: {2} ms", c, p, r); } }
// Use this for initialization void Start() { if (SVGFile != null) { Stopwatch w = new Stopwatch(); w.Reset(); w.Start(); ISVGDevice device; if (useFastButBloatedRenderer) { device = new SVGDeviceFast(); } else { device = new SVGDeviceSmall(); } m_implement = new Implement(this.SVGFile, device); w.Stop(); long c = w.ElapsedMilliseconds; w.Reset(); w.Start(); m_implement.StartProcess(); w.Stop(); long p = w.ElapsedMilliseconds; w.Reset(); w.Start(); renderer.material.mainTexture = m_implement.GetTexture(); w.Stop(); long r = w.ElapsedMilliseconds; UnityEngine.Debug.Log("Construction: " + Format(c) + ", Processing: " + Format(p) + ", Rendering: " + Format(r)); Vector2 ts = renderer.material.mainTextureScale; ts.x *= -1; renderer.material.mainTextureScale = ts; renderer.material.mainTexture.filterMode = FilterMode.Trilinear; } }
public string groupStr = "";//所有相片的显示字符串 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = Implement.GetAllCategory(); //获取所有类别 int i = 0; for (int x = 0; x < dt.Rows.Count; x++) //遍历每个类别,显示所有图片 { i++; DataRow dr = dt.Rows[x]; DataTable dt2 = Implement.GetCatePic(dr["id"].ToString()); groupStr += "<div><h3 onclick=\"showgroup('group" + i.ToString() + "')\"> " + dr["name"].ToString() + "</h3><ul id=\"group" + i.ToString() + "\">"; //把每个图片都添加到字符串中 for (int y = 0; y < dt2.Rows.Count; y++) { DataRow dr2 = dt2.Rows[y]; groupStr += "<li><a title=\"" + dr2["desc"].ToString() + "\" href=\"" + dr2["url"].ToString() + "\" rel=\"lightbox[" + i + "]\">" + dr2["name"].ToString() + " --上传者: " + dr2["userName"].ToString() + "</a></li>"; } groupStr += "</ul></div>"; } } }
private void Start() { //yield return new WaitForSeconds(0.1f); if(SVGFile != null) { Stopwatch w = new Stopwatch(); w.Reset(); w.Start(); ISVGDevice device; if(fastRenderer) device = new SVGDeviceFast(); else device = new SVGDeviceSmall(); var implement = new Implement(SVGFile, device); w.Stop(); long c = w.ElapsedMilliseconds; w.Reset(); w.Start(); implement.StartProcess(); w.Stop(); long p = w.ElapsedMilliseconds; w.Reset(); w.Start(); var myRenderer = GetComponent<Renderer>(); var result = implement.GetTexture(); result.wrapMode = wrapMode; result.filterMode = filterMode; result.anisoLevel = anisoLevel; myRenderer.material.mainTexture = result; w.Stop(); long r = w.ElapsedMilliseconds; UnityEngine.Debug.LogFormat("Construction: {0} ms, Processing: {1} ms, Rendering: {2} ms", c, p, r); } }
/// <summary> /// 从远程加载数据 /// </summary> /// <param name="define"></param> /// <param name="id"></param> /// <returns></returns> private static DynamicRoot GetRootByRemote(AggregateRootDefine define, object id) { var data = Implement.GetObject(define.RemoteType, id); return((DynamicRoot)define.CreateInstance(data)); }
/// <summary> /// 通知对象已删除 /// </summary> /// <param name="type"></param> /// <param name="id"></param> internal static void NotifyDeleted(RemoteType type, object id) { Implement.NotifyDeleted(type, id, _config.MembershipAddresses); }
public void WhenISearchForItem(String val) { Implement.SearchItem(val); }
public void GivenINavigateToUrl(string url) { DriverInit.Initialize(); Implement.OpenUrl(url); Implement.ImplicitWait(); }
/// <summary> /// 异步调用服务 /// </summary> /// <param name="address"></param> /// <param name="request"></param> /// <returns></returns> internal static Task <ServiceResponse> InvokeAsync(ServiceRequest request, string address) { return(Implement.InvokeAsync(request, address)); }
public void WhenIClickOnLinkUnderCategory(string link) { Implement.SearchItem(link); }
public void GivenIHaveOpenedHomePage(string url) { DriverInit.Initialize(); Implement.OpenUrl(url); Implement.ImplicitWait(); }
/// <summary> /// 调用服务 /// </summary> /// <param name="address"></param> /// <param name="request"></param> /// <returns></returns> internal static ServiceResponse Invoke(ServiceRequest request) { return(Implement.Invoke(request)); }
public void GivenIOpenWebsite(string url) { DriverInit.Initialize(); Implement.OpenUrl(url); Implement.ImplicitWait(); }
/// <summary> /// Implements declared event raisers, property accessors and methods calling the <see cref="Implement"/> callback. /// </summary> protected override void OnImplement() { Implement?.Invoke(this); }
/// <summary> /// 调用服务 /// </summary> /// <param name="address"></param> /// <param name="request"></param> /// <returns></returns> internal static ServiceResponse Invoke(ServiceRequest request, string address) { return(Implement.Invoke(request, address)); }
private void updateButton_Click(object sender, RoutedEventArgs e) { Implement impl = new Implement(); }
//绑定数据源 private void myDataBind() { GridView1.DataSource = Implement.GetAllCategory(); GridView1.DataBind(); }