Пример #1
0
        public HullEditor(DisplayHull hull)
        {
            m_hull     = hull;
            IsEditable = false;
            LockX      = false;

            m_handle = new Rectangle[m_hull.numChines];
        }
Пример #2
0
        private void openClick(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "Hull files (*.hul)|*.hul|All files (*.*)|*.*";
            //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            if (openFileDialog.ShowDialog() == true)
            {
                string result = myHull.LoadFromHullFile(openFileDialog.FileName);

                if (result != "")
                {
                    Console.WriteLine(result);
                }
                else
                {
                    currBulkhead.Items.Clear();

                    for (int ii = 1; ii < myHull.numBulkheads + 1; ii++)
                    {
                        currBulkhead.Items.Add(ii);
                    }

                    //m_hullEditor = new HullEditor(myHull, 0, 0, 0, Perspective);

                    m_xAngle = 10;
                    m_yAngle = 30;
                    m_zAngle = 190;

                    m_FrontDisplay.SetHull(myHull);
                    m_PerspectiveDisplay.SetHull(myHull);

                    //m_FrontDisplay = new DisplayHull(myHull, FrontCanvas);
                    m_SideDisplay = new DisplayHull(myHull, SideCanvas);
                    m_TopDisplay  = new DisplayHull(myHull, TopCanvas);
                    //m_PerspectiveDisplay = new DisplayHull(myHull, Perspective);

                    m_hullEditor = new HullEditor(m_PerspectiveDisplay);

                    m_hullEditor.IsEditable = false;
                    UpdateDrawings();
                }
            }
        }
Пример #3
0
 public void SetHull(DisplayHull hull)
 {
     m_hull     = hull;
     IsEditable = false;
     m_handle   = new Rectangle[m_hull.numChines];
 }