Esempio n. 1
0
        private void NodePropertiesDialog_Close(object sender, EventArgs e)
        {
            NodePropertiesDialog dialog = sender as NodePropertiesDialog;

            if (dialog != null)
            {
                if (dialog.DialogResult.Value)
                {
                    TypeManager        typeManager             = IoC.IoCContainer.GetInjectionInstance().GetInstance <TypeManager>();
                    IMetadataTypeProxy stringMetadataTypeProxy = typeManager.GetMetadataType("string");
                    Navigator.UpdateNodeMetadataAsync(dialog.NodeProxy, Guid.Empty, null, "Note", dialog.Note, stringMetadataTypeProxy);
                }
                else
                {
                    //cancel was selected
                }
            }
        }
Esempio n. 2
0
        private void propertiesMenuItem_Click(object sender, RoutedEventArgs e)
        {
            NodePropertiesDialog npd = new NodePropertiesDialog();

            npd.DataContext = NodeProxy;
            MetadataContext noteKey = new MetadataContext()
            {
                MetadataName = "Note",
                NodeUid      = NodeProxy.Id
            };

            if (NodeProxy.HasMetadata(noteKey))
            {
                npd.Note = NodeProxy.GetNodeMetadata(noteKey).MetadataValue;
            }
            npd.Closed += new EventHandler(NodePropertiesDialog_Close);
            npd.Show();
        }