private void lstSkins_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { if (lstSkins.SelectedIndex < 0) { imgSkin.Source = null; return; } var item = lstSkins.SelectedItem as PNListBoxItem; if (item == null) { return; } if (Skin.SkinName != item.Text) { _CustomSkin = true; Skin.SkinName = item.Text; var path = Path.Combine(PNPaths.Instance.SkinsDir, Skin.SkinName + PNStrings.SKIN_EXTENSION); if (File.Exists(path)) { PNSkinsOperations.LoadSkin(path, Skin); } } if (Skin.SkinName != PNSkinDetails.NO_SKIN) { PNStatic.DrawSkinPreview(_Group, Skin, imgSkin); } } catch (Exception ex) { PNStatic.LogException(ex); } }
//internal void RaiseDeleteCompletelyEvent() //{ // if (NoteDeletedCompletely != null) // { // NoteDeletedCompletely(this, new NoteDeletedCompletelyEventArgs(_ID, _GroupID)); // } //} private void group_GroupPropertyChanged(object sender, GroupPropertyChangedEventArgs e) { if (!_Visible || _Dialog == null) return; switch (e.Type) { case GroupChangeType.BackColor: if (_Skinless == null && !PNStatic.Settings.GeneralSettings.UseSkins) { _Dialog.ApplyBackColor((Color)e.NewStateObject); } break; case GroupChangeType.CaptionColor: if (_Skinless == null && !PNStatic.Settings.GeneralSettings.UseSkins) { _Dialog.ApplyCaptionFontColor((Color)e.NewStateObject); } break; case GroupChangeType.CaptionFont: if (_Skinless == null && !PNStatic.Settings.GeneralSettings.UseSkins) { _Dialog.ApplyCaptionFont((PNFont)e.NewStateObject); } break; case GroupChangeType.Skin: if (_Skin == null && PNStatic.Settings.GeneralSettings.UseSkins) { PNSkinsOperations.ApplyNoteSkin(_Dialog, this); } break; } }