예제 #1
0
 //============================================================
 // <T>加载资源。</T>
 //
 // @param resource 资源
 //============================================================
 public void LoadResource(FRcObject resource)
 {
     // 检查参数
     _resource = resource as FRcControl;
     if (_resource == null)
     {
         return;
     }
     // 属性设置
     chkOptionEnable.Checked       = _resource.OptionEnable;
     chkOptionVisible.Checked      = _resource.OptionVisible;
     cbxDockCd.Text                = REnum.ToString <ERcDock>(_resource.DockCd);
     txtLocation.Text              = _resource.Location.ToString();
     txtSize.Text                  = _resource.Size.ToString();
     txtMargin.Text                = _resource.Margin.ToString();
     txtPadding.Text               = _resource.Padding.ToString();
     qcpForeColor.SelectColorValue = _resource.ForeColor;
     qpeForeResource.LoadResource(_resource.ForeResource);
     qcpBackColor.SelectColorValue = _resource.BackColor;
     qpeBackResource.LoadResource(_resource.BackResourceId);
     qUiInnerBorderProperty.LoadResource(_resource.BorderInner);
     qUiOuterBorderProperty.LoadResource(_resource.BorderOuter);
     // 事件设置
     txtClick.Text       = _resource.OnClick;
     txtDoubleClick.Text = _resource.OnDoubleClick;
     txtMouseDown.Text   = _resource.OnMouseDown;
     txtMouseUp.Text     = _resource.OnMouseUp;
     txtMouseMove.Text   = _resource.OnMouseMove;
     txtMouseEnter.Text  = _resource.OnMouseEnter;
     txtMouseLeave.Text  = _resource.OnMouseLeave;
 }
예제 #2
0
 //============================================================
 // <T>存储设置信息</T>
 //
 // @param xconfig 设置信息
 //============================================================
 public override void OnSaveConfig(FXmlNode xconfig)
 {
     base.OnSaveConfig(xconfig);
     // 存储配置
     xconfig.SetNvl("option_visible", _optionVisible);
     xconfig.SetNvl("option_enable", _optionEnable);
     // 保存属性
     if (_dockCd != ERcDock.None)
     {
         xconfig.SetNvl("dock_cd", REnum.ToString(typeof(ERcDock), _dockCd));
     }
     // 存储位置
     if (!_location.IsEmpty())
     {
         xconfig.Set("location", _location.ToString());
     }
     // 存储尺寸
     if (!_size.IsEmpty())
     {
         xconfig.SetNvl("size", _size.ToString());
     }
     // 加载空白
     if (!_margin.IsEmpty())
     {
         xconfig.SetNvl("margin", _margin.ToString());
     }
     if (!_padding.IsEmpty())
     {
         xconfig.SetNvl("padding", _padding.ToString());
     }
     // 存储边框
     if (_propertyBorderInner == null || (_propertyBorderInner != null && !_borderInner.EqualsStyleProperty(_propertyBorderInner)))
     {
         _borderInner.SaveConfig(xconfig, "border_inner");
     }
     if (_propertyBorderOuter == null || (_propertyBorderOuter != null && !_borderOuter.EqualsStyleProperty(_propertyBorderOuter)))
     {
         _borderOuter.SaveConfig(xconfig, "border_outer");
     }
     // 保存前景资源
     if ((_propertyForeColor == null) || (_propertyForeColor != null && _foreColor != _propertyForeColor.GetHex()))
     {
         xconfig.Set("fore_color", RColor.FormatHtml(_foreColor));
     }
     _foreResource.SaveConfig(xconfig, "fore");
     // 保存后景资源
     if ((_propertyBackColor == null) || (_propertyBackColor != null && _backColor != _propertyBackColor.GetHex()))
     {
         xconfig.Set("back_color", RColor.FormatHtml(_backColor));
     }
     _backResource.SaveConfig(xconfig, "back");
     // 存储事件
     xconfig.SetNvl("on_click", _onClick);
     xconfig.SetNvl("on_double_click", _onDoubleClick);
     xconfig.SetNvl("on_mouse_down", _onMouseDown);
     xconfig.SetNvl("on_mouse_up", _onMouseUp);
     xconfig.SetNvl("on_mouse_enter", _onMouseEnter);
     xconfig.SetNvl("on_mouse_move", _onMouseMove);
     xconfig.SetNvl("on_mouse_leave", _onMouseLeave);
 }
예제 #3
0
 //============================================================
 // <T>加载资源。</T>
 //
 // @param resource 资源
 //============================================================
 public void LoadResource(FRcPicture resource)
 {
     _resource        = resource;
     txtCode.Text     = _resource.Code.ToString();
     cboAlignCd.Text  = REnum.ToString <ERcPictureAlign>(_resource.AlignCd);
     txtLocation.Text = _resource.Location.ToString();
     txtPadding.Text  = _resource.Padding.ToString();
 }
