Hunter 수정 중
This commit is contained in:
@@ -281,6 +281,7 @@
|
||||
<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>
|
||||
|
||||
5
Million/Properties/licenses.licx
Normal file
5
Million/Properties/licenses.licx
Normal file
@@ -0,0 +1,5 @@
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.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.XtraTreeList.TreeList, DevExpress.XtraTreeList.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.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
30
Million/SubForm/ChartIndicatorSetupForm.Designer.cs
generated
30
Million/SubForm/ChartIndicatorSetupForm.Designer.cs
generated
@@ -30,7 +30,7 @@ namespace Million.SubForm
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panelControl_IndicatorSetup = new DevExpress.XtraEditors.PanelControl();
|
||||
this.treeList_BuySetupList = new DevExpress.XtraTreeList.TreeList();
|
||||
this.treeList_ConditionSetupList = new DevExpress.XtraTreeList.TreeList();
|
||||
this.treeListColumn_IndexString = new DevExpress.XtraTreeList.Columns.TreeListColumn();
|
||||
this.treeListColumn_IndicatorType = new DevExpress.XtraTreeList.Columns.TreeListColumn();
|
||||
this.treeListColumn_Description = new DevExpress.XtraTreeList.Columns.TreeListColumn();
|
||||
@@ -42,7 +42,7 @@ namespace Million.SubForm
|
||||
this.simpleButton_SetupRefresh = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton_ToList = new DevExpress.XtraEditors.SimpleButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl_IndicatorSetup)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList_BuySetupList)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList_ConditionSetupList)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit_IndicatorSelection.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@@ -58,21 +58,21 @@ namespace Million.SubForm
|
||||
this.panelControl_IndicatorSetup.Size = new System.Drawing.Size(476, 172);
|
||||
this.panelControl_IndicatorSetup.TabIndex = 2;
|
||||
//
|
||||
// treeList_BuySetupList
|
||||
// treeList_ConditionSetupList
|
||||
//
|
||||
this.treeList_BuySetupList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] {
|
||||
this.treeList_ConditionSetupList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] {
|
||||
this.treeListColumn_IndexString,
|
||||
this.treeListColumn_IndicatorType,
|
||||
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";
|
||||
this.treeList_BuySetupList.OptionsBehavior.Editable = false;
|
||||
this.treeList_BuySetupList.OptionsView.ShowIndicator = false;
|
||||
this.treeList_BuySetupList.OptionsView.ShowRoot = false;
|
||||
this.treeList_BuySetupList.Size = new System.Drawing.Size(476, 197);
|
||||
this.treeList_BuySetupList.TabIndex = 3;
|
||||
this.treeList_ConditionSetupList.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.treeList_ConditionSetupList.Location = new System.Drawing.Point(12, 299);
|
||||
this.treeList_ConditionSetupList.Name = "treeList_ConditionSetupList";
|
||||
this.treeList_ConditionSetupList.OptionsBehavior.Editable = false;
|
||||
this.treeList_ConditionSetupList.OptionsView.ShowIndicator = false;
|
||||
this.treeList_ConditionSetupList.OptionsView.ShowRoot = false;
|
||||
this.treeList_ConditionSetupList.Size = new System.Drawing.Size(476, 197);
|
||||
this.treeList_ConditionSetupList.TabIndex = 3;
|
||||
//
|
||||
// treeListColumn_IndexString
|
||||
//
|
||||
@@ -184,13 +184,13 @@ namespace Million.SubForm
|
||||
this.Controls.Add(this.simpleButton_SetupEdit);
|
||||
this.Controls.Add(this.simpleButton_SetupDelete);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.treeList_BuySetupList);
|
||||
this.Controls.Add(this.treeList_ConditionSetupList);
|
||||
this.Controls.Add(this.panelControl_IndicatorSetup);
|
||||
this.Name = "ChartIndicatorSetupForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = " ";
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl_IndicatorSetup)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList_BuySetupList)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList_ConditionSetupList)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit_IndicatorSelection.Properties)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
@@ -200,7 +200,7 @@ namespace Million.SubForm
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.PanelControl panelControl_IndicatorSetup;
|
||||
private DevExpress.XtraTreeList.TreeList treeList_BuySetupList;
|
||||
private DevExpress.XtraTreeList.TreeList treeList_ConditionSetupList;
|
||||
private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn_IndexString;
|
||||
private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn_IndicatorType;
|
||||
private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn_Description;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using DevExpress.XtraEditors;
|
||||
using Million.HunterSubForm.IndicatorSetupForm;
|
||||
using Million.IndicatorConditionSetup;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -14,6 +15,15 @@ namespace Million.SubForm
|
||||
{
|
||||
public partial class ChartIndicatorSetupForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
// 현재 수정/삭제 대기중인 클래스의 초기화
|
||||
private IndicatorCoditionSetup _curIndicatorSetup = null;
|
||||
|
||||
// 현재 선택된 Indicator 폼
|
||||
private CommonIndicatorSetupUserForm _curruentIndicatorform;
|
||||
|
||||
// Indicator 저장할 리스트
|
||||
public List<object> ConditionSetupList = new List<object>();
|
||||
|
||||
public ChartIndicatorSetupForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -28,6 +38,9 @@ namespace Million.SubForm
|
||||
object[] indicatorTypeList = Enum.GetNames(enumType: typeof(CommonProperty.IndicatorType));
|
||||
comboBoxEdit_IndicatorSelection.Properties.Items.AddRange(indicatorTypeList);
|
||||
|
||||
// 트리 리스트에 조건 리스트 바인딩
|
||||
treeList_ConditionSetupList.DataSource = ConditionSetupList;
|
||||
|
||||
// 지표 새로 추가 시 수정/삭제 버튼 Hidden 처리
|
||||
simpleButton_SetupEdit.Visible = false;
|
||||
simpleButton_SetupDelete.Visible = false;
|
||||
@@ -85,7 +98,43 @@ namespace Million.SubForm
|
||||
// 리스트로 지표 추가
|
||||
private void simpleButton_ToList_Click(object sender, EventArgs e)
|
||||
{
|
||||
var button = sender as SimpleButton;
|
||||
|
||||
// 예외처리
|
||||
if (comboBoxEdit_IndicatorSelection.SelectedItem == null) return;
|
||||
|
||||
// 선택된 콤보박스로 부터 Indicator type 가져오기
|
||||
Enum.TryParse(comboBoxEdit_IndicatorSelection.SelectedItem.ToString(),
|
||||
out CommonProperty.IndicatorType indicatorType);
|
||||
|
||||
// Buy Sell 구분
|
||||
Enum.TryParse(button.Tag.ToString(), out CommonProperty.BuySellType buySelltype);
|
||||
|
||||
|
||||
if (panelControl_IndicatorSetup == null && panelControl_IndicatorSetup.Controls == null
|
||||
&& panelControl_IndicatorSetup.Controls.Count == 0) return;
|
||||
|
||||
switch (indicatorType)
|
||||
{
|
||||
case CommonProperty.IndicatorType.볼린저밴드:
|
||||
((BolingerBandSetupUserForm)panelControl_IndicatorSetup.Controls[0]).SaveIndicatorSetup();
|
||||
break;
|
||||
case CommonProperty.IndicatorType.일목균형표:
|
||||
|
||||
break;
|
||||
case CommonProperty.IndicatorType.이동평균선:
|
||||
|
||||
break;
|
||||
case CommonProperty.IndicatorType.ParabolicSAR:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ConditionSetupList.Add(_curIndicatorSetup);
|
||||
treeList_ConditionSetupList.RefreshDataSource();
|
||||
|
||||
// 현재 수정 / 삭제 대기중인 클래스의 초기화
|
||||
_curIndicatorSetup = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,10 +76,27 @@ namespace Million.HunterSubForm.IndicatorSetupForm
|
||||
}
|
||||
|
||||
// Indicator 정보 저장
|
||||
public void SaveIndicatorSetup(object indicatorSetupData)
|
||||
public void SaveIndicatorSetup(object indicatorSetupData = null)
|
||||
{
|
||||
// 예외처리 필요
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user