Example #1
0
 void OnMediaMouseDown(IMedia media, double x, double y)
 {
     if (Mouse.LeftButton == MouseButtonState.Pressed)
     {
         if (AnnoTierStatic.Selected != null &&
             AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.POINT &&
             control.annoListControl.annoDataGrid.SelectedItem != null &&
             control.geometricListControl.geometricDataGrid.SelectedItem != null)
         {
             AnnoListItem item = (AnnoListItem)control.annoListControl.annoDataGrid.SelectedItem;
             if (control.geometricListControl.geometricDataGrid.SelectedItems.Count > 1)
             {
                 return;
             }
             PointListItem point = (PointListItem)control.geometricListControl.geometricDataGrid.SelectedItem;
             point.XCoord = x;
             point.YCoord = y;
             geometricTableUpdate();
             int pos = control.annoListControl.annoDataGrid.SelectedIndex;
             geometricOverlayUpdate(item, AnnoScheme.TYPE.POINT, pos);
         }
     }
     if (Mouse.RightButton == MouseButtonState.Pressed)
     {
         RightHeldPos = new double[] { x, y };
         RightHeld    = true;
     }
 }
Example #2
0
        private void geometricList_Selection(object sender, SelectionChangedEventArgs e)
        {
            if (control.annoListControl.annoDataGrid.SelectedItem != null)
            {
                AnnoListItem item = (AnnoListItem)control.annoListControl.annoDataGrid.SelectedItem;
                int          pos  = control.annoListControl.annoDataGrid.SelectedIndex;
                geometricOverlayUpdate(item, AnnoScheme.TYPE.POINT, pos);
            }

            if (control.geometricListControl.geometricDataGrid.SelectedItems.Count == 1)
            {
                PointListItem item = (PointListItem)control.geometricListControl.geometricDataGrid.SelectedItems[0];
                control.geometricListControl.editTextBox.Text = item.Label;
            }
        }