示例#1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ImageVote2 = ((ThuIPsySystem.Experiments.ImageVote2.Trial)(target));
     
     #line 16 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 17 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown);
     
     #line default
     #line hidden
     
     #line 19 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.KeyDown += new System.Windows.Input.KeyEventHandler(this.TrialWindow_KeyDown);
     
     #line default
     #line hidden
     
     #line 20 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Window_SizeChanged);
     
     #line default
     #line hidden
     
     #line 21 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove);
     
     #line default
     #line hidden
     
     #line 22 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.StateChanged += new System.EventHandler(this.Window_StateChanged);
     
     #line default
     #line hidden
     
     #line 24 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.ImageVote2.Closing += new System.ComponentModel.CancelEventHandler(this.ImageVote_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.GridTrial = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.StackPanelGuideWords = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.TextBlockGuideWordsType1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 5:
     this.GridSceneImage = ((System.Windows.Controls.Grid)(target));
     return;
     case 6:
     this.StackPanelVote = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 7:
     
     #line 112 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 113 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 9:
     
     #line 114 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 10:
     
     #line 115 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 11:
     
     #line 116 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 12:
     
     #line 117 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 13:
     
     #line 118 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 14:
     
     #line 119 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 15:
     
     #line 120 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     ((System.Windows.Controls.Label)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Vote_MouseDown);
     
     #line default
     #line hidden
     return;
     case 16:
     this.TxtCount = ((System.Windows.Controls.Label)(target));
     return;
     case 17:
     this.BtnNext = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     
     #line 125 "..\..\..\..\Experiments\ImageVote2\Trial.xaml"
     this.BtnNext.Click += new System.Windows.RoutedEventHandler(this.BtnNext_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.TxtMsg = ((System.Windows.Controls.Label)(target));
     return;
     case 19:
     this.StackPanelTips = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 20:
     this.TextBlockTips = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
示例#2
0
        private void LBItemImageVote2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            int start_index = 0;
            int end_index = 0;
            if (ImageVote2List[0].ExpIsChecked && ImageVote2List[1].ExpIsChecked)
            {
                start_index = 0;
                end_index = (int)(ImageDirectory.UndefinedSceneCount - 1);
            }
            else if (ImageVote2List[0].ExpIsChecked)
            {
                start_index = 0;
                end_index = (int)Math.Ceiling(ImageDirectory.UndefinedSceneCount * 0.5) - 1;
            }
            else if (ImageVote2List[1].ExpIsChecked)
            {
                start_index = (int)Math.Ceiling(ImageDirectory.UndefinedSceneCount * 0.5);
                end_index = (int)(ImageDirectory.UndefinedSceneCount - 1);
            }
            else
            {
                MessageWin message_win = new MessageWin();
                message_win.Owner = (Window)this.Parent;
                message_win.ShowDialog("请选择图像打分范围!", "提示", MessageBoxButton.OK);
                return;
            }

            // 配置图像库打分表
            if (!ConfigImageVoteTable())
                return;

            ThuIPsySystem.Experiments.ImageVote2.Trial imagelibvote = new ThuIPsySystem.Experiments.ImageVote2.Trial(start_index, end_index);
            imagelibvote.Owner = this;
            imagelibvote.ShowDialog();
        }