Exemplo n.º 1
0
    public ModProjectButtonViewModel(ModProjectViewModel projectViewModel, ModProject.Button button)
    {
        this.ProjectViewModel = projectViewModel;
        this.Button = button;
        this.Button.Name.OnChange += NameChanged;
        this.Button.Description.OnChange += DescriptionChanged;

        CheckForErrors();
    }
Exemplo n.º 2
0
 public void AddButton()
 {
     try
     {
         ModProject.Button button = new ModProject.Button();
         button.project = Project;
         Project.Buttons.Add(button);
         ModProjectButton _button = new ModProjectButton();
         _button.DataContext = new ModProjectButtonViewModel(this, button);
         _Buttons.Add(_button);
     }
     catch (Exception e)
     {
         System.Console.WriteLine(e.ToString());
     }
 }