示例#1
0
        private void OnAddActCommand(object o)
        {
            CommandChangedEvent2.GetEvent().Handler += CloseAddActWindows;

            _addActView      = new AddActView();
            _addActView.Name = "Ajouter";
            _addActView.ShowDialog();

            if (_addActView.ActView.Valid == true)
            {
                Film.Acteurs.Add(_addActView.ActView.Acteur);
                NotifyPropertyChanged("Film");
            }
        }
示例#2
0
        private void OnAddCommand(object o)
        {
            string source   = Parcourir.ToString();
            string fileName = System.IO.Path.GetFileName(Parcourir.ToString());

            if (System.IO.Directory.GetParent(Parcourir.LocalPath).ToString() != System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString())
            {
                string targetFile = System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString();
                System.IO.File.Copy(@Parcourir.LocalPath, @targetFile + "/" + fileName, true);
            }

            Acteur.Photo = new Uri(@System.IO.Directory.GetParent(Application.ResourceAssembly.Location).ToString() + "/" + fileName);
            Valid        = true;
            CommandChangedEvent2.GetEvent().OnButtonPressedActionHandler2(EventArgs.Empty);
        }
示例#3
0
 private void CloseAddActWindows(object sender, EventArgs e)
 {
     _addActView.Close();
     CommandChangedEvent2.GetEvent().Handler -= CloseAddActWindows;
 }
示例#4
0
 private void OnCancelCommand(object o)
 {
     Valid = false;
     CommandChangedEvent2.GetEvent().OnButtonPressedActionHandler2(EventArgs.Empty);
 }