Example #1
0
 /// <summary>
 /// Memo delete clicked
 /// </summary>
 /// <param name="sender">Event sender</param>
 /// <param name="e">Event parameter</param>
 void OnMemoDeleteClicked(
         object sender,
         MemoClickedEventArgs e)
 {
   _vm.DeleteMemo(e.Document);
   if (_vm.MemoList.Count == 0)
   {
     NewTextMemo();
   }
   GoToVisualState(VS_NORMAL);
 }
Example #2
0
    /// <summary>
    /// Memo clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    void OnMemoClicked(object sender, MemoClickedEventArgs e)
    {
      Messenger.Default.Send<OpenMemoMessage>(
        new OpenMemoMessage(e.Document));

      Uri uri = null;

      if (e.Document.IsTextMemo)
        uri = new Uri("/TextEditorPage.xaml", UriKind.Relative);
      else if (e.Document.IsPhotoMemo)
        uri = new Uri("/PhotoViewerPage.xaml", UriKind.Relative);

      NavigationService.Navigate(uri);
    }
Example #3
0
 /// <summary>
 /// Memo is flipped
 /// </summary>
 /// <param name="sender">Event sender</param>
 /// <param name="e">Event parameter</param>
 void OnMemoFlipped(object sender, MemoClickedEventArgs e)
 {
   this._list.ForEach(c =>
     {
       if (c == sender)
         return;
       if (c.IsFlipped)
         c.FlipBackToFront();
     });
 }
Example #4
0
 /// <summary>
 /// Memo clicked
 /// </summary>
 /// <param name="sender">Event sender</param>
 /// <param name="e"></param>
 void OnMemoClicked(object sender, MemoClickedEventArgs e)
 {
   if (MemoClicked != null)
     MemoClicked(this, e);
 }
Example #5
0
    /// <summary>
    /// Memo delete clicked
    /// </summary>
    /// <param name="sender">Event sender</param>
    /// <param name="e">Event parameter</param>
    void OnMemoDeleteClicked(
              object sender,
              MemoClickedEventArgs e)
    {
      int delindex = this.Children.IndexOf(sender as UIElement);
      if (-1 == delindex)
        return;

      var c = _list[delindex];
      var doc = c.Memo;
      this.Children.Remove(c);
      _list.Remove(c);

      ArrangeMemoControls();
      UpdateScrollRange();

      double tx = Align(X);
      if (tx > _beginx)
        tx = _beginx;
      else if (tx < _endx)
        tx = _endx;

      BeginAlignAnimationTo(tx);

      if (MemoDeleteClicked != null)
        MemoDeleteClicked(this, e);
    }