Beispiel #1
0
        private void tvTest_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            TreeViewItem item = this.tvTest.SelectedItem as TreeViewItem;

            if (item != null && item.Tag != null)
            {
                string name = System.IO.Path.GetFileNameWithoutExtension(typeof(TesterBase).FullName) + "." + item.Tag.ToString();
                Type   type = Type.GetType(name);
                if (type != null)
                {
                    this.tester = (TesterBase)type.GetConstructor(Type.EmptyTypes).Invoke(null);
                    this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));
                    this.wpfPreview.SetRenderEvent(new RenderEvent(this.tester.RenderPage));
                    (this.statusBar1.Items[0] as System.Windows.Controls.Primitives.StatusBarItem).Content = this.tester.Description;

                    //this.tester = new XDrawing.TestLab.Tester.LinesStraightLines();
                    //this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));
                }
            }
        }
    //internal XDrawing.Drawings.DrawingTest drawingTest;

    private void Test_Click()
    {
      this.tester = new XDrawing.TestLab.Tester.LinesStraightLines();
      this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));
      this.wpfPreview.SetRenderEvent(new RenderEvent(this.tester.RenderPage));
    }
    private void tvTest_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
    {
      TreeViewItem item = this.tvTest.SelectedItem as TreeViewItem;
      if (item != null && item.Tag != null)
      {
        string name = System.IO.Path.GetFileNameWithoutExtension(typeof(TesterBase).FullName) + "." + item.Tag.ToString();
        Type type = Type.GetType(name);
        if (type != null)
        {
          this.tester = (TesterBase)type.GetConstructor(Type.EmptyTypes).Invoke(null);
          this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));
          this.wpfPreview.SetRenderEvent(new RenderEvent(this.tester.RenderPage));
          (this.statusBar1.Items[0] as System.Windows.Controls.Primitives.StatusBarItem).Content = this.tester.Description;

          //this.tester = new XDrawing.TestLab.Tester.LinesStraightLines();
          //this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));

        }

      }
    }
Beispiel #4
0
        //internal XDrawing.Drawings.DrawingTest drawingTest;

        private void Test_Click()
        {
            this.tester = new XDrawing.TestLab.Tester.LinesStraightLines();
            this.preview.SetRenderEvent(new PdfSharp.Forms.PagePreview.RenderEvent(this.tester.RenderPage));
            this.wpfPreview.SetRenderEvent(new RenderEvent(this.tester.RenderPage));
        }
Beispiel #5
0
 private void btnTest_Click(object sender, System.EventArgs e)
 {
   object tag = ((Control)sender).Tag;
   if (tag != null)
   {
     string name = Path.GetFileNameWithoutExtension(typeof(TesterBase).FullName) + "." + tag.ToString();
     Type type = Type.GetType(name);
     if (type != null)
     {
       this.tester = (TesterBase)type.GetConstructor(Type.EmptyTypes).Invoke(null);
       this.preview.SetRenderEvent(new PagePreview.RenderEvent(this.tester.RenderPage));
       this.statusBar.Text = this.tester.Description;
     }
   }
 }