當前位置: 首頁>>代碼示例>>C#>>正文


C# CameraWindow.BringToFront方法代碼示例

本文整理匯總了C#中iSpyApplication.Controls.CameraWindow.BringToFront方法的典型用法代碼示例。如果您正苦於以下問題:C# CameraWindow.BringToFront方法的具體用法?C# CameraWindow.BringToFront怎麽用?C# CameraWindow.BringToFront使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在iSpyApplication.Controls.CameraWindow的用法示例。


在下文中一共展示了CameraWindow.BringToFront方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: NewCameraWindow


//.........這裏部分代碼省略.........
            oc.settings.smsnumber = MobileNumber;
            oc.settings.suppressnoise = true;
            oc.settings.login = "";
            oc.settings.password = "";
            oc.settings.useragent = "Mozilla/5.0";
            oc.settings.frameinterval = 10;
            oc.settings.sourceindex = videoSourceIndex;
            oc.settings.micpair = -1;
            oc.settings.frameinterval = 200;
            oc.settings.maxframerate = 10;
            oc.settings.maxframeraterecord = 10;
            oc.settings.ptzautotrack = false;
            oc.settings.framerate = 10;
            oc.settings.timestamplocation = 1;
            oc.settings.ptztimetohome = 100;
            oc.settings.ptzchannel = "0";
            oc.settings.timestampformatter = "FPS: {FPS} {0:G} ";
            oc.settings.timestampfontsize = 10;
            oc.settings.notifyondisconnect = false;
            oc.settings.ptzautohomedelay = 30;
            oc.settings.accessgroups = "";
            oc.settings.nobuffer = true;
            oc.settings.reconnectinterval = 0;
            oc.settings.timestampforecolor = "255,255,255";
            oc.settings.timestampbackcolor = "70,70,70";
            oc.settings.timestampfont = FontXmlConverter.ConvertToString(Drawfont);
            oc.settings.timestampshowback = true;

            oc.settings.youtube = new objectsCameraSettingsYoutube
            {
                category = Conf.YouTubeDefaultCategory,
                tags = "iSpy, Motion Detection, Surveillance",
                @public = true
            };
            oc.settings.cloudprovider = new objectsCameraSettingsCloudprovider();

            oc.settings.storagemanagement = new objectsCameraSettingsStoragemanagement
            {
                enabled = false,
                maxage = 72,
                maxsize = 1024

            };

            oc.alertevents = new objectsCameraAlertevents { entries = new objectsCameraAlerteventsEntry[] { } };

            oc.settings.desktopresizeheight = 480;
            oc.settings.desktopresizewidth = 640;
            oc.settings.resize = false;
            oc.settings.directoryIndex = Conf.MediaDirectories.First().ID;

            oc.settings.vlcargs = VlcHelper.VlcInstalled ? "--rtsp-caching=100" : "";

            oc.detector.recordondetect = Conf.DefaultRecordOnDetect;
            oc.detector.recordonalert = Conf.DefaultRecordOnAlert;
            oc.detector.keepobjectedges = false;
            oc.detector.processeveryframe = 1;
            oc.detector.nomovementintervalnew = oc.detector.nomovementinterval = 30;
            oc.detector.movementintervalnew = oc.detector.movementinterval = 0;

            oc.detector.calibrationdelay = 15;
            oc.detector.color = ColorTranslator.ToHtml(Conf.TrackingColor.ToColor());
            oc.detector.type = "Two Frames";
            oc.detector.postprocessor = "None";
            oc.detector.minsensitivity = 20;
            oc.detector.maxsensitivity = 100;
            oc.detector.minwidth = 20;
            oc.detector.minheight = 20;
            oc.detector.highlight = true;

            oc.recorder.bufferseconds = 2;
            oc.recorder.inactiverecord = 8;
            oc.recorder.timelapse = 0;
            oc.recorder.timelapseframes = 0;
            oc.recorder.maxrecordtime = 900;
            oc.recorder.timelapsesave = 60;
            oc.recorder.quality = 8;
            oc.recorder.timelapseframerate = 5;
            oc.recorder.crf = true;

            oc.settings.audioport = 80;
            oc.settings.audiomodel = "None";
            oc.settings.audioip = "";
            oc.rotateMode = "RotateNoneFlipNone";

            var cameraControl = new CameraWindow(oc,this) { BackColor = Conf.BackColor.ToColor() };
            _pnlCameras.Controls.Add(cameraControl);

            cameraControl.Location = new Point(oc.x, oc.y);
            cameraControl.Size = new Size(320, 240);
            cameraControl.AutoSize = true;
            cameraControl.BringToFront();
            SetCameraEvents(cameraControl);
            if (Conf.AutoLayout)
                LayoutObjects(0, 0);

            cameraControl.Tag = GetControlIndex();

            return cameraControl;
        }