예제 #4
0
 //============================================================
 // <T>存储设置信息</T>
 //
 // @param xconfig 设置信息
 //============================================================
 public override void OnSaveConfig(FXmlNode xconfig)
 {
     base.OnSaveConfig(xconfig);
     // 存储配置
     xconfig.SetNvl("option_scroll_auto", _optionScrollAuto);
     //xconfig.SetNvl("option_scroll_horizontal", _optionScrollHorizontal);
     //xconfig.SetNvl("option_scroll_vertical", _optionScrollVertical);
     // 保存类型
     xconfig.SetNvl("scroll_style_cd", REnum.ToString(typeof(ERcScrollStyle), _scrollStyleCd));
     xconfig.SetNvl("horizontal_dock", REnum.ToString(typeof(ERcHorizontalDock), _horizontalDockCd));
     xconfig.SetNvl("vertical_dock", REnum.ToString(typeof(ERcVerticalDock), _verticalDockCd));
 }
예제 #5
0
 //============================================================
 // <T>存储设置信息。</T>
 //
 // @param xconfig 设置信息
 //============================================================
 public override void OnSaveConfig(FXmlNode xconfig)
 {
     base.OnSaveConfig(xconfig);
     xconfig.SetNvl("design_item_count", _designItemCount);
     if (_spreadCd != ERcSpread.None)
     {
         xconfig.SetNvl("spread_cd", REnum.ToString(typeof(ERcSpread), _spreadCd));
     }
     xconfig.SetNvl("horizontal_count", _horizontalCount);
     xconfig.SetNvl("horizontal_space", _horizontalSpace);
     xconfig.SetNvl("vertical_count", _verticalCount);
     xconfig.SetNvl("vertical_space", _verticalSpace);
     xconfig.SetNvl("initial_count", _initialCount);
 }
예제 #6
0
 //============================================================
 // <T>加载边框信息。</T>
 //============================================================
 public void LoadBorder()
 {
     // 左边线
     qcpLColor.SelectColorValue = _border.Left.Color;
     txtLWidth.Text             = _border.Left.Width.ToString();
     cbxLStyle.Text             = REnum.ToString <EUiLineStyle>(_border.Left.Style);
     // 上边线
     qcpTColor.SelectColorValue = _border.Top.Color;
     txtTWidth.Text             = _border.Top.Width.ToString();
     cbxTStyle.Text             = REnum.ToString <EUiLineStyle>(_border.Top.Style);
     // 右边线
     qcpRColor.SelectColorValue = _border.Right.Color;
     txtRWidth.Text             = _border.Right.Width.ToString();
     cbxRStyle.Text             = REnum.ToString <EUiLineStyle>(_border.Right.Style);
     // 下边线
     qcpBColor.SelectColorValue = _border.Bottom.Color;
     txtBWidth.Text             = _border.Bottom.Width.ToString();
     cbxBStyle.Text             = REnum.ToString <EUiLineStyle>(_border.Bottom.Style);
 }
예제 #7
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcScrollBar(FRcFrameConsole console = null) : base(console)
 {
     _typeName  = REnum.ToString <ERcComponent>(ERcComponent.ScrollBar);
     _styleName = "control.scroll.bar";
 }
예제 #8
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcGridColumnCheck(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.GridColumn);
 }
예제 #9
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcSlider(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.ScrollBar);
 }
예제 #10
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcButton(FRcFrameConsole console = null) : base(console)
 {
     _typeName  = REnum.ToString <ERcComponent>(ERcComponent.Button);
     _styleName = "control.button";
 }
예제 #11
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcTreeNodeLevel(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.TreeNodeLevel);
 }
예제 #12
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcListView(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.ListView);
 }
예제 #13
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcSelect(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.Select);
 }
예제 #14
0
 //============================================================
 // <T>构造窗口定义。</T>
 //============================================================
 public FRcWindow(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.Window);
 }
예제 #15
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcProgressBar(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.ProgressBar);
 }
예제 #16
0
파일: FRcRadio.cs 프로젝트: whztt07/MoCross
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcRadio(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.Radio);
 }
예제 #17
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcPageControl(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.PageControl);
 }
예제 #18
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcMenuItem(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.MenuItem);
 }
예제 #19
0
파일: FRcTable.cs 프로젝트: whztt07/MoCross
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcTable(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.Table);
 }
예제 #20
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcGridCellNumber(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.GridCellNumber);
 }
예제 #21
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcStaticLabel(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.StaticLabel);
 }
예제 #22
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcPictureBox(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.PictureBox);
 }
예제 #23
0
 public virtual void SaveConfig(FXmlNode config)
 {
     config[PTY_TYPE] = REnum.ToString <EScheduleConditionType>(_type);
     config.Set(PTY_VALID, _valid);
     config[PTY_FILE] = _fileName;
 }
예제 #24
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcCalendar(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.Calendar);
 }
예제 #25
0
 //============================================================
 // <T>构造控件。</T>
 //============================================================
 public FRcRichEdit(FRcFrameConsole console = null)
     : base(console)
 {
     _typeName = REnum.ToString <ERcComponent>(ERcComponent.RichEdit);
 }