示例#1
0
        private void barGlobeTools_ItemClick(object sender, EventArgs e)
        {
            ButtonItem item = sender as ButtonItem;

            if (item == null)
            {
                return;
            }

            switch (item.Name)
            {
            case "buttonZoomIn":
                double alt = this._globeView.GlobeCamera.CameraAltitude;
                double lon = this._globeView.GlobeCamera.CameraLongitude;
                double lat = this._globeView.GlobeCamera.CameraLatitude;
                this._globeView.GlobeCamera.GotoLatLonAltitude(lat, lon, alt * 0.8);
                break;

            case "buttonZoomOut":
                alt = this._globeView.GlobeCamera.CameraAltitude;
                lon = this._globeView.GlobeCamera.CameraLongitude;
                lat = this._globeView.GlobeCamera.CameraLatitude;
                this._globeView.GlobeCamera.GotoLatLonAltitude(lat, lon, alt * 1.2);
                break;

            case "buttonNorth":
                this._globeView.GlobeCamera.Reset();
                break;

            case "buttonZoomAll":
                this._globeView.GlobeCamera.Reset();
                this._globeView.GlobeCamera.Reset();
                break;

            case "buttonTileDown":
                this._globeView.GlobeCamera.CameraTilt += 5;
                break;

            case "buttonTileUp":
                this._globeView.GlobeCamera.CameraTilt -= 5;
                break;

            case "buttonMeasure":
                this._globeView.DoMeasure();
                break;

            case "buttonMeasureMulti":
                this._globeView.DoMeasureMuliline();
                break;

            case "buttonTerrainInfo":
                _slopeAnalysisTabPanel.Show();
                break;

            case "buttonTerrainProfile":
                _terrainAnalysisTabPanel.Show();
                break;

            case "buttonVolumeAnalysis":
                _areaVolumeAnalysisTabPanel.Show();
                break;

            default:
                break;
            }
        }
示例#2
0
		public static void Execute (Atom parent)
		{

			var d = new Div ("bs-docs-example");

			var top = new TabPanel (new TabPanelOptions{
				TabsPosition="top",
				Bordered=true,

			});
			top.Content.Style.MinHeight = "100px";

			var t1 = new Tab ();
			t1.Caption="First Tab";
			t1.Body.Append ("Firs tab body");
			AlertFn.Success (t1.Body.FirstChild, "Cayita is awesome");
			top.Add (t1);

			top.Add (tab=>{
				tab.Caption= "Second Tab";
				tab.Body.AddClass("well");  
				tab.Body.Append("Hello second tab");  
				tab.Body.Style.Color="red";  
			});

			top.Add (tab=>{
				tab.Caption= "El Coyote";
				tab.Body.Append( new Div(cd=>{
					cd.ClassName="span1";
					cd.Append( new Image{Src="img/coyote.jpg"});
				}));
				tab.Body.Append( new Div(cd=>{
					cd.ClassName="span11";
					cd.Append( CoyoteText);
				}));
			});

			d.Append (top);

			parent.JQuery.Append ("Tabs on top".Header(3)).Append(d);


			var right = new TabPanel (new TabPanelOptions{
				TabsPosition="right",
			}, pn=>{
				pn.Add( tab=>{
					tab.Caption="First tab";  
					tab.Body.Append("Hello first tab".Header(3));
				});
				pn.Add( tab=>{
					tab.Caption= "Second tab";
					tab.Body.AddClass("well");  
					tab.Body.Append("Hello second tab");  
					tab.Body.Style.Color="blue";  
					tab.Body.Style.Height="80px";
				});
				pn.Add( tab=>{
					tab.Caption= "El Coyote";
					tab.Body.Append( new Div(cd=>{
						cd.ClassName="span1";
						cd.Append( new Image{Src="img/coyote.jpg"});
					}));
					tab.Body.Append( new Div(cd=>{
						cd.ClassName="span11";
						cd.Append( CoyoteText);
					}));
				});

			});

			new Div (ex=>{
				ex.ClassName="bs-docs-example";
				ex.Append(right);
				parent.JQuery.Append ("Tabs on right".Header(3)).Append(ex);
			});

			right.Show (2);


			var bottom = new TabPanel (new TabPanelOptions{
				TabsPosition="below",
			}, pn=>{
				pn.Add( tab=>{
					tab.Caption="First tab";  
					tab.Body.Append("Hello first tab".Header(3));
				});
				pn.Add( tab=>{
					tab.Caption= "Second tab";
					tab.Body.AddClass("well");  
					tab.Body.Append("Hello second tab");  
					tab.Body.Style.Color="blue";  
					tab.Body.Style.Height="80px";
				});
				pn.Add( tab=>{
					tab.Caption= "El Coyote";
					tab.Body.Append( new Div(cd=>{
						cd.ClassName="span1";
						cd.Append( new Image{Src="img/coyote.jpg"});
					}));
					tab.Body.Append( new Div(cd=>{
						cd.ClassName="span11";
						cd.Append( CoyoteText);
					}));
				});

			});

			bottom.Content.Style.MinHeight = "150px";

			new Div (ex=>{
				ex.ClassName="bs-docs-example";
				ex.Append(bottom);
				parent.JQuery.Append ("Tabs on bottom".Header(3)).Append(ex);
			});

			bottom.Show (1);

			var left = new TabPanel (new TabPanelOptions{
				TabsPosition="left", Bordered=true
			}, pn=>{
				pn.Add( tab=>{
					tab.Caption="First tab";  
					tab.Body.Append("Hello first tab".Header(3));
				});
				pn.Add( tab=>{
					tab.Caption= "Second tab";
					tab.Body.AddClass("well");  
					tab.Body.Append("Hello second tab");  
					tab.Body.Style.Color="blue";  
					tab.Body.Style.Height="80px";
				});
				pn.Add( tab=>{
					new Image(tab, i=>{i.Src="img/coyote.jpg"; i.Style.Height="106px";});
					new Label(tab, "El Coyote");
					tab.Body.Append(CoyoteText);
				});

			});
			left.Content.Style.MinHeight = "220px";

			new Div (ex=>{
				ex.ClassName="bs-docs-example";
				ex.Append(left);
				parent.JQuery.Append ("Tabs on left".Header(3)).Append(ex);
			});

			left.Show (0);


			parent.Append ("C# code".Header(3));

			var rq =jQuery.GetData<string> ("code/demotabpanel.html");
			rq.Done (s=> {
				var code=new Div();
				code.InnerHTML= s;
				parent.Append(code);
			});



		}