Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Algorithm = ((FU_UWP.ImageShow)(target));
                return;

            case 2:
                this.main = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.image = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.textBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.borderimage = ((System.Windows.Controls.Image)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
 void onstart()
 {
     #region 初始化算法列表
     String line;
     #region 风格模仿
     StreamReader sr = new StreamReader("..\\风格模仿.txt", Encoding.Default);
     while ((line = sr.ReadLine()) != null)
     {
         ImageShow Is = new ImageShow();
         Is.image.Source   = new BitmapImage(new Uri(@"..\..\models\" + line + ".jpg", UriKind.Relative));
         Is.textBlock.Text = line;
         Is.MouseDown     += fengetrans;
         stack_fenggemofang.Children.Add(Is);
         stack_fenggemofang.Height += 300;
     }
     #endregion
     #region 滤镜
     StreamReader sr2 = new StreamReader("..\\滤镜.txt", Encoding.Default);
     while ((line = sr2.ReadLine()) != null)
     {
         ImageShow Is = new ImageShow();
         Is.image.Source   = new BitmapImage(new Uri(@"..\..\images\QQ截图20161025211605.png", UriKind.Relative));
         Is.textBlock.Text = line;
         Is.MouseDown     += lvjingtrans;
         stack_lvjing.Children.Add(Is);
         stack_lvjing.Height += 300;
     }
     #endregion
     #region 贴纸
     StreamReader sr3 = new StreamReader("..\\贴纸.txt", Encoding.Default);
     while ((line = sr3.ReadLine()) != null)
     {
         ImageShow Is = new ImageShow();
         Is.image.Source   = new BitmapImage(new Uri(@"..\..\images\贴纸\" + line + ".png", UriKind.Relative));
         Is.textBlock.Text = line;
         Is.MouseDown     += tiezhitrans;
         stack_tiezhi.Children.Add(Is);
         stack_tiezhi.Height += 300;
     }
     #endregion
     #region 调整
     StreamReader sr4 = new StreamReader("..\\调整.txt", Encoding.Default);
     while ((line = sr4.ReadLine()) != null)
     {
         ImageShow Is = new ImageShow();
         Is.image.Source         = new BitmapImage(new Uri(@"..\..\images\调整\" + line + ".png", UriKind.Relative));
         Is.textBlock.Visibility = Visibility.Hidden;
         Is.textBlock.Text       = line;
         Is.MouseDown           += tiaozhengtrans;
         stack_tiaozheng.Children.Add(Is);
         stack_tiaozheng.Height += 300;
     }
     #endregion
     #endregion
 }