SaveToConfiguration() public method

public SaveToConfiguration ( ) : void
return void
Ejemplo n.º 1
0
        private void SaveSettings()
        {
            Properties.Settings.Default.QueueServerHost        = tbServer.Text;
            Properties.Settings.Default.QueueServerPort        = Convert.ToInt32(tbPort.Text);
            Properties.Settings.Default.StationName            = tbStation.Text;
            Properties.Settings.Default.StationPost            = cbPost.Text;
            Properties.Settings.Default.StartDisplayFullScreen = chkStartFullScreen.Checked;
            Properties.Settings.Default.PrintTicket            = chkPrintTicket.Checked;
            Properties.Settings.Default.RunningText0           = txtRuntext0.Text;
            Properties.Settings.Default.RunningText1           = txtRuntext1.Text;
            Properties.Settings.Default.PrintFooter            = txtPrintFooter.Text;
            Properties.Settings.Default.DisplayLogoImg         = tbImgLogo.Text;
            Properties.Settings.Default.DisplayHeaderImg       = tbImgHeader.Text;
            Properties.Settings.Default.DisplayHeaderBg        = tbImgBG.Text;

            Properties.Settings.Default.DrawLabelOnButtons     = chkButtonsWithLabel.Checked;
            Properties.Settings.Default.ButtonLabelFontSize    = (int)btnFontSizeChanger.Value;
            Properties.Settings.Default.MainMenuLabelFontSize  = (int)labelFontSizeChanger.Value;
            Properties.Settings.Default.MainMenuLabelAlignment = GetMainMenuLabelAlignmentValue();

            Properties.Settings.Default.ShowLeftMenu  = chkShowLeftMenu.Checked;
            Properties.Settings.Default.ShowRightMenu = chkShowRightMenu.Checked;

            // save post options
            var          postId = cbSelectPost.Text;
            PostProperty prop   = postProperties.FindById(postId);

            if (prop != null)
            {
                prop.Name = tbPostName.Text;
                //prop.Id = tbPostId.Text;
                prop.Caption     = tbPostCaption.Text;
                prop.Visible     = chkPostVisible.Checked;
                prop.Enabled     = chkPostEnabled.Checked;
                prop.BtnImageOn  = tbPostBtnImgOn.Text;
                prop.BtnImageOff = tbPostBtnImgOff.Text;
                prop.PrintHeader = tbPostTicketHeader.Text;
                //prop.PrintFooter = tbPostTicketFooter.Text;
                prop.PrintCopies = (short)pickPostPrintCopies.Value;
            }
            postProperties.SaveToConfiguration();

            Properties.Settings.Default.Save();
        }
Ejemplo n.º 2
0
        private void SaveSettings()
        {
            _settings.AudioLoketIDUseAlphabet     = chkAudioLoketIDUseAlphabet.Checked;
            _settings.QueueAnimationTimeInSecond  = (int)numericUpDown.Value;
            _settings.PlayVideoAtStartup          = chkPlayVideoStartup.Checked;
            _settings.StartNumberWithUnderscore   = chkSetUnderscore.Checked;
            _settings.NumberAudioLocation         = tbAudioFolder.Text;
            _settings.VideoClipLocation           = tbClipFolder.Text;
            _settings.StartDisplayFullScreen      = mDisplay.isFullScreen;
            _settings.AudioSpellNumber            = chkSpellNumber.Checked;
            _settings.PlaySimpleSoundNotification = chkPlaySimpleNotification.Checked;
            _settings.ShowLogo            = chkShowLogo.Checked;
            _settings.ShowInfoTextTop0    = chkShowInfoTextTop0.Checked;
            _settings.ShowInfoTextTop1    = chkShowInfoTextTop1.Checked;
            _settings.ShowCenterMiddleDiv = chkShowCenterMiddleDiv.Checked;
            _settings.ShowLeftPosts       = chkShowLeftPosts.Checked;
            _settings.ShowRightPosts      = chkShowRightPosts.Checked;

            _settings.DSEngineVolumeLevel = mDisplay.DSEngine.CurrentVolume;

            if (mDisplay.DSEngine.DisplaySource == DisplaySource.Stream)
            {
                _settings.VideoSource          = "VideoInputDevice";
                _settings.VideoInputDevicePath = mDisplay.DSEngine.VideoInputDevicePath;
                _settings.VideoInputDeviceName = mDisplay.DSEngine.VideoInputDeviceName;

                if (mDisplay.DSEngine.UsingCrossbar)
                {
                    string src;
                    if (mDisplay.DSEngine.VideoInputDeviceSource == PhysicalConnectorType.Video_Tuner)
                    {
                        src = "VideoTuner";
                    }
                    else if (mDisplay.DSEngine.VideoInputDeviceSource == PhysicalConnectorType.Video_SVideo)
                    {
                        src = "VideoSVideo";
                    }
                    else if (mDisplay.DSEngine.VideoInputDeviceSource == PhysicalConnectorType.Video_Composite)
                    {
                        src = "VideoComposite";
                    }
                    else
                    {
                        src = String.Empty;
                    }

                    _settings.VideoInputDeviceSource = src;
                }
            }
            else if (mDisplay.DSEngine.DisplaySource == DisplaySource.Clip)
            {
                _settings.VideoSource = "VideoCLip";
            }

            _settings.QueueServerHost = tbServer.Text;
            _settings.QueueServerPort = Convert.ToInt32(tbPort.Text);
            _settings.StationName     = tbStation.Text;
            _settings.StationPost     = cbPost.Text;

            _settings.RunningText0 = txtRuntext0.Text;
            _settings.RunningText1 = txtRuntext1.Text;

            _settings.DisplayLogoImg  = tbImgLogo.Text;
            _settings.DisplayLogoText = tbTextLogo.Text;


            // save post options
            var          postId = cbSelectPost.Text;
            PostProperty prop   = _postProperties.FindById(postId);

            if (prop != null)
            {
                prop.Name = tbPostName.Text;
                //prop.Id = tbPostId.Text;
                prop.Caption   = tbPostCaption.Text;
                prop.Visible   = chkPostVisible.Checked;
                prop.PlayAudio = chkPostPlayAudio.Checked;
                prop.RunText   = tbPostRunText.Text;

                if (prop.Index == 0 || prop.Index == 1 || prop.Index == 2 ||
                    prop.Index == 5 || prop.Index == 6 || prop.Index == 7)
                {
                    prop.Visible = true;
                }
            }

            _postProperties.SaveToConfiguration();

            _settings.Save();
        }