コード例 #1
0
ファイル: VsPersonal.cs プロジェクト: xfbingshan/openvss
        public VsPersonal()
        {
            InitializeComponent();

            // form load handler
            this.Load        += new EventHandler(VsMonitor_Load);
            this.Resize      += new EventHandler(VsMonitor_Resize);
            this.FormClosing += new FormClosingEventHandler(VsMonitor_FormClosing);

            try
            {
                // new object
                vsCoreMonitor = new VsCoreServer(Path.GetDirectoryName(Application.ExecutablePath));

                // allow to save all configs to files
                vsCoreMonitor.SaveConfigToFile = true;

                // Initial application core
                vsCoreMonitor.VsMonitorInitial();

                VsSplasher.Status = "Load application setting...";
                System.Threading.Thread.Sleep(1500);

                VsSplasher.Close();
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
コード例 #2
0
        public VsLive()
        {
            try
            {
                InitializeComponent();

                Vs.Monitor.VsSplasher.Status = "Load application setting...";
                System.Threading.Thread.Sleep(1000);

                Vs.Monitor.VsSplasher.LoginSerivce();

                while (Vs.Monitor.VsSplasher.Blocked)
                {
                    System.Threading.Thread.Sleep(100);
                }


                if (!Vs.Monitor.VsSplasher.Connected)
                {
                    this.Hide();
                    bCancel = true;

                    // this.Close();
                    //VsMonitor_Close();

                    return;
                }
                else
                {
                    //VsSplasher.Close();

                    // form load handler
                    this.Load        += new EventHandler(VsMonitor_Load);
                    this.Resize      += new EventHandler(VsMonitor_Resize);
                    this.FormClosing += new FormClosingEventHandler(VsMonitor_FormClosing);


                    //Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

                    // new object
                    string configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "OpenVss\\VsClient\\");;
                    vsCoreMonitor = new VsCoreServer(Path.GetDirectoryName(Application.ExecutablePath));

                    // allow to save all configs to files
                    vsCoreMonitor.SaveConfigToFile = true;

                    // Initial application core
                    vsCoreMonitor.VsMonitorInitial(configPath);
                }
                VsSplasher.Close();
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
コード例 #3
0
ファイル: VsChannelDialog.cs プロジェクト: xfbingshan/openvss
        // Construction
        public VsChannelDialog(VsCoreServer vsCore)
        {
            this.AddPage(vsChannelDescription);
            this.AddPage(vsChannelStructure);
            this.Text = "Add Layout";

            vsCoreMonitor = vsCore;
            vsChannelDescription.CoreMonitor = vsCore;
            vsChannelStructure.CoreMonitor   = vsCore;
            vsAnalyzerSetting.CoreMonitor    = vsCore;
            vsEncoderSetting.CoreMonitor     = vsCore;

            this.imagePanel.Visible = false;
        }
コード例 #4
0
ファイル: VsPersonal.cs プロジェクト: xfbingshan/openvss
        // form close
        void VsMonitor_Close()
        {
            //formState.Restore(this);

            if (vsCoreMonitor != null)
            {
                // disconnect all camera
                vsCoreMonitor.DisconnectCameraAll();

                // Dispose
                vsCoreMonitor.Dispose();

                vsCoreMonitor = null;
            }
        }
コード例 #5
0
        // Construction
        public VsCameraPropertiesDialog(VsCoreServer vsCore)
        {
            this.AddPage(vsCameraDescription);
            this.AddPage(vsCameraSetting);
            this.AddPage(vsAnalyzerSetting);
            this.AddPage(vsEncoderSetting);
            this.Text = "Add New Camera";

            // set current core
            vsCoreMonitor = vsCore;
            vsCameraDescription.CoreMonitor = vsCore;
            vsCameraSetting.CoreMonitor     = vsCore;
            vsAnalyzerSetting.CoreMonitor   = vsCore;
            vsEncoderSetting.CoreMonitor    = vsCore;
        }
コード例 #6
0
        // Construction
        public VsAnalyzerDialog(VsCoreServer vsCore, VsCamera vsCam)
        {
            this.AddPage(vsAnalyzerSetting);
            vsAnalyzerSetting.CoreMonitor = vsCoreMonitor;
            vsAnalyzerSetting.Camera      = vsCam;

            // set current core
            vsCamera      = vsCam;
            vsCoreMonitor = vsCore;

            this.Text = "Analyzer";
            this.buttonApply.Visible = true;
            this.backButton.Visible  = false;
            this.nextButton.Visible  = false;
            this.imagePanel.Visible  = false;
        }
コード例 #7
0
        // Construction
        public VsCameraDialog(VsCoreServer vsCore)
        {
            this.AddPage(vsCameraDescription);
            this.AddPage(vsCameraSetting);

            this.Text = "Add Analyzer";

            // set current core
            vsCoreMonitor = vsCore;
            vsCameraDescription.CoreMonitor = vsCore;
            vsCameraSetting.CoreMonitor     = vsCore;
            vsAnalyzerSetting.CoreMonitor   = vsCore;
            vsEncoderSetting.CoreMonitor    = vsCore;

            this.imagePanel.Visible = false;
        }