示例#1
0
 private void btPick_Click(object sender, EventArgs e)
 {
     using (AttitudePickerForm form = new AttitudePickerForm(orientation))
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             if (orientation != form.Orientation)
             {
                 orientation     = form.Orientation;
                 tbAttitude.Text = StringConverter.GetString(orientation);
                 OnOrientationChanged();
             }
         }
     }
 }
示例#2
0
 private void btPick_Click(object sender, EventArgs e)
 {
     using (AttitudePickerForm form = new AttitudePickerForm(Euler.FromDirection(direction)))
     {
         Vector3 oldDir = direction;
         form.OrientationChanged += new EventHandler(form_OrientationChanged);
         if (form.ShowDialog() == DialogResult.OK)
         {
             Vector3 dir = form.Orientation.ToDirection();
             direction = oldDir;
             if (direction != dir)
             {
                 direction       = dir;
                 tbAttitude.Text = StringConverter.GetString(direction);
                 OnDirectionChanged();
             }
         }
     }
 }
示例#3
0
        void dialog_OrientationChanged(object sender, EventArgs e)
        {
            AttitudePickerForm dialog = sender as AttitudePickerForm;

            pd.SetValue(component, dialog.Orientation.ToMatrix());
        }