public Window1() {
InitializeComponent();
RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, false);
var tools = Enumerable.Empty<Tool>();
if (File.Exists(TOOLS_XML_FILE)) {
tools = from elm in XDocument.Load(TOOLS_XML_FILE).Root.Elements("tool")
select new Tool(elm.Attribute("id").Value) {
Url = elm.Attribute("url").Value,
RegisiterTime = ((DateTime?)elm.Attribute("regtime")) ?? DateTime.Now
};
}
service = new ZCentralService(this.Dispatcher, tools);
RemotingServices.Marshal(service, "manager");
this.DataContext = service.Tools;
}