Exemplo n.º 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;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Saves the configuration
 /// </summary>
 /// <param name="config">The configuration</param>
 public static void Save(PriceHistoryConfig config)
 {
     Properties.Settings.Default.PriceHistoryConfig_CachePath = config.CachePath;
 }