Exemplo n.º 1
0
 public void Init()
 {
     try
     {
         if (!this._isInit)
         {
             if (!ApplicationInfo.IsSupportTfex)
             {
                 this._filterType = frmTickerSetting.filterType.SET_ONLY;
             }
             this.toolTip1.SetToolTip(this.btnFilterSetting, "Ticker Setting");
             this.SetHeaderColor(false);
             this._isTickerLoading = false;
             this._isInit = true;
         }
     }
     catch (Exception ex)
     {
         this.ShowError("Init", ex);
     }
 }
Exemplo n.º 2
0
 public frmTickerSetting(frmTickerSetting.filterType filterType)
 {
     this.InitializeComponent();
     this._filterTickerType = filterType;
 }
Exemplo n.º 3
0
 private void frmTickerSetting_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         this._filterType = ((frmTickerSetting)sender).FilterTickerType;
         switch (this._filterType)
         {
         case frmTickerSetting.filterType.ALL_MARKET:
             this.lbFilterType.Text = "Filter : All";
             break;
         case frmTickerSetting.filterType.SET_ONLY:
             this.lbFilterType.Text = "Filter : SET Only";
             break;
         case frmTickerSetting.filterType.TFEX_ONLY:
             this.lbFilterType.Text = "Filter : TFEX Only";
             break;
         case frmTickerSetting.filterType.SYMBOL:
             ApplicationInfo.TickerStockList = ((frmTickerSetting)sender).SymbolList;
             this.lbFilterType.Text = "Filter : Symbols";
             break;
         case frmTickerSetting.filterType.FAV1:
             this._favListPage = 1;
             this.lbFilterType.Text = "Filter : Favorite 1";
             break;
         case frmTickerSetting.filterType.FAV2:
             this._favListPage = 2;
             this.lbFilterType.Text = "Filter : Favorite 2";
             break;
         case frmTickerSetting.filterType.FAV3:
             this._favListPage = 3;
             this.lbFilterType.Text = "Filter : Favorite 3";
             break;
         case frmTickerSetting.filterType.FAV4:
             this._favListPage = 4;
             this.lbFilterType.Text = "Filter : Favorite 4";
             break;
         case frmTickerSetting.filterType.FAV5:
             this._favListPage = 5;
             this.lbFilterType.Text = "Filter : Favorite 5";
             break;
         }
         this.SetResize();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
 private void frmTickerSetting_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (this.rdbtnSymbol.Checked)
         {
             this._filterTickerType = frmTickerSetting.filterType.SYMBOL;
             if (this.lstSymbol.Items.Count > 0)
             {
                 this._symbolList.Clear();
                 foreach (string item in this.lstSymbol.Items)
                 {
                     this._symbolList.Add(item);
                 }
             }
         }
         else if (this.rdbtnBoard.Checked)
         {
             if (this.cbFavListType.Text == "Favorites 1")
             {
                 this._filterTickerType = frmTickerSetting.filterType.FAV1;
             }
             else if (this.cbFavListType.Text == "Favorites 2")
             {
                 this._filterTickerType = frmTickerSetting.filterType.FAV2;
             }
             else if (this.cbFavListType.Text == "Favorites 3")
             {
                 this._filterTickerType = frmTickerSetting.filterType.FAV3;
             }
             else if (this.cbFavListType.Text == "Favorites 4")
             {
                 this._filterTickerType = frmTickerSetting.filterType.FAV4;
             }
             else if (this.cbFavListType.Text == "Favorites 5")
             {
                 this._filterTickerType = frmTickerSetting.filterType.FAV5;
             }
         }
         else if (this.rdbtnMarket.Checked)
         {
             if (this.rdbAllMarket.Checked)
             {
                 this._filterTickerType = frmTickerSetting.filterType.ALL_MARKET;
             }
             else if (this.rdbSET.Checked)
             {
                 this._filterTickerType = frmTickerSetting.filterType.SET_ONLY;
             }
             else if (this.rdbTFEX.Checked)
             {
                 this._filterTickerType = frmTickerSetting.filterType.TFEX_ONLY;
             }
         }
     }
     catch (Exception ex)
     {
         this.ShowError("frmTickerSetting_FormClosing", ex);
     }
 }