diff --git a/.conan/windows/profiles/debug b/.conan/windows/profiles/debug
new file mode 100644
index 000000000..715ec1f26
--- /dev/null
+++ b/.conan/windows/profiles/debug
@@ -0,0 +1,28 @@
+[settings]
+os=Windows
+compiler='Visual Studio'
+build_type=Debug
+arch=x86_64
+compiler.version=17
+compiler.runtime=MTd
+
+[options]
+boost:without_graph=True
+boost:without_iostreams=True
+boost:without_json=True
+boost:without_log=True
+boost:without_math=True
+boost:without_nowide=True
+boost:without_program_options=True
+boost:without_python=True
+boost:without_random=True
+boost:without_serialization=True
+boost:without_test=True
+boost:without_timer=True
+boost:without_wave=True
+boost:layout=system
+boost:multithreading=True
+
+[build_requires]
+
+[env]
diff --git a/.conan/windows/profiles/release b/.conan/windows/profiles/release
new file mode 100644
index 000000000..3e675a4e3
--- /dev/null
+++ b/.conan/windows/profiles/release
@@ -0,0 +1,28 @@
+[settings]
+os=Windows
+compiler='Visual Studio'
+build_type=Release
+arch=x86_64
+compiler.version=17
+compiler.runtime=MT
+
+[options]
+boost:without_graph=True
+boost:without_iostreams=True
+boost:without_json=True
+boost:without_log=True
+boost:without_math=True
+boost:without_nowide=True
+boost:without_program_options=True
+boost:without_python=True
+boost:without_random=True
+boost:without_serialization=True
+boost:without_test=True
+boost:without_timer=True
+boost:without_wave=True
+boost:layout=system
+boost:multithreading=True
+
+[build_requires]
+
+[env]
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index d8d5a3bc7..81773435b 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -7,6 +7,12 @@
"commands": [
"dotnet-format"
]
+ },
+ "protobuf-net.protogen": {
+ "version": "3.1.17",
+ "commands": [
+ "protogen"
+ ]
}
}
}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 775120b97..e6b2b6ebf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,3 +51,4 @@ trace_data/
/.venv*/*
.cache/
src/web/api/tsconfig.*.g.json
+.conan/windows/install/*
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a50fd465..b4f6bb48b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,10 @@ set(TOOLS "${CMAKE_SOURCE_DIR}/tools")
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
set(BUILD_WEB ON CACHE BOOL "Build the web server")
+include(${CMAKE_SOURCE_DIR}/.conan/${platform}/install/debug/conanbuildinfo.cmake)
+set(CONAN_SYSTEM_INCLUDES ON)
+conan_basic_setup()
+
include_directories(BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
link_directories(${SPARK_LIB})
@@ -31,6 +35,7 @@ if(WIN32)
COMMAND cp ARGS ${TOOLS}/cpp.build.props ${CMAKE_BINARY_DIR}/Directory.Build.Props
DEPENDS ${TOOLS}/cpp.build.props
COMMENT "Copy cpp.build.props -> Directory.Build.Props")
+ add_custom_target(client_layout ALL DEPENDS ${CMAKE_BINARY_DIR}/Directory.Build.Props)
else()
add_compile_definitions(SPARK_ENABLE_CCAPI)
add_compile_definitions(CCAPI_ENABLE_SERVICE_MARKET_DATA)
diff --git a/CMakePresets.json b/CMakePresets.json
index 6872d5805..a14032f1d 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -21,6 +21,8 @@
"CMAKE_CXX_FLAGS_DEBUG": "/MTd",
"CMAKE_CXX_FLAGS_RELEASE": "/MT",
"CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/DEBUG /OPT:REF /OPT:ICF /LTCG",
+ "CONAN_COMPILER": "Visual Studio",
+ "CONAN_COMPILER_VERSION": "17",
"EXTERNALS_ROOT": "${sourceDir}/externals/windows"
}
},
diff --git a/cmake/Protobuf.cmake b/cmake/Protobuf.cmake
index 2008f9b01..5b33d2556 100644
--- a/cmake/Protobuf.cmake
+++ b/cmake/Protobuf.cmake
@@ -1,6 +1,4 @@
-set(Protobuf_PROTOC_EXECUTABLE "${SPARK_BIN}/protoc")
set(PROTOBUF_INCLUDE_DIRS "${SPARK_INCLUDE}")
-set(PROTOBUF_STATIC_LIB "libprotobuf")
function(Protobuf_Generate_Cpp SRCS HDRS)
set(${SRCS})
diff --git a/conanfile.py b/conanfile.py
new file mode 100644
index 000000000..c3c4411d4
--- /dev/null
+++ b/conanfile.py
@@ -0,0 +1,16 @@
+from conans import ConanFile
+
+
+class SparkCryptoConan(ConanFile):
+ name = "spark_crypto"
+ version = "0.1"
+ author = "Blue Trading Solutions"
+ topics = (
+ "crypto", "trading", "options", "futures", "derivatives", "api",
+ "risk", "volatility", "finance")
+ requires = [
+ "boost/1.79.0", "catch2/3.0.1", "cmake/3.23.2", "fmt/8.1.1",
+ "libcurl/7.83.1", "nlohmann_json/3.10.5", "openssl/1.1.1o",
+ "protobuf/3.21.1", "onetbb/2021.3.0", "zlib/1.2.12"
+ ]
+ generators = ("cmake", "virtualenv")
diff --git a/requirements.txt b/requirements.txt
index 51c22aa07..7d3a4aadb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,17 +1,39 @@
astroid==2.7.3
autopep8==1.5.7
+bottle==0.12.21
+certifi==2022.6.15
cffi==1.14.6
+charset-normalizer==2.1.0
colorama==0.4.4
+conan==1.50.0
+fasteners==0.17.3
+gitdb==4.0.9
+idna==3.3
isort==5.9.3
+Jinja2==3.1.2
lazy-object-proxy==1.6.0
+MarkupSafe==2.1.1
mccabe==0.6.1
+node-semver==0.6.1
+patch-ng==1.17.4
platformdirs==2.3.0
+pluginbase==1.0.1
protobuf==3.19.1
pybars3==0.9.7
pycodestyle==2.7.0
pycparser==2.20
+Pygments==2.12.0
+PyJWT==2.4.0
pylint==2.10.2
PyMeta3==0.5.1
+python-dateutil==2.8.2
+PyYAML==6.0
+requests==2.28.1
+six==1.16.0
+smmap==5.0.0
+termcolor==1.1.0
toml==0.10.2
+tqdm==4.64.0
+urllib3==1.26.9
wrapt==1.12.1
yapf==0.31.0
diff --git a/src/client/Directory.Build.Props b/src/client/Directory.Build.Props
index 47b823c6d..cfaf3c083 100644
--- a/src/client/Directory.Build.Props
+++ b/src/client/Directory.Build.Props
@@ -29,8 +29,8 @@
$(SparkRoot)\src\lib\api\service_compiler
- $(Externals)\bin\protoc.exe
- $(Externals)\bin\protogen.exe
+ protoc
+ dotnet protogen
diff --git a/src/client/Directory.Build.Targets b/src/client/Directory.Build.Targets
index 19c38157c..629def79b 100644
--- a/src/client/Directory.Build.Targets
+++ b/src/client/Directory.Build.Targets
@@ -3,7 +3,7 @@
@@ -17,9 +17,6 @@
DestinationFolder="$(WorkingDirectory)"
SkipUnchangedFiles="True"
UseHardLinksIfPossible="True" />
-
@@ -37,7 +34,7 @@
Name="CompileProto3"
AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3)'!=''"
- Inputs="$(protoc);
+ Inputs="
%(Proto3.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\c#\client.pb.cs;
$(ProtocPluginBase)\templates\c#\server.pb.cs;
@@ -52,7 +49,7 @@
();
- Log.Ui.info($"VolSurfaceUsageList vs_usage acount: {vs_usage.vol_surface_usage.Count}");
- foreach (var u in vs_usage.vol_surface_usage) {
- string option_name = u.option_name;
- string vs_name = u.vs_name;
+ Log.Ui.info($"VolSurfaceUsageList vs_usage acount: {vs_usage.VolSurfaceUsages.Count}");
+ foreach (var u in vs_usage.VolSurfaceUsages) {
+ string option_name = u.OptionName;
+ string vs_name = u.VsName;
int vs_key;
if (name_to_ids.TryGetValue(vs_name, out vs_key)) {
ulist.UsageList.Add(new VolSurfaceUsageEntry() {
diff --git a/src/client/spark/AlgoProvider/AlgoProviderFactory.cs b/src/client/spark/AlgoProvider/AlgoProviderFactory.cs
index 52e8f66fa..0ea20a06c 100644
--- a/src/client/spark/AlgoProvider/AlgoProviderFactory.cs
+++ b/src/client/spark/AlgoProvider/AlgoProviderFactory.cs
@@ -20,7 +20,7 @@ namespace mbts.spark {
[ImportingConstructor]
public AlgoProviderFactory(IAlgoStudioModel studio_model, DynamicOrderHelper dynamic_helper, ISecurityAuxiliaryDataModel security_auxiliary_model) {
var from_conf = config.Configuration.get();
- if (from_conf.rules.Count == 0) {
+ if (from_conf.Rules.Count == 0) {
// There seems to be a config race bug, where the returned config values are empty, despite having entries in spark.conf.
// [John]I've only noticed it happen when attached to the debugger,
// but best to have a contingency plan in place anyways, to prevent any chance of regression.
@@ -108,7 +108,7 @@ namespace mbts.spark {
.Select(t => _get_type_data(t))
.Concat(dynamic_helper.dynamic_types.Select(dt => _get_type_data(AlgoType.Dynamic, dt)))
.ToListLazy();
- var conf_sets = from_conf.rules.Select(r => _to_security_algo_set(r, dynamic_helper, algo_type_data)).ToList();
+ var conf_sets = from_conf.Rules.Select(r => _to_security_algo_set(r, dynamic_helper, algo_type_data)).ToList();
security_algo_provider = new AlgoProvider(conf_sets.Select(tup => tup.standard).ToList(), studio_model, dynamic_helper, security_auxiliary_model);
attachable_algo_provider = new AttachableAlgoProvider(conf_sets.Select(tup => tup.attachable).ToList(), studio_model, dynamic_helper, security_auxiliary_model);
}
@@ -128,9 +128,9 @@ namespace mbts.spark {
context == null ?
new SecurityCriteriaClause() :
new SecurityCriteriaClause(
- exchanges: context.exchanges?.Select(EnumHelper.parse)?.ToArray(),
- security_types: context.security_types?.Select(EnumHelper.parse)?.Select(t => t.security_type())?.ToArray(),
- symbols: context.symbols?.ToArray());
+ exchanges: context.Exchanges?.Select(EnumHelper.parse)?.ToArray(),
+ security_types: context.SecurityTypes?.Select(EnumHelper.parse)?.Select(t => t.security_type())?.ToArray(),
+ symbols: context.Symbols?.ToArray());
static (SecurityAlgoTypeSetImmutable standard, SecurityAlgoTypeSetImmutable attachable) _to_security_algo_set(
bts.config.AlgoTypeRule rule,
@@ -141,24 +141,24 @@ namespace mbts.spark {
var dynamic_types = ImmutableHashSet.Empty.ToBuilder();
var attachable_factory_types = ImmutableHashSet.Empty.ToBuilder();
var attachable_dynamic_types = ImmutableHashSet.Empty.ToBuilder();
- foreach (var a in rule.algos) {
- if (Enum.TryParse(a.name, out AlgoType sys_algo) && sys_algo != AlgoType.Composite && sys_algo != AlgoType.Dynamic) {
- on_sys_match(sys_algo, a.is_attachable);
- } else if (dynamic_helper.try_parse(a.name, out var dyn_type)) {
- on_dyn_match(dyn_type, a.is_attachable);
+ foreach (var a in rule.Algos) {
+ if (Enum.TryParse(a.Name, out AlgoType sys_algo) && sys_algo != AlgoType.Composite && sys_algo != AlgoType.Dynamic) {
+ on_sys_match(sys_algo, a.IsAttachable);
+ } else if (dynamic_helper.try_parse(a.Name, out var dyn_type)) {
+ on_dyn_match(dyn_type, a.IsAttachable);
} else {
foreach (var (name, factory, dynamic) in algo_type_data) {
- if (Regex.Match(name, a.name).Success) {
+ if (Regex.Match(name, a.Name).Success) {
switch (factory) {
case AlgoType.None:
case AlgoType.Composite:
// unexpected, but no need to crash
continue;
case AlgoType.Dynamic:
- on_dyn_match(dynamic, a.is_attachable);
+ on_dyn_match(dynamic, a.IsAttachable);
break;
default:
- on_sys_match(factory, a.is_attachable);
+ on_sys_match(factory, a.IsAttachable);
break;
}
}
@@ -168,13 +168,13 @@ namespace mbts.spark {
return (
// standard
new SecurityAlgoTypeSetImmutable(
- _to_clause(rule.context),
+ _to_clause(rule.Context),
new AlgoTypeSetImmutable(
factory_types.ToImmutable(),
dynamic_types.ToImmutable())),
// attachable
new SecurityAlgoTypeSetImmutable(
- _to_clause(rule.context),
+ _to_clause(rule.Context),
new AlgoTypeSetImmutable(
attachable_factory_types.ToImmutable(),
attachable_dynamic_types.ToImmutable())));
diff --git a/src/client/spark/Daemons/AboutDaemon.cs b/src/client/spark/Daemons/AboutDaemon.cs
index 324817708..f9d3b6b29 100644
--- a/src/client/spark/Daemons/AboutDaemon.cs
+++ b/src/client/spark/Daemons/AboutDaemon.cs
@@ -37,7 +37,7 @@ namespace bts.ui {
Window about = Application.LoadComponent(new Uri("/view/Shell/About.xaml", UriKind.Relative)) as Window;
enable_crash_on_dblclick(about);
if (about != null) {
- about.DataContext = new { Version = Configuration.get().version, User = _user };
+ about.DataContext = new { Version = Configuration.get().Version, User = _user };
about.Topmost = true;
about.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (a, b) => about.Close()));
about.CommandBindings.Add(new CommandBinding(ApplicationCommands.Open, (arg, e) => {
diff --git a/src/client/spark/Daemons/MDDaemon.cs b/src/client/spark/Daemons/MDDaemon.cs
index 4999d5881..1e47dcd9c 100644
--- a/src/client/spark/Daemons/MDDaemon.cs
+++ b/src/client/spark/Daemons/MDDaemon.cs
@@ -49,7 +49,7 @@ namespace bts {
ss,
user,
security_metadata,
- TimeSpan.FromMilliseconds(Configuration.get().naggle_ms),
+ TimeSpan.FromMilliseconds(Configuration.get().NaggleMs),
TimeSpan.FromSeconds(1)) { }
public MDDaemon(
diff --git a/src/client/spark/Daemons/OrderTicketDaemon.cs b/src/client/spark/Daemons/OrderTicketDaemon.cs
index 374869492..e9a53af78 100644
--- a/src/client/spark/Daemons/OrderTicketDaemon.cs
+++ b/src/client/spark/Daemons/OrderTicketDaemon.cs
@@ -33,7 +33,7 @@ namespace bts.shell {
[ImportingConstructor]
public OrderTicketDaemon(IBus bus, OrdersModel model, UserSettingsHub settings_hub, ErrorReporter error_reporter)
- : this(bus, model, settings_hub, error_reporter, Configuration.get().close_on_send) { }
+ : this(bus, model, settings_hub, error_reporter, Configuration.get().CloseOnSend) { }
public OrderTicketDaemon(IBus bus, OrdersModel model, UserSettingsHub settings_hub, ErrorReporter error_reporter, bool close_on_send) {
_bus = bus;
diff --git a/src/client/spark/Daemons/RecenterDaemon.cs b/src/client/spark/Daemons/RecenterDaemon.cs
index 8c11c92d3..7ddbc3b34 100644
--- a/src/client/spark/Daemons/RecenterDaemon.cs
+++ b/src/client/spark/Daemons/RecenterDaemon.cs
@@ -21,7 +21,7 @@ namespace mbts.ui {
[ImportingConstructor]
public RecenterDaemon(IBus bus) {
_bus = bus;
- _time_to_center = TimeSpan.FromSeconds(config.Configuration.get().seconds_to_recenter);
+ _time_to_center = TimeSpan.FromSeconds(config.Configuration.get().SecondsToRecenter);
_last_recenter = DateTime.UtcNow;
_dispose = _bus.subscribe(SparkTags.RequestRecenterLadder).Subscribe(_ => trigger_recenter(SparkTags.RecenterLadderNow));
diff --git a/src/client/spark/Daemons/ShellLatencyDaemon.cs b/src/client/spark/Daemons/ShellLatencyDaemon.cs
index c9a910749..b8f2252b1 100644
--- a/src/client/spark/Daemons/ShellLatencyDaemon.cs
+++ b/src/client/spark/Daemons/ShellLatencyDaemon.cs
@@ -24,7 +24,7 @@ namespace bts.perf {
[ImportingConstructor]
public ShellLatencyDaemon(ShellLatencyService service, Lazy user) {
_service = service;
- _version = Configuration.get().version;
+ _version = Configuration.get().Version;
_username = user.Value.name;
_hostname = Environment.MachineName;
@@ -49,32 +49,32 @@ namespace bts.perf {
async void _forever_ping_host(Ping pinger) {
var config = Configuration.get();
- string server_ip = Configuration.get().config_ip;
- int delay = config.workloop_milliseconds_interval;
+ string server_ip = Configuration.get().ConfigIp;
+ int delay = config.WorkloopMillisecondsInterval;
int _current_missed_ping_count = 0;
- if (config.shell_ping_is_enabled && pinger != null) {
+ if (config.ShellPingIsEnabled && pinger != null) {
while (true) {
try {
await Task.Delay(delay);
- var response = await pinger.SendPingAsync(server_ip, config.timeout_milliseconds_threshold);
+ var response = await pinger.SendPingAsync(server_ip, config.TimeoutMillisecondsThreshold);
if (response.Status == IPStatus.Success) {
_current_missed_ping_count = 0;
- if (response.RoundtripTime > config.logging_milliseconds_threshold) {
+ if (response.RoundtripTime > config.LoggingMillisecondsThreshold) {
Log.Ui.warn($"Ping response not received in a timely manner:\n" +
$"\tAddress:\t{response.Address}\n" +
$"\tRoundTrip:\t{response.RoundtripTime} ms");
}
// potentially reset delay to initial work period (no-op otherwise)
- delay = config.workloop_milliseconds_interval;
+ delay = config.WorkloopMillisecondsInterval;
} else {
_current_missed_ping_count++;
- delay = _get_exp_delay(_current_missed_ping_count, config.workloop_milliseconds_interval, config.maximum_backoff_milliseconds);
+ delay = _get_exp_delay(_current_missed_ping_count, config.WorkloopMillisecondsInterval, config.MaximumBackoffMilliseconds);
Log.Ui.warn($"Ping was not successful. Ping response: {response.Status}. Missed ping count: {_current_missed_ping_count}. Backing off for {delay} milliseconds.");
}
} catch (PingException e) {
_current_missed_ping_count++;
- delay = _get_exp_delay(_current_missed_ping_count, config.workloop_milliseconds_interval, config.maximum_backoff_milliseconds);
+ delay = _get_exp_delay(_current_missed_ping_count, config.WorkloopMillisecondsInterval, config.MaximumBackoffMilliseconds);
Log.Ui.error($"Ping exception. {e}\nBacking off for {delay} milliseconds.");
}
} // end while
diff --git a/src/client/spark/Init/ReleaseNotesParade.cs b/src/client/spark/Init/ReleaseNotesParade.cs
index c7c70c0a3..be8a9b172 100644
--- a/src/client/spark/Init/ReleaseNotesParade.cs
+++ b/src/client/spark/Init/ReleaseNotesParade.cs
@@ -28,7 +28,7 @@ namespace bts.shell {
}
}
bool check_version() {
- string current = Configuration.get().version;
+ string current = Configuration.get().Version;
if (!string.IsNullOrWhiteSpace(current) && current != "private") {
using (var key = Registry.CurrentUser.CreateSubKey(@"Software\BTS")) {
var value = key.GetValue("version");
diff --git a/src/client/spark/Modules/Analytics/VolSurface/VolSurfaceWindow.cs b/src/client/spark/Modules/Analytics/VolSurface/VolSurfaceWindow.cs
index 2f80a8140..dee741440 100644
--- a/src/client/spark/Modules/Analytics/VolSurface/VolSurfaceWindow.cs
+++ b/src/client/spark/Modules/Analytics/VolSurface/VolSurfaceWindow.cs
@@ -31,7 +31,7 @@
public override string window_type => WINDOW_TYPE;
string ISharedWindow.thread_id =>
- config.Configuration.get().vol_surface ? "VolSurface" : null;
+ config.Configuration.get().VolSurface ? "VolSurface" : null;
public int vs_id => _startup_data.id;
public string vs_name { get; }
diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewWindow.cs b/src/client/spark/Modules/Market/MarketView/MarketViewWindow.cs
index 8038890b4..93004c464 100644
--- a/src/client/spark/Modules/Market/MarketView/MarketViewWindow.cs
+++ b/src/client/spark/Modules/Market/MarketView/MarketViewWindow.cs
@@ -65,7 +65,7 @@ namespace mbts.spark {
_settings_hub = settings_hub;
_settings_manager = settings_hub.create_mview_settings_manager(state.grid);
Icon.Freeze();
- thread_id = config.Configuration.get().market_view ? "MarketView" : null;
+ thread_id = config.Configuration.get().MarketView ? "MarketView" : null;
_dispose = Disposable.Create(() => {
Disposable.dispose(ref _subscriptions);
_vm.Dispose();
diff --git a/src/client/spark/Modules/Market/TimeAndSalesWindowFactory.cs b/src/client/spark/Modules/Market/TimeAndSalesWindowFactory.cs
index f8373cce2..78232ee01 100644
--- a/src/client/spark/Modules/Market/TimeAndSalesWindowFactory.cs
+++ b/src/client/spark/Modules/Market/TimeAndSalesWindowFactory.cs
@@ -42,7 +42,7 @@
public override Task load(TimeAndSalesSettings state) {
var conf = Configuration.get();
- var thread_id = Configuration.get().time_and_sales ?
+ var thread_id = Configuration.get().TimeAndSales ?
TimeAndSalesWindow.WINDOW_TYPE_NAME : null;
var settings_man = new WindowSettingsManager(
_settings_hub, state.grid, s => s.time_and_sales_grid, (s, g) => s.with(time_and_sales: g));
@@ -52,7 +52,7 @@
_consumer,
state,
settings_man,
- conf.can_pause_updates,
+ conf.CanPauseUpdates,
_security_auxiliary_model.get_display_quantity_divisor,
thread_id);
return Task.FromResult(win);
diff --git a/src/client/spark/Modules/Settings/SettingsShellModule.cs b/src/client/spark/Modules/Settings/SettingsShellModule.cs
index 0a737d859..969a7f2d9 100644
--- a/src/client/spark/Modules/Settings/SettingsShellModule.cs
+++ b/src/client/spark/Modules/Settings/SettingsShellModule.cs
@@ -32,7 +32,7 @@ namespace bts.ui {
SparkCommands.ShowGlobalAlerts,
SparkCommands.ShowWorkspaces
};
- if (Configuration.get().enabled) {
+ if (Configuration.get().Enabled) {
actions_list.Add(SparkCommands.ShowSettings);
}
actions = actions_list;
diff --git a/src/client/spark/Modules/ShellModuleCollection.cs b/src/client/spark/Modules/ShellModuleCollection.cs
index 15c8e6c21..6df74b73b 100644
--- a/src/client/spark/Modules/ShellModuleCollection.cs
+++ b/src/client/spark/Modules/ShellModuleCollection.cs
@@ -26,9 +26,9 @@ namespace bts {
static bool _is_hidden(IShellModule module) {
var props = Configuration.get();
string name = module.GetType().Name;
- foreach (var p in props.module) {
- if (p.name.ToLower() == name.ToLower()) {
- return !p.visible;
+ foreach (var p in props.Modules) {
+ if (p.Name.ToLower() == name.ToLower()) {
+ return !p.Visible;
}
}
return false;
diff --git a/src/client/spark/Modules/Spreader/SyntheticManagementWindow.cs b/src/client/spark/Modules/Spreader/SyntheticManagementWindow.cs
index ec6e6948a..7b0ded691 100644
--- a/src/client/spark/Modules/Spreader/SyntheticManagementWindow.cs
+++ b/src/client/spark/Modules/Spreader/SyntheticManagementWindow.cs
@@ -42,7 +42,7 @@ namespace mbts.spark {
_state = state;
_settings_manager = settings_manager;
Icon.Freeze();
- thread_id = config.Configuration.get().synthetic_management ?
+ thread_id = config.Configuration.get().SyntheticManagement ?
"SyntheticManagement" : null;
_dispose = Disposable.Create(() => {
Disposable.dispose(ref _vm);
diff --git a/src/client/spark/Modules/Support/Browser/BrowserWindow.cs b/src/client/spark/Modules/Support/Browser/BrowserWindow.cs
index 60fbc2732..a2e1622fe 100644
--- a/src/client/spark/Modules/Support/Browser/BrowserWindow.cs
+++ b/src/client/spark/Modules/Support/Browser/BrowserWindow.cs
@@ -44,8 +44,8 @@ namespace bts.shell {
string uristr = uri.ToString();
string http_base =
"http://{0}:{1}/".fmt(
- Configuration.get().config_host,
- Configuration.get().config_port);
+ Configuration.get().ConfigHost,
+ Configuration.get().ConfigPort);
string temp = uristr;
if (uristr.StartsWith("bts://m/")) {
temp = uristr.Replace("bts://m/", http_base + "docs/");
@@ -94,7 +94,7 @@ namespace bts.shell {
emulation_key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(ke_name);
}
- var process_name = Configuration.get().process_name;
+ var process_name = Configuration.get().ProcessName;
emulation_key.SetValue(process_name, 11001); // IE11
}
#endregion
diff --git a/src/client/spark/Modules/Trading/AlgoStudio/AlgoStudioWindow.cs b/src/client/spark/Modules/Trading/AlgoStudio/AlgoStudioWindow.cs
index 7bec54999..4c7bc2c72 100644
--- a/src/client/spark/Modules/Trading/AlgoStudio/AlgoStudioWindow.cs
+++ b/src/client/spark/Modules/Trading/AlgoStudio/AlgoStudioWindow.cs
@@ -43,7 +43,7 @@ namespace mbts.spark {
: base(NAME, bus, factory, SparkCommands.ShowAlgoStudio.icon) {
_model = model;
_state = state;
- thread_id = config.Configuration.get().algo_studio ? "AlgoStudio" : null;
+ thread_id = config.Configuration.get().AlgoStudio ? "AlgoStudio" : null;
_dispose = Disposable.Create(_dispose_core);
}
@@ -74,12 +74,12 @@ namespace mbts.spark {
_commands.Add(new SparkCommandCommand("Add Algo", Icons.AddBoxes, _vm.add_definition_cmd));
_commands.Add(new SparkCommandCommand("Clone Algo", Icons.CopyBoxes, _vm.clone_selected_definition_cmd));
_commands.Add(new SparkCommandCommand("Save Algo", Icons.DiskFile, _vm.save_cmd) {
- show_in_toolbar = _ui_configuration.can_save_specific
+ show_in_toolbar = _ui_configuration.CanSaveSpecific
});
_commands.Add(new SparkCommandCommand("Save All", Icons.Disk, ObservantAsyncCommand.create(_vm.save_all, out var save_all_observer)));
_resources.Add(_vm.subscribe_dirty().OnDispatcher().Subscribe(save_all_observer));
// undo/redo
- if (_ui_configuration.can_undo_redo) {
+ if (_ui_configuration.CanUndoRedo) {
// undo
var undo_cmd = new ObservantCommand(() => _vm.selected_definition?.try_undo());
var undo_spark_cmd = new SparkCommandCommand("Undo", Icons.UndoCircular, undo_cmd);
diff --git a/src/client/spark/Modules/Trading/AlgoStudio/Model/IAlgoStudioModel.cs b/src/client/spark/Modules/Trading/AlgoStudio/Model/IAlgoStudioModel.cs
index 7adadaa41..af2fe078f 100644
--- a/src/client/spark/Modules/Trading/AlgoStudio/Model/IAlgoStudioModel.cs
+++ b/src/client/spark/Modules/Trading/AlgoStudio/Model/IAlgoStudioModel.cs
@@ -17,10 +17,10 @@ namespace mbts.spark {
static class AlgoStudioModelUtils {
public static IReadOnlyDictionary