Exemplo n.º 1
0
        private void SetPostPropertiesControl(string postid)
        {
            string       postId       = postid;
            PostProperty postProperty = postProperties.FindById(postId);

            if (postProperty != null)
            {
                tbPostName.Text           = postProperty.Name;
                tbPostId.Text             = postProperty.Id;
                tbPostCaption.Text        = postProperty.Caption;
                chkPostEnabled.Checked    = postProperty.Enabled;
                tbPostBtnImgOn.Text       = postProperty.BtnImageOn;
                tbPostBtnImgOff.Text      = postProperty.BtnImageOff;
                pickPostPrintCopies.Value = (decimal)postProperty.PrintCopies;
                tbPostTicketHeader.Text   = postProperty.PrintHeader;

                if (postProperty.Index == 0 || postProperty.Index == 1 || postProperty.Index == 2 ||
                    postProperty.Index == 5 || postProperty.Index == 6 || postProperty.Index == 7)
                {
                    chkPostVisible.Checked = true;
                    chkPostVisible.Enabled = false;
                }
                else
                {
                    chkPostVisible.Checked = postProperty.Visible;
                    chkPostVisible.Enabled = true;
                }
            }
        }
Exemplo n.º 2
0
        private void SetPostPropertiesControl(string postid)
        {
            string       postId = postid;
            PostProperty prop   = _postProperties.FindById(postId);

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

                if (prop.Id == _settings.StationPost)
                {
                    chkPostPlayAudio.Checked = true;
                }

                if (prop.Index == 0 || prop.Index == 1 || prop.Index == 2 ||
                    prop.Index == 5 || prop.Index == 6 || prop.Index == 7)
                {
                    chkPostVisible.Checked = true;
                    chkPostVisible.Enabled = false;
                }
                else
                {
                    chkPostVisible.Checked = prop.Visible;
                    chkPostVisible.Enabled = true;
                }
            }
        }
Exemplo n.º 3
0
        private void OnPrintCopiesValueChanged(object sender, EventArgs e)
        {
            var          postId      = cbSelectPost.Text;
            var          printCopieS = ((NumericUpDown)sender).Value;
            PostProperty prop        = postProperties.FindById(postId);

            if (prop != null)
            {
                prop.PrintCopies = (short)printCopieS;
            }
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
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();
        }