private void OnSelectCfg_Button_Click(object sender, RoutedEventArgs e) { // 选择配置 //if (DealCfgs.Count < 1) // return; //int newSelected; //if (CfgSelectWnd.ShowDialog(DealCfgs, TileCfgIndex,out newSelected, this)) //{ // TileCfgIndex = newSelected; // TbCurrentCfg.Text = CurrentDealCfg.Name; //} var hostWnd = new HostWnd { Owner = this }; var result = hostWnd.ShowDialog(); if (result == false) { return; } ProgramConfig.ServerUrl = hostWnd.HostUrl; ProgramConfig.SaveConfig2File(); UpdateTile(); }
public MainWindow() { InitIdNames(); DataContext = this; InitializeComponent(); LoadMahjongPics(); HideTileStackWnds(); ProgramConfig.LoadConfigFromFile(); UpdateTile(); }