| SunnyUI.Demo/App.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Bin/CommonHelper.dll | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Bin/SunnyUI.Demo.exe | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Bin/SunnyUI.Demo.exe.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/DomesticPolicyData.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/DomesticPolicyData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/ForeignPolicyData.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/ForeignPolicyData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/LoaderForm.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/SemiconductorProductionData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/Controls/SemiconductorSalesData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/FMain.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SunnyUI.Demo/FMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
SunnyUI.Demo/App.config
@@ -2,8 +2,10 @@ <configuration> <appSettings> <add key="TushareToken" value="bf0a8329bb8e6014e750ea8f37995bf8f2b81e73f1f7c507ae87b147" /> <add key="URL" value="http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?pageIndex" /> </appSettings> <connectionStrings> <!-- 用于指数数据 --> <add name="connStrDCT" connectionString="Data Source=106.55.47.126,1433;Initial Catalog=JRMonitorDB;Integrated Security=False;User ID=sa;Password=12345sa!@#$" providerName="System.Data.SqlClient" /> <!-- 用于所有数据 --> SunnyUI.Demo/Bin/CommonHelper.dllBinary files differ
SunnyUI.Demo/Bin/SunnyUI.Demo.exeBinary files differ
SunnyUI.Demo/Bin/SunnyUI.Demo.exe.config
@@ -2,8 +2,10 @@ <configuration> <appSettings> <add key="TushareToken" value="bf0a8329bb8e6014e750ea8f37995bf8f2b81e73f1f7c507ae87b147" /> <add key="URL" value="http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?pageIndex" /> </appSettings> <connectionStrings> <!-- 用于指数数据 --> <add name="connStrDCT" connectionString="Data Source=106.55.47.126,1433;Initial Catalog=JRMonitorDB;Integrated Security=False;User ID=sa;Password=12345sa!@#$" providerName="System.Data.SqlClient" /> <!-- 用于所有数据 --> SunnyUI.Demo/Controls/DomesticPolicyData.Designer.cs
@@ -52,6 +52,7 @@ this.uiButton1.TabIndex = 31; this.uiButton1.Text = "清空"; this.uiButton1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click); // // btnIndustryIndex // SunnyUI.Demo/Controls/DomesticPolicyData.cs
@@ -15,13 +15,15 @@ using System.Collections; using SqlSugar; using Newtonsoft.Json.Converters; using System.Configuration; namespace Sunny.UI.Demo.Controls { public partial class DomesticPolicyData : UIPage { private Hashtable ht = new Hashtable(); //接口路径 string URL = ConfigurationManager.AppSettings["URL"].ToString(); /// <summary> /// 表格标题重命名 /// </summary> @@ -38,7 +40,7 @@ InitializeComponent(); //string url = "http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?PageIndex=1&PageSize=1"; JObject item = (JObject)GetChinaStockList(1, 1, "http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?PageIndex=1&PageSize=1"); JObject item = (JObject)GetChinaStockList(1, 1, URL + 1 + "&PageSize=" + 1); var items = item["data"]["totalItems"]; uiPagination1.TotalCount = items.Value<int>(); uiPagination1.PageSize = 5; @@ -153,7 +155,7 @@ public void GetdgViewIndustryIndex(int PageIndex, int PageSize) { string url = "http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?pageIndex=" + PageIndex + "&PageSize=" + PageSize; string url = URL + PageIndex + "&PageSize=" + PageSize; JObject item = (JObject)GetChinaStockList(PageIndex, PageSize, url); if (item["data"]["items"] != null) { @@ -165,6 +167,20 @@ if (colName == "id") { dgViewIndustryIndex.Columns[i].Visible = false; } for (int j = 0; j < dgViewIndustryIndex.Rows.Count - 1; j++) { //string colName = dgViewCompanyIn.Columns[13].Name; if (colName == "introduction" || colName == "email" || colName == "office" || colName == "main_business" || colName == "business_scope_show") { string introduction = dgViewIndustryIndex.Rows[j].Cells[i].Value.ToString(); if (introduction.Length > 25) { dgViewIndustryIndex.Rows[j].Cells[i].Value = introduction.Substring(0, 25) + "..."; dgViewIndustryIndex.Rows[j].Cells[i].ToolTipText = introduction; } } } dgViewIndustryIndex.Columns[i].HeaderText = GetDgvColumName(colName); } @@ -204,7 +220,7 @@ dgViewIndustryIndex.DataSource = null; for (int i = 1; i <= uiPagination1.TotalCount; i++) { string url = "http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?pageIndex=" + i + "&PageSize=" + 1; string url = URL + i + "&PageSize=" + 1; JObject item = (JObject)GetChinaStockList(i, 1, url); if (item["data"]["items"] != null) { @@ -239,5 +255,10 @@ MessageBox.Show("没有查询到匹配数据!"); } } private void uiButton1_Click(object sender, EventArgs e) { this.txtIndustryIndex.Text = ""; } } } SunnyUI.Demo/Controls/ForeignPolicyData.Designer.cs
@@ -28,23 +28,160 @@ /// </summary> private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.uiPagination1 = new Sunny.UI.UIPagination(); this.uiButton1 = new Sunny.UI.UIButton(); this.btnIndustryIndex = new Sunny.UI.UIButton(); this.txtIndustryIndex = new Sunny.UI.UITextBox(); this.dgViewIndustryIndex = new Sunny.UI.UIDataGridView(); ((System.ComponentModel.ISupportInitialize)(this.dgViewIndustryIndex)).BeginInit(); this.SuspendLayout(); // // uiPagination1 // this.uiPagination1.AutoSize = true; this.uiPagination1.Dock = System.Windows.Forms.DockStyle.Bottom; this.uiPagination1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiPagination1.Location = new System.Drawing.Point(0, 484); this.uiPagination1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiPagination1.MinimumSize = new System.Drawing.Size(1, 1); this.uiPagination1.Name = "uiPagination1"; this.uiPagination1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; this.uiPagination1.ShowText = false; this.uiPagination1.Size = new System.Drawing.Size(879, 37); this.uiPagination1.TabIndex = 37; this.uiPagination1.Text = "uiPagination1"; this.uiPagination1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; // // uiButton1 // this.uiButton1.Cursor = System.Windows.Forms.Cursors.Hand; this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiButton1.Location = new System.Drawing.Point(315, 44); this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1); this.uiButton1.Name = "uiButton1"; this.uiButton1.Size = new System.Drawing.Size(100, 35); this.uiButton1.TabIndex = 36; this.uiButton1.Text = "清空"; this.uiButton1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click); // // btnIndustryIndex // this.btnIndustryIndex.Cursor = System.Windows.Forms.Cursors.Hand; this.btnIndustryIndex.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnIndustryIndex.Location = new System.Drawing.Point(198, 44); this.btnIndustryIndex.MinimumSize = new System.Drawing.Size(1, 1); this.btnIndustryIndex.Name = "btnIndustryIndex"; this.btnIndustryIndex.Size = new System.Drawing.Size(100, 35); this.btnIndustryIndex.TabIndex = 35; this.btnIndustryIndex.Text = "查询"; this.btnIndustryIndex.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnIndustryIndex.Click += new System.EventHandler(this.btnIndustryIndex_Click_1); // // txtIndustryIndex // this.txtIndustryIndex.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtIndustryIndex.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtIndustryIndex.Location = new System.Drawing.Point(12, 45); this.txtIndustryIndex.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtIndustryIndex.MinimumSize = new System.Drawing.Size(1, 16); this.txtIndustryIndex.Name = "txtIndustryIndex"; this.txtIndustryIndex.ShowText = false; this.txtIndustryIndex.Size = new System.Drawing.Size(179, 34); this.txtIndustryIndex.TabIndex = 34; this.txtIndustryIndex.TagString = ""; this.txtIndustryIndex.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; this.txtIndustryIndex.Watermark = "请输入关键字"; // // dgViewIndustryIndex // dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); this.dgViewIndustryIndex.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgViewIndustryIndex.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dgViewIndustryIndex.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; this.dgViewIndustryIndex.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); this.dgViewIndustryIndex.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dgViewIndustryIndex.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgViewIndustryIndex.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dgViewIndustryIndex.DefaultCellStyle = dataGridViewCellStyle3; this.dgViewIndustryIndex.EnableHeadersVisualStyles = false; this.dgViewIndustryIndex.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dgViewIndustryIndex.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255))))); this.dgViewIndustryIndex.Location = new System.Drawing.Point(12, 89); this.dgViewIndustryIndex.MultiSelect = false; this.dgViewIndustryIndex.Name = "dgViewIndustryIndex"; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dgViewIndustryIndex.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgViewIndustryIndex.RowHeight = 27; dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9.6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dgViewIndustryIndex.RowsDefaultCellStyle = dataGridViewCellStyle5; this.dgViewIndustryIndex.RowTemplate.Height = 27; this.dgViewIndustryIndex.SelectedIndex = -1; this.dgViewIndustryIndex.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgViewIndustryIndex.ShowGridLine = true; this.dgViewIndustryIndex.Size = new System.Drawing.Size(849, 387); this.dgViewIndustryIndex.TabIndex = 33; // // ForeignPolicyData // this.AllowShowTitle = true; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(879, 521); this.Controls.Add(this.uiPagination1); this.Controls.Add(this.uiButton1); this.Controls.Add(this.btnIndustryIndex); this.Controls.Add(this.txtIndustryIndex); this.Controls.Add(this.dgViewIndustryIndex); this.Name = "ForeignPolicyData"; this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); this.ShowTitle = true; this.Symbol = 362747; this.Text = "国外政策数据"; this.Load += new System.EventHandler(this.ForeignPolicyData_Load); ((System.ComponentModel.ISupportInitialize)(this.dgViewIndustryIndex)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private UIPagination uiPagination1; private UIButton uiButton1; private UIButton btnIndustryIndex; private UITextBox txtIndustryIndex; private UIDataGridView dgViewIndustryIndex; } } SunnyUI.Demo/Controls/ForeignPolicyData.cs
@@ -1,25 +1,249 @@ using System; using CommonHelper; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Newtonsoft.Json.Linq; using Newtonsoft.Json; using System.Collections; using SqlSugar; using Newtonsoft.Json.Converters; using System.Configuration; namespace Sunny.UI.Demo.Controls { public partial class ForeignPolicyData : UIPage { private Hashtable ht = new Hashtable(); //地址 string URL = ConfigurationManager.AppSettings["URL"].ToString(); /// <summary> /// 表格标题重命名 /// </summary> /// <param name="ColName"></param> /// <returns></returns> private string GetDgvColumName(string ColName) { if (ht.Contains(ColName)) return ht[ColName].ToString(); else return ColName; } public ForeignPolicyData() { InitializeComponent(); //string url = "http://1.117.218.88:8090/api/IndustryPolicyApp/GetPages?PageIndex=1&PageSize=1"; JObject item = (JObject)GetChinaStockList(1, 1, URL + 1 + "&PageSize=" + 1); var items = item["data"]["totalItems"]; uiPagination1.TotalCount = items.Value<int>(); uiPagination1.PageSize = 5; } //public static String GetData(String url, Encoding encode) //{ // HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); // request.Method = "GET"; // request.ContentType = "text/html, application/xhtml+xml, */*"; // HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Stream rs = response.GetResponseStream(); // StreamReader sr = new StreamReader(rs, encode); // var result = sr.ReadToEnd(); // sr.Close(); // rs.Close(); // return result; //} //public object GetChinaStockList(string SearchInfo, int ReportType) //{ // //string URL = Configs.GetValue("HYSiteUrl"); // //string GetSarchUrl = $"{URL}/ChinaStock/GetChinaStockList"; // string Result = GetData(SearchInfo, Encoding.UTF8); // //JavaMsgData javaMsgData = JsonHelper.ToObject<JavaMsgData>(Result); // return (JObject)JsonConvert.DeserializeObject(Result); //} public object GetChinaStockList(int PageIndex, int PageSize, string fieldValue) { PageSearchParam chinaStockListPara = new PageSearchParam(); List<SugarTableSearchSimple> colCondition = new List<SugarTableSearchSimple>(); SugarTableSearchSimple colCondition2 = new SugarTableSearchSimple(); colCondition2.FieldValue = "中国"; colCondition2.FieldName = "country"; colCondition2.ConditionalType = SqlSugar.ConditionalType.NoEqual; colCondition.Add(colCondition2); chinaStockListPara.PageIndex = PageIndex; chinaStockListPara.PageSize = PageSize; chinaStockListPara.ColCondition = colCondition; string Content = JsonHelper.ToJson(chinaStockListPara); string GetSarchUrl = fieldValue; string Result = SendRequest(GetSarchUrl, Content, Encoding.UTF8); return (JObject)JsonConvert.DeserializeObject(Result); } public string SendRequest(string url, string content, Encoding encoding) { try { HttpWebRequest request = (System.Net.HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; // 内容类型 request.ContentType = "application/json"; //WebHeaderCollection headers = request.Headers; //headers.Add("X-Access-Token: tokeninfo"); var payload = System.Text.Encoding.UTF8.GetBytes(content); request.ContentLength = payload.Length; Stream writer = request.GetRequestStream(); writer.Write(payload, 0, payload.Length); writer.Close(); System.Net.HttpWebResponse webResponse = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(webResponse.GetResponseStream(), encoding); return sr.ReadToEnd(); } catch (Exception e) { return ""; } } public class PageSearchParam { /// <summary> /// 页码 /// </summary> public int PageIndex { get; set; } /// <summary> /// 条数 /// </summary> public int PageSize { get; set; } /// <summary> /// 指标查询条件 /// </summary> public List<SugarTableSearchSimple> ColCondition { get; set; } } public class SugarTableSearchSimple { /// <summary> /// 字段名 /// </summary> public string FieldName { get; set; } /// <summary> /// 条件类型 /// https://www.donet5.com/Home/Doc?typeId=2314 /// </summary> [JsonConverter(typeof(StringEnumConverter))] public ConditionalType ConditionalType { get; set; } /// <summary> /// 值 /// </summary> public string FieldValue { get; set; } } public void GetdgViewIndustryIndex(int PageIndex, int PageSize) { string url = URL + PageIndex + "&PageSize=" + PageSize; JObject item = (JObject)GetChinaStockList(PageIndex, PageSize, url); if (item["data"]["items"] != null) { var items = item["data"]["items"]; dgViewIndustryIndex.DataSource = items; for (int i = 0; i < dgViewIndustryIndex.Columns.Count; i++) { string colName = dgViewIndustryIndex.Columns[i].Name; if (colName == "id") { dgViewIndustryIndex.Columns[i].Visible = false; } dgViewIndustryIndex.Columns[i].HeaderText = GetDgvColumName(colName); } } } private void ForeignPolicyData_Load(object sender, EventArgs e) { LoadingHelper.CloseForm(); ht.Add("title", "政策名称"); ht.Add("publishDate", "日期"); ht.Add("organization", "发布单位"); ht.Add("content", "主要内容"); ht.Add("country", "国家"); ht.Add("area", "区域"); ht.Add("type", "政策性质"); ht.Add("url", "来源"); GetdgViewIndustryIndex(1, uiPagination1.PageSize); } private void dgViewIndustryIndex_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 7 && e.RowIndex > 0) { System.Diagnostics.Process.Start(dgViewIndustryIndex.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()); //this.dataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()); } } private void uiPagination1_PageLocationChanged(object sender, EventArgs e, int pageIndex, int count) { GetdgViewIndustryIndex(pageIndex, uiPagination1.PageSize); } private void btnIndustryIndex_Click_1(object sender, EventArgs e) { dgViewIndustryIndex.DataSource = null; for (int i = 1; i <= uiPagination1.TotalCount; i++) { string url = URL + i + "&PageSize=" + 1; JObject item = (JObject)GetChinaStockList(i, 1, url); if (item["data"]["items"] != null) { var items = item["data"]["items"]; var title = items[0]["title"].Value<string>(); if (this.txtIndustryIndex.Text.Trim() != "") { if (title.Contains(this.txtIndustryIndex.Text.Trim())) { dgViewIndustryIndex.DataSource = items; for (int x = 0; x < dgViewIndustryIndex.Columns.Count; x++) { string colName = dgViewIndustryIndex.Columns[x].Name; if (colName == "id") { dgViewIndustryIndex.Columns[x].Visible = false; } dgViewIndustryIndex.Columns[x].HeaderText = GetDgvColumName(colName); } } } else { GetdgViewIndustryIndex(1, uiPagination1.PageSize); //DomesticPolicyData_Load(); } } } if (dgViewIndustryIndex.DataSource == null) { MessageBox.Show("没有查询到匹配数据!"); } } private void uiButton1_Click(object sender, EventArgs e) { this.txtIndustryIndex.Text = ""; } } } SunnyUI.Demo/Controls/LoaderForm.Designer.cs
@@ -33,14 +33,11 @@ // // uiProgressIndicator1 // this.uiProgressIndicator1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.uiProgressIndicator1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiProgressIndicator1.Location = new System.Drawing.Point(168, 65); this.uiProgressIndicator1.Location = new System.Drawing.Point(400, 163); this.uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1); this.uiProgressIndicator1.Name = "uiProgressIndicator1"; this.uiProgressIndicator1.Size = new System.Drawing.Size(424, 306); this.uiProgressIndicator1.Size = new System.Drawing.Size(174, 144); this.uiProgressIndicator1.TabIndex = 88; this.uiProgressIndicator1.Text = "uiProgressIndicator1"; // SunnyUI.Demo/Controls/SemiconductorProductionData.cs
@@ -110,11 +110,23 @@ { for (int i = 0; i < uiDataGridView1.Columns.Count; i++) { //设个变量取该列下的所有值 string value = ""; string colName = uiDataGridView1.Columns[i].Name; if (colName == "id") { uiDataGridView1.Columns[i].Visible = false; } //循环添加该列的所有行的值 for (int j = 0; j < uiDataGridView1.Rows.Count-1; j++) { value += uiDataGridView1.Rows[j].Cells[i].Value; } //判断该列的值是否全部为空,是的话就隐藏该列 if (value == "") { uiDataGridView1.Columns[i].Visible = false; } uiDataGridView1.Columns[i].HeaderText = GetDgvColumName(colName); } } SunnyUI.Demo/Controls/SemiconductorSalesData.cs
@@ -40,11 +40,23 @@ { for (int i = 0; i < uiDataGridView1.Columns.Count; i++) { //设个变量取该列下的所有值 string value = ""; string colName = uiDataGridView1.Columns[i].Name; if (colName == "id") { uiDataGridView1.Columns[i].Visible = false; } //循环添加该列的所有行的值 for (int j = 0; j < uiDataGridView1.Rows.Count - 1; j++) { value += uiDataGridView1.Rows[j].Cells[i].Value; } //判断该列的值是否全部为空,是的话就隐藏该列 if (value == "") { uiDataGridView1.Columns[i].Visible = false; } uiDataGridView1.Columns[i].HeaderText = GetDgvColumName(colName); } } SunnyUI.Demo/FMain.Designer.cs
@@ -33,7 +33,6 @@ System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("行业数据"); System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("公司数据"); System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("特色数据"); System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("主题"); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FMain)); this.uiAvatar = new Sunny.UI.UIAvatar(); this.StyleManager = new Sunny.UI.UIStyleManager(this.components); @@ -78,14 +77,11 @@ treeNode3.Text = "公司数据"; treeNode4.Name = "节点0"; treeNode4.Text = "特色数据"; treeNode5.Name = "节点2"; treeNode5.Text = "主题"; this.Header.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, treeNode4, treeNode5}); treeNode4}); this.Header.NodeSize = new System.Drawing.Size(110, 45); this.Header.SelectedIndex = 0; this.Header.Size = new System.Drawing.Size(1020, 110); @@ -141,7 +137,7 @@ this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.pictureBox1.Location = new System.Drawing.Point(5, 51); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(466, 79); this.pictureBox1.Size = new System.Drawing.Size(349, 79); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 4; this.pictureBox1.TabStop = false; SunnyUI.Demo/FMain.cs
@@ -89,23 +89,23 @@ //Aside.CreateChildNode(parent, AddPage(CreateInstance<UIPage>("Sunny.UI.Demo.FLed"))); //Aside.CreateChildNode(parent, AddPage(CreateInstance<UIPage>("Sunny.UI.Demo.FLight"))); Header.SetNodeSymbol(Header.Nodes[4], 61502); var styles = UIStyles.PopularStyles(); foreach (UIStyle style in styles) { Header.CreateChildNode(Header.Nodes[4], style.DisplayText(), style.Value()); } //Header.SetNodeSymbol(Header.Nodes[4], 61502); //var styles = UIStyles.PopularStyles(); //foreach (UIStyle style in styles) //{ // Header.CreateChildNode(Header.Nodes[4], style.DisplayText(), style.Value()); //} Header.CreateChildNode(Header.Nodes[4], "多彩主题", UIStyle.Colorful.Value()); //直接增加一个页面,不在左侧列表显示 AddPage(new FColorful()); AddPage(new FCommon()); //Header.CreateChildNode(Header.Nodes[4], "多彩主题", UIStyle.Colorful.Value()); ////直接增加一个页面,不在左侧列表显示 //AddPage(new FColorful()); //AddPage(new FCommon()); //选中第一个节点 Aside.SelectPage(1002); ////选中第一个节点 //Aside.SelectPage(1002); Text = Version; RegisterHotKey(UI.ModifierKeys.Shift, Keys.F8); //Text = Version; //RegisterHotKey(UI.ModifierKeys.Shift, Keys.F8); ////根据页面类型获取页面 //FButton page = GetPage<FButton>(); @@ -187,20 +187,20 @@ Header.SetNodePageIndex(Header.Nodes[3], pageIndex); Header.SetNodeSymbol(Header.Nodes[3], 362614); } switch (menuIndex) { // case 4: // UIStyle style = (UIStyle)pageIndex; // if (style != UIStyle.Colorful) // StyleManager.Style = style; // else // SelectPage(pageIndex); //switch (menuIndex) //{ // // case 4: // // UIStyle style = (UIStyle)pageIndex; // // if (style != UIStyle.Colorful) // // StyleManager.Style = style; // // else // // SelectPage(pageIndex); // break; // default: // Aside.SelectPage(pageIndex); // break; } // // break; // // default: // // Aside.SelectPage(pageIndex); // // break; //} } private void FMain_Selecting(object sender, TabControlCancelEventArgs e, UIPage page)