public WordVideoVM(VideoModel model, int videostyp, int?word_id, LeapKinnectType thisleaporkin, IUnitOfWork uw) { Contract.Requires(model != null); _uow = uw; videotype = videostyp; VideoInfo = model; video = new VideoService(_uow); word = new WordsService(_uow); option = new OptionService(_uow); user = new UserService(_uow); listitem = new ListItems(); wordid = word_id; //AllLanguages = GetAllLanguages(); //allWordTypes = listitem.GetWordType(); app = option.GetAll(); lk = thisleaporkin; //app.FileUrl = "c:"; RefreshProducts(); chatmodel = new MSChartVM(); //chatmodel.BarChart(); charttest = chatmodel.BarSeriesCollection;// PerVideoPartCount(); if (model != null /* && UtilityClass.CheckIntHasValue(model.video_id)*/) { //wordType = model.Words.WordType; //elang = model.Words.Languages; //Name = model.Words.Name; eword = model.Words; if (!string.IsNullOrEmpty(model.KinnectFilePath) && videotype == 1) { //euser = model.User; //if (model.User_id.HasValue) // User_id = model.User_id.Value; _attachPicture = new Uri(app.FileUrl + @"\" + model.KinnectFilePath);//UtilityClass.ByteToStream(app.FileUrl + model.FilePath); selectedpic = model.KinnectFilePath; prevpic = model.KinnectFilePath; } else if (!string.IsNullOrEmpty(model.LeapFilePath) && videotype != 1) { //euser = model.User; //if (model.User_id.HasValue) // User_id = model.User_id.Value; _attachPicture = new Uri(app.FileUrl + @"\" + model.LeapFilePath);//UtilityClass.ByteToStream(app.FileUrl + model.FilePath); selectedpic = model.LeapFilePath; prevpic = model.LeapFilePath; } } ConfigureValidationRules(); Validator.ResultChanged += OnValidationResultChanged; }
// 1 ==> kinnect // 2 ==> leap public WordVideoVM(VideoModel model) { }