private void SolutionEvents_Renamed(string oldName)
        {
            AspectWindow MyWindow = (AspectWindow)this.FindToolWindow(typeof(AspectWindow), 0, true);
            string       FileName = _dte.Solution.FullName.Replace(".sln", AspectCore.Strings.DefaultAspectExtension);

            MyWindow.control.RenameAspectFile(FileName);
        }
示例#2
0
        public AspectControl(AspectWindow win)
        {
            InitializeComponent();
            WinInstance = win;

            // Create the interop host control.
            System.Windows.Forms.Integration.WindowsFormsHost host =
                new System.Windows.Forms.Integration.WindowsFormsHost();

            AspectCore.GlobalData.traceAction = Helpers.OutputWindowHelper.WriteOutput;

            VSInterop ide = new VSInterop(WinInstance);

            // Assign the MaskedTextBox control as the host control's child.
            awp        = new AspectWindowPane(ide);
            host.Child = awp;
            if (AspectPackage.dte != null && AspectPackage.dte.Solution != null)
            {
                string FileName = AspectPackage.dte.Solution.FullName.Replace(".sln", AspectCore.Strings.DefaultAspectExtension);
                if (FileName != "")
                {
                    awp.OpenOrCreateAspectFile(FileName);
                }
            }

            // Add the interop host control to the Grid
            // control's collection of child controls.
            this.grid1.Children.Add(host);
        }
        public AspectControl(AspectWindow win)
        {
            InitializeComponent();
            WinInstance = win;

            // Create the interop host control.
            System.Windows.Forms.Integration.WindowsFormsHost host =
                new System.Windows.Forms.Integration.WindowsFormsHost();

            AspectCore.GlobalData.traceAction = Helpers.OutputWindowHelper.WriteOutput;

            VSInterop ide = new VSInterop(WinInstance);

            // Assign the MaskedTextBox control as the host control's child.
            awp = new AspectWindowPane(ide);
            host.Child = awp;
            if (AspectPackage.dte != null && AspectPackage.dte.Solution != null)
            {
                string FileName = AspectPackage.dte.Solution.FullName.Replace(".sln", AspectCore.Strings.DefaultAspectExtension);
                if (FileName != "")
                    awp.OpenOrCreateAspectFile(FileName);
            }

            // Add the interop host control to the Grid 
            // control's collection of child controls. 
            this.grid1.Children.Add(host);
        }
        private void SolutionEvents_Opened()
        {
            //ShowAspectWindow(null, null);
            AspectWindow MyWindow = (AspectWindow)this.FindToolWindow(typeof(AspectWindow), 0, true);
            string       FileName = _dte.Solution.FullName.Replace(".sln", AspectCore.Strings.DefaultAspectExtension);

            if (FileName != "")
            {
                MyWindow.control.OpenOrCreateAspectFile(FileName);
            }
        }
示例#5
0
 public VSInterop(AspectWindow aw)
 {
     this.aw = aw;
 }
示例#6
0
 public VSInterop(AspectWindow aw)
 {
     this.aw = aw;
 }
        private void SolutionEvents_AfterClosing()
        {
            AspectWindow MyWindow = (AspectWindow)this.FindToolWindow(typeof(AspectWindow), 0, true);

            MyWindow.control.SaveAspectFile();
        }