本文整理汇总了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;
}
示例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);
}
}
示例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();
}
示例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;
}