Beispiel #1
0
        public void UpdateService()
        {
            Text = @"Event Log - " + ServiceName;
            ConfigurationLoggingSession.ServerDirectory = ServiceDirectory;
            checkBoxEnableLogging.Text = string.Format("Enable Logging ({0})", ServiceName);

            bool logDicomDataset;

            checkBoxEnableLogging.Checked = ConfigurationLoggingSession.ReadSettings(out logDicomDataset);
            checkBoxLogDatasets.Checked   = logDicomDataset;
        }
Beispiel #2
0
        private void UpdateSettings()
        {
            ConfigurationLoggingSession.ServerDirectory = ServiceDirectory;

            try
            {
                ConfigurationLoggingSession.WriteSettings(checkBoxEnableLogging.Checked, checkBoxLogDatasets.Checked);
                if (ActiveService != null && ActiveService.Status == System.ServiceProcess.ServiceControllerStatus.Running)
                {
                    ActiveService.SendMessage(MyDicomLoggingChannel.SettingsChanged);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }