コード例 #1
0
        int IVsSelectionEvents.OnElementValueChanged(uint elementid, object varValueOld, object varValueNew)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (elementid == (uint)VSConstants.VSSELELEMID.SEID_StartupProject)
            {
                if (varValueOld == varValueNew)
                {
                    return(VSConstants.S_OK);
                }

                _currentRadProject?.Unload();
                _currentRadProject = null;

                if (varValueNew is IVsProject vsProject && GetCpsProject(vsProject) is UnconfiguredProject cpsProject)
                {
                    LoadRadProject(cpsProject);
                }
                else
                {
                    SolutionUnloaded?.Invoke(this, null);
                }
            }
コード例 #2
0
 public void OnSolutionUnloaded()
 {
     SolutionUnloaded?.Invoke(this, new System.EventArgs());
 }