public IssuesListView(IIssuesServiceConnection service, string message, string[] files) { PropertyChanged += new PropertyChangedEventHandler(DebugPropertyChanged); _service = service; _comments = message; _filters.ReplaceContents(_service.GetFilters()); _assignees.AddRange(new IIssueUser[] { ReportedByUser.Instance, _service.CurrentUser }); _assignees.AddRange(_service.GetUsers()); _serializer = new ObjectSerializer(this, "_filters.SelectedText", "_assignedFilter.SelectedText", "_statusFilter.SelectedText", "_actions.SelectedText", "_assignees.SelectedText" ); _serializer.ContinueOnError = true; _serializer.Deserialize(_storage); // if no filter is pre-selected, select the last one, as this is the search filter // this increases the performance (no need to display all items) if (_filters.SelectedIndex == -1 && _filters.Count > 0) _filters.SelectedIndex = _filters.Count - 1; ServerFilterChanged(String.Empty); }
public IssuesListView(IIssuesServiceConnection service, string message, string[] files) { PropertyChanged += new PropertyChangedEventHandler(DebugPropertyChanged); _service = service; _comments = message; _filters.ReplaceContents(_service.GetFilters()); _assignees.AddRange(new IIssueUser[] { ReportedByUser.Instance, _service.CurrentUser }); _assignees.AddRange(_service.GetUsers()); _serializer = new ObjectSerializer(this, "_filters.SelectedText", "_assignedFilter.SelectedText", "_statusFilter.SelectedText", "_actions.SelectedText", "_assignees.SelectedText" ); _serializer.ContinueOnError = true; _serializer.Deserialize(_storage); // if no filter is pre-selected, select the first one, otherwise window comes up in odd state if (_filters.SelectedIndex == -1 && _filters.Count > 0) _filters.SelectedIndex = 0; ServerFilterChanged(String.Empty); }
public IssuesList(IssuesListView viewControl) { _viewControl = viewControl; _serializer = new ObjectSerializer(this, "Top", "Left", "Height", "Width", "_splitter.SplitterDistance", "worklogpanel.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; }
public IssuesList(IssuesListView viewControl) { _viewControl = viewControl; _serializer = new ObjectSerializer(this, "Top", "Left", "Height", "Width", "_splitter.SplitterDistance", "_worklogGroup.Visible"); _serializer.ContinueOnError = true; _tipitem = new ToolTipLabel(); Controls.Add(_tipitem); InitializeComponent(); new ListViewSort(_listView); _viewControl.FoundIssues.ListChanged += FoundIssues_ListChanged; _binding.DataSource = _viewControl; _textChangedtimer = new Timer { Interval = 500 }; _textChangedtimer.Tick += _textChangedtimer_Tick; }
public void TestObjectSerializer() { HaveReadOnly data = new HaveReadOnly(); data.Value = "a"; ObjectSerializer ser = new ObjectSerializer(data, "Value"); ser.Serialize(Dictionary); HaveReadOnly test = new HaveReadOnly(); ser = new ObjectSerializer(test, "Value"); ser.Deserialize(Dictionary); Assert.AreEqual("a", test.Value); }