public FrmRecordQuery(ProgPara para) { InitializeComponent(); ProgPara.CurrentProgPara = para; VideoEnvironment_SKN.SKNVideoSDK_Init(para.ServerAddress, para.ServerPort, para.UserName, para.XmlCgfFullPath, para.DefaultSaveDir); VideoEnvironment_SKN.DownLoadDoneEvent += VideoEnvironment_SKN_DownLoadDoneEvent; VideoEnvironment_SKN.DownLoadProcessEvent += VideoEnvironment_SKN_DownLoadProcessEvent; }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ProgPara para = null; if (args != null && args.Length > 0) { StringBuilder sbInfo = new StringBuilder(); foreach (string s in args) { sbInfo.Append(s); sbInfo.Append(" "); } ; sbInfo.Length = sbInfo.Length - 1; string strJsonData = CommonMethod.StringEncrypt.Base64Decode(sbInfo.ToString()); para = Newtonsoft.Json.JsonConvert.DeserializeObject <ProgPara>(strJsonData); foreach (CameraInfo cInfo in para.VideoInfo.Cameras.Values) { cInfo.VideoInfo = para.VideoInfo; } } else { para = new ProgPara { ServerAddress = "192.168.5.200", ServerPort = 48624, UserName = "******", PlaybackTimeStart = DateTime.Now.AddDays(-1), PlaybackTimeEnd = DateTime.Now.AddDays(1), PlaybackTime = DateTime.Now.AddHours(-1), Channel = 9, VideoInfo = TestDataSource.SKNVideoDatSource.GetSKData2(), DefaultSaveDir = Environment.CurrentDirectory, XmlCgfFullPath = Environment.CurrentDirectory }; } Application.Run(new FrmMain(para)); //ProgPara.CurrentProgPara = new ProgPara //{ // ServerAddress = "192.168.2.19", // ServerPort = 48624, // UserName = "******", // PlaybackTimeStart = DateTime.Now.AddDays(-1), // PlaybackTimeEnd = DateTime.Now.AddDays(1), // PlaybackTime = DateTime.Now.AddHours(-1), // Channel = 9, // VideoInfo = TestDataSource.SKNVideoDatSource.GetSKData1(), // DefaultSaveDir = Environment.CurrentDirectory, // XmlCgfFullPath = Environment.CurrentDirectory //}; //Application.Run(new FrmRecordQuery(ProgPara.CurrentProgPara)); }
public FrmMain(ProgPara para) { InitializeComponent(); ProgPara.CurrentProgPara = para; dateTimePicker1.Value = DateTime.Now; VideoEnvironment_SKN.SKNVideoSDK_Init(para.ServerAddress, para.ServerPort, para.UserName, para.XmlCgfFullPath, para.DefaultSaveDir); WriteEvent("SDK初始化成功"); //VideoEnvironment_SKN.DownLoadDoneEvent += VideoEnvironment_SKN_DownLoadDoneEvent; SetVideoInfo(para.VideoInfo); }
public void ProgStartParaTest() { ProgPara para = new ProgPara { ServerAddress = "192.168.2.19", ServerPort = 48624, UserName = "******", PlaybackTimeStart = DateTime.Now.AddDays(-1), PlaybackTimeEnd = DateTime.Now.AddDays(1), PlaybackTime = DateTime.Now.AddHours(-1), Channel = 9, VideoInfo = TestDataSource.SKNVideoDatSource.GetSKData1(), DefaultSaveDir = Environment.CurrentDirectory, XmlCgfFullPath = Environment.CurrentDirectory }; }