Пример #1
0
        public LoginForm(ForexConnectConfig forexConnectConfig, PriceHistoryConfig priceHistoryConfig)
        {
            InitializeComponent();

            mForexConnectConfig = forexConnectConfig;
            mPriceHistoryConfig = priceHistoryConfig;

            textBoxCache.Text      = mPriceHistoryConfig.CachePath;
            textBoxUrl.Text        = mForexConnectConfig.Url;
            textBoxUserName.Text   = mForexConnectConfig.UserName;
            textBoxConnection.Text = mForexConnectConfig.Connection;
        }
        /// <summary>
        /// Construtor
        /// </summary>
        public ApplicationWindow()
        {
            InitializeComponent();

            mForexConnectConfig = ForexConnectConfigFactory.Create();
            mPriceHistoryConfig = PriceHistoryConfigFactory.Create();

            mController.OnErrorEvent       += this.PriceAPIController_Error;
            mController.OnCollectionLoaded += this.PriceAPIController_CollectionLoaded;
            mController.OnStateChange      += this.PriceAPIController_StateChange;

            mRemoveController.OnErrorEvent         += this.PriceAPIController_Error;
            mRemoveController.OnListPreparedEvent  += this.RemoveQuotesController_Prepared;
            mRemoveController.OnQuotesRemovedEvent += this.RemoveQuotesController_Removed;
        }
Пример #3
0
 /// <summary>
 /// Saves the configuration
 /// </summary>
 /// <param name="config">The configuration</param>
 public static void Save(ForexConnectConfig config)
 {
     Properties.Settings.Default.ForexConnectConfig_UserName   = config.UserName;
     Properties.Settings.Default.ForexConnectConfig_Url        = config.Url;
     Properties.Settings.Default.ForexConnectConfig_Connection = config.Connection;
 }