開發者ID:Jaejoon,項目名稱:iSpy,代碼行數:101,代碼來源:MainForm_Configuration.cs

示例2: DisplayCamera

        internal void DisplayCamera(objectsCamera cam)
        {
            var cameraControl = new CameraWindow(cam);
            SetCameraEvents(cameraControl);
            cameraControl.BackColor = Conf.BackColor.ToColor();
            _pnlCameras.Controls.Add(cameraControl);
            cameraControl.Location = new Point(cam.x, cam.y);
            cameraControl.Size = new Size(cam.width, cam.height);
            cameraControl.BringToFront();
            cameraControl.Tag = GetControlIndex();

            if (Conf.AutoSchedule && cam.schedule.active && cam.schedule.entries.Any())
            {
                cam.settings.active = false;
                cameraControl.ApplySchedule();
            }
            else
            {
                try
                {
                    if (cam.settings.active)
                        cameraControl.Enable();
                }
                catch (Exception ex)
                {
                    Log.Error("", ex);
                }
            }

            string path = Conf.MediaDirectory + "video\\" + cam.directory + "\\";
            if (!Directory.Exists(path))
                Directory.CreateDirectory(path);
            path = Conf.MediaDirectory + "video\\" + cam.directory + "\\thumbs\\";
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
                //move existing thumbs into directory
                var lfi =
                    Directory.GetFiles(Conf.MediaDirectory + "video\\" + cam.directory + "\\", "*.jpg").ToList();
                foreach (string file in lfi)
                {
                    string destfile = file;
                    int i = destfile.LastIndexOf(@"\", StringComparison.Ordinal);
                    destfile = file.Substring(0, i) + @"\thumbs" + file.Substring(i);
                    File.Move(file, destfile);
                }
            }
            path = Conf.MediaDirectory + "video\\" + cam.directory + "\\grabs\\";
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
        }
開發者ID:vmail,項目名稱:main,代碼行數:53,代碼來源:MainForm_Configuration.cs

示例3: DisplayCamera

        public void DisplayCamera(objectsCamera cam, bool enableOnDisplay = false)
        {
            var cameraControl = new CameraWindow(cam,this);
            SetCameraEvents(cameraControl);
            cameraControl.BackColor = Conf.BackColor.ToColor();
            _pnlCameras.Controls.Add(cameraControl);
            cameraControl.Location = new Point(cam.x, cam.y);
            cameraControl.Size = new Size(cam.width, cam.height);
            cameraControl.BringToFront();
            cameraControl.Tag = GetControlIndex();

            var dir = Helper.GetMediaDirectory(2, cam.id);
            string path = dir + "video\\" + cam.directory + "\\";
            try
            {
                if (!Directory.Exists(path))
                    Directory.CreateDirectory(path);
                path = dir + "video\\" + cam.directory + "\\thumbs\\";
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                    //move existing thumbs into directory
                    var lfi =
                        Directory.GetFiles(dir + "video\\" + cam.directory + "\\", "*.jpg").ToList();
                    foreach (string file in lfi)
                    {
                        string destfile = file;
                        int i = destfile.LastIndexOf(@"\", StringComparison.Ordinal);
                        destfile = file.Substring(0, i) + @"\thumbs" + file.Substring(i);
                        File.Move(file, destfile);
                    }
                }
                path = dir + "video\\" + cam.directory + "\\grabs\\";
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
            }
            catch (Exception ex)
            {
                LogExceptionToFile(ex);
            }
            if (enableOnDisplay)
                cameraControl.Enable();
            cameraControl.GetFiles();
        }
開發者ID:Jaejoon,項目名稱:iSpy,代碼行數:46,代碼來源:MainForm_Configuration.cs

示例4: NewCameraWindow


