private void textLoaded(object sender, RoutedEventArgs e) { TextState.Text = "丽水城南水阁区块排水管网健康查询系统 当前用户:" + AuthControl.getInstance().UserName + " " + AuthControl.getInstance().getLoginTime(); TextState.TextAlignment = TextAlignment.Center; //AddContent(); }
private List <BaseControl> listLayer = new List <BaseControl>(); //创建图层集合 public void AddContent() { this.MapGrid.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; this.MapGrid.VerticalAlignment = System.Windows.VerticalAlignment.Top; this.MapGrid.Children.Add(mBackground); listLayer.Add(mBackground); //保存到图层中,便于管理 this.MapGrid.Children.Add(mRainpipe); //添加雨水管道图层 listLayer.Add(mRainpipe); this.MapGrid.Children.Add(mWastepipe); //添加污水管道图层 listLayer.Add(mWastepipe); this.MapGrid.Children.Add(mRainjunc); //添加雨水检查井图层 listLayer.Add(mRainjunc); this.MapGrid.Children.Add(mWastejunc); listLayer.Add(mWastejunc); //check authority EnableButton(AuthControl.getInstance().getAuth() == AuthControl.AUTH_ROOT); }
public JuncWindow(int id) { InitializeComponent(); this.Junc_Name.Text = "\t" + id + " 检查井信息"; mBasic = new BaseContent(id); this.Stackpanel1.Children.Add(mBasic); //check authority bool b = AuthControl.AUTH_ROOT == AuthControl.getInstance().getAuth(); Button_Cancle.IsEnabled = b; Button_Save.IsEnabled = b; AnimationUtil.ScaleEasingAnimation(this); }