Здравствуйте,
Помогите плиз разобраться. Пытаюсь настроить S#.Studio (4.1.21.1) для работы с Quik. Но появляется странная ошибка. Сначала создаю простейшую стратегию, все работает, данные из quik поступают. Но в логах возникает ошибка:
S#.Studio 11/28/2013 22:13:39 Error System.ArgumentException: The key was already present in the dictionary.
Parameter name: key
at Wintellect.PowerCollections.DictionaryBase`2.Add(TKey key, TValue value)
at StockSharp.Studio.Services.StudioCommandService.StockSharp.Studio.Core.Commands.IStudioCommandService.Bind(Object sender, IStudioCommandScope scope)
at StockSharp.Studio.Extensions.BindStrategyToScope(Strategy strategy, IStudioCommandScope control)
at StockSharp.Studio.Extensions.SetStrategy(StrategyContent control, Strategy strategy)
at StockSharp.Studio.MainWindow.<>c__DisplayClass4f.<OpenWindow>b__4e()
at StockSharp.Studio.MainWindow.<>c__DisplayClass5d.<OpenWindow>b__5c(Tuple`2 key)
at Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler, Boolean& isNew)
at StockSharp.Studio.MainWindow.OpenWindow(String id, Type ctrlType, Boolean isToolWindow, Object context, Func`1 getControl)
at StockSharp.Studio.MainWindow.OpenWindow(Strategy strategy)
at StockSharp.Studio.MainWindow.<.ctor>b__c(OpenStrategyCommand cmd)
at StockSharp.Studio.Services.StudioCommandService.<>c__DisplayClass7`1.<StockSharp.Studio.Core.Commands.IStudioCommandService.Register>b__6(IStudioCommand cmd)
at StockSharp.Studio.Services.StudioCommandService.<>c__DisplayClass4.<ProcessCommand>b__3(Action`1 handler)
at Ecng.Collections.CollectionHelper.ForEach[T](IEnumerable`1 source, Action`1 action)
at StockSharp.Studio.Services.StudioCommandService.ProcessCommand(IStudioCommand command, IStudioCommandScope scope)
at StockSharp.Studio.Services.StudioCommandService.StockSharp.Studio.Core.Commands.IStudioCommandService.Process(Object sender, IStudioCommand command, Boolean isSyncProcess)
at StockSharp.Studio.Controls.StrategiesGrid.StrategiesGrid_OnMouseDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Control.OnMouseDoubleClick(MouseButtonEventArgs e)
at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Затем, если стратегию останавливаешь, то включить ее обратно уже невозможно. Кнопка запуска неактивна.