Пример #1
0
        public IssuesList(IssuesListView viewControl)
        {
            _viewControl = viewControl;
            _serializer = new ObjectSerializer(this, "Top", "Left", "Height", "Width", "_splitter.SplitterDistance", "_worklogGroup.Visible");
            _serializer.ContinueOnError = true;

            _tipitem = new ToolTipLabel();
            this.Controls.Add(_tipitem);

            InitializeComponent();

            new ListViewSort(_listView);

            _viewControl.FoundIssues.ListChanged += new ListChangedEventHandler(FoundIssues_ListChanged);
            _binding.DataSource = _viewControl;
            _textChangedtimer = new Timer();
            _textChangedtimer.Interval = 500;
            _textChangedtimer.Tick += new EventHandler(_textChangedtimer_Tick);
        }
Пример #2
0
        /// <summary> Releases any locked resources </summary>
        public void Dispose()
        {
            if (_issues != null)
                _issues.Dispose();
            _issues = null;

            if (_service != null)
                _service.Dispose();
            _service = null;
        }
Пример #3
0
        /// <summary>
        /// Prompt the user for the comments and related issues
        /// </summary>
        public string GetCommitMsg(IntPtr hParentWnd, string parameters, string originalMessage, string commonRoot, string[] files)
        {
            Log.Verbose("Loading form...");
            DateTime time = DateTime.Now;
            string message = originalMessage;
            try
            {
                if (!Logon(hParentWnd, parameters, commonRoot))
                    return originalMessage;

                if (_issues == null)
                    _issues = new IssuesListView(_service, originalMessage, files);
                else
                    _issues.SyncComments(originalMessage);

                Log.Verbose("Opening form");
                Log.Info("Time required to connect: {0}", DateTime.Now - time);
                IssuesList form = new IssuesList(_issues);
                form.ShowInTaskbar = hParentWnd == IntPtr.Zero;

                Log.Info("Time required to open form: {0}", DateTime.Now - time);
                if (form.ShowDialog(Win32Window.FromHandle(hParentWnd)) != DialogResult.OK)
                { _cancelled = true; return originalMessage; }

                _cancelled = false;
                return _issues.GetFullComments();
            }
            catch (OperationCanceledException) { _cancelled = true; return originalMessage; }
            catch (Exception ex)
            {
                ShowError(hParentWnd, ex.Message, ex.GetType().FullName);
                throw;
            }
        }
Пример #4
0
 public IssueItemView(IssuesListView view, IIssue issue)
 {
     this._view = view;
     this.Issue = issue;
 }