예제 #1
0
        public void LoadLayoutSettings() // called by discovery form by us after its adjusted itself
        {
            // ORDER IMPORTANT for right outer/inner splitter, otherwise windows fixes it

            if (!EDDOptions.Instance.NoWindowReposition)
            {
                try
                {
                    splitContainerLeftRight.SplitterDistance  = SQLiteDBClass.GetSettingInt("TravelControlSpliterLR", splitContainerLeftRight.SplitterDistance);
                    splitContainerLeft.SplitterDistance       = SQLiteDBClass.GetSettingInt("TravelControlSpliterL", splitContainerLeft.SplitterDistance);
                    splitContainerRightOuter.SplitterDistance = SQLiteDBClass.GetSettingInt("TravelControlSpliterRO", splitContainerRightOuter.SplitterDistance);
                    splitContainerRightInner.SplitterDistance = SQLiteDBClass.GetSettingInt("TravelControlSpliterR", splitContainerRightInner.SplitterDistance);
                }
                catch { };          // so splitter can except, if values are strange, but we don't really care, so lets throw away the exception
            }

            userControlTravelGrid.LoadLayout();

            // NO NEED to reload the three tabstrips - code below will cause a LoadLayout on the one selected.

            int max = (int)PopOutControl.PopOuts.EndList;

            // saved as the pop out enum value, for historical reasons
            int piindex_bottom      = Math.Min(SQLiteDBClass.GetSettingInt("TravelControlBottomTab", (int)(PopOutControl.PopOuts.Scan)), max);
            int piindex_bottomright = Math.Min(SQLiteDBClass.GetSettingInt("TravelControlBottomRightTab", (int)(PopOutControl.PopOuts.Log)), max);
            int piindex_middleright = Math.Min(SQLiteDBClass.GetSettingInt("TravelControlMiddleRightTab", (int)(PopOutControl.PopOuts.StarDistance)), max);
            int piindex_topright    = Math.Min(SQLiteDBClass.GetSettingInt("TravelControlTopRightTab", (int)(PopOutControl.PopOuts.SystemInformation)), max);

            tabStripBottom.SelectedIndex      = PopOutControl.GetPopOutIndexByEnum((PopOutControl.PopOuts)piindex_bottom);  // translate to image index
            tabStripBottomRight.SelectedIndex = PopOutControl.GetPopOutIndexByEnum((PopOutControl.PopOuts)piindex_bottomright);
            tabStripMiddleRight.SelectedIndex = PopOutControl.GetPopOutIndexByEnum((PopOutControl.PopOuts)piindex_middleright);
            tabStripTopRight.SelectedIndex    = PopOutControl.GetPopOutIndexByEnum((PopOutControl.PopOuts)piindex_topright);
        }
예제 #2
0
        Control TabCreate(ExtendedControls.TabStrip t, int si)        // called by tab strip when selected index changes.. create a new one.. only create.
        {
            PopOutControl.PopOuts i = (PopOutControl.PopOuts)(si + PopOutControl.PopOuts.StartTabButtons);

            _discoveryForm.ActionRun("onPanelChange", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PanelTabName", PopOutControl.popoutinfo[i].WindowRefName, "PanelTabTitle", PopOutControl.popoutinfo[i].WindowTitlePrefix, "PanelName", t.Name }));

            return(PopOutControl.Create(i));
        }
예제 #3
0
        public void Init()
        {
            _initialised = true;
            Controller.Init();

            // Some components require the controller to be initialized
            InitializeComponent();

            label_version.Text = EDDConfig.Options.VersionDisplayString;

            PopOuts = new PopOutControl(this);

            ToolStripManager.Renderer = theme.toolstripRenderer;
            theme.LoadThemes();                                         // default themes and ones on disk loaded
            themeok = theme.RestoreSettings();                          // theme, remember your saved settings

            trilaterationControl.InitControl(this);
            travelHistoryControl1.InitControl(this);
            imageHandler1.InitControl(this);
            settings.InitControl(this);
            journalViewControl1.InitControl(this, 0);
            routeControl1.InitControl(this);
            savedRouteExpeditionControl1.InitControl(this);
            exportControl1.InitControl(this);

            Map = new EDDiscovery._3DMap.MapManager(EDDConfig.Options.NoWindowReposition, this);

            this.TopMost = EDDConfig.KeepOnTop;

#if !__MonoCS__
            // Windows TTS (2000 and above). Speech *recognition* will be Version.Major >= 6 (Vista and above)
            if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 5)
            {
                audiodriverwave   = new Audio.AudioDriverCSCore(EDDConfig.DefaultWaveDevice);
                audiodriverspeech = new Audio.AudioDriverCSCore(EDDConfig.DefaultVoiceDevice);
                speechsynth       = new Audio.SpeechSynthesizer(new Audio.WindowsSpeechEngine());
            }
            else
            {
                audiodriverwave   = new Audio.AudioDriverDummy();
                audiodriverspeech = new Audio.AudioDriverDummy();
                speechsynth       = new Audio.SpeechSynthesizer(new Audio.DummySpeechEngine());
            }
#else
            audiodriverwave   = new Audio.AudioDriverDummy();
            audiodriverspeech = new Audio.AudioDriverDummy();
            speechsynth       = new Audio.SpeechSynthesizer(new Audio.DummySpeechEngine());
#endif
            audioqueuewave   = new Audio.AudioQueue(audiodriverwave);
            audioqueuespeech = new Audio.AudioQueue(audiodriverspeech);

            actioncontroller = new Actions.ActionController(this, Controller);

            ApplyTheme();

            notifyIcon1.Visible = EDDConfig.UseNotifyIcon;
        }
예제 #4
0
        Control TabCreate(ExtendedControls.TabStrip t, int si)        // called by tab strip when selected index changes.. create a new one.. only create.
        {
            Control c = PopOutControl.Create(si);

            c.Name = PopOutControl.PopOutList[si].WindowTitlePrefix;        // tabs uses Name field for display, must set it

            _discoveryForm.ActionRun(Actions.ActionEventEDList.onPanelChange, null, new Conditions.ConditionVariables(new string[] { "PanelTabName", PopOutControl.PopOutList[si].WindowRefName, "PanelTabTitle", PopOutControl.PopOutList[si].WindowTitlePrefix, "PanelName", t.Name }));

            return(c);
        }
예제 #5
0
 void TabConfigure(ExtendedControls.TabStrip t, string name, int displayno)
 {
     t.Images           = PopOutControl.GetPopOutImages();
     t.ToolTips         = PopOutControl.GetPopOutToolTips();
     t.Tag              = displayno; // these are IDs for purposes of identifying different instances of a control.. 0 = main ones (main travel grid, main tab journal). 1..N are popups
     t.OnRemoving      += TabRemoved;
     t.OnCreateTab     += TabCreate;
     t.OnPostCreateTab += TabPostCreate;
     t.OnPopOut        += TabPopOut;
     t.Name             = name;
 }
        Control TabCreate(ExtendedControls.TabStrip t, int si)        // called by tab strip when selected index changes.. create a new one.. only create.
        {
            PopOutControl.PopOuts i = (PopOutControl.PopOuts)si;

            Control c = PopOutControl.Create(i);

            c.Name = PopOutControl.GetPopOutName(i);        // tabs uses Name field for display, must set it

            _discoveryForm.ActionRun("onPanelChange", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PanelTabName", PopOutControl.popoutinfo[i].WindowRefName, "PanelTabTitle", PopOutControl.popoutinfo[i].WindowTitlePrefix, "PanelName", t.Name }));

            return(c);
        }