Ejemplo n.º 1
0
 public void OnSelectedItemChanged(object pSource, SceneItem pScene)
 {
     if (this.selectedItemChanged != null)
     {
         selectedItemChanged(pSource, pScene);
     }
 }
Ejemplo n.º 2
0
        public static SceneItem GetFromClipboard(Type itemType)
        {
            String      jsonString = "";
            IDataObject dataObject = Clipboard.GetDataObject();
            string      format     = itemType.FullName;

            if (dataObject.GetDataPresent(format))
            {
                jsonString = dataObject.GetData(format) as String;
                MethodInfo mi   = typeof(UtilitiesIO).GetMethod("GetObjectFromJsonString").MakeGenericMethod(itemType);
                object[]   args = { null, jsonString };
                mi.Invoke(null, args);
                SceneItem item = args[0] as SceneItem;
                item.Id = SCENE_COUNT;
                SCENE_COUNT++;
                return(item);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// removes the given item from being rendered
 /// </summary>
 /// <param name="pItem">item to be removed</param>
 ///
 public void Remove(SceneItem pItem)
 {
     m_Items.Remove(pItem);
     NotifyPropertyChanged("Remove");
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Add SceneItem to List
 /// </summary>
 /// <param name="item"></param>
 public void Add(SceneItem item)
 {
     m_Items.Add(item);
     NotifyPropertyChanged();
 }