| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Infrastructure.Helpers;
- using System;
- using System.Windows;
- using System.Windows.Controls;
- using Muchinfo.MTPClient.Account.Views;
- using Muchinfo.MTPClient.Infrastructure.Utilities;
- namespace Muchinfo.MTPClient.UI.Views
- {
- /// <summary>
- /// MainContent.xaml 的交互逻辑
- /// </summary>
- public partial class MainContent : UserControl
- {
- public MainContent()
- {
- InitializeComponent();
- MessengerHelper.DefaultRegister<TabContetMode>(this, MessengerTokens.ActiveMainRadio, (contentMode) =>
- {
- this.Dispatcher.BeginInvoke(new Action(() =>
- {
- switch (contentMode)
- {
- case TabContetMode.QuoteList:
- ////列表报价
- QuoteRadioButton.SetValue(Panel.ZIndexProperty, 10);
- QuoteRadioButton2.SetValue(Panel.ZIndexProperty, 5);
- CandelstickRadioButton.SetValue(Panel.ZIndexProperty, 4);
- //GoodsInfoRadioButton.SetValue(Panel.ZIndexProperty, 3);
- QuoteListView.Focusable = true;
- QuoteListView.Focus();
- break;
- case TabContetMode.QuoteBoard:
- ////大字报价牌
- QuoteRadioButton.SetValue(Panel.ZIndexProperty, 10);
- QuoteRadioButton2.SetValue(Panel.ZIndexProperty, 20);
- CandelstickRadioButton.SetValue(Panel.ZIndexProperty, 4);
- //GoodsInfoRadioButton.SetValue(Panel.ZIndexProperty, 3);
- break;
- case TabContetMode.QuoteChart:
- ////图表
- QuoteRadioButton.SetValue(Panel.ZIndexProperty, 10);
- QuoteRadioButton2.SetValue(Panel.ZIndexProperty, 5);
- CandelstickRadioButton.SetValue(Panel.ZIndexProperty, 20);
- //GoodsInfoRadioButton.SetValue(Panel.ZIndexProperty, 3);
- ChartContentControl.Focusable = true;
- ChartContentControl.Focus();
- break;
- case TabContetMode.QuoteGoodsInfo:
- ////商品资料
- QuoteRadioButton.SetValue(Panel.ZIndexProperty, 10);
- QuoteRadioButton2.SetValue(Panel.ZIndexProperty, 5);
- CandelstickRadioButton.SetValue(Panel.ZIndexProperty, 3);
- //GoodsInfoRadioButton.SetValue(Panel.ZIndexProperty, 30);
- break;
- case TabContetMode.HistoryCommissions:
- ////五档历史
- QuoteRadioButton.SetValue(Panel.ZIndexProperty, 10);
- QuoteRadioButton2.SetValue(Panel.ZIndexProperty, 5);
- CandelstickRadioButton.SetValue(Panel.ZIndexProperty, 3);
- ListingBoardButton.SetValue(Panel.ZIndexProperty, 2);
- break;
- }
- }));
- });
- this.Loaded += MainContent_Loaded;
- }
- void MainContent_Loaded(object sender, System.Windows.RoutedEventArgs e)
- {
- QuoteListView.Focusable = true;
- QuoteListView.Focus();
- //未修改密码的 且 系统配置首次登录需要修改密码的 则弹出修改密码窗口
- if (UserManager.CurrentTradeAccount.HasUpdatedPwd == 0 && SystemParamManager.IsForceModify)
- {
- MessengerHelper.DefaultSend(false, MessengerTokens.ShowModifyPwd);
- }
- }
- }
- }
|