コード例 #1
0
ファイル: RoboTesterForm.cs プロジェクト: yuxi214/TradeSharp
        private void BtnAccountSettingsClick(object sender, EventArgs e)
        {
            var dlg = new PropertiesDlg(new Account(robotContext.AccountInfo), Localizer.GetString("TitleAccountSettings"));

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                robotContext.AccountInfo = (Account)dlg.objectsList[0];
            }
        }
コード例 #2
0
ファイル: RoboTesterForm.cs プロジェクト: yuxi214/TradeSharp
        private void BtnSetupTestGroupClick(object sender, EventArgs e)
        {
            var dlg = new PropertiesDlg(new AccountGroup
            {
                BrokerLeverage         = robotContext.groupDefault.BrokerLeverage,
                Code                   = robotContext.groupDefault.Code,
                DefaultVirtualDepo     = robotContext.groupDefault.DefaultVirtualDepo,
                IsReal                 = robotContext.groupDefault.IsReal,
                MarginCallPercentLevel = robotContext.groupDefault.MarginCallPercentLevel,
                Name                   = robotContext.groupDefault.Name,
                StopoutPercentLevel    = robotContext.groupDefault.StopoutPercentLevel
            }, Localizer.GetString("TitleGroupSettings"));

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                robotContext.groupDefault = (AccountGroup)dlg.objectsList[0];
            }
        }
コード例 #3
0
        private void BtnSetupTestGroupClick(object sender, EventArgs e)
        {
            var dlg = new PropertiesDlg(new AccountGroup
                                            {
                                                BrokerLeverage = robotContext.groupDefault.BrokerLeverage,
                                                Code = robotContext.groupDefault.Code,
                                                DefaultVirtualDepo = robotContext.groupDefault.DefaultVirtualDepo,
                                                IsReal = robotContext.groupDefault.IsReal,
                                                MarginCallPercentLevel = robotContext.groupDefault.MarginCallPercentLevel,
                                                Name = robotContext.groupDefault.Name,
                                                StopoutPercentLevel = robotContext.groupDefault.StopoutPercentLevel

                                            }, Localizer.GetString("TitleGroupSettings"));
            if (dlg.ShowDialog() == DialogResult.OK)
                robotContext.groupDefault = (AccountGroup) dlg.objectsList[0];
        }
コード例 #4
0
 private void BtnAccountSettingsClick(object sender, EventArgs e)
 {
     var dlg = new PropertiesDlg(new Account(robotContext.AccountInfo), Localizer.GetString("TitleAccountSettings"));
     if (dlg.ShowDialog() == DialogResult.OK)
         robotContext.AccountInfo = (Account) dlg.objectsList[0];
 }