public MainForm() { InitializeComponent(); updateImageLabels(); saveCaseDialog.InitialDirectory = Application.StartupPath; openCaseDialog.InitialDirectory = Application.StartupPath; this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.imagePanel_MouseWheel); assignHandlers(this); string config_file = Path.Combine(Application.StartupPath, "casemaker_config.xml"); List <string> urlList = new List <string>(); try { XmlDocument doc = new XmlDocument(); doc.Load(config_file); XmlNodeList nodelist = doc.SelectNodes("//location"); dictLocation = new Dictionary <string, string>(); Debug.WriteLine("Reading locations"); foreach (XmlNode node in nodelist) { string matchstring = node.Attributes["matchstring"].Value; string site = node.Attributes["site"].Value; dictLocation.Add(matchstring, site); } Debug.WriteLine("Reading upload URLs"); nodelist = doc.SelectNodes("//site"); foreach (XmlNode node in nodelist) { string url = node.Attributes["url"].Value; urlList.Add(url); } } catch (Exception e) { Debug.WriteLine("Config XML error: " + e.Message); dictLocation = new Dictionary <string, string>() { { "datasource=https%253A%252F%252Fkeckimaging.usc.edu", "Keck/Norris" }, { "datasource=https%253A%252F%252Fexternal.synapse.uscuh.com", "UH/Norris" }, { "datasource=http%253A%252F%252Fsynapse.uscuh.com", "UH/Norris" }, { "datasource=https%253A%252F%252Ffujipacs.hsc.usc.edu", "HCC2" }, { "datasource=http%253A%252F%252Fhcc2synvweb", "HCC2" }, { "datasource=http%253A%252F%252Flacsynapse", "LACUSC" }, { "datasource=http%253A%252F%252Fdhssynapse", "LACUSC" }, { "datasource=http%253A%252F%252F160uscpacdbpw02", "LACUSC" } }; urlList = new List <string>() { "http://207.151.11.95:8080/submit/ss1", "http://192.168.0.101:8080/submit/ss1", "http://mirc.usc.edu/submit/ss1" }; } uploadDialog = new UploadMIRCDialog(urlList); dictCategory = new Dictionary <CheckBox, string>() { { checkBoxPulm, "Pulmonary" }, { checkBoxCV, "Cardiovascular" }, { checkBoxGI, "Gastrointestinal" }, { checkBoxGU, "Genitourinary" }, { checkBoxIR, "Vascular|Interventional" }, { checkBoxMammo, "Breast" }, { checkBoxMSK, "Musculoskeletal" }, { checkBoxNeuro, "Neuro" }, { checkBoxUltrasound, "Ultrasound" }, { checkBoxPeds, "Pediatric" }, { checkBoxNucs, "Nuclear" } }; ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; // activate TLS 1.2 ServicePointManager.Expect100Continue = false; // Ignore Certificate validation failures (aka untrusted certificate + certificate chains) ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true); bw.WorkerReportsProgress = true; bw.DoWork += sendMIRC; bw.ProgressChanged += sendMIRC_Progress; bw.RunWorkerCompleted += sendMIRC_Completed; }
public MainForm() { InitializeComponent(); updateImageLabels(); saveCaseDialog.InitialDirectory = Application.StartupPath; openCaseDialog.InitialDirectory = Application.StartupPath; this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.imagePanel_MouseWheel); assignHandlers(this); string config_file= Path.Combine(Application.StartupPath, "casemaker_config.xml"); List<string> urlList = new List<string>(); try { XmlDocument doc = new XmlDocument(); doc.Load(config_file); XmlNodeList nodelist = doc.SelectNodes("//location"); dictLocation = new Dictionary<string, string>(); Debug.WriteLine("Reading locations"); foreach (XmlNode node in nodelist) { string matchstring = node.Attributes["matchstring"].Value; string site = node.Attributes["site"].Value; dictLocation.Add(matchstring, site); } Debug.WriteLine("Reading upload URLs"); nodelist = doc.SelectNodes("//site"); foreach (XmlNode node in nodelist) { string url = node.Attributes["url"].Value; urlList.Add(url); } } catch (Exception e) { Debug.WriteLine("Config XML error: "+e.Message); dictLocation = new Dictionary<string, string>() { {"datasource=https%253A%252F%252Fkeckimaging.usc.edu","Keck/Norris"}, {"datasource=https%253A%252F%252Fexternal.synapse.uscuh.com", "UH/Norris"}, {"datasource=http%253A%252F%252Fsynapse.uscuh.com", "UH/Norris"}, {"datasource=https%253A%252F%252Ffujipacs.hsc.usc.edu","HCC2"}, {"datasource=http%253A%252F%252Fhcc2synvweb","HCC2"}, {"datasource=http%253A%252F%252Flacsynapse","LACUSC"}, {"datasource=http%253A%252F%252Fdhssynapse","LACUSC"} }; urlList = new List<string>() { "http://207.151.11.95:8080/submit/ss1", "http://192.168.0.101:8080/submit/ss1", "http://mirc.usc.edu/submit/ss1" }; } uploadDialog = new UploadMIRCDialog(urlList); dictCategory = new Dictionary<CheckBox, string>() { {checkBoxPulm,"Pulmonary"}, {checkBoxCV,"Cardiovascular"}, {checkBoxGI,"Gastrointestinal"}, {checkBoxGU,"Genitourinary"}, {checkBoxIR,"Vascular|Interventional"}, {checkBoxMammo,"Breast"}, {checkBoxMSK,"Musculoskeletal"}, {checkBoxNeuro,"Neuro"}, {checkBoxUltrasound,"Ultrasound"}, {checkBoxPeds,"Pediatric"}, {checkBoxNucs,"Nuclear"} }; ServicePointManager.Expect100Continue = false; // Ignore Certificate validation failures (aka untrusted certificate + certificate chains) ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true); bw.WorkerReportsProgress = true; bw.DoWork += sendMIRC; bw.ProgressChanged += sendMIRC_Progress; bw.RunWorkerCompleted += sendMIRC_Completed; }