Exemplo n.º 1
0
 void CommitCorrection()
 {
     if (CurrentLaserIndex >= 0)
     {
         LaserCorrection cor = new LaserCorrection();
         cor.LoadFromSettings(CurrentLaserIndex);
         cor.Apply(Drag);
         cor.SaveToSettings(CurrentLaserIndex);
         Drag.Init();
     }
 }
Exemplo n.º 2
0
 private void CorrectionMatrix_Load(object sender, EventArgs e)
 {
     try
     {
         if (File.Exists(QuickFileName))
         {
             ProcessScanData(ScanDataIO.Read(QuickFileName));
         }
         EnableLaser(true);
     }
     catch
     {
         EnableLaser(false);
     }
     Drag = new DragBallNavigator(PreviewPanel);
     Drag.Init();
     this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Selectable, true);
     typeof(Panel).InvokeMember("DoubleBuffered",
                                BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                null, PreviewPanel, new object[] { true });
     PreviewPanel.TabStop = true;
     this.MouseWheel     += Drag.MouseWheel;
 }