Exemple #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            m_Splitter      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter(this);
            m_Splitter.Dock = Pos.Fill;


            Alt.GUI.Temporary.Gwen.Control.Base imageMainPanel = new Alt.GUI.Temporary.Gwen.Control.Base(m_Splitter);
            imageMainPanel.Dock = Pos.Fill;


            m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);            //imageMainPanel);
            m_TopLabel.AutoSizeToContents = true;
            m_TopLabel.Text      = label_TOP_text + " (please, wait while map image creating)";
            m_TopLabel.TextColor = Color.Yellow;
            m_TopLabel.Dock      = Pos.Top;
            m_TopLabel.Margin    = new Margin(0, 3, 0, 7);


            Alt.GUI.Temporary.Gwen.Control.ScrollControl scrollControl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(imageMainPanel);
            scrollControl.Margin = Margin.One;
            scrollControl.Dock   = Pos.Fill;
            scrollControl.EnableScroll(true, true);
            scrollControl.AutoHideBars = true;


            Alt.GUI.Temporary.Gwen.Control.Base logMainPanel = new Alt.GUI.Temporary.Gwen.Control.Base(m_Splitter);

            Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(logMainPanel);
            label.AutoSizeToContents = true;
            label.Text      = "Processing Log:";
            label.TextColor = Color.Yellow;
            label.Dock      = Pos.Top;
            label.Margin    = new Margin(0, 0, 0, 5);

            m_Log      = new Alt.GUI.Temporary.Gwen.Control.ListBox(logMainPanel);
            m_Log.Dock = Pos.Fill;

            m_Splitter.SetPanel(0, imageMainPanel);
            m_Splitter.SetPanel(1, logMainPanel);
            m_Splitter.SetVValue(0.75f);


            m_ImagePanel          = new Base(scrollControl);
            m_ImagePanel.Margin   = Margin.Two;
            m_ImagePanel.Location = PointI.Zero;
            m_ImagePanel.Size     = new SizeI(100, 100);
            m_ImagePanel.Paint   += new GUI.PaintEventHandler(ImagePanel_Paint);


            m_BGThread = new Thread(new ThreadStart(this.CreateBitmap));
            m_BGThread.SetApartmentState(ApartmentState.STA);
            m_BGThread.Start();
        }
Exemple #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            m_CurZoom = 0;

            m_Splitter = new Alt.GUI.Temporary.Gwen.Control.CrossSplitter(this);
            m_Splitter.SetPosition(0, 0);
            m_Splitter.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill;

            {
                Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(m_Splitter);
                Alt.GUI.Temporary.Gwen.Control.Button           button1  = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button1.SetText("Vertical left");
                Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button2.SetText("Vertical right");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(0, splitter);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter(m_Splitter);
                Alt.GUI.Temporary.Gwen.Control.Button             button1  = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button1.SetText("Horizontal up");
                Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button2.SetText("Horizontal down");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(1, splitter);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter(m_Splitter);
                Alt.GUI.Temporary.Gwen.Control.Button             button1  = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button1.SetText("Horizontal up");
                Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button2.SetText("Horizontal down");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(2, splitter);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(m_Splitter);
                Alt.GUI.Temporary.Gwen.Control.Button           button1  = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button1.SetText("Vertical left");
                Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter);
                button2.SetText("Vertical right");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(3, splitter);
            }

            //Status bar to hold unit testing buttons
            Alt.GUI.Temporary.Gwen.Control.StatusBar pStatus = new Alt.GUI.Temporary.Gwen.Control.StatusBar(this);
            pStatus.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom;

            {
                Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus);
                pButton.SetText("Zoom");
                pButton.Clicked += ZoomTest;
                pStatus.AddControl(pButton, false);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus);
                pButton.SetText("UnZoom");
                pButton.Clicked += UnZoomTest;
                pStatus.AddControl(pButton, false);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus);
                pButton.SetText("CenterPanels");
                pButton.Clicked += CenterPanels;
                pStatus.AddControl(pButton, true);
            }

            {
                Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus);
                pButton.SetText("Splitters");
                pButton.Clicked += ToggleSplitters;
                pStatus.AddControl(pButton, true);
            }
        }