JWoord
JWoord
CC#
Created by JWoord on 5/5/2023 in #help
❔ Need Help with Rotation for my 3D model
Hi, i created a project in c# to apply Verlet integration on some OBJ file. In the video is the visualization of my elements that are translated every frame. My goal is here to tranlate/rotate my model so that it stays in the verlet shape 🙂
2 replies
CC#
Created by JWoord on 1/20/2023 in #help
❔ my delegate event is not raising the event
i defined a event in my CustomerViewModel to pass the data to my main viewModel and raise a new event when gets there. i checked internet for a solution for this to gets working but did not find a answer yet
public partial class CustomerListViewModel : ObservableObject
{
public CustomerListViewModel()
{

customerCollection = new ObservableCollection<Customer>();
Customer jacob = new Customer("Jacob", "Woord", "Urk");




customerCollection.Add(jacob);



}


public event Action<Guid> PlaceOrderRequested = delegate { };

[RelayCommand]
void PlaceOrder(Customer customer)
{
PlaceOrderRequested(customer.CustomerId);
}
public partial class CustomerListViewModel : ObservableObject
{
public CustomerListViewModel()
{

customerCollection = new ObservableCollection<Customer>();
Customer jacob = new Customer("Jacob", "Woord", "Urk");




customerCollection.Add(jacob);



}


public event Action<Guid> PlaceOrderRequested = delegate { };

[RelayCommand]
void PlaceOrder(Customer customer)
{
PlaceOrderRequested(customer.CustomerId);
}
namespace viewModelBinding
{
public partial class MainWIndowViewModel : ObservableObject
{
//intialize every vieModel
private CustomerListViewModel customerListViewModel = new CustomerListViewModel();

private OrderListViewModel orderListViewModel = new OrderListViewModel();


private Timer timer = new Timer(5000);
public MainWIndowViewModel()
{
customerListViewModel.PlaceOrderRequested += CustomerListViewModel_PlaceOrderRequested;
currentViewModel = new OrderListViewModel();
timer.Elapsed += (s, e) => NotificationMessage = "Na 5 seconden word de huidige tijd neergzet: " + DateTime.Now.ToLocalTime() + " Kukulukuu";
timer.Start();
}

private void CustomerListViewModel_PlaceOrderRequested(Guid obj)
{
orderListViewModel.CustomerId = obj;
CurrentViewModel = orderListViewModel;
}

[ObservableProperty]
object currentViewModel;

[ObservableProperty]
string notificationMessage;


namespace viewModelBinding
{
public partial class MainWIndowViewModel : ObservableObject
{
//intialize every vieModel
private CustomerListViewModel customerListViewModel = new CustomerListViewModel();

private OrderListViewModel orderListViewModel = new OrderListViewModel();


private Timer timer = new Timer(5000);
public MainWIndowViewModel()
{
customerListViewModel.PlaceOrderRequested += CustomerListViewModel_PlaceOrderRequested;
currentViewModel = new OrderListViewModel();
timer.Elapsed += (s, e) => NotificationMessage = "Na 5 seconden word de huidige tijd neergzet: " + DateTime.Now.ToLocalTime() + " Kukulukuu";
timer.Start();
}

private void CustomerListViewModel_PlaceOrderRequested(Guid obj)
{
orderListViewModel.CustomerId = obj;
CurrentViewModel = orderListViewModel;
}

[ObservableProperty]
object currentViewModel;

[ObservableProperty]
string notificationMessage;


5 replies