Esempio n. 1
0
        private void AddTarget_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var targetPropertyDataModel = new TargetPropertyDataModel();

            targetPropertyDataModel.EnableRemoteOperation = __main_wnd_data_model.IsOnline == false;
            var targetPropertyControl = new TargetPropertyControl(targetPropertyDataModel, __target_manager_data_model, null);

            if (targetPropertyControl.ShowDialog() == true)
            {
                __target_manager_data_model.Add(targetPropertyDataModel);
                __main_wnd_data_model.IsDirty = true;
            }
        }
Esempio n. 2
0
        private void TargetProperty_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var targetPropertyDataModel = __target_manager_data_model.SelectedTarget.ShallowCopy();

            targetPropertyDataModel.EnableRemoteOperation = __main_wnd_data_model.IsOnline == false;
            var targetPropertyControl = new TargetPropertyControl(targetPropertyDataModel, __target_manager_data_model, __target_manager_data_model.SelectedTarget.Name);

            if (targetPropertyControl.ShowDialog() == true)
            {
                __target_manager_data_model.Modify(__target_manager_data_model.SelectedTarget, targetPropertyDataModel);
                __main_wnd_data_model.IsDirty = true;
            }
        }