Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToolWindow1Control"/> class.
 /// </summary>
 public ToolWindow1Control()
 {
     _dataGridCollection = new ObservableCollection <DataGridItem>();
     InitializeComponent();
     dataGrid.ItemsSource   = _dataGridCollection;
     _authenticationCommand = new AuthenticationCommand();
     // sending false to avoid blocking UI when VS is starting and toolwindow is open
     UpdateAvailableProjects(false);
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ToolMenuCommand"/> class.
        /// Adds our command handlers for menu (commands must exist in the command table file)
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        private ToolMenuCommand(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }

            _package = package as QuantConnectPackage;
            _authenticationCommand = new AuthenticationCommand();

            var commandService = _serviceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                RegisterLoginCommand(commandService);
                RegisterLogoutCommand(commandService);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SolutionExplorerMenuCommand"/> class.
        /// Adds our command handlers for menu (commands must exist in the command table file)
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        private SolutionExplorerMenuCommand(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }

            _package = package as QuantConnectPackage;
            _dte2    = _serviceProvider.GetService(typeof(SDTE)) as DTE2;
            _authenticationCommand = new AuthenticationCommand();

            var commandService = _serviceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                RegisterSendForBacktesting(commandService);
                RegisterSaveToQuantConnect(commandService);
            }
        }