void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.img_window = ((WpfApplication1.ImageWindow)(target)); return; case 2: this.wp = ((System.Windows.Controls.WrapPanel)(target)); return; } this._contentLoaded = true; }
public void LoadFrames() { imageWindow = new ImageWindow(); string pattern = "^?.(bmp|gif|png|jpeg|jpg|tif)$"; //imageIndex = ArkWork.Instance.ArchivedFiles.Where(x => Regex.IsMatch(x.Value.Filename, pattern, RegexOptions.IgnoreCase)) // .OrderBy(x => x.Value.fileNameW).Select(x => x.Key).ToArray(); frames = new ImageFrame[imageIndex.Length]; bmps = new BitmapImage[imageIndex.Length]; imageWindow.KeyDown += image_KeyDown; for (int i = 0; i < imageIndex.Length; i++) { frames[i] = new ImageFrame(); frames[i].KeyDown += image_KeyDown; //frames[i].lbl_name.Content = ArkWork.Instance.ArchivedFileNames[imageIndex[i]]; imageWindow.panel.Children.Add(frames[i]); } var spl = new System.Windows.Controls.Separator(); var spr = new System.Windows.Controls.Separator(); spl.Width = SystemParameters.MaximizedPrimaryScreenWidth; spr.Width = SystemParameters.MaximizedPrimaryScreenWidth; spl.Height = 0; spr.Height = 0; imageWindow.panel.Children.Add(spl); imageWindow.panel.Children.Insert(0, spr); //new Thread(() => { ArkWork.Instance.ExtractToStream(); }).Start(); if (main != null) main.Close(); imageWindow.Show(); Cursor = 0; }