private void buttonCopy_Click(object sender, RoutedEventArgs e) { if (lcp == null) { SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return; } CameraTestDesktop d = CameraTestDesktop.getDesktop(); d.addClip(lcp.getPhoto()); }
private void buttonITEGray_Click(object sender, RoutedEventArgs e) { ITEGrayscaleChartTest w = new ITEGrayscaleChartTest(); ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w); Canvas Desk = CameraTestDesktop.getDesktopPanel(); if (Desk.Children.Contains(this)) { Desk.Children.Remove(this); } }
private void buttonRemove_Click(object sender, RoutedEventArgs e) { Image i = Tag as Image; Visibility = Visibility.Collapsed; CameraTestDesktop d = CameraTestDesktop.getDesktop(); if (d.ClipList.Children.Contains(i)) { d.ClipList.Children.Remove(i); } }
private void buttonShutterSpeed_Click(object sender, RoutedEventArgs e) { ShutterSpeed w = new ShutterSpeed(); ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w); Canvas Desk = CameraTestDesktop.getDesktopPanel(); if (Desk.Children.Contains(this)) { Desk.Children.Remove(this); } }
private void buttonAdd_Click(object sender, RoutedEventArgs e) { WriteableBitmap b = OpenImage(); if (b == null) { return; } image1.Source = b; CameraTestDesktop d = CameraTestDesktop.getDesktop(); d.addClip(b); }
//public List<IParameter> ParameterList = new List<IParameter>(); //public List<string> TestHtml = new List<string>(); private void Button_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Standard)) { return; } var filter = new Dictionary <string, IList <string> >(); filter.Add("html file", new List <string>() { "*.html", "*.htm" }); SilverlightLFC.common.Environment.getEnvironment().SaveFileString(WriteToHTML(), filter); }
private void buttonPaste_Click(object sender, RoutedEventArgs e) { if (lcp == null) { SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return; } CameraTestDesktop d = CameraTestDesktop.getDesktop(); WriteableBitmap wb = d.getClip(); if (wb == null) { return; } lcp.setPhoto(wb); }
public void ToForm() { LayoutRoot.Opacity = 1; Panel p = CameraTestDesktop.getDesktopPanel(); if (!p.Children.Contains(ctp)) { p.Children.Add(ctp); } Point sp = CameraTestDesktop.getPosition(this); ActionAnimationShow a = new ActionAnimationShow(ctp); a.AnimationComplete += new AnimationCompleteEventHandler(a_AnimationComplete); a.ShowZoomProjection(500, sp, FormPoint); }
void hidea_AnimationComplete(object sender, LynxAnimationCompleteEventArgs e) { Panel p = CameraTestDesktop.getDesktopPanel(); if (p != null) { p.Children.Remove(ctp); } StackPanel tb = CameraTestDesktop.getTaskBar(); if (!tb.Children.Contains(this)) { tb.Children.Add(this); } }
private void buttonAberrationChart_Click(object sender, RoutedEventArgs e) { if (!CameraTestDesktop.CanAccess(Version.Standard)) { return; } AberrationChartTest w = new AberrationChartTest(); ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w); Canvas Desk = CameraTestDesktop.getDesktopPanel(); if (Desk.Children.Contains(this)) { Desk.Children.Remove(this); } }
public void Active()//不会激活窗体 { LayoutRoot.Opacity = 1; Panel p = CameraTestDesktop.getDesktopPanel(); if (p.Children.Contains(ctp)) { CameraTestDesktop.ActiveUserControl(ctp); } if (CameraTestDesktop.SelectedTest != this && CameraTestDesktop.SelectedTest != null) { CameraTestDesktop.SelectedTest.DeActive(); } CameraTestDesktop.SelectedTest = this; //LayoutRoot.Background = new SolidColorBrush(Colors.Yellow); }
public void ToIcon() { if (ctp == null) { return; } ActionAnimationShow a = new ActionAnimationShow(ctp); CameraTestDesktop cd = CameraTestDesktop.getDesktop(); StackPanel taskBar = CameraTestDesktop.getTaskBar(); FormPoint = new Point(Canvas.GetLeft(ctp), Canvas.GetTop(ctp)); Point ep = CameraTestDesktop.getPosition(this); a.AnimationComplete += new AnimationCompleteEventHandler(hidea_AnimationComplete); a.HideZoomProjection(500, FormPoint, ep); }
private void image1_PointerPressed(object sender, PointerRoutedEventArgs e) { e.Handled = true; if (ctp != null) { if (CameraTestDesktop.getDesktopPanel().Children.Contains(ctp)) { CameraTestDesktop.getDesktopPanel().Children.Remove(ctp); } } if (release != null) { release(); } if ((Parent != null) && ((Parent as Panel).Children.Contains(this))) { (Parent as Panel).Children.Remove(this); } }
public CameraTestProject() { InitializeComponent(); am = new ActionMove(this, this.LayoutRoot); CameraTestDesktop cd = CameraTestDesktop.getDesktop(); }
private void LayoutRoot_PointerPressed(object sender, PointerRoutedEventArgs e) { CameraTestDesktop cd = CameraTestDesktop.getDesktop(); cd.currentProject = this; }
public static Point getPosition(UIElement u) { GeneralTransform gt = u.TransformToVisual(CameraTestDesktop.getDesktop()); return(gt.TransformPoint(new Point())); }