//保存设置 private void SaveButtonClick(object sender, RoutedEventArgs e) { string[] path = { Relation_File_TextBox.Text, Label_Dir_TextBox.Text, Picture_Dir_TextBox.Text, Log_Dir_TextBox.Text, //Exception_File_TextBox.Text }; FileTools.SaveSettingFile(Setting_File_TextBox.Text, path); /*if (((MainWindow)this.Owner).GetLogPage() != null) * { * ((MainWindow)this.Owner).GetLogPage().LoadData(FileTools.logDirPath + "\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"); * ((MainWindow)this.Owner).GetLogPage().SetComboBox(); * } * * if (((MainWindow)this.Owner).GetRelationPage() != null) * ((MainWindow)this.Owner).GetRelationPage().LoadData(); * * this.Close();*/ if (((Window1)this.Owner).GetLogPage() != null) { ((Window1)this.Owner).GetLogPage().LoadData(FileTools.logDirPath + "\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"); ((Window1)this.Owner).GetLogPage().SetComboBox(); } if (((Window1)this.Owner).GetRelationPage() != null) { ((Window1)this.Owner).GetRelationPage().LoadData(); } this.Close(); }