示例#1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="owner"></param>
            /// <param name="height"></param>
            public HeightCutMenuItem(MapViewWindow owner, int height)
            {
                this.owner  = owner;
                this.height = height;

                //				this.Checked = ( height==owner.drawer.heightCutHeight );

                if (height == WorldDefinition.World.Size.z - 1)
                {
                    this.Text = "None";
                    //! this.Text = "なし";
                }
                else
                {
                    int h = height - WorldDefinition.World.WaterLevel;
                    if (h == 0)
                    {
                        this.Text = "Water level";
                    }
                    //! if( h==0 )		this.Text = "地表";
                    else
                    {
                        this.Text = h.ToString();
                    }
                }
            }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mapView"></param>
        /// <param name="drawer"></param>
        public HeightCutWindow(MapViewWindow mapView, QuarterViewDrawer drawer)
        {
            this.mapView = mapView;
            this.drawer  = drawer;
            InitializeComponent();

            trackBar.Minimum = 0;
            trackBar.Maximum = World.WorldDefinition.World.Size.z - 1;
            trackBar.Value   = drawer.HeightCutHeight;

            drawer.OnHeightCutChanged += new EventHandler(onHeightCutChange);
        }