Exemplo n.º 1
0
        public void Display(bool start_server = false)
        {
            m_osvrIcon.Icon    = Resources.logo;
            m_osvrIcon.Text    = "OSVR Tray App";
            m_osvrIcon.Visible = true;

            // Note: this is a workaround; see OSVI-65 for context.
            PromptSetHDKDisplayOrientation p = new PromptSetHDKDisplayOrientation();

            p.Opacity = 0d;
            p.Show();
            p.Hide();
            p.Opacity = 100d;

            m_contextMenu                = new ContextMenuWYSIWYG(m_osvrIcon, p, start_server);
            p.m_contextMenu              = m_contextMenu;
            m_osvrIcon.ContextMenuStrip  = m_contextMenu.OSVRContextMenuStrip;
            m_osvrIcon.MouseDoubleClick += OSVRIcon_MouseDoubleClick;

            SetupLabels(m_osvrIcon.ContextMenuStrip.Items);

            m_osvrIcon.ContextMenuStrip.BackColor = BG_COLOR;

            foreach (ToolStripItem tsi in m_osvrIcon.ContextMenuStrip.Items)
            {
                SetupTSIColors(tsi);
            }

            m_osvrIcon.ContextMenuStrip.Renderer = new CustomColorRenderer();
        }
 private void PromptDeviceRotation()
 {
     if (Properties.Settings.Default.promptSetLandscapeDisplayOrientation)
     {
         m_displayOrientationPrompt.Show();
     }
     else if (Properties.Settings.Default.shouldSetLandscapeDisplayOrientation)
     {
         NativeHelpers.CorrectDeviceRotation();
     }
 }