Ejemplo n.º 1
0
 private void cmdOK_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         setUpSchedule();
         _Note.Schedule = (PNNoteSchedule)_Schedule.Clone();
         if (_Schedule.CloseOnNotification && _Schedule.Type != ScheduleType.None && _Note.Visible)
         {
             PNNotesOperations.ShowHideSpecificNote(_Note, false);
         }
         DialogResult = true;
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
Ejemplo n.º 2
0
 private void PNTreeView_PNTreeViewLeftMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         var item = tvwResults.GetHierarchyObjectAtPoint <PNTreeItem>(e.GetPosition(tvwResults)) as PNTreeItem;
         if (item == null)
         {
             return;
         }
         if (item.Parent == null)
         {
             var note = PNStatic.Notes.Note((string)item.Tag);
             if (note != null)
             {
                 PNNotesOperations.ShowHideSpecificNote(note, true);
             }
         }
         else if (item.Tag != null)
         {
             var parent = item.Parent as PNTreeItem;
             if (parent == null)
             {
                 return;
             }
             var note = PNStatic.Notes.Note((string)parent.Tag);
             if (note == null)
             {
                 return;
             }
             if (PNNotesOperations.ShowHideSpecificNote(note, true) != ShowHideResult.Success)
             {
                 return;
             }
             var range = (int[])item.Tag;
             note.Dialog.Edit.SelectionStart  = range[0];
             note.Dialog.Edit.SelectionLength = range[1];
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
Ejemplo n.º 3
0
 private void grdTagsResults_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         var item = grdTagsResults.GetObjectAtPoint <ListViewItem>(e.GetPosition(grdTagsResults)) as FoundNote;
         if (item == null)
         {
             return;
         }
         var note = PNStatic.Notes.Note(item.Id);
         if (note != null)
         {
             PNNotesOperations.ShowHideSpecificNote(note, true);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }