Esempio n. 1
0
        FindControl(string InControlName)
        {
            Microsoft.VisualStudio.CommandBars.CommandBarControl foundControl = null;

            try
            {
                foundControl = mBar.Controls[InControlName];
            }
            catch (Exception)
            {
                foundControl = null;
            }

            return(foundControl);
        }
Esempio n. 2
0
        private void UpdateSendStatus()
        {
            var dte = GetService(typeof(SDTE)) as DTE2;
            var cbs = ((Microsoft.VisualStudio.CommandBars.CommandBars)dte.CommandBars);

            Microsoft.VisualStudio.CommandBars.CommandBar        cb           = cbs["OSBIDE Toolbar"];
            Microsoft.VisualStudio.CommandBars.CommandBarControl toolsControl = cb.Controls["Log into OSBIDE"];
            Microsoft.VisualStudio.CommandBars.CommandBarButton  loginButton  = toolsControl as Microsoft.VisualStudio.CommandBars.CommandBarButton;

            if (_client.IsSendingData == true)
            {
                loginButton.Picture     = (stdole.StdPicture)IconConverter.GetIPictureDispFromImage(Resources.login_active);
                loginButton.TooltipText = "Connected to OSBIDE";
            }
            else
            {
                loginButton.Picture     = (stdole.StdPicture)IconConverter.GetIPictureDispFromImage(Resources.login);
                loginButton.TooltipText = "Not connected to OSBIDE.  Click to log in.";
            }
        }
Esempio n. 3
0
        void ToggleProfileImage(bool hasSocial)
        {
            var dte = GetService(typeof(SDTE)) as DTE2;
            var cbs = ((Microsoft.VisualStudio.CommandBars.CommandBars)dte.CommandBars);

            Microsoft.VisualStudio.CommandBars.CommandBar        cb            = cbs["OSBIDE Toolbar"];
            Microsoft.VisualStudio.CommandBars.CommandBarControl toolsControl  = cb.Controls["My OSBIDE Profile"];
            Microsoft.VisualStudio.CommandBars.CommandBarButton  profileButton = toolsControl as Microsoft.VisualStudio.CommandBars.CommandBarButton;

            if (hasSocial == true)
            {
                profileButton.Picture     = (stdole.StdPicture)IconConverter.GetIPictureDispFromImage(Resources.profile_new_social);
                profileButton.TooltipText = "New social activity detected";
            }
            else
            {
                profileButton.Picture     = (stdole.StdPicture)IconConverter.GetIPictureDispFromImage(Resources.profile);
                profileButton.TooltipText = "View your profile";
            }
        }