示例#1
0
 public Bitmap this[XTileInfoVM _tile, FColor _fColor, bool _removeTransparency, bool _grayScale]
 {
     get
     {
         if (_tile == null)
         {
             return(null);
         }
         return(this[_tile.Texture, _tile.X, _tile.Y, _fColor, _removeTransparency, _grayScale, _tile.Parent is XTerrainSetVM, _tile.PlusHalfX, _tile.PlusHalfY]);
     }
 }
示例#2
0
		private void ExecuteAddCommand(object _obj)
		{
			var d = new XTileInfoVM();
			m_xTileInfoVM.Parent.Children.Add(d);
			d = Manager.Instance.XClient.Get<XTileInfoVM>(d.Uid);
			d.Texture = Texture;
            d.Opacity = 1;
			d.X = CursorX;
			d.Y = CursorY;
			d.Order = m_xTileInfoVM.Parent.Children.Max(_vm => _vm.Order) + 1;
			m_xTileInfoVM.Parent.SelectedItem = d;
            m_xTileInfoVM.Parent.RefreshChildren();
		}
示例#3
0
		public TextureVM(XTileInfoVM _xTileInfoVM)
		{
			m_xTileInfoVM = _xTileInfoVM;
			Texture = _xTileInfoVM.Texture;
			CursorX = _xTileInfoVM.X;
			CursorY = _xTileInfoVM.Y;
			Sets = new ObservableCollection<ETextureSet>(Enum.GetValues(typeof(ETextureSet)).Cast<ETextureSet>().OrderBy(_set => _set.ToString()));
			TextureClick = new RelayCommand(ExecuteTextureClick);
			SetCommand = new RelayCommand(ExecuteSetCommand, CanSetCommand);
			AddCommand = new RelayCommand(ExecuteAddCommand, CanAddCommand);
			Subscribe(m_xTileInfoVM, info => info.PlusHalfX, _changed => OnPropertyChanged(() => ScreenCursorX));
			Subscribe(m_xTileInfoVM, info => info.PlusHalfY, _changed => OnPropertyChanged(() => ScreenCursorY));
		}
示例#4
0
 public TextureVM(XTileInfoVM _xTileInfoVM)
 {
     m_xTileInfoVM = _xTileInfoVM;
     Texture       = _xTileInfoVM.Texture;
     CursorX       = _xTileInfoVM.X;
     CursorY       = _xTileInfoVM.Y;
     Sets          = new ObservableCollection <ETextureSet>(Enum.GetValues(typeof(ETextureSet)).Cast <ETextureSet>().OrderBy(_set => _set.ToString()));
     TextureClick  = new RelayCommand(ExecuteTextureClick);
     SetCommand    = new RelayCommand(ExecuteSetCommand, CanSetCommand);
     AddCommand    = new RelayCommand(ExecuteAddCommand, CanAddCommand);
     Subscribe(m_xTileInfoVM, info => info.PlusHalfX, _changed => OnPropertyChanged(() => ScreenCursorX));
     Subscribe(m_xTileInfoVM, info => info.PlusHalfY, _changed => OnPropertyChanged(() => ScreenCursorY));
 }
示例#5
0
        private void ExecuteAddCommand(object _obj)
        {
            var d = new XTileInfoVM();

            m_xTileInfoVM.Parent.Children.Add(d);
            d         = Manager.Instance.XClient.Get <XTileInfoVM>(d.Uid);
            d.Texture = Texture;
            d.Opacity = 1;
            d.X       = CursorX;
            d.Y       = CursorY;
            d.Order   = m_xTileInfoVM.Parent.Children.Max(_vm => _vm.Order) + 1;
            m_xTileInfoVM.Parent.SelectedItem = d;
            m_xTileInfoVM.Parent.RefreshChildren();
        }
示例#6
0
		public Bitmap this[XTileInfoVM _tile, FColor _fColor, bool _removeTransparency, bool _grayScale]
	    {
	        get
	        {
                if (_tile == null) return null;
	            return this[_tile.Texture, _tile.X, _tile.Y, _fColor, _removeTransparency, _grayScale, _tile.Parent is XTerrainSetVM, _tile.PlusHalfX, _tile.PlusHalfY];
	        }
	    }