public void RequestClose(Sidebar sidebar) { if (sidebar.IsOpenedOrOpening()) { if (closeSidebarClip = null) { audioSource.PlayOneShot(closeSidebarClip); } } sidebar.Close(); }
/*public NodeMap(FLVM f) * { * InitializeComponent(); * Flame = f; * XFVM.StaticPropertyChanged += PropertyChanged; * //Flame.PropertyChanged += PropertyChanged; * * }*/ private void PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) {//sender: flame vagy null (static XFVM) if (e.PropertyName == "Selection") { if (Flame.Selection != null) { if (Flame.Selection != Flame.GetFinalXForm()) { BringNodeToFront(GetNodeFromXF(Flame.Selection)); } Sidebar.Show(Flame.Selection); } else { Sidebar.Close(false); } updateConnections(); } if (e.PropertyName == "Saved") { updateConnections(); } }