コード例 #1
0
        private void AddDronePort_click(object sender, RoutedEventArgs e)
        {
            DronePort obj = new DronePort();

            this.Data.DronePorts.Add(obj);

            if (!droneExpander.IsExpanded)
            {
                droneExpander.IsExpanded = true;
            }
        }
コード例 #2
0
        private void DeleteDronePort_Click(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (btn != null)
            {
                DronePort bp = btn.CommandParameter as DronePort;
                if (btn != null)
                {
                    this.Data.DronePorts.Remove(bp);
                    //bp.VectorItemChanged -= new EventHandler(bp_VectorItemChanged);
                    //AdjustWallRatio();
                }
            }
        }