private void buttonLogin_Click(object sender, RoutedEventArgs e) { if (SigknowDBServer.gServer == Global.gEMPTY) { MessageBox.Show("請先設定伺服器資料."); return; } if (Global.gStation == Global.gEMPTY) { MessageBox.Show("輸入站名"); return; } if ((Global.gUsername == Global.gEMPTY) || (Global.gUsername == "")) { MessageBox.Show("輸入姓名"); return; } switch (Global.gStation) { case StationName.gStationA: var stationA = new StationA(this); this.Hide(); stationA.ShowDialog(); break; case StationName.gStationB: var stationB = new StationB(this); this.Hide(); stationB.ShowDialog(); break; case StationName.gStationC: var stationC = new StationC(this); this.Hide(); stationC.ShowDialog(); break; //case StationName.gStationD: // var stationD = new StationD(this); // this.Hide(); // stationD.ShowDialog(); // break; case StationName.gStationE: var stationE = new StationE(this); this.Hide(); stationE.ShowDialog(); break; case StationName.gStationF: var stationF = new StationF(this); this.Hide(); stationF.ShowDialog(); break; case StationName.gStationG: var stationG = new StationG(this); this.Hide(); stationG.ShowDialog(); break; } }
public StationEassociate(StationE w) : this() { mainwindow = w; }