Пример #1
0
 public AddView(Markup issue, string bcfTempFolder)
 {
   try
   {
     InitializeComponent();
     Issue = issue;
     TempFolder = bcfTempFolder;
   }
   catch (System.Exception ex1)
   {
     MessageBox.Show("exception: " + ex1);
   }
 }
Пример #2
0
    public AddViewNavis(Markup issue, string bcfTempFolder)
    {
      try
      {
        InitializeComponent();
        AddViewControl.Issue = issue;
        AddViewControl.TempFolder = bcfTempFolder;

        AddViewControl.TextBlockInfo.Text = "3D information of the current view will be included in the viewpoint";

        GetNavisSnapshot();
      }
      catch (System.Exception ex1)
      {
        MessageBox.Show("exception: " + ex1, "Error!");
      }

    }
Пример #3
0
    public AddViewRevit(Markup issue, string bcfTempFolder, Document _doc)
    {
      try
      {
        this.InitializeComponent();
        AddViewControl.Issue = issue;
        AddViewControl.TempFolder = bcfTempFolder;
        doc = _doc;

        AddViewControl.TextBlockInfo.Text = "3D/2D information of the current view will be included in the viewpoint";

        GetRevitSnapshot();
      }
      catch (System.Exception ex1)
      {
        TaskDialog.Show("Error!", "exception: " + ex1);
      }

    }
Пример #4
0
        public AddViewXbim(Markup issue, string bcfTempFolder, DrawingControl3D control)
        {
            try
            {
                InitializeComponent();
                AddViewControl.Issue = issue;
                AddViewControl.TempFolder = bcfTempFolder;
                _control = control;

                AddViewControl.TextBlockInfo.Text =
                    "3D/2D information of the current view will be included in the viewpoint";

                GetRevitSnapshot();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error!", "exception: " + ex);
            }
        }
Пример #5
0
        public void RemoveView(IEnumerable<ViewPoint> selectetitems, Markup issue, bool delComm)
        {
            foreach (var item in selectetitems)
              {
            if (File.Exists(Path.Combine(TempPath, issue.Topic.Guid, item.Viewpoint)))
              File.Delete(Path.Combine(TempPath, issue.Topic.Guid, item.Viewpoint));
            if (File.Exists(item.SnapshotPath))
              File.Delete(item.SnapshotPath);

            var guid = item.Guid;
            issue.Viewpoints.Remove(item);
            //remove comments associated with that view
            var viewcomments = issue.Comment.Where(x => x.Viewpoint.Guid == guid).ToList();
            foreach (var viewcomm in viewcomments)
            {
              if (delComm)
            issue.Comment.Remove(viewcomm);
              else
            viewcomm.Viewpoint = null;
            }

              }
              HasBeenSaved = false;
        }
Пример #6
0
        public void RemoveView(ViewPoint view, Markup issue, bool delComm)
        {
            if (File.Exists(Path.Combine(TempPath, issue.Topic.Guid, view.Viewpoint)))
            File.Delete(Path.Combine(TempPath, issue.Topic.Guid, view.Viewpoint));
              if (File.Exists(view.SnapshotPath))
            File.Delete(view.SnapshotPath);

              var guid = view.Guid;
              issue.Viewpoints.Remove(view);
              //remove comments associated with that view
              var viewcomments = issue.Comment.Where(x => x.Viewpoint!=null && x.Viewpoint.Guid == guid).ToList();

              if (!viewcomments.Any())
            return;

              foreach (var viewcomm in viewcomments)
              {
            if (delComm)
              issue.Comment.Remove(viewcomm);
            else
              viewcomm.Viewpoint = null;
              }

              HasBeenSaved = false;
        }
Пример #7
0
 public void RemoveComment(Comment comment, Markup issue)
 {
     issue.Comment.Remove(comment);
       HasBeenSaved = false;
 }
Пример #8
0
 public void RemoveComment(IEnumerable<Comment> selectetitems, Markup issue)
 {
     foreach (var item in selectetitems)
       {
     issue.Comment.Remove(item);
       }
       HasBeenSaved = false;
 }
Пример #9
0
        private void OnAddIssue(object sender, ExecutedRoutedEventArgs e)
        {
            try
              {

            if (SelectedBcf() == null)
              return;
            var issue = new Markup(DateTime.Now);
            SelectedBcf().Issues.Add(issue);
            SelectedBcf().SelectedIssue = issue;

              }
              catch (System.Exception ex1)
              {
            MessageBox.Show("exception: " + ex1);
              }
        }