private void InitInterface() { // Initiate ICommands for KeyBindings icToggleFullscreen = new ActionCommand(() => ToggleFullscreen()); icPauseDevice = new ActionCommand(() => TogglePause()); icCloseDevice = new ActionCommand(() => this.Close()); icExitProgram = new ActionCommand(() => App.Patient_Editor.Exit()); icSaveScreen = new ActionCommand(() => SaveScreen()); icPrintScreen = new ActionCommand(() => PrintScreen()); // Populate UI strings per language selection wdwDeviceDefib.Title = App.Language.Localize("DEFIB:WindowTitle"); menuDevice.Header = App.Language.Localize("MENU:MenuDeviceOptions"); menuPauseDevice.Header = App.Language.Localize("MENU:MenuPauseDevice"); menuAddNumeric.Header = App.Language.Localize("MENU:MenuAddNumeric"); menuAddTracing.Header = App.Language.Localize("MENU:MenuAddTracing"); menuToggleFullscreen.Header = App.Language.Localize("MENU:MenuToggleFullscreen"); menuSaveScreen.Header = App.Language.Localize("MENU:MenuSaveScreen"); menuPrintScreen.Header = App.Language.Localize("MENU:MenuPrintScreen"); menuCloseDevice.Header = App.Language.Localize("MENU:MenuCloseDevice"); menuExitProgram.Header = App.Language.Localize("MENU:MenuExitProgram"); btntxtDefib.Text = App.Language.Localize("DEFIB:Defibrillator"); txtEnergyAmount.Text = App.Language.Localize("DEFIB:EnergyAmount"); btntxtEnergyDecrease.Text = App.Language.Localize("DEFIB:Decrease"); btntxtEnergyIncrease.Text = App.Language.Localize("DEFIB:Increase"); btntxtCharge.Text = App.Language.Localize("DEFIB:Charge"); btntxtShock.Text = App.Language.Localize("DEFIB:Shock"); btntxtAnalyze.Text = App.Language.Localize("DEFIB:Analyze"); btntxtSync.Text = App.Language.Localize("DEFIB:Sync"); btntxtPacer.Text = App.Language.Localize("DEFIB:Pacer"); txtPaceRate.Text = App.Language.Localize("DEFIB:Rate"); btntxtPaceRateDecrease.Text = App.Language.Localize("DEFIB:Decrease"); btntxtPaceRateIncrease.Text = App.Language.Localize("DEFIB:Increase"); txtPaceEnergy.Text = App.Language.Localize("DEFIB:EnergyAmount"); btntxtPaceEnergyDecrease.Text = App.Language.Localize("DEFIB:Decrease"); btntxtPaceEnergyIncrease.Text = App.Language.Localize("DEFIB:Increase"); btntxtPacePause.Text = App.Language.Localize("DEFIB:Pause"); }
private void InitInterface() { // Initiate ICommands for KeyBindings icToggleFullscreen = new ActionCommand(() => ToggleFullscreen()); icPauseDevice = new ActionCommand(() => TogglePause()); icCloseDevice = new ActionCommand(() => this.Close()); icExitProgram = new ActionCommand(() => App.Patient_Editor.Exit()); icSaveScreen = new ActionCommand(() => SaveScreen()); icPrintScreen = new ActionCommand(() => PrintScreen()); // Populate UI strings per language selection wdwDeviceMonitor.Title = App.Language.Localize("CM:WindowTitle"); menuDevice.Header = App.Language.Localize("MENU:MenuDeviceOptions"); menuPauseDevice.Header = App.Language.Localize("MENU:MenuPauseDevice"); menuAddNumeric.Header = App.Language.Localize("MENU:MenuAddNumeric"); menuAddTracing.Header = App.Language.Localize("MENU:MenuAddTracing"); menuToggleFullscreen.Header = App.Language.Localize("MENU:MenuToggleFullscreen"); menuSaveScreen.Header = App.Language.Localize("MENU:MenuSaveScreen"); menuPrintScreen.Header = App.Language.Localize("MENU:MenuPrintScreen"); menuCloseDevice.Header = App.Language.Localize("MENU:MenuCloseDevice"); menuExitProgram.Header = App.Language.Localize("MENU:MenuExitProgram"); }
private void InitInterface() { // Initiate ICommands for KeyBindings icToggleFullscreen = new ActionCommand(() => ToggleFullscreen()); icPauseDevice = new ActionCommand(() => TogglePause()); icCloseDevice = new ActionCommand(() => this.Close()); icExitProgram = new ActionCommand(() => App.Patient_Editor.RequestExit()); // Populate UI strings per language selection wdwDeviceECG.Title = App.Language.Dictionary ["ECG:WindowTitle"]; menuDevice.Header = App.Language.Dictionary ["MENU:MenuDeviceOptions"]; menuPauseDevice.Header = App.Language.Dictionary ["MENU:MenuPauseDevice"]; menuToggleFullscreen.Header = App.Language.Dictionary ["MENU:MenuToggleFullscreen"]; menuCloseDevice.Header = App.Language.Dictionary ["MENU:MenuCloseDevice"]; menuExitProgram.Header = App.Language.Dictionary ["MENU:MenuExitProgram"]; /* 12 Lead ECG Interface layout */ List <Leads.Values> listLeads = new List <Leads.Values> (); foreach (Leads.Values v in Enum.GetValues(typeof(Leads.Values))) { if (v.ToString().StartsWith("ECG")) { listLeads.Add(v); } } int amtRows = 3, amtColumns = 4, indexLeads = 0; // Set grid's row and column definitions for (int i = 0; i < amtRows; i++) { layoutGrid.RowDefinitions.Add(new RowDefinition()); } for (int i = 0; i < amtColumns; i++) { layoutGrid.ColumnDefinitions.Add(new ColumnDefinition()); } // Populate the grid with tracings for each lead for (int iColumns = 0; iColumns < amtColumns; iColumns++) { for (int iRows = 0; iRows < amtRows && indexLeads < listLeads.Count; iRows++) { listTracings.Add(new Controls.ECGTracing(new Strip(3f, listLeads [indexLeads]))); listTracings [indexLeads].SetValue(Grid.ColumnProperty, iColumns); listTracings [indexLeads].SetValue(Grid.RowProperty, iRows); layoutGrid.Children.Add(listTracings [indexLeads]); indexLeads++; } } // Add Lead II running along bottom spanning all columns Controls.ECGTracing leadII = new Controls.ECGTracing(new Strip(12f, Leads.Values.ECG_II)); leadII.SetValue(Grid.ColumnProperty, 0); leadII.SetValue(Grid.RowProperty, 4); leadII.SetValue(Grid.ColumnSpanProperty, 4); listTracings.Add(leadII); layoutGrid.RowDefinitions.Add(new RowDefinition()); layoutGrid.Children.Add(listTracings [indexLeads]); }
private void InitInterface() { // Initiate ICommands for KeyBindings icLoadFile = new ActionCommand(() => LoadFile()); icSaveFile = new ActionCommand(() => SaveFile()); // Populate UI strings per language selection wdwPatientEditor.Title = App.Language.Dictionary ["PE:WindowTitle"]; menuFile.Header = App.Language.Dictionary ["PE:MenuFile"]; menuLoad.Header = App.Language.Dictionary ["PE:MenuLoadSimulation"]; menuSave.Header = App.Language.Dictionary ["PE:MenuSaveSimulation"]; menuExit.Header = App.Language.Dictionary ["PE:MenuExitProgram"]; menuSettings.Header = App.Language.Dictionary ["PE:MenuSettings"]; menuSetLanguage.Header = App.Language.Dictionary ["PE:MenuSetLanguage"]; menuHelp.Header = App.Language.Dictionary ["PE:MenuHelp"]; menuAbout.Header = App.Language.Dictionary ["PE:MenuAboutProgram"]; lblGroupDevices.Content = App.Language.Dictionary ["PE:Devices"]; lblDeviceMonitor.Content = App.Language.Dictionary ["PE:CardiacMonitor"]; lblDevice12LeadECG.Content = App.Language.Dictionary ["PE:12LeadECG"]; lblDeviceDefibrillator.Content = App.Language.Dictionary ["PE:Defibrillator"]; lblDeviceIABP.Content = App.Language.Dictionary ["PE:IABP"]; //lblDeviceVentilator.Content = App.Language.Dictionary["PE:Ventilator"]; //lblDeviceEFM.Content = App.Language.Dictionary["PE:EFM"]; //lblDeviceIVPump.Content = App.Language.Dictionary["PE:IVPump"]; //lblDeviceLabResults.Content = App.Language.Dictionary["PE:LabResults"]; lblGroupMirroring.Content = App.Language.Dictionary ["PE:MirrorPatientData"]; lblMirrorStatus.Content = App.Language.Dictionary ["PE:Status"]; radioInactive.Content = App.Language.Dictionary ["PE:Inactive"]; radioServer.Content = App.Language.Dictionary ["PE:Server"]; radioClient.Content = App.Language.Dictionary ["PE:Client"]; lblAccessionKey.Content = App.Language.Dictionary ["PE:AccessionKey"]; lblAccessPassword.Content = App.Language.Dictionary ["PE:AccessPassword"]; lblAdminPassword.Content = App.Language.Dictionary ["PE:AdminPassword"]; btnApplyMirroring.Content = App.Language.Dictionary ["BUTTON:ApplyChanges"]; lblGroupVitalSigns.Content = App.Language.Dictionary ["PE:VitalSigns"]; lblHR.Content = String.Format("{0}:", App.Language.Dictionary ["PE:HeartRate"]); lblNIBP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:BloodPressure"]); lblRR.Content = String.Format("{0}:", App.Language.Dictionary ["PE:RespiratoryRate"]); lblSPO2.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PulseOximetry"]); lblT.Content = String.Format("{0}:", App.Language.Dictionary ["PE:Temperature"]); lblCardiacRhythm.Content = String.Format("{0}:", App.Language.Dictionary ["PE:CardiacRhythm"]); checkDefaultVitals.Content = App.Language.Dictionary ["PE:UseDefaultVitalSignRanges"]; lblGroupHemodynamics.Content = App.Language.Dictionary ["PE:AdvancedHemodynamics"]; lblETCO2.Content = String.Format("{0}:", App.Language.Dictionary ["PE:EndTidalCO2"]); lblCVP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:CentralVenousPressure"]); lblASBP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:ArterialBloodPressure"]); lblPSP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PulmonaryArteryPressure"]); lblICP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:IntracranialPressure"]); lblIAP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:IntraabdominalPressure"]); lblGroupRespiratoryProfile.Content = App.Language.Dictionary ["PE:RespiratoryProfile"]; lblRespiratoryRhythm.Content = String.Format("{0}:", App.Language.Dictionary ["PE:RespiratoryRhythm"]); lblMechanicallyVentilated.Content = String.Format("{0}:", App.Language.Dictionary ["PE:MechanicallyVentilated"]); lblInspiratoryRatio.Content = String.Format("{0}:", App.Language.Dictionary ["PE:InspiratoryExpiratoryRatio"]); lblGroupCardiacProfile.Content = App.Language.Dictionary ["PE:CardiacProfile"]; lblPacemakerCaptureThreshold.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PacemakerCaptureThreshold"]); lblPulsusParadoxus.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PulsusParadoxus"]); lblPulsusAlternans.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PulsusAlternans"]); lblCardiacAxis.Content = String.Format("{0}:", App.Language.Dictionary ["PE:CardiacAxis"]); grpSTSegmentElevation.Header = App.Language.Dictionary ["PE:STSegmentElevation"]; grpTWaveElevation.Header = App.Language.Dictionary ["PE:TWaveElevation"]; lblGroupObstetricProfile.Content = App.Language.Dictionary ["PE:ObstetricProfile"]; lblFHR.Content = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartRate"]); lblFHRRhythms.Content = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartRhythms"]); lblFHRVariability.Content = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartVariability"]); lblUCFrequency.Content = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionFrequency"]); lblUCDuration.Content = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionDuration"]); lblUCIntensity.Content = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionIntensity"]); lblParametersApply.Content = App.Language.Dictionary ["BUTTON:ApplyChanges"]; lblParametersReset.Content = App.Language.Dictionary ["BUTTON:ResetParameters"]; List <string> cardiacRhythms = new List <string> (), cardiacAxes = new List <string> (), respiratoryRhythms = new List <string> (), intensityScale = new List <string> (), fetalHeartRhythms = new List <string> (); foreach (Cardiac_Rhythms.Values v in Enum.GetValues(typeof(Cardiac_Rhythms.Values))) { cardiacRhythms.Add(App.Language.Dictionary [Cardiac_Rhythms.LookupString(v)]); } comboCardiacRhythm.ItemsSource = cardiacRhythms; foreach (CardiacAxes.Values v in Enum.GetValues(typeof(CardiacAxes.Values))) { cardiacAxes.Add(App.Language.Dictionary [CardiacAxes.LookupString(v)]); } comboCardiacAxis.ItemsSource = cardiacAxes; foreach (Respiratory_Rhythms.Values v in Enum.GetValues(typeof(Respiratory_Rhythms.Values))) { respiratoryRhythms.Add(App.Language.Dictionary [Respiratory_Rhythms.LookupString(v)]); } comboRespiratoryRhythm.ItemsSource = respiratoryRhythms; foreach (Patient.Intensity.Values v in Enum.GetValues(typeof(Patient.Intensity.Values))) { intensityScale.Add(App.Language.Dictionary [Patient.Intensity.LookupString(v)]); } comboFHRVariability.ItemsSource = intensityScale; comboUCIntensity.ItemsSource = intensityScale; foreach (FetalHeartDecelerations.Values v in Enum.GetValues(typeof(FetalHeartDecelerations.Values))) { fetalHeartRhythms.Add(App.Language.Dictionary [FetalHeartDecelerations.LookupString(v)]); } listFHRRhythms.ItemsSource = fetalHeartRhythms; // Populate status bar with updated version information and make visible BackgroundWorker bgw = new BackgroundWorker(); string latestVersion = ""; bgw.DoWork += delegate { latestVersion = App.Server.Get_LatestVersion(); }; bgw.RunWorkerCompleted += delegate { if (Utility.IsNewerVersion(Utility.Version, latestVersion)) { txtUpdateAvailable.Text = String.Format(App.Language.Dictionary ["STATUS:UpdateAvailable"], latestVersion).Trim(); } else { statusUpdateAvailable.Visibility = Visibility.Collapsed; } }; bgw.RunWorkerAsync(); }
private void InitInterface() { /* Initiate ICommands for KeyBindings */ icToggleFullscreen = new ActionCommand(() => ToggleFullscreen()); icPauseDevice = new ActionCommand(() => TogglePause()); icCloseDevice = new ActionCommand(() => Close()); icExitProgram = new ActionCommand(() => App.Patient_Editor.Exit()); icSaveScreen = new ActionCommand(() => SaveScreen()); icPrintScreen = new ActionCommand(() => PrintScreen()); /* Populate UI strings per language selection */ wdwDeviceECG.Title = App.Language.Localize("ECG:WindowTitle"); menuDevice.Header = App.Language.Localize("MENU:MenuDeviceOptions"); menuPauseDevice.Header = App.Language.Localize("MENU:MenuPauseDevice"); menuShowGrid.Header = App.Language.Localize("MENU:MenuShowGrid"); menuToggleFullscreen.Header = App.Language.Localize("MENU:MenuToggleFullscreen"); menuSaveScreen.Header = App.Language.Localize("MENU:MenuSaveScreen"); menuPrintScreen.Header = App.Language.Localize("MENU:MenuPrintScreen"); menuCloseDevice.Header = App.Language.Localize("MENU:MenuCloseDevice"); menuExitProgram.Header = App.Language.Localize("MENU:MenuExitProgram"); menuColor.Header = App.Language.Localize("MENU:MenuColorScheme"); menuColorLight.Header = App.Language.Localize("MENU:MenuColorSchemeLight"); menuColorDark.Header = App.Language.Localize("MENU:MenuColorSchemeDark"); /* Set background image for grid lines */ gridBackground = new ImageBrush(new BitmapImage( new Uri("pack://application:,,,/Resources/12L ECG Grid.png"))); /* 12 Lead ECG Interface layout */ List <Lead.Values> listLeads = new List <Lead.Values> (); foreach (Lead.Values v in Enum.GetValues(typeof(Lead.Values))) { if (v.ToString().StartsWith("ECG")) { listLeads.Add(v); } } int amtRows = 3, amtColumns = 4, indexLeads = 0; // Set grid's row and column definitions for (int i = 0; i < amtRows; i++) { layoutGrid.RowDefinitions.Add(new RowDefinition()); } for (int i = 0; i < amtColumns; i++) { layoutGrid.ColumnDefinitions.Add(new ColumnDefinition()); } // Populate the grid with tracings for each lead for (int iColumns = 0; iColumns < amtColumns; iColumns++) { for (int iRows = 0; iRows < amtRows && indexLeads < listLeads.Count; iRows++) { listTracings.Add(new Controls.ECGTracing(new Strip(listLeads [indexLeads], (4 - iColumns) * 2.5f, 2.5f))); listTracings [indexLeads].SetValue(Grid.ColumnProperty, iColumns); listTracings [indexLeads].SetValue(Grid.RowProperty, iRows); layoutGrid.Children.Add(listTracings [indexLeads]); indexLeads++; } } // Add Lead II running along bottom spanning all columns Controls.ECGTracing leadII = new Controls.ECGTracing(new Strip(Lead.Values.ECG_II, 10f)); leadII.SetValue(Grid.ColumnProperty, 0); leadII.SetValue(Grid.RowProperty, 4); leadII.SetValue(Grid.ColumnSpanProperty, 4); listTracings.Add(leadII); layoutGrid.RowDefinitions.Add(new RowDefinition()); layoutGrid.Children.Add(listTracings [indexLeads]); }