private void Window_Loaded(object sender, RoutedEventArgs e) { int room = shared.GetIntValue("room"); string topForm = shared.GetStringValue("topForm"); this.cb_topForm.IsChecked = (string.IsNullOrEmpty(topForm)) ? true : Convert.ToBoolean(topForm); txt_room.Text = room + ""; }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { int room = shared.GetIntValue("room"); string topForm = shared.GetStringValue("topForm"); this.Topmost = (string.IsNullOrEmpty(topForm)) ? true : Convert.ToBoolean(topForm); if (room != 0) { Start(room); } else { if (settingWindow == null) { settingWindow = new SettingWindow(this); } settingWindow.Show(); } }