private void InitializeProgram() { txtInputStartHeight = txtInput.Height; Modification.pb = this.pbChange.progress; Modification.tb = this.txtInput; Modification.sp = this.spGrammar; Modification.mw = this; progressCallBack = new CallBack(AddProgress); textCallBack = new CallBack2(AddNewText); txtInput.TextChanged += txtInput_TextChanged; txtInput.Focus(); }
static public void DownloadArticle(HitomiArticle ha, string folder, CallBack2 callback, PicElement pe, int v1, int v2) { Directory.CreateDirectory(folder); for (int i = v1; i < v2; i++) { WebClient wc = new WebClient(); wc.Headers["Accept-Encoding"] = "application/x-gzip"; wc.Encoding = Encoding.UTF8; wc.DownloadFileCompleted += wc_da; if (ha.TagsKor == false) { wc.DownloadFileAsync(new Uri(HitomiDef.GetDownloadImageAddress(ha.Magic, ha.ImagesLink[i])), Path.Combine(folder, ha.ImagesLink[i]), new Tuple <HitomiArticle, int, CallBack2, PicElement>(ha, i, callback, pe)); } } }
private static extern IntPtr FFMS_DoIndexing(IntPtr Indexer, int IndexMask, int DumpMask, CallBack TAudioNameCallback, IntPtr ANCPrivate, bool IgnoreDecodeErrors, CallBack2 TIndexCallback, IntPtr ICPrivate, ref FFMS_ErrorInfo ErrorInfo);
/** * * Dado un fichero multimedia ya inicializado. * Realiza el estudio de Keyframes y funciones del video. * * */ public void FFMSDoIndex(bool DumpActive) { this.isIndexing = true; if (Indexer == IntPtr.Zero) throw new Exception("Indexer no cargado."); int IndexMask = -1; int DumpMask = 0; if (DumpActive) DumpMask = 1; bool IgnoreDecodeErrors = true; CallBack TAudioNameCallback = new CallBack(AudioName); CallBack2 IndexCB = new CallBack2(IndexCBI); Index = FFMS_DoIndexing(Indexer, IndexMask, DumpMask, TAudioNameCallback, System.IntPtr.Zero, IgnoreDecodeErrors, IndexCB, IntPtr.Zero, ref Error); this.isIndexing = false; Indexer = IntPtr.Zero; }