예제 #1
0
        void AddNewProfileExecuted()
        {
            //Create the new profile and if success, open the profile in a new window to edit
            var newProfile = new Profile()
            {
                ProfileName = "Empty Profile",
                DateCreated = DateTime.Now,
            };

            if (HostLists.HostLists.AddNewProfile(newProfile))
            {
                if (newProfileWindow != null)
                    newProfileWindow.Close();

                newProfileWindow = new ProfileEditWindow(newProfile);
                newProfileWindow.Show();
            }
        }
예제 #2
0
 public ProfileEditViewModel(Profile profile)
 {
     this.Profile = profile;
 }
예제 #3
0
        public ProfileEditWindow(Profile profile)
        {
            InitializeComponent();

            PEditViewModel = new ProfileEditViewModel(profile);
        }
예제 #4
0
파일: HostLists.cs 프로젝트: shawty/hostman
 public static bool UpdateProfile(Profile newProfile)
 {
     // Return true for success, false for fail
       return true;
 }