Ejemplo n.º 1
0
 private static void ShowFirstRunWizard(Settings settings, IPersistence persistence, ConnectionManager connectionManager)
 {
     if (settings.ShowWizard)
     {
         //settings file doesn't exist
         using (var wzrd = new FirstRunWizard(persistence, connectionManager))
             wzrd.ShowDialog();
     }
 }
Ejemplo n.º 2
0
 private static void ShowFirstRunWizard()
 {
     if (Settings.Instance.ShowWizard)
     {
         //settings file doesn't exist
         using (var wzrd = new FirstRunWizard(Persistence.Instance))
             wzrd.ShowDialog();
     }
 }
Ejemplo n.º 3
0
        /*private ScreenCapture screenCapture;
        private PictureBox previewPictureBox;*/
        public MainForm()
        {
            try
            {

                //check for wizard
                if(Settings.ShowWizard)
                {
                    //settings file doesnt exist, wizard!
                    //this.Hide();
                    FirstRunWizard wzrd = new FirstRunWizard();
                    wzrd.ShowDialog(this);
                    Settings.ShowWizard = false;
                }

                imageFormatHandler = new ImageFormatHandler();
                //screenCapture = new ScreenCapture(imageFormatHandler);
                _formSettings = new FormSettings(this);
                InitializeComponent();

                if(Settings.Office2007BlueFeel)
                    ToolStripManager.Renderer = Office2007Renderer.Office2007Renderer.GetRenderer(Office2007Renderer.RenderColors.Blue);
                else if(Settings.Office2007BlackFeel)
                    ToolStripManager.Renderer = Office2007Renderer.Office2007Renderer.GetRenderer(Office2007Renderer.RenderColors.Black);
                else
                    ToolStripManager.Renderer = new System.Windows.Forms.ToolStripProfessionalRenderer();

                //Settings.RebuildTagIndex();

                LoadFavorites();
                LoadFavorites("");
                LoadSpecialCommands();
                LoadGroups();
                UpdateControls();
                pnlTagsFavorites.Width = 7;
                LoadTags("");
                ProtocolHandler.Register();
                SingleInstanceApplication.NewInstanceMessage += new NewInstanceMessageEventHandler(SingleInstanceApplication_NewInstanceMessage);
                tcTerminals.MouseClick += new MouseEventHandler(tcTerminals_MouseClick);
                QuickContextMenu.ItemClicked += new ToolStripItemClickedEventHandler(QuickContextMenu_ItemClicked);
                SystemTrayQuickConnectToolStripMenuItem.DropDownItemClicked += new ToolStripItemClickedEventHandler(SystemTrayQuickConnectToolStripMenuItem_DropDownItemClicked);
                //System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged += new System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler(NetworkChange_NetworkAvailabilityChanged);

                LoadWindowState();

                this.MainWindowNotifyIcon.Visible = Settings.MinimizeToTray;
                this.lockToolbarsToolStripMenuItem.Checked = Settings.ToolbarsLocked;
                this.groupsToolStripMenuItem.Visible = Settings.EnableGroupsMenu;

                if(Settings.ToolbarsLocked)
                    MainMenuStrip.GripStyle = ToolStripGripStyle.Hidden;
                else
                    MainMenuStrip.GripStyle = ToolStripGripStyle.Visible;

                //be sure to turn off the visual studio hosting process for this to work
                //right click the Terminals project, debug, bottom checkbox
                //try {
                //    gma.System.Windows.UserActivityHook hook = new gma.System.Windows.UserActivityHook(false, true);
                //    hook.KeyUp += new KeyEventHandler(hook_KeyUp);
                //} catch(Exception exc) {
                //    Terminals.Logging.Log.Info("Failed to set keyboard hook for global event handling.", exc);
                //}

            }
            catch(Exception exc)
            {
                Terminals.Logging.Log.Info("", exc);
                System.Windows.Forms.MessageBox.Show(exc.ToString());
            }
        }
Ejemplo n.º 4
0
 private void ShowWizardAndReloadSpecialCommands()
 {
 	Log.InsideMethod();
 	
     if (Settings.ShowWizard)
     {
         //settings file doesnt exist, wizard!
         using (FirstRunWizard wzrd = new FirstRunWizard())
             wzrd.ShowDialog(this);
     }
     else
     {
         ThreadPool.QueueUserWorkItem(this.ReloadSpecialCommands, null);
     }
 }