Пример #1
0
        private void createClick(object sender, RoutedEventArgs e)
        {
            Point loc = GetMousePosition();

            CreateHullDialog createHullDialog = new CreateHullDialog();

            createHullDialog.Top  = loc.Y;
            createHullDialog.Left = loc.X;
            if (createHullDialog.ShowDialog() == true)
            {
                CreateHullData data = (CreateHullData)this.FindResource("CreateHullData");
                if (data != null)
                {
                    myHull = new Hull(data);
                    myHull.PropertyChanged += hull_PropertyChanged;
                    myHull.SetBulkheadHandler();

                    undoLog.Clear();
                    undoLog.Add(myHull);

                    redoLog.Clear();

                    UpdateViews();
                }
            }
        }
Пример #2
0
        public void createClick(object sender, RoutedEventArgs e)
        {
            //Point loc = GetMousePosition();

            CreateHullDialog createHullDialog = new CreateHullDialog();

            //createHullDialog.Top = loc.Y;
            //createHullDialog.Left = loc.X;
            if (createHullDialog.ShowDialog() == true)
            {
                CreateHullData data = (CreateHullData)this.FindResource("CreateHullData");
                if (data != null)
                {
                    Hull tempHull = new Hull(data);
                    BaseHull.Instance().Bulkheads = tempHull.Bulkheads;

                    undoLog.Clear();
                    undoLog.Add(BaseHull.Instance());

                    redoLog.Clear();

                    UpdateViews();
                }
            }
        }