Beispiel #1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            var        selectedAccount = MyAccountListView.SelectedItem as Note;
            var        listType        = MyListView.ItemsSource as List <string>;
            frmNewNote frm             = new frmNewNote(listType, _currentUser, string.Empty, true, selectedAccount);

            if (frm.ShowDialog() == true)
            {
                Refresh();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonAddUserClick(object sender, RoutedEventArgs e)
        {
            var listType = MyListView.ItemsSource as List <string>;

            if (object.Equals(listType, null) || listType.Count < 1)
            {
                MessageBox.Show("请先新建一个分类");
                return;
            }
            var        currentType = MyListView.SelectedIndex == -1 ? string.Empty : MyListView.SelectedItem.ToString();
            frmNewNote frm         = new frmNewNote(listType, _currentUser, currentType);

            if (frm.ShowDialog() == true)
            {
                Refresh();
            }
        }
Beispiel #3
0
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonAddUserClick(object sender, RoutedEventArgs e)
        {
            var listType = MyListView.ItemsSource as List <string>;

            if (object.Equals(listType, null) || listType.Count < 1)
            {
                MessageBox.Show("请先新建一个分类");
                return;
            }
            var             currentType = MyListView.SelectedIndex == -1 ? string.Empty : MyListView.SelectedItem.ToString();
            frmNewNote      frm         = new frmNewNote(listType, _currentUser, currentType);
            DoubleAnimation animFadeIn  = new DoubleAnimation();

            animFadeIn.From     = 0;
            animFadeIn.To       = 1;
            animFadeIn.Duration = new Duration(TimeSpan.FromSeconds(2));
            frm.BeginAnimation(Window.OpacityProperty, animFadeIn);
            //window.ShowDialog();

            if (frm.ShowDialog() == true)
            {
                Refresh();
            }
        }