Пример #1
0
        private void initForm()
        {
            //throw new NotImplementedException();
            lbl0Msg.Text = "";
            _isScroll = false;

            _InstartTime = DateTime.Now.AddHours(-1);
            _InendTime = DateTime.Now;

            dateTimePicker1.Format = DateTimePickerFormat.Custom;
            dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
            dateTimePicker1.Value = DateTime.Now.AddHours(-3);

            _byChannel = 0;

            _jsStockInDate = null;
            _jsStockInNotic = null;
            _jsStockOutDate = null;
            _jsStockOutNotic = null;
            _jsStockShelfDate = null;
            _jsStockShelfNotic = null;

            //list doublie
            listBox1.DoubleClick += listBox1_DoubleClick;

            _fullplay = new FullPlay(this);
        }
Пример #2
0
        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                //if (_isDoublePlay)
                //{
                //    return;
                //}
                if (_lisIn.Count > 0)
                {
                    m_IsFullScreen = !m_IsFullScreen;//点一次全屏,再点还原。
                    this.SuspendLayout();
                    _fullplay = new FullPlay(this);
                    if (m_IsFullScreen)//全屏 ,按特定的顺序执行
                    {
                        SetFormFullScreen(m_IsFullScreen);
                        _fullplay.FormBorderStyle = FormBorderStyle.None;
                        _fullplay.WindowState = FormWindowState.Maximized;
                        _fullplay.TopMost = true;
                        _fullplay.Show();
                        playOldFileListName(_lisIn[0], _notice, _startTime, _endTime, _byChannel, _fullplay.pictureBox1.Handle);

                    }
                    //else//还原,按特定的顺序执行——窗体状态,窗体边框,设置任务栏和工作区域
                    //{
                    //    _fullplay.WindowState = FormWindowState.Normal;
                    //    _fullplay.FormBorderStyle = FormBorderStyle.Sizable;
                    //    SetFormFullScreen(m_IsFullScreen);
                    //    _fullplay.TopMost = false;
                    //    closeAll();
                    //    _fullplay.Close();
                    //}

                }
                else
                {
                    if (_playNow)
                    {
                        m_IsFullScreen = !m_IsFullScreen;//点一次全屏,再点还原。
                        this.SuspendLayout();
                        _fullplay = new FullPlay(this);
                        if (m_IsFullScreen)//全屏 ,按特定的顺序执行
                        {
                            SetFormFullScreen(m_IsFullScreen);
                            _fullplay.FormBorderStyle = FormBorderStyle.None;
                            _fullplay.WindowState = FormWindowState.Maximized;
                            _fullplay.TopMost = true;
                            _fullplay.Show();
                            startPlayNow(_fullplay.pictureBox1.Handle);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                m_IsFullScreen = false;
                closeAll();
                _fullplay.TopMost = true;
                _fullplay.Close();
                SetFormFullScreen(m_IsFullScreen);
                _playNow = false;
            }
        }