//.........這裏部分代碼省略.........
            oc.ftp.enabled = false;
            oc.ftp.port = 21;
            oc.ftp.mode = 0;
            oc.ftp.server = "ftp://";
            oc.ftp.interval = 10;
            oc.ftp.filename = "mylivecamerafeed.jpg";
            oc.ftp.localfilename = "{0:yyyy-MM-dd_HH-mm-ss_fff}.jpg";
            oc.ftp.ready = true;
            oc.ftp.text = "www.ispyconnect.com";
            oc.ftp.quality = 75;

            oc.schedule.active = false;

            oc.settings.active = false;
            oc.settings.deleteavi = true;
            oc.settings.ffmpeg = Conf.FFMPEG_Camera;
            oc.settings.emailaddress = EmailAddress;
            oc.settings.smsnumber = MobileNumber;
            oc.settings.suppressnoise = true;
            oc.settings.login = "";
            oc.settings.password = "";
            oc.settings.useragent = "Mozilla/5.0";
            oc.settings.frameinterval = 10;
            oc.settings.sourceindex = videoSourceIndex;
            oc.settings.micpair = -1;
            oc.settings.frameinterval = 200;
            oc.settings.maxframerate = 10;
            oc.settings.maxframeraterecord = 10;
            oc.settings.ptzautotrack = false;
            oc.settings.framerate = 10;
            oc.settings.timestamplocation = 1;
            oc.settings.ptztimetohome = 100;
            oc.settings.ptzchannel = "0";
            oc.settings.timestampformatter = "FPS: {FPS} {0:G} ";
            oc.settings.timestampfontsize = 10;
            oc.settings.notifyondisconnect = false;
            oc.settings.ptzautohomedelay = 30;
            oc.settings.accessgroups = "";

            oc.settings.youtube = new objectsCameraSettingsYoutube
            {
                autoupload = false,
                category = Conf.YouTubeDefaultCategory,
                tags = "iSpy, Motion Detection, Surveillance",
                @public = false
            };
            oc.settings.desktopresizeheight = 480;
            oc.settings.desktopresizewidth = 640;
            oc.settings.resize = false;

            if (VlcHelper.VlcInstalled)
                oc.settings.vlcargs = "-I" + NL + "dummy" + NL + "--ignore-config" + NL +
                                      "--plugin-path=\"" + VlcHelper.VlcPluginsFolder + "\"";
            else
                oc.settings.vlcargs = "";

            oc.detector.recordondetect = true;
            oc.detector.keepobjectedges = false;
            oc.detector.processeveryframe = 1;
            oc.detector.nomovementinterval = 30;
            oc.detector.movementinterval = 0;
            oc.detector.calibrationdelay = 15;
            oc.detector.color = ColorTranslator.ToHtml(Conf.TrackingColor.ToColor());
            oc.detector.type = "Two Frames";
            oc.detector.postprocessor = "None";
            oc.detector.minsensitivity = 20;
            oc.detector.maxsensitivity = 100;
            oc.detector.minwidth = 20;
            oc.detector.minheight = 20;
            oc.detector.highlight = true;

            oc.recorder.bufferseconds = 3;
            oc.recorder.inactiverecord = 8;
            oc.recorder.timelapse = 0;
            oc.recorder.timelapseframes = 0;
            oc.recorder.maxrecordtime = 900;
            oc.recorder.timelapsesave = 60;
            oc.recorder.quality = 8;
            oc.recorder.timelapseframerate = 5;
            oc.recorder.crf = true;

            oc.settings.audioport = 80;
            oc.settings.audiomodel = "None";
            oc.settings.audioip = "";

            var cameraControl = new CameraWindow(oc) { BackColor = Conf.BackColor.ToColor() };
            _pnlCameras.Controls.Add(cameraControl);

            cameraControl.Location = new Point(oc.x, oc.y);
            cameraControl.Size = new Size(320, 240);
            cameraControl.AutoSize = true;
            cameraControl.BringToFront();
            SetCameraEvents(cameraControl);
            if (Conf.AutoLayout)
                LayoutObjects(0, 0);

            cameraControl.Tag = GetControlIndex();

            return cameraControl;
        }
開發者ID:vmail,項目名稱:main,代碼行數:101,代碼來源:MainForm_Configuration.cs


注:本文中的iSpyApplication.Controls.CameraWindow.BringToFront方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。