This commit is contained in:
kyh
2022-09-26 20:52:19 +09:00
7 changed files with 114 additions and 40 deletions

View File

@@ -129,7 +129,6 @@
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

@@ -1,3 +1,13 @@
<<<<<<< HEAD
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v18.2.UI, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.DashboardWin.DashboardDesigner, DevExpress.Dashboard.v18.2.Win, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
=======
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.DashboardWin.DashboardDesigner, DevExpress.Dashboard.v18.2.Win, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
@@ -6,3 +16,4 @@ DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v18.2.UI, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
>>>>>>> 5d22e4607e33c802362d97699c9133d25c54ac80

View File

@@ -34,6 +34,7 @@ namespace Million.SubForm
this.treeListColumn_IndexString = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.treeListColumn_IndicatorType = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.treeListColumn_Description = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.comboBoxEdit_IndicatorSelection = new DevExpress.XtraEditors.ComboBoxEdit();
this.simpleButton_SetupEdit = new DevExpress.XtraEditors.SimpleButton();
@@ -52,9 +53,9 @@ namespace Million.SubForm
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelControl_IndicatorSetup.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.panelControl_IndicatorSetup.Location = new System.Drawing.Point(12, 63);
this.panelControl_IndicatorSetup.Location = new System.Drawing.Point(12, 66);
this.panelControl_IndicatorSetup.Name = "panelControl_IndicatorSetup";
this.panelControl_IndicatorSetup.Size = new System.Drawing.Size(476, 175);
this.panelControl_IndicatorSetup.Size = new System.Drawing.Size(476, 172);
this.panelControl_IndicatorSetup.TabIndex = 2;
//
// treeList_BuySetupList
@@ -62,7 +63,8 @@ namespace Million.SubForm
this.treeList_BuySetupList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] {
this.treeListColumn_IndexString,
this.treeListColumn_IndicatorType,
this.treeListColumn_Description});
this.treeListColumn_Description,
this.treeListColumn1});
this.treeList_BuySetupList.Cursor = System.Windows.Forms.Cursors.Default;
this.treeList_BuySetupList.Location = new System.Drawing.Point(12, 299);
this.treeList_BuySetupList.Name = "treeList_BuySetupList";
@@ -101,6 +103,12 @@ namespace Million.SubForm
this.treeListColumn_Description.VisibleIndex = 2;
this.treeListColumn_Description.Width = 369;
//
// treeListColumn1
//
this.treeListColumn1.Caption = "IndicatorData";
this.treeListColumn1.FieldName = "IndicatorData";
this.treeListColumn1.Name = "treeListColumn1";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.comboBoxEdit_IndicatorSelection);
@@ -119,6 +127,7 @@ namespace Million.SubForm
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.comboBoxEdit_IndicatorSelection.Size = new System.Drawing.Size(173, 20);
this.comboBoxEdit_IndicatorSelection.TabIndex = 0;
this.comboBoxEdit_IndicatorSelection.SelectedIndexChanged += new System.EventHandler(this.comboBoxEdit_IndicatorSelection_SelectedIndexChanged);
//
// simpleButton_SetupEdit
//
@@ -163,6 +172,7 @@ namespace Million.SubForm
this.simpleButton_ToList.Size = new System.Drawing.Size(97, 31);
this.simpleButton_ToList.TabIndex = 8;
this.simpleButton_ToList.Text = "추가";
this.simpleButton_ToList.Click += new System.EventHandler(this.simpleButton_ToList_Click);
//
// ChartIndicatorSetupForm
//
@@ -178,7 +188,7 @@ namespace Million.SubForm
this.Controls.Add(this.panelControl_IndicatorSetup);
this.Name = "ChartIndicatorSetupForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = " ";
this.Text = " ";
((System.ComponentModel.ISupportInitialize)(this.panelControl_IndicatorSetup)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeList_BuySetupList)).EndInit();
this.groupBox1.ResumeLayout(false);
@@ -200,5 +210,6 @@ namespace Million.SubForm
private DevExpress.XtraEditors.SimpleButton simpleButton_SetupDelete;
private DevExpress.XtraEditors.SimpleButton simpleButton_SetupRefresh;
private DevExpress.XtraEditors.SimpleButton simpleButton_ToList;
private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1;
}
}

View File

@@ -1,4 +1,5 @@
using DevExpress.XtraEditors;
using Million.HunterSubForm.IndicatorSetupForm;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -16,6 +17,75 @@ namespace Million.SubForm
public ChartIndicatorSetupForm()
{
InitializeComponent();
initForm();
}
private void initForm()
{
// 지표 ComboBox 초기화
comboBoxEdit_IndicatorSelection.Properties.Items.Clear();
object[] indicatorTypeList = Enum.GetNames(enumType: typeof(CommonProperty.IndicatorType));
comboBoxEdit_IndicatorSelection.Properties.Items.AddRange(indicatorTypeList);
// 지표 새로 추가 시 수정/삭제 버튼 Hidden 처리
simpleButton_SetupEdit.Visible = false;
simpleButton_SetupDelete.Visible = false;
simpleButton_ToList.Visible = false;
}
private void comboBoxEdit_IndicatorSelection_SelectedIndexChanged(object sender, EventArgs e)
{
var comboboxEdit = sender as ComboBoxEdit;
if (comboboxEdit == null) return;
if (comboboxEdit.SelectedIndex < 0) return;
Enum.TryParse(comboBoxEdit_IndicatorSelection.SelectedItem.ToString(),
out CommonProperty.IndicatorType indicatorType);
// Indicator Setup 패널 초기화
panelControl_IndicatorSetup.Controls.Clear();
// 지표 조건 설정 폼 생성하기
switch(indicatorType)
{
case CommonProperty.IndicatorType.볼린저밴드:
var bolingerConditionSetup = new IndicatorConditionSetup.BolingerConditionSetup();
var bolingerBandSetupUserForm = new BolingerBandSetupUserForm(bolingerConditionSetup, true) { Dock = DockStyle.Fill };
panelControl_IndicatorSetup.Controls.Add(bolingerBandSetupUserForm);
break;
case CommonProperty.IndicatorType.일목균형표:
IndicatorConditionSetup.IchimokuConditionSetup ichimokuConditionSetup = new IndicatorConditionSetup.IchimokuConditionSetup();
IchimokuCloudSetupUserForm ichimokuCloudSetupUserForm = new IchimokuCloudSetupUserForm(ichimokuConditionSetup, true) { Dock = DockStyle.Fill };
panelControl_IndicatorSetup.Controls.Add(ichimokuCloudSetupUserForm);
break;
case CommonProperty.IndicatorType.이동평균선:
IndicatorConditionSetup.MovingAverageConditionSetup movingAverageConditionSetup = new IndicatorConditionSetup.MovingAverageConditionSetup();
MovingAverageSetupUserForm movingAverageSetupUserForm = new MovingAverageSetupUserForm(movingAverageConditionSetup, true) { Dock = DockStyle.Fill };
panelControl_IndicatorSetup.Controls.Add(movingAverageSetupUserForm);
break;
case CommonProperty.IndicatorType.ParabolicSAR:
IndicatorConditionSetup.ParabolicSarIndicatorConditionSetup parabolicSarIndicatorConditionSetup = new IndicatorConditionSetup.ParabolicSarIndicatorConditionSetup();
ParabolicSarSetupUserForm parabolicSarSetupUserForm = new ParabolicSarSetupUserForm(parabolicSarIndicatorConditionSetup, true) { Dock = DockStyle.Fill };
panelControl_IndicatorSetup.Controls.Add(parabolicSarSetupUserForm);
break;
}
// 지표 새로 추가 시 수정/삭제 버튼 Hidden 처리
simpleButton_SetupEdit.Visible = false;
simpleButton_SetupDelete.Visible = false;
simpleButton_ToList.Visible = true;
// 현재 수정/삭제 대기중인 클래스의 초기화
//_curIndicatorSetup = null;
}
// 리스트로 지표 추가
private void simpleButton_ToList_Click(object sender, EventArgs e)
{
}
}
}

View File

@@ -58,7 +58,7 @@
this.panel_ChartViewer.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel_ChartViewer.Location = new System.Drawing.Point(0, 80);
this.panel_ChartViewer.Name = "panel_ChartViewer";
this.panel_ChartViewer.Size = new System.Drawing.Size(680, 539);
this.panel_ChartViewer.Size = new System.Drawing.Size(756, 540);
this.panel_ChartViewer.TabIndex = 1;
//
// comboBoxEdit_Hour
@@ -74,7 +74,7 @@
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(560, 15);
this.label1.Location = new System.Drawing.Point(532, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(69, 14);
this.label1.TabIndex = 1;
@@ -83,7 +83,7 @@
// comboBoxEdit_CandleDateTime
//
this.comboBoxEdit_CandleDateTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxEdit_CandleDateTime.Location = new System.Drawing.Point(631, 12);
this.comboBoxEdit_CandleDateTime.Location = new System.Drawing.Point(603, 12);
this.comboBoxEdit_CandleDateTime.Name = "comboBoxEdit_CandleDateTime";
this.comboBoxEdit_CandleDateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -94,7 +94,7 @@
//
this.dateEdit_DateTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dateEdit_DateTime.EditValue = null;
this.dateEdit_DateTime.Location = new System.Drawing.Point(718, 12);
this.dateEdit_DateTime.Location = new System.Drawing.Point(695, 12);
this.dateEdit_DateTime.Name = "dateEdit_DateTime";
this.dateEdit_DateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -106,13 +106,13 @@
this.dateEdit_DateTime.Properties.EditFormat.FormatString = "u";
this.dateEdit_DateTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit_DateTime.Properties.Mask.EditMask = "u";
this.dateEdit_DateTime.Size = new System.Drawing.Size(121, 20);
this.dateEdit_DateTime.Size = new System.Drawing.Size(179, 20);
this.dateEdit_DateTime.TabIndex = 8;
//
// comboBoxEdit_ExchangePlace
//
this.comboBoxEdit_ExchangePlace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxEdit_ExchangePlace.Location = new System.Drawing.Point(75, 12);
this.comboBoxEdit_ExchangePlace.Location = new System.Drawing.Point(68, 12);
this.comboBoxEdit_ExchangePlace.Name = "comboBoxEdit_ExchangePlace";
this.comboBoxEdit_ExchangePlace.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -123,7 +123,7 @@
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 15);
this.label3.Location = new System.Drawing.Point(16, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(49, 14);
this.label3.TabIndex = 4;
@@ -132,7 +132,7 @@
// comboBoxEdit_PaymentType
//
this.comboBoxEdit_PaymentType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxEdit_PaymentType.Location = new System.Drawing.Point(248, 12);
this.comboBoxEdit_PaymentType.Location = new System.Drawing.Point(241, 12);
this.comboBoxEdit_PaymentType.Name = "comboBoxEdit_PaymentType";
this.comboBoxEdit_PaymentType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -143,7 +143,7 @@
//
this.label_종목타입.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_종목타입.AutoSize = true;
this.label_종목타입.Location = new System.Drawing.Point(182, 15);
this.label_종목타입.Location = new System.Drawing.Point(175, 15);
this.label_종목타입.Name = "label_종목타입";
this.label_종목타입.Size = new System.Drawing.Size(63, 14);
this.label_종목타입.TabIndex = 10;
@@ -152,7 +152,7 @@
// comboBoxEdit_MarketInfo
//
this.comboBoxEdit_MarketInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxEdit_MarketInfo.Location = new System.Drawing.Point(404, 12);
this.comboBoxEdit_MarketInfo.Location = new System.Drawing.Point(397, 12);
this.comboBoxEdit_MarketInfo.Name = "comboBoxEdit_MarketInfo";
this.comboBoxEdit_MarketInfo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -163,7 +163,7 @@
//
this.label_종목이름.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_종목이름.AutoSize = true;
this.label_종목이름.Location = new System.Drawing.Point(339, 14);
this.label_종목이름.Location = new System.Drawing.Point(332, 14);
this.label_종목이름.Name = "label_종목이름";
this.label_종목이름.Size = new System.Drawing.Size(63, 14);
this.label_종목이름.TabIndex = 12;
@@ -172,7 +172,7 @@
// simpleButton_IndicatorSetup
//
this.simpleButton_IndicatorSetup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.simpleButton_IndicatorSetup.Location = new System.Drawing.Point(709, 46);
this.simpleButton_IndicatorSetup.Location = new System.Drawing.Point(744, 46);
this.simpleButton_IndicatorSetup.Name = "simpleButton_IndicatorSetup";
this.simpleButton_IndicatorSetup.Size = new System.Drawing.Size(130, 29);
this.simpleButton_IndicatorSetup.TabIndex = 13;
@@ -195,22 +195,22 @@
this.panelControl_menu.Dock = System.Windows.Forms.DockStyle.Top;
this.panelControl_menu.Location = new System.Drawing.Point(0, 0);
this.panelControl_menu.Name = "panelControl_menu";
this.panelControl_menu.Size = new System.Drawing.Size(851, 80);
this.panelControl_menu.Size = new System.Drawing.Size(886, 80);
this.panelControl_menu.TabIndex = 0;
//
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.Location = new System.Drawing.Point(680, 80);
this.panel1.Location = new System.Drawing.Point(756, 80);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(171, 539);
this.panel1.Size = new System.Drawing.Size(130, 540);
this.panel1.TabIndex = 2;
//
// ChartViewerForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(851, 619);
this.ClientSize = new System.Drawing.Size(886, 620);
this.Controls.Add(this.panel_ChartViewer);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panelControl_menu);

View File

@@ -47,7 +47,7 @@ namespace Million.SubForm
// 시간 단위 가져오기
var candleTimeTypeList = Enum.GetNames(enumType: typeof(CommonProperty.MCandleTimeType));
comboBoxEdit_CandleDateTime.Properties.Items.AddRange(candleTimeTypeList);
comboBoxEdit_CandleDateTime.SelectedItem = CommonProperty.MCandleTimeType.H1;
comboBoxEdit_CandleDateTime.SelectedItem = CommonProperty.MCandleTimeType.H1.ToString();
// 기간 설정 (Default) : 현재 시간
dateEdit_DateTime.DateTime = DateTime.Now;

View File

@@ -79,24 +79,7 @@ namespace Million.HunterSubForm.IndicatorSetupForm
public void SaveIndicatorSetup(object indicatorSetupData)
{
// 예외처리 필요
var bolingerBandSetup = (BolingerConditionSetup) indicatorSetupData;
// 지표 설정
bolingerBandSetup.IndicatorType = CommonProperty.IndicatorType.볼린저밴드;
// 지표 기본 값
bolingerBandSetup.Period = int.Parse(textEdit_Period.Text);
bolingerBandSetup.Squared = int.Parse(textEdit_Squared.Text);
// 지표 기준선
Enum.TryParse(checkedListBoxControl_Lines.Items.First(item => item.CheckState == CheckState.Checked).Value.ToString()
, out CommonProperty.Indicator_BolingerOverLine indicatorOverLine);
bolingerBandSetup.Indicator_BolingerOverLine = indicatorOverLine;
var description = string.Format("[{0},{1},{2}]", bolingerBandSetup.Period.ToString(),
bolingerBandSetup.Squared.ToString(), bolingerBandSetup.Indicator_BolingerOverLine.ToString());
bolingerBandSetup.Description = description + bolingerBandSetup.Description;
}
}