📄 计算主力支撑位.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace stock_Log
{
/// <summary>
/// 计算主力支撑位 的摘要说明。
/// </summary>
public class 计算主力支撑位 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox code;
private System.Windows.Forms.TextBox price1;
private System.Windows.Forms.TextBox price2;
private System.Windows.Forms.TextBox price3;
private System.Windows.Forms.TextBox cdp;
private System.Windows.Forms.TextBox ah;
private System.Windows.Forms.TextBox nh;
private System.Windows.Forms.TextBox hl;
private System.Windows.Forms.TextBox al;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Button button2;
private System.Data.DataSet ccDS;
private System.Data.DataSet dp_DS;
private System.Windows.Forms.DataGrid dcpGrid;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.DateTimePicker date1;
private System.Windows.Forms.DateTimePicker date2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Button button4;
private Button button5;
private DataGrid dataGrid1;
private RichTextBox richTextBox1;
private Label label15;
private Button button6;
private TabPage tabPage4;
private DataGridView dataGridView1;
private bool isLoad = false;
private string strId = string.Empty;
private Button BtnEdit;
private DataGridViewTextBoxColumn ID;
private DataGridViewTextBoxColumn Datetime1;
private DataGridViewTextBoxColumn event1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public 计算主力支撑位()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
string sql="select 股票名称,代码,最高价,最低价,成交价 from zxg order by 代码 desc";
dp_DS = ExceSql.GetBySqlToDS(sql);
this.comboBox1.DataSource= dp_DS.Tables[0].DefaultView;
this.comboBox1.DisplayMember="股票名称";
this.comboBox1.SelectedIndex = -1;
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.code = new System.Windows.Forms.TextBox();
this.price1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.price2 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.price3 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.cdp = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.ah = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.nh = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.hl = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.al = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.dcpGrid = new System.Windows.Forms.DataGrid();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.BtnEdit = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.label15 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.button2 = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.date1 = new System.Windows.Forms.DateTimePicker();
this.date2 = new System.Windows.Forms.DateTimePicker();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Datetime1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.event1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dcpGrid)).BeginInit();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 16);
this.label1.TabIndex = 0;
this.label1.Text = "股票名称";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(256, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 16);
this.label2.TabIndex = 3;
this.label2.Text = "代码";
//
// code
//
this.code.Location = new System.Drawing.Point(310, 8);
this.code.Name = "code";
this.code.Size = new System.Drawing.Size(130, 21);
this.code.TabIndex = 0;
//
// price1
//
this.price1.Location = new System.Drawing.Point(96, 40);
this.price1.Name = "price1";
this.price1.ReadOnly = true;
this.price1.Size = new System.Drawing.Size(121, 21);
this.price1.TabIndex = 6;
//
// label3
//
this.label3.Location = new System.Drawing.Point(48, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 16);
this.label3.TabIndex = 5;
this.label3.Text = "最高价";
//
// price2
//
this.price2.Location = new System.Drawing.Point(312, 40);
this.price2.Name = "price2";
this.price2.ReadOnly = true;
this.price2.Size = new System.Drawing.Size(128, 21);
this.price2.TabIndex = 8;
//
// label4
//
this.label4.Location = new System.Drawing.Point(248, 40);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 23);
this.label4.TabIndex = 7;
this.label4.Text = "最低价";
//
// price3
//
this.price3.Location = new System.Drawing.Point(96, 72);
this.price3.Name = "price3";
this.price3.ReadOnly = true;
this.price3.Size = new System.Drawing.Size(121, 21);
this.price3.TabIndex = 10;
//
// label5
//
this.label5.Location = new System.Drawing.Point(48, 80);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(64, 16);
this.label5.TabIndex = 9;
this.label5.Text = "收盘价";
//
// cdp
//
this.cdp.BackColor = System.Drawing.SystemColors.ControlLight;
this.cdp.ForeColor = System.Drawing.Color.Red;
this.cdp.Location = new System.Drawing.Point(96, 128);
this.cdp.Name = "cdp";
this.cdp.ReadOnly = true;
this.cdp.Size = new System.Drawing.Size(121, 21);
this.cdp.TabIndex = 12;
//
// label6
//
this.label6.Location = new System.Drawing.Point(8, 160);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(104, 16);
this.label6.TabIndex = 11;
this.label6.Text = "AH值(强阻力位)";
//
// ah
//
this.ah.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.ah.Location = new System.Drawing.Point(96, 152);
this.ah.Name = "ah";
this.ah.ReadOnly = true;
this.ah.Size = new System.Drawing.Size(121, 21);
this.ah.TabIndex = 14;
//
// label7
//
this.label7.Location = new System.Drawing.Point(24, 128);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(40, 16);
this.label7.TabIndex = 13;
this.label7.Text = "CDP";
//
// nh
//
this.nh.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.nh.Location = new System.Drawing.Point(312, 152);
this.nh.Name = "nh";
this.nh.ReadOnly = true;
this.nh.Size = new System.Drawing.Size(128, 21);
this.nh.TabIndex = 16;
//
// label8
//
this.label8.Location = new System.Drawing.Point(224, 160);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(96, 23);
this.label8.TabIndex = 15;
this.label8.Text = "NH值(次阻力位)";
//
// hl
//
this.hl.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.hl.Location = new System.Drawing.Point(96, 184);
this.hl.Name = "hl";
this.hl.ReadOnly = true;
this.hl.Size = new System.Drawing.Size(121, 21);
this.hl.TabIndex = 18;
//
// label9
//
this.label9.Location = new System.Drawing.Point(8, 192);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(96, 16);
this.label9.TabIndex = 17;
this.label9.Text = "HL值(次支撑位)";
//
// al
//
this.al.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.al.Location = new System.Drawing.Point(312, 184);
this.al.Name = "al";
this.al.ReadOnly = true;
this.al.Size = new System.Drawing.Size(128, 21);
this.al.TabIndex = 20;
//
// label10
//
this.label10.Location = new System.Drawing.Point(224, 192);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(96, 16);
this.label10.TabIndex = 19;
this.label10.Text = "AL值(强支撑位)";
//
// label11
//
this.label11.Location = new System.Drawing.Point(224, 128);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(240, 16);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -