Esempio n. 1
0
 private void buttonGraph_Click(Graph.SourceY src)
 {
     graph.SetSource(src, Graph.SourceX.Old);
     BufferDrawMode = BufferDrawModeGraph;
     showButton(button2, MenuPage.BFkt.map_zoomIn);
     showButton(button3, MenuPage.BFkt.map_zoomOut);
     
     NoBkPanel.BringToFront();
     NoBkPanel.Invalidate();
     timerButtonHide.Enabled = false;
 }
Esempio n. 2
0
        // c-tor. Create classes used, init some components
        public Form1()      //first executed, then Form1_Load()
        {
            //this.Menu = null;
            //this.ControlBox = false;
            
            // Required for Windows Form Designer support
            InitializeComponent();      //3162ms
            
            CurrentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            if (CurrentDirectory != "\\") { CurrentDirectory += "\\"; }

            mPage = new MenuPage();
            Controls.Add(mPage);
            mapUtil = new MapUtil();
            mapUtil.parent = this;
            graph = new Graph();
            graph.parent = this;

            // set defaults (shall load from file later)
            comboGpsPoll.SelectedIndex = 0;
            comboDropFirst.SelectedIndex = 0;
            comboUnits.SelectedIndex = 1;
            comboBoxKmlOptColor.SelectedIndex = 0;
            comboBoxKmlOptWidth.SelectedIndex = 1;
            comboBoxLine2OptColor.SelectedIndex = 1;
            comboBoxLine2OptWidth.SelectedIndex = 1;
            comboBoxUseGccDllRate.SelectedIndex = 0;
            comboBoxUseGccDllCom.SelectedIndex = 4;
            checkBoxUseGccDll.Checked = true;
            //checkPlotLine2AsDots.Checked = true;
            comboMultiMaps.SelectedIndex = 1;
            //comboMapDownload.SelectedIndex = 0; initializes at runtime
            comboBoxCwLogMode.SelectedIndex = 0;
            comboLapOptions.SelectedIndex = 0;
            comboArraySize.SelectedIndex = 0;
            comboNavCmd.SelectedIndex = 0;      //0=off; 1=voice on; 2=voice only important; 3=beep on; 4=beep only important

            Revision = Assembly.GetExecutingAssembly().GetName().Version.Major.ToString() + "."
                     + Assembly.GetExecutingAssembly().GetName().Version.Minor.ToString()
#if BETA
                     + "beta" + Assembly.GetExecutingAssembly().GetName().Version.Build.ToString()
#endif
#if SERVICEPACK
                     + "SP" + Assembly.GetExecutingAssembly().GetName().Version.Build.ToString()
#endif
                     ;
            labelRevision.Text = "programming/idea : AndyZap\ncontributors: expo7, AngelGR, Blaustein\n\nversion " + Revision;

            
            CreateCustomControls();         //3350ms
            
                                            //8s until here
            LockResize = false;

            cMenu1.Popup += new EventHandler(cMenu1_Popup);
            this.NoBkPanel.ContextMenu = cMenu1;
            mPage.ContextMenu = cMenu1;
            listBoxFiles.ContextMenu = cMenu1;
            //tabOpenFile.ContextMenu = cMenu1;         //don't work on WinCE  - listBoxFiles has no MouseDown
            //tabOpenFile.MouseDown += new MouseEventHandler(Form1_MouseDownCE);
            mPage.form1ref = this;
            Utils.form1ref = this;

            //for WinCE     -> for WM it is not necessary - does it really not harm on WM?
            contextMenuTimerCE.Tick += new EventHandler(contextMenuTimer_Tick);
            //this.MouseDown += new MouseEventHandler(Form1_MouseDownCE);   //is called in tabGraph_MouseDown
            mPage.MouseDown += new MouseEventHandler(Form1_MouseDownCE);
            mPage.MouseUp += new MouseEventHandler(Form1_MouseUpCE);
            timerButtonHide.Tick += new EventHandler(timerButtonHide_Tick);
        }