protected override void CreateChildElements() { base.CreateChildElements(); stackLayout = new StackLayoutPanel(); stackLayout.Orientation = System.Windows.Forms.Orientation.Horizontal; non_timed_option = new RadRadioButtonElement(); non_timed_option.Text = "Non-Timed Session"; non_timed_option.Margin = new Padding(5, 3, 0, 0); non_timed_option.MouseUp += Non_timed_option_MouseUp; timed_option = new RadRadioButtonElement(); timed_option.Text = "Timed Session"; timed_option.Margin = new Padding(5, 3, 0, 0); timed_option.MouseUp += Timed_option_MouseUp; duration = new RadSpinEditorElement(); duration.Value = 50; duration.MaxValue = 999; duration.MinValue = 1; duration.AutoSize = false; duration.Size = new Size(50, 30); duration.Margin = new Padding(5, 5, 0, 0); duration.Visibility = ElementVisibility.Hidden; duration.ValueChanged += Duration_ValueChanged; stackLayout.Children.Add(non_timed_option); stackLayout.Children.Add(timed_option); stackLayout.Children.Add(duration); this.Children.Add(this.stackLayout); }
protected override void CreateChildElements() { base.CreateChildElements(); radioButtonElement1 = new RadRadioButtonElement(); radioButtonElement1.Margin = new Padding(0, 2, 0, 0); radioButtonElement1.MinSize = new Size(50, 20); radioButtonElement1.Text = "Red"; radioButtonElement2 = new RadRadioButtonElement(); radioButtonElement2.Margin = new Padding(0, 2, 0, 0); radioButtonElement2.MinSize = new Size(50, 20); radioButtonElement2.Text = "Blue"; radioButtonElement3 = new RadRadioButtonElement(); radioButtonElement3.Margin = new Padding(0, 2, 0, 0); radioButtonElement3.MinSize = new Size(50, 20); radioButtonElement3.Text = "Green"; this.Children.Add(radioButtonElement1); this.Children.Add(radioButtonElement2); this.Children.Add(radioButtonElement3); radioButtonElement1.MouseDown += new MouseEventHandler(radioButtonElement1_MouseDown); radioButtonElement2.MouseDown += new MouseEventHandler(radioButtonElement2_MouseDown); radioButtonElement3.MouseDown += new MouseEventHandler(radioButtonElement3_MouseDown); }
private void radMenuItem4_Click(object sender, EventArgs e) { RadRadioButtonElement radioButton = new RadRadioButtonElement(); radioButton.Text = "radio button"; surface1.Element.Children.Add(new SurfaceObject(10, 10, radioButton)); radButtonRemove.Enabled = true; surface1.Element.CurrentObject = (SurfaceObject)surface1.Element.Children[surface1.Element.Children.Count - 1]; }
private void CreateMenuGroup() { #region 时间 dtBeginTime = new RadDateTimePickerElement(); dtBeginTime.Format = DateTimePickerFormat.Custom; dtBeginTime.CustomFormat = "yyyy年MM月dd日 HH:mm:ss"; dtBeginTime.Value = DateTime.Today; dtBeginTime.Size = new System.Drawing.Size(180, 21); dtBeginTime.MaxSize = new System.Drawing.Size(180, 21); dtBeginTime.MinSize = new System.Drawing.Size(180, 21); dtBeginTime.Alignment = ContentAlignment.TopLeft; RadLabelElement lbBeginTime = new RadLabelElement(); lbBeginTime.Text = "开始时间"; lbBeginTime.MinSize = new System.Drawing.Size(40, 21); RadRibbonBarButtonGroup gpBeginTime = new RadRibbonBarButtonGroup(); gpBeginTime.Items.AddRange(new RadItem[] { lbBeginTime, dtBeginTime }); gpBeginTime.Orientation = Orientation.Horizontal; gpBeginTime.ShowBackColor = false; //gpBeginTime.ShowBorder = false; gpBeginTime.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); dtEndTime = new RadDateTimePickerElement(); dtEndTime.Format = DateTimePickerFormat.Custom; dtEndTime.CustomFormat = "yyyy年MM月dd日 HH:mm:ss"; dtEndTime.Value = DateTime.Today.AddDays(1).AddSeconds(-1); dtEndTime.Size = new System.Drawing.Size(180, 21); dtEndTime.MaxSize = new System.Drawing.Size(180, 21); dtEndTime.MinSize = new System.Drawing.Size(180, 21); dtEndTime.Alignment = ContentAlignment.TopLeft; RadLabelElement lbEndTime = new RadLabelElement(); lbEndTime.Text = "结束时间"; lbEndTime.MinSize = new System.Drawing.Size(40, 21); RadRibbonBarButtonGroup gpEndTime = new RadRibbonBarButtonGroup(); gpEndTime.Items.AddRange(new RadItem[] { lbEndTime, dtEndTime }); gpEndTime.Orientation = Orientation.Horizontal; gpEndTime.ShowBackColor = false; //gpEndTime.ShowBorder = false; gpEndTime.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); RadRibbonBarButtonGroup gpTime = new RadRibbonBarButtonGroup(); gpTime.Items.AddRange(new RadItem[] { gpBeginTime, gpEndTime }); gpTime.Orientation = Orientation.Vertical; gpTime.ShowBackColor = false; gpTime.ShowBorder = false; gpTime.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); #endregion #region 卫星传感器 sate1 = new RadRadioButtonElement(); sate1.Text = "FY-3A"; //sate1.Font = new System.Drawing.Font("宋体", 11); sate1.MinSize = new System.Drawing.Size(50, 21); sate1.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); sate1.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; sate2 = new RadRadioButtonElement(); sate2.Text = "FY-3B"; //sate2.Font = new System.Drawing.Font("宋体", 11); sate2.MinSize = new System.Drawing.Size(50, 21); sate2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); sate3 = new RadRadioButtonElement(); sate3.Text = "FY-3C"; sate3.MinSize = new System.Drawing.Size(50, 21); sate3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); RadRibbonBarButtonGroup gpSatellite = new RadRibbonBarButtonGroup(); gpSatellite.Items.AddRange(new RadItem[] { sate1, sate2, sate3 }); gpSatellite.Orientation = Orientation.Vertical; gpSatellite.ShowBackColor = false; //gpSatellite.ShowBorder = false; gpSatellite.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); sensor1 = new RadRadioButtonElement(); sensor1.Text = "VIRR"; //sensor1.Font = new System.Drawing.Font("宋体", 11); sensor1.MinSize = new System.Drawing.Size(60, 21); sensor1.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; sensor1.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); sensor2 = new RadRadioButtonElement(); sensor2.Text = "MERSI"; //sensor2.Font = new System.Drawing.Font("宋体", 11); sensor2.MinSize = new System.Drawing.Size(60, 21); sensor2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); RadRibbonBarButtonGroup gpSensor = new RadRibbonBarButtonGroup(); gpSensor.Items.AddRange(new RadItem[] { sensor1, sensor2 }); gpSensor.Orientation = Orientation.Vertical; gpSensor.ShowBackColor = false; //gpSensor.ShowBorder = false; gpSensor.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); RadRibbonBarButtonGroup gpSatelliteSensor = new RadRibbonBarButtonGroup(); gpSatelliteSensor.Items.AddRange(new RadItem[] { gpSatellite, gpSensor }); gpSatelliteSensor.Orientation = Orientation.Horizontal; gpSatelliteSensor.ShowBackColor = false; gpSatelliteSensor.ShowBorder = false; #endregion #region 数据类型 dataType1 = new RadRadioButtonElement(); dataType1.Text = "投影数据"; dataType1.MinSize = new System.Drawing.Size(60, 21); dataType1.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; dataType1.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); dataType2 = new RadRadioButtonElement(); dataType2.Text = "投影拼接数据"; dataType2.MinSize = new System.Drawing.Size(60, 21); dataType2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); dataType3 = new RadRadioButtonElement(); dataType3.Text = "分幅数据"; dataType3.MinSize = new System.Drawing.Size(60, 21); dataType3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); RadRibbonBarButtonGroup gpDataType = new RadRibbonBarButtonGroup(); gpDataType.Items.AddRange(new RadItem[] { dataType1, dataType2, dataType3 }); gpDataType.Orientation = Orientation.Vertical; gpDataType.ShowBackColor = false; gpDataType.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); #endregion RadButtonElement btnSearch = new RadButtonElement(); btnSearch.Image = GeoDo.RSS.UI.AddIn.HdService.Properties.Resources.search_green; btnSearch.Text = "预处理数据查询"; btnSearch.ImageAlignment = ContentAlignment.MiddleCenter; btnSearch.TextAlignment = ContentAlignment.MiddleCenter; btnSearch.TextImageRelation = TextImageRelation.ImageAboveText; btnSearch.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); btnSearch.Click += new EventHandler(btnSearch_Click); _group = new RadRibbonBarGroup(); _group.Text = "数据查询"; _group.Items.Add(gpSatelliteSensor); _group.Items.Add(gpDataType); _group.Items.Add(gpTime); _group.Items.Add(btnSearch); //RadButtonElement prjData = new RadButtonElement("投影数据查询"); //prjData.Click += new EventHandler(_rasterDats_Click); //_group.Items.Add(prjData); //RadButtonElement prjCombinData = new RadButtonElement("投影拼接数据查询"); //prjCombinData.Click += new EventHandler(_rasterDats_Click); //_group.Items.Add(prjCombinData); //RadButtonElement splitDats = new RadButtonElement("分幅数据查询"); //splitDats.Click += new EventHandler(_rasterDats_Click); //_group.Items.Add(splitDats); RadButtonElement rasterDats = new RadButtonElement("栅格产品数据查询"); rasterDats.Image = GeoDo.RSS.UI.AddIn.HdService.Properties.Resources.search_green; rasterDats.ImageAlignment = ContentAlignment.MiddleCenter; rasterDats.TextAlignment = ContentAlignment.MiddleCenter; rasterDats.TextImageRelation = TextImageRelation.ImageAboveText; rasterDats.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); rasterDats.Click += new EventHandler(_rasterDats_Click); RadRibbonBarButtonGroup gpPd = new RadRibbonBarButtonGroup(); gpPd.Items.AddRange(new RadItem[] { rasterDats }); gpPd.Orientation = Orientation.Horizontal; gpPd.ShowBackColor = false; gpPd.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3); _group.Items.Add(gpPd); }