コード例 #1
0
        private void EditBut_Click(object sender, RoutedEventArgs e)
        {
            Transaction   transaction   = (Transaction)(sender as Button).Tag;
            CommentWindow commentWindow = new CommentWindow(transaction, transaction.Comment, transaction.Parent.GetMainWindow());

            commentWindow.ShowDialog();
        }
コード例 #2
0
        private void Details()
        {
            CommentWindow cw = new CommentWindow();

            cw.DataContext = this;

            cw.Show();
        }
コード例 #3
0
        private void btn_addComment_Click(object sender, RoutedEventArgs e)
        {
            CommentWindow commentWindow = new CommentWindow();

            if (commentWindow.ShowDialog() == true)
            {
                taskContract.AddComment(commentWindow.CurrentText,
                                        (this.DataContext as Task).ID,
                                        GlobalSettings.CurrentUser.ID);
                UpdateComment((this.DataContext as Task).ID);
            }
        }
コード例 #4
0
        // коментарии
        void btnComment_Click(object sender, RoutedEventArgs e)
        {
            var btn = sender as Button;

            if (btn == null || !(btn.Tag is Project))
            {
                return;
            }

            var win = new CommentWindow((Project)btn.Tag)
            {
                Owner = Window.GetWindow(this)
            };

            win.ShowDialog();
        }
コード例 #5
0
        private void Update()
        {
            DateTime oldDate    = Entity.Date;
            string   oldContent = Entity.Content;

            Entity.Date    = Date;
            Entity.Content = Content;

            UpdateCommand.RaiseCanExecuteChanged();

            if (!_apiRequester.Update(Entity, "comment/" + Id))
            {
                Entity.Date    = oldDate;
                Entity.Content = oldContent;
            }

            CommentWindow commentWindow = App.Current.Windows.OfType <CommentWindow>().FirstOrDefault();

            commentWindow.Close();
            //cw.Close();
        }
コード例 #6
0
        private void commentButton_Click(object sender, RoutedEventArgs e)
        {
            CommentWindow commentWnd = new CommentWindow(this.currentAppItem.Id);

            commentWnd.ShowDialog();
        }
コード例 #7
0
        private void Comments(object sender, RoutedEventArgs e)
        {
            CommentWindow window = new CommentWindow();

            window.ShowDialog();
        }