This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathTeamExplorerBaseSection.cs
More file actions
117 lines (104 loc) · 3.22 KB
/
Copy pathTeamExplorerBaseSection.cs
File metadata and controls
117 lines (104 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
* Copyright (c) Microsoft Corporation. All rights reserved. This code released
* under the terms of the Microsoft Limited Public License (MS-LPL).
*/
using System;
using System.ComponentModel;
using Microsoft.TeamFoundation.Controls;
namespace GitHub.VisualStudio
{
/// <summary>
/// Team Explorer base section class.
/// </summary>
public class TeamExplorerBaseSection : TeamExplorerBase, ITeamExplorerSection
{
#region ITeamExplorerSection
/// <summary>
/// Initialize the section.
/// </summary>
public virtual void Initialize(object sender, SectionInitializeEventArgs e)
{
this.ServiceProvider = e.ServiceProvider;
}
/// <summary>
/// Save context handler that is called before a section is unloaded.
/// </summary>
public virtual void SaveContext(object sender, SectionSaveContextEventArgs e)
{
}
/// <summary>
/// Get/set the section title.
/// </summary>
public string Title
{
get { return m_title; }
set { m_title = value; RaisePropertyChanged("Title"); }
}
private string m_title;
/// <summary>
/// Get/set the section content.
/// </summary>
public object SectionContent
{
get { return m_sectionContent; }
set { m_sectionContent = value; RaisePropertyChanged("SectionContent"); }
}
private object m_sectionContent;
/// <summary>
/// Get/set the IsVisible flag.
/// </summary>
public bool IsVisible
{
get { return m_isVisible; }
set { m_isVisible = value; RaisePropertyChanged("IsVisible"); }
}
private bool m_isVisible = true;
/// <summary>
/// Get/set the IsExpanded flag.
/// </summary>
public bool IsExpanded
{
get { return m_isExpanded; }
set { m_isExpanded = value; RaisePropertyChanged("IsExpanded"); }
}
private bool m_isExpanded = true;
/// <summary>
/// Get/set the IsBusy flag.
/// </summary>
public bool IsBusy
{
get { return m_isBusy; }
set { m_isBusy = value; RaisePropertyChanged("IsBusy"); }
}
private bool m_isBusy = false;
/// <summary>
/// Called when the section is loaded.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public virtual void Loaded(object sender, SectionLoadedEventArgs e)
{
}
/// <summary>
/// Refresh the section contents.
/// </summary>
public virtual void Refresh()
{
}
/// <summary>
/// Cancel any running operations.
/// </summary>
public virtual void Cancel()
{
}
/// <summary>
/// Get the requested extensibility service from the section. Return
/// null if the service is not offered by this section.
/// </summary>
public virtual object GetExtensibilityService(Type serviceType)
{
return null;
}
#endregion
}
}