示例#1
0
        //吴成文:分享指定文件
        //分享指定文件
        private void MenuFlyShare_Click(object sender, RoutedEventArgs e)
        {
            var datacontext = (sender as FrameworkElement).DataContext;
            var item        = MainLeftItemList.ContainerFromItem(datacontext) as ListViewItem;

            timeReaper.SelectedItem = (ListItem)(item.Content);

            DataTransferManager.ShowShareUI();
        }
示例#2
0
        //删除指定文件
        private void MenuFlyDelete_Click(object sender, RoutedEventArgs e)
        {
            var datacontext = (sender as FrameworkElement).DataContext;
            var item        = MainLeftItemList.ContainerFromItem(datacontext) as ListViewItem;

            timeReaper.SelectedItem = (ListItem)(item.Content);
            timeReaper.RemoveTodoItem(timeReaper.SelectedItem);
            timeReaper.SelectedItem = null;
            UpdateTile();
        }
示例#3
0
        //前往编辑页面(编辑与创造的区别在于timeReaper.SelectedItem是否为空)
        private void MenuFlyEdit_Click(object sender, RoutedEventArgs e)
        {
            var datacontext = (sender as FrameworkElement).DataContext;
            var item        = MainLeftItemList.ContainerFromItem(datacontext) as ListViewItem;

            timeReaper.SelectedItem = (ListItem)(item.Content);

            if (timer != null)
            {
                timeReaper.cacheBeginTime  = beginTime;
                timeReaper.cacheTimerState = timerState;
                timeReaper.cacheNeedPress  = needPress;
                timeReaper.cacheWork       = work;
            }

            Frame.Navigate(typeof(CreatePage));
        }