void ReleaseDesignerOutlets()
        {
            if (Button != null)
            {
                Button.Dispose();
                Button = null;
            }

            if (Play != null)
            {
                Play.Dispose();
                Play = null;
            }

            if (Stop != null)
            {
                Stop.Dispose();
                Stop = null;
            }

            if (OutputLabel != null)
            {
                OutputLabel.Dispose();
                OutputLabel = null;
            }
        }
Example #2
0
 protected override void DisposeManagedResources()
 {
     base.DisposeManagedResources();
     Play?.Dispose();
     Play = null;
     CamerasConfig.Clear();
 }
Example #3
0
 public void Dispose()
 {
     Toggle?.Dispose();
     Next?.Dispose();
     Previous?.Dispose();
     Play?.Dispose();
     Pause?.Dispose();
     Restart?.Dispose();
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _isPlaying.Dispose();
         _isPaused.Dispose();
         _isStopped.Dispose();
         _state.Dispose();
         Play.Dispose();
         Pause.Dispose();
         Stop.Dispose();
     }
     base.Dispose(disposing);
 }
Example #5
0
        void ReleaseDesignerOutlets()
        {
            if (Play != null)
            {
                Play.Dispose();
                Play = null;
            }

            if (SignOut != null)
            {
                SignOut.Dispose();
                SignOut = null;
            }

            if (Title != null)
            {
                Title.Dispose();
                Title = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (Delete_button != null)
            {
                Delete_button.Dispose();
                Delete_button = null;
            }

            if (Description_text != null)
            {
                Description_text.Dispose();
                Description_text = null;
            }

            if (loader != null)
            {
                loader.Dispose();
                loader = null;
            }

            if (MainUIView != null)
            {
                MainUIView.Dispose();
                MainUIView = null;
            }

            if (netWork_label != null)
            {
                netWork_label.Dispose();
                netWork_label = null;
            }

            if (Play != null)
            {
                Play.Dispose();
                Play = null;
            }

            if (recording != null)
            {
                recording.Dispose();
                recording = null;
            }

            if (Save_button != null)
            {
                Save_button.Dispose();
                Save_button = null;
            }

            if (saveLoader != null)
            {
                saveLoader.Dispose();
                saveLoader = null;
            }

            if (Scrollview != null)
            {
                Scrollview.Dispose();
                Scrollview = null;
            }

            if (Status_switch1 != null)
            {
                Status_switch1.Dispose();
                Status_switch1 = null;
            }

            if (Title_text != null)
            {
                Title_text.Dispose();
                Title_text = null;
            }
        }
Example #7
0
 public void Dispose()
 {
     Play.Dispose();
     Pause.Dispose();
     Stop.Dispose();
 }
Example #8
0
        private void PlayCompleted(object o, System.EventArgs e)
        {
            if (myPlay != null)
            {
                myPlay.Dispose();
                myPlay = null;
            }
            videoSize = Size.Empty;
            SetButton(PlayState.Stop);
            this.PlayBar.Value   = 0;
            this.lblCurTime.Text = "00:00";
            this.pnlPlay.Refresh();
            this.lblButton.Visible = false;
            this.lblTop.Visible    = false;
            this.Invalidate();
            GC.Collect();
            GC.WaitForPendingFinalizers();

            int oldNodeId = treeList1.FocusedNode.Id;

            switch (curOper)
            {
            case Oper.PrevPlay:
            case Oper.NextPlay:
                curOper = Oper.AgainPlay;
                StartPlay();
                break;

            case Oper.StopPlay:
                break;

            default:
                if (treeList1.MoveNext().Id != oldNodeId)
                {
                    StartPlay();
                }
                else
                {
                    treeList1.MoveFirst();
                }
                break;
            }
            //LoadList();
            //if (curOper == Oper.PrevPlay)
            //{
            //    curOper = Oper.AgainPlay;
            //    StartPlay();
            //}
            //else if (curOper == Oper.NextPlay)
            //{

            //}
            //else if (treeList1.MoveNext().Id != oldNodeId && curOper != Oper.StopPlay)
            //{
            //    curOper = Oper.AgainPlay;
            //    StartPlay();
            //}

            //if (curOper == Oper.NextPlay)
            ////{
            ////    curNum++;
            ////}
            ////else if (curOper == Oper.PrevPlay)
            ////{
            ////    curNum--;
            ////}
            ////else if (curOper == Oper.StopPlay)
            ////{
            ////    curNum = this.gridList.Rows.Count;
            ////}

            ////if (curNum >= 0 && curNum < this.gridList.Rows.Count)
            ////{
            ////    this.gridList.Rows[curNum].Selected = true;
            ////    curOper = Oper.NextPlay;
            ////    StartPlay();
            ////}
            ////else if (curNum == this.gridList.Rows.Count)
            ////{
            ////    curNum = 0;
            ////    this.gridList.Rows[0].Selected = true;
            ////}

            #region old code
            //if (myPlay != null)
            //{
            //    myPlay.Dispose();
            //    myPlay = null;
            //}
            //videoSize = Size.Empty;
            //SetButton(PlayState.Stop);
            //this.PlayBar.Value = 0;
            //this.lblCurTime.Text = "00:00";
            //this.pnlPlay.Refresh();
            //this.lblButton.Visible = false;
            //this.lblTop.Visible = false;
            //this.Invalidate();
            //GC.Collect();
            //GC.WaitForPendingFinalizers();
            //if (curOper == Oper.NextPlay)
            //{
            //    curNum++;
            //}
            //else if (curOper == Oper.PrevPlay)
            //{
            //    curNum--;
            //}
            //else if (curOper == Oper.StopPlay)
            //{
            //    curNum = this.gridList.Rows.Count;
            //}

            //if (curNum >= 0 && curNum < this.gridList.Rows.Count)
            //{
            //    this.gridList.Rows[curNum].Selected = true;
            //    curOper = Oper.NextPlay;
            //    StartPlay();
            //}
            //else if (curNum == this.gridList.Rows.Count)
            //{
            //    curNum = 0;
            //    this.gridList.Rows[0].Selected = true;
            //}
            #endregion
        }