本文整理汇总了C#中MonoDevelop.Projects.WorkspaceItemEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# WorkspaceItemEventArgs类的具体用法?C# WorkspaceItemEventArgs怎么用?C# WorkspaceItemEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WorkspaceItemEventArgs类属于MonoDevelop.Projects命名空间,在下文中一共展示了WorkspaceItemEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCloseWorkspace
protected override void OnCloseWorkspace (object sender, WorkspaceItemEventArgs e)
{
base.OnCloseWorkspace (sender, e);
IdeApp.ProjectOperations.CurrentSelectedSolutionItem = null;
IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem = null;
IdeApp.ProjectOperations.CurrentSelectedItem = null;
}
示例2: OnWorkspaceItemLoaded
static void OnWorkspaceItemLoaded (object sender, WorkspaceItemEventArgs e)
{
string fileToLoad = GetUserTasksFilename (e.Item);
userTasks.BeginTaskUpdates ();
try {
// Load User Tasks from xml file
if (File.Exists (fileToLoad)) {
XmlDataSerializer serializer = new XmlDataSerializer (new DataContext ());
List<Task> ts = (List<Task>) serializer.Deserialize (fileToLoad, typeof(List<Task>));
foreach (Task t in ts) {
t.WorkspaceObject = e.Item;
userTasks.Add (t);
}
}
}
catch (Exception ex) {
LoggingService.LogWarning ("Could not load user tasks: " + fileToLoad, ex);
}
finally {
userTasks.EndTaskUpdates ();
}
}
示例3: OnEntryRemoved
void OnEntryRemoved (object sender, WorkspaceItemEventArgs e)
{
ITreeBuilder tb = Context.GetTreeBuilder (e.Item);
if (tb != null)
tb.Remove ();
}
示例4: OnEntryAdded
void OnEntryAdded (object sender, WorkspaceItemEventArgs e)
{
ITreeBuilder tb = Context.GetTreeBuilder (e.Item.ParentWorkspace);
if (tb != null) {
tb.AddChild (e.Item, true);
tb.Expanded = true;
}
}
示例5: OnSolutionUnloaded
void OnSolutionUnloaded (object sender, WorkspaceItemEventArgs e)
{
if (e.Item is Solution) {
RegistryInfo reg;
if (solutions.TryGetValue ((Solution) e.Item, out reg)) {
var nav = tree.BuilderContext.GetTreeBuilder (reg);
if (nav != null)
nav.Remove ();
}
}
}
示例6: OnWorkspaceItemUnloaded
void OnWorkspaceItemUnloaded (object s, WorkspaceItemEventArgs args)
{
if (ContainsTarget (args.Item, currentSolutionItem))
CurrentSelectedSolutionItem = null;
if (ContainsTarget (args.Item, currentWorkspaceItem))
CurrentSelectedWorkspaceItem = null;
if ((currentItem is IBuildTarget) && ContainsTarget (args.Item, ((IBuildTarget)currentItem)))
CurrentSelectedItem = null;
}
示例7: OnWorkspaceItemRemoved
static void OnWorkspaceItemRemoved (object s, WorkspaceItemEventArgs args)
{
Unload (args.Item);
}
示例8: OnWorkspaceItemUnloaded
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
{
foreach (var sln in e.Item.GetAllSolutions ())
loadedSlns.Remove (sln);
comments.RemoveItemTasks (e.Item, true);
}
示例9: OnCloseWorkspace
protected virtual void OnCloseWorkspace (object sender, WorkspaceItemEventArgs e)
{
treeView.RemoveChild (e.Item);
}
示例10: OnOpenWorkspace
protected virtual void OnOpenWorkspace (object sender, WorkspaceItemEventArgs e)
{
treeView.AddChild (e.Item);
}
示例11: OnWorkspaceItemUnloaded
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
{
comments.RemoveItemTasks (e.Item, true);
var solution = e.Item as Solution;
if (solution != null) {
loadedSlns.Remove (solution);
foreach (Project p in solution.GetAllProjects ()) {
projectTags.Remove (p);
}
}
}
示例12: OnEntryChanged
void OnEntryChanged (object sender, WorkspaceItemEventArgs e)
{
UpdateTests ();
}
示例13: OnCombineOpened
void OnCombineOpened(object sender, WorkspaceItemEventArgs args)
{
try {
Solution sol = args.Item as Solution;
if (sol != null && sol.StartupItem != null)
fb.CurrentDir = sol.StartupItem.BaseDirectory;
} catch {
fb.CurrentDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}
}
示例14: OnWorkspaceItemUnloaded
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
{
foreach (var sln in e.Item.GetAllSolutions ()) {
if (loadedSlns.Remove (sln))
sln.SolutionItemAdded -= HandleSolutionItemAdded;
}
comments.RemoveItemTasks (e.Item, true);
}
示例15: OnWorkspaceItemUnloaded
static void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
{
// Save UserTasks to xml file
SaveUserTasks (e.Item);
// Remove solution tasks
errors.RemoveItemTasks (e.Item, true);
userTasks.RemoveItemTasks (e.Item, true);
}