protected override void OnLoad(EventArgs e) { base.OnLoad(e); IAuthorizationService auth = ClientEnvironment.AuthorizationService; AccessType country_service = auth.GetAccess(ClientEnvironment.CountryService); isImortableRight = (country_service & AccessType.Import) != 0; isWriteRigth = (country_service & AccessType.Write) != 0; if (!isWriteRigth) gridControlFeast.ContextMenuStrip = null; InitToolBar(); ToolTipController toolTip = new ToolTipController(); // ToolTips ***************** toolTip.Rounded = true; toolTip.ShowBeak = true; toolTip.ToolTipType = ToolTipType.Standard; gridControlFeast.ToolTipController = toolTip; foreach (DevExpress.XtraGrid.Views.Base.ColumnView bview in gridControlFeast.Views) { foreach (DevExpress.XtraGrid.Columns.GridColumn column in bview.Columns) { column.ToolTip = GetLocalized(column.Caption); } } //*********end tooltips UpdateEnableButton(); }
public void OnPointerEnter(PointerEventData eventData) { GameObject go = Instantiate (TooltipPrefab) as GameObject; go.transform.SetParent (transform.parent, false); _tooltip = go.GetComponent<ToolTipController> (); _tooltip.Initialize (Title, Subtitle, Maintext); _tooltip = go.GetComponent<ToolTipController> (); _tooltip.SetCost (_cost, _hasEnoughMoney); if (_warning != "") _tooltip.SetWarning (_warning); }
protected ObjectToolTipController(Control parent) { this.parent = parent; this.parent.Disposed += delegate { Dispose(); }; _toolTipController = new ToolTipController(); _toolTipController.ReshowDelay = _toolTipController.InitialDelay; _toolTipController.AllowHtmlText = true; _toolTipController.ToolTipType = ToolTipType.SuperTip; _toolTipController.AutoPopDelay = 10000; parent.MouseDown += delegate { HideHint(false); }; parent.MouseLeave += delegate { HideHint(true); }; }
public static void ShowError(DXErrorProvider errorProvider, BaseEdit control, ToolTipController tipController, string errorMessage) { control.Properties.Appearance.BorderColor = Color.Red; control.Focus(); control.SelectAll(); errorProvider.SetError(control, errorMessage); ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs(); args.ToolTipImage = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical); args.ToolTip = control.ErrorText; args.SelectedControl = control; args.SuperTip = null; // here tipController.ShowHint(args, control.Parent.PointToScreen(control.Location)); }
public void ShowHint(object editObject, Point location, IObjectSpace objectSpace, ToolTipController toolTipController) { if (Equals(editObject, _editObject)) return; _objectSpace = objectSpace; _editObject = editObject; var info = new ToolTipControlInfo(); var item = new ToolTipItem(); InitToolTipItem(item); item.ImageToTextDistance = 10; info.Object = DateTime.Now.Ticks; info.SuperTip = new SuperToolTip(); info.SuperTip.Items.Add(item); info.ToolTipPosition = parent.PointToScreen(location); toolTipController.ShowHint(info); _hintIsShown = true; }
public SensitivityAnalysisResultsView(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator) { _toolTipCreator = toolTipCreator; InitializeComponent(); _lblInfo = new LabelControl { Parent = this }; pivotGrid.ToolTipController = new ToolTipController(); configureFields(); pivotGrid.OptionsView.ShowColumnHeaders = true; pivotGrid.OptionsView.ShowRowHeaders = true; var toolTipController = new ToolTipController(); toolTipController.Initialize(imageListRetriever); toolTipController.GetActiveObjectInfo += (o, e) => OnEvent(onToolTipControllerGetActiveObjectInfo, e); pivotGrid.ToolTipController = toolTipController; }
public ImportSimulationResultsView(Shell shell, IToolTipCreator toolTipCreator, IImageListRetriever imageListRetriever) : base(shell) { InitializeComponent(); gridView.AllowsFiltering = false; gridView.ShowRowIndicator = false; gridView.OptionsSelection.EnableAppearanceFocusedRow = true; _gridViewBinder = new GridViewBinder <SimulationResultsFileSelectionDTO>(gridView) { BindingMode = BindingMode.TwoWay }; _filePathRepository.Buttons[0].Kind = ButtonPredefines.Ellipsis; _screenBinder = new ScreenBinder <ImportSimulationResultsDTO>(); _toolTipCreator = toolTipCreator; _toolTipController = new ToolTipController() .Initialize(imageListRetriever) .For(gridControl); _toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; }
protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); if (GridView == null) { return; } _toolTipController = new ToolTipController { ToolTipType = ToolTipType.SuperTip }; _toolTipController.ReshowDelay = _toolTipController.InitialDelay; _toolTipController.AutoPopDelay = 10000; _toolTipController.AllowHtmlText = true; GridView.GridControl.MouseMove += GridControl_MouseMove; GridView.TopRowChanged += GridViewTopRowChanged; GridView.ShownEditor += HideHint; GridView.GridControl.MouseDown += HideHint; GridView.GridControl.MouseLeave += HideHint; }
public ParameterSetView(IToolTipCreator toolTipCreator, IImageListRetriever imageListRetriever, ValueOriginBinder <ParameterDTO> valueOriginBinder) { InitializeComponent(); _imageListRetriever = imageListRetriever; _toolTipController = new ToolTipController(); _toolTipCreator = toolTipCreator; _isFixedParameterEditRepository = new UxRepositoryItemButtonImage(ApplicationIcons.Reset, PKSimConstants.UI.ResetParameterToolTip) { TextEditStyle = TextEditStyles.Standard }; _toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; _toolTipController.Initialize(_imageListRetriever); PopupBarManager = new BarManager { Form = this, Images = imageListRetriever.AllImagesForContextMenu }; _standardParameterEditRepository.ConfigureWith(typeof(double)); _standardParameterEditRepository.Appearance.TextOptions.HAlignment = HorzAlignment.Far; _isFixedParameterEditRepository.Buttons[0].IsLeft = true; _valueOriginBinder = valueOriginBinder; }
/// <summary> /// Create a button controller for the view. /// </summary> /// <param name="viewButton">View to be controlled.</param> /// <param name="needPaint">Paint delegate.</param> /// <param name="clickHandler">Reference to click handler.</param> /// <returns>Controller instance.</returns> public override ButtonSpecViewControllers CreateController(ViewDrawButton viewButton, NeedPaintHandler needPaint, MouseEventHandler clickHandler) { // Create a ribbon specific button controller _controller = new ButtonSpecRibbonController(viewButton, needPaint); _controller.BecomesFixed = true; _controller.Click += clickHandler; // If associated with a tooltip manager then pass mouse messages onto tooltip manager IMouseController mouseController = (IMouseController)_controller; if (Manager.ToolTipManager != null) { mouseController = new ToolTipController(Manager.ToolTipManager, viewButton, _controller); } // Return a collection of controllers return(new ButtonSpecViewControllers(mouseController, _controller, _controller)); }
/// <summary> /// ToolTip消息提示 /// </summary> /// <param name="title">标题</param> /// <param name="content">内容</param> /// <param name="showTime">显示时长</param> /// <param name="isAutoHide">自动隐藏</param> public static void NewToolTip(string title, string content, int showTime, bool isAutoHide) { try { MyToolTipClt = new ToolTipController(); args = MyToolTipClt.CreateShowArgs(); title = string.IsNullOrEmpty(title) ? "温馨提示" : title; args.AutoHide = isAutoHide; MyToolTipClt.ShowBeak = true; MyToolTipClt.ShowShadow = true; MyToolTipClt.Rounded = true; MyToolTipClt.AutoPopDelay = (showTime == 0 ? 2000 : showTime); MyToolTipClt.Active = true; MyToolTipClt.HideHint(); MyToolTipClt.ShowHint(content, title, Control.MousePosition); } catch (Exception ex) { throw ex; } }
public static void SetCalcNull(Control cr) { if (cr is CalcEdit) { (cr as CalcEdit).Properties.AllowNullInput = DefaultBoolean.True; //(cr as DevExpress.XtraEditors.CalcEdit).CausesValidation = false; var myToolTipController = new ToolTipController(); myToolTipController.ShowBeak = true; myToolTipController.Rounded = true; myToolTipController.ShowShadow = true; myToolTipController.ReshowDelay = 0; myToolTipController.InitialDelay = 0; myToolTipController.AutoPopDelay = 10000; (cr as CalcEdit).ToolTipTitle = "操作提示"; (cr as CalcEdit).ToolTipIconType = ToolTipIconType.Information; (cr as CalcEdit).ToolTip = "Ctrl + Del清除输入内容!"; (cr as CalcEdit).ToolTipController = myToolTipController; } }
/// <summary> /// Initialize a new instance of the ViewDrawRibbonQATButton class. /// </summary> /// <param name="ribbon">Reference to owning ribbon control.</param> /// <param name="qatButton">Reference to button definition.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public ViewDrawRibbonQATButton(KryptonRibbon ribbon, IQuickAccessToolbarButton qatButton, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(qatButton != null); // Remember incoming references _ribbon = ribbon; QATButton = qatButton; // If the source interface comes from a component then allow it to // be selected at design time by clicking on the view instance Component = qatButton as System.ComponentModel.Component; // Attach a controller to this element for the pressing of the button QATButtonController controller = new QATButtonController(ribbon, this, needPaint); controller.Click += OnClick; SourceController = controller; KeyController = controller; // Create controller for intercepting events to determine tool tip handling MouseController = new ToolTipController(_ribbon.TabsArea.ButtonSpecManager.ToolTipManager, this, controller); // Use a class to convert from ribbon tab to content interface _contentProvider = new QATButtonToContent(qatButton); // Create and add the draw content for display inside the button _drawContent = new ViewDrawContent(_contentProvider, this, VisualOrientation.Top); Add(_drawContent); // Need to notice when the ribbon enable state changes _ribbon.EnabledChanged += OnRibbonEnableChanged; // Set the initial enabled state UpdateEnabled(); }
void Start() { bgImage = toolTip.transform.GetChild(0).GetComponent <Image>(); textItemName = bgImage.transform.GetChild(0).GetComponent <Text>(); textInteraction = bgImage.transform.GetChild(1).GetComponent <Text>(); bgRectTransform = toolTip.GetComponent <RectTransform>(); UIRectTransform = Global.UIElement.GetUI().GetComponent <RectTransform>(); playerTransform = Global.Obj.GetPlayerGameObject().GetComponent <Transform>(); controller = Global.Component.GetController(); instance = this; preferredHeight = textItemName.preferredHeight; HideToolTip(); pos = itemDescription.GetComponent <RectTransform>().anchoredPosition; rtItemDescription = itemDescription.GetComponent <RectTransform>(); eventController = Global.Component.GetEventController(); eventController.OnCaseCloseEvent.AddListener(HideItemReview); }
/// <summary> /// init tooltip /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { ToolTipController controller = sender as ToolTipController; AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo; if (aptViewInfo == null) { return; } toolTipController.ToolTipType = ToolTipType.SuperTip; if (toolTipController.ToolTipType == ToolTipType.SuperTip) { SuperToolTip SuperTip = new SuperToolTip(); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Contents.Text = aptViewInfo.Description; args.ShowFooterSeparator = true; args.Footer.Text = aptViewInfo.Appointment.Start.ToShortTimeString() + " ~ " + aptViewInfo.Appointment.End.ToShortTimeString();//"SuperTip"; SuperTip.Setup(args); e.SuperTip = SuperTip; } }
public IndividualSettingsView(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator, UserLookAndFeel lookAndFeel) { InitializeComponent(); _toolTipController = new ToolTipController(); _toolTipController.Initialize(imageListRetriever); _imageListRetriever = imageListRetriever; _toolTipCreator = toolTipCreator; _lookAndFeel = lookAndFeel; _gridParameterValueVersionsBinder = new GridViewBinder <CategoryParameterValueVersionDTO>(gridViewParameterValueVersions); _gridCalculationMethodsBinder = new GridViewBinder <CategoryCalculationMethodDTO>(gridViewCalculationMethods); _repositoryForParameterValueVersions = new UxRepositoryItemComboBox(gridViewParameterValueVersions); _repositoryForCalculationMethods = new UxRepositoryItemComboBox(gridViewCalculationMethods); gridViewParameterValueVersions.AllowsFiltering = false; gridViewCalculationMethods.AllowsFiltering = false; gridViewParameterValueVersions.ShowColumnHeaders = false; gridViewCalculationMethods.ShowColumnHeaders = false; gridViewCalculationMethods.ShowRowIndicator = false; gridViewParameterValueVersions.ShowRowIndicator = false; gridCalculationMethods.ToolTipController = _toolTipController; }
private void ThongTinChiTietTKB(Label lbl, ToolTipController toolTipController1, string tenMH, int tietBD, int soTiet, string lop, string phongHoc, string diaChi) { try { SuperToolTip superToolTip1 = new SuperToolTip(); ToolTipTitleItem toolTipTitleItem1 = new ToolTipTitleItem(); toolTipTitleItem1.Appearance.Image = global::QuanLyDaoTao.Properties.Resources.non_32; toolTipTitleItem1.Appearance.Options.UseImage = true; toolTipTitleItem1.Image = global::QuanLyDaoTao.Properties.Resources.non_32; toolTipTitleItem1.Text = "Thông tin chi tiết thời khóa biểu"; ToolTipItem toolTipItem1 = new ToolTipItem(); toolTipItem1.LeftIndent = 6; toolTipItem1.Text += "Tên môn học: " + tenMH; toolTipItem1.Text += "\nTiết bắt đầu: " + (tietBD + 1).ToString(); toolTipItem1.Text += "\nSố tiết: " + soTiet.ToString(); toolTipItem1.Text += "\nLớp: " + lop; toolTipItem1.Text += "\nPhòng học: " + phongHoc; toolTipItem1.Text += "\nĐịa chỉ: " + diaChi; ToolTipTitleItem toolTipTitleItem2 = new ToolTipTitleItem(); toolTipTitleItem2.LeftIndent = 6; toolTipTitleItem2.Text = "Hệ thống quản lý đào tạo"; superToolTip1.Items.Add(toolTipTitleItem1); superToolTip1.Items.Add(toolTipItem1); ToolTipSeparatorItem toolTipSeparatorItem1 = new ToolTipSeparatorItem(); superToolTip1.Items.Add(toolTipSeparatorItem1); superToolTip1.Items.Add(toolTipTitleItem2); toolTipController1.SetSuperTip(lbl, superToolTip1); } catch (Exception ex) { throw ex; } }
public NotificationView(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator, IStartOptions runOptions) { _toolTipCreator = toolTipCreator; _runOptions = runOptions; InitializeComponent(); _barManager.Images = imageListRetriever.AllImages16x16; _popupBarManager = new BarManager { Form = this, Images = imageListRetriever.AllImages16x16 }; _buttonCache = new Cache <NotificationType, BarButtonItem>(); _gridViewBinder = new GridViewBinder <NotificationMessageDTO>(gridViewMessages); gridViewMessages.CustomRowFilter += customRowFilter; _statusIconRepository = new RepositoryItemPictureEdit(); _toolTipController = new ToolTipController { ImageList = imageListRetriever.AllImages16x16 }; _toolTipController.AutoPopDelay = AppConstants.NotificationToolTipDelay; _toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; gridMessages.ToolTipController = _toolTipController; gridViewMessages.MouseDown += (o, e) => this.DoWithinExceptionHandler(() => onGridViewMouseDown(e)); gridViewMessages.DoubleClick += (o, e) => this.DoWithinExceptionHandler(onDoubleClick); gridViewMessages.ShouldUseColorForDisabledCell = false; }
public SimulationExpressionsView(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator) { _imageListRetriever = imageListRetriever; _toolTipCreator = toolTipCreator; InitializeComponent(); InitializeWithGrid(gridViewParameters); var toolTipController = new ToolTipController(); _gridViewBinder = new GridViewBinder <ExpressionContainerDTO>(gridViewParameters) { BindingMode = BindingMode.OneWay }; _screenBinder = new ScreenBinder <SimulationExpressionsDTO>(); _favoriteRepository = new UxRepositoryItemCheckEdit(gridViewParameters); _uxReferenceConcentration = new UxParameterDTOEdit(); _uxHalfLifeLiver = new UxParameterDTOEdit(); _uxHalfLifeIntestine = new UxParameterDTOEdit(); gridViewParameters.GroupFormat = "[#image]{1}"; gridViewParameters.EndGrouping += (o, e) => gridViewParameters.ExpandAllGroups(); gridViewParameters.AllowsFiltering = false; gridViewParameters.CustomColumnSort += customColumnSort; gridViewParameters.GridControl.ToolTipController = toolTipController; toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; }
public void Initialize(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator) { _toolTipCreator = toolTipCreator; _title = new ChartTitle { Text = string.Empty, Font = new Font("Arial", 16), Alignment = StringAlignment.Center, Dock = ChartTitleDockStyle.Top }; Titles.Add(_title); Images = imageListRetriever.AllImages16x16; CrosshairEnabled = DefaultBoolean.False; SelectionMode = ElementSelectionMode.Single; SeriesSelectionMode = SeriesSelectionMode.Point; ToolTipController = new ToolTipController { ToolTipType = ToolTipType.SuperTip }; ToolTipController.Initialize(imageListRetriever); BoundDataChanged += (o, e) => this.DoWithinExceptionHandler(onBoundDataChanged); ObjectHotTracked += (o, e) => this.DoWithinExceptionHandler(() => onObjectHotTracked(e)); ObjectSelected += (o, e) => this.DoWithinExceptionHandler(() => onObjectSelected(e)); }
private void SetToolTipsControllerSetting(ToolTipController showTipsControl, string sType) { //showTipsControl.AutoPopDelay = 0; //展示10s ms单位 showTipsControl.InitialDelay = 0; }
private void Form1_Load(object sender, EventArgs e) { // Create an empty chart. ChartControl chartControl = new ChartControl(); // Add the chart to the form. chartControl.Dock = DockStyle.Fill; this.Controls.Add(chartControl); // Create a series and add points to it. Series boundSeries = new Series("Bound Series", ViewType.Line); // Assign the created data source to the series. boundSeries.DataSource = CreateChartData(); boundSeries.ArgumentScaleType = ScaleType.Auto; boundSeries.ArgumentDataMember = "Argument"; boundSeries.ValueScaleType = ScaleType.Numerical; boundSeries.ValueDataMembers.AddRange(new string[] { "Value" }); Series unboundSeries = new Series("Unbound Series", ViewType.Line); unboundSeries.Points.Add(new SeriesPoint("A", new double[] { 9 })); unboundSeries.Points.Add(new SeriesPoint("B", new double[] { 7 })); unboundSeries.Points.Add(new SeriesPoint("C", new double[] { 23 })); unboundSeries.Points.Add(new SeriesPoint("D", new double[] { 9 })); unboundSeries.Points.Add(new SeriesPoint("E", new double[] { 23 })); unboundSeries.Points.Add(new SeriesPoint("F", new double[] { 17 })); unboundSeries.Points.Add(new SeriesPoint("G", new double[] { 20 })); Series unboundSeriesWithTag = new Series("Unbound Series with Tag", ViewType.Line); unboundSeriesWithTag.Points.Add(new SeriesPoint("A", 2) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("B", 0) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("C", 15) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("D", 2) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("E", 15) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("F", 10) { Tag = new { Test = "TestValue" } }); unboundSeriesWithTag.Points.Add(new SeriesPoint("G", 13) { Tag = new { Test = "TestValue" } }); // Add the series to the chart. chartControl.Series.AddRange(unboundSeries, unboundSeriesWithTag, boundSeries); // Enable data point markers. ((LineSeriesView)unboundSeries.View).MarkerVisibility = DefaultBoolean.True; ((LineSeriesView)unboundSeriesWithTag.View).MarkerVisibility = DefaultBoolean.True; ((LineSeriesView)boundSeries.View).MarkerVisibility = DefaultBoolean.True; // Disable a crosshair cursor. chartControl.CrosshairEnabled = DefaultBoolean.False; // Enable chart tooltips. chartControl.ToolTipEnabled = DefaultBoolean.True; // Show a tooltip's beak. ToolTipController controller = new ToolTipController(); chartControl.ToolTipController = controller; controller.ShowBeak = true; // Change the default tooltip mouse position to relative position. ToolTipRelativePosition relativePosition = new ToolTipRelativePosition(); chartControl.ToolTipOptions.ToolTipPosition = relativePosition; // Specify the tooltip relative position offsets. relativePosition.OffsetX = 2; relativePosition.OffsetY = 2; // Specify the tooltip point pattern. unboundSeries.ToolTipPointPattern = "Line Series: {A}:{V}"; unboundSeriesWithTag.ToolTipPointPattern = "{A}: {V} ({Test})"; boundSeries.ToolTipPointPattern = "{A}: {V} ({Comment})"; }
public GridViewGroupToolTipController(GridView view, GroupRowSummaryHelper grRowSummary, ToolTipController tooltip) { this.view = view; this.tooltip = tooltip; groupRowSummary = grRowSummary; View.MouseLeave += new EventHandler(OnView_MouseLeave); View.MouseMove += new MouseEventHandler(OnView_MouseMove); }
static void ShowColumnTooltip(GridColumn column, ToolTipControllerShowEventArgs args) { var view = column.View; var viewInfo = (GridViewInfo)view.GetViewInfo(); args.ToolTipLocation = ToolTipLocation.TopRight; args.SelectedControl = view.GridControl; var controller = new ToolTipController(); controller.ShowHint(args, view.GridControl.PointToScreen(viewInfo.ColumnsInfo[column].Bounds.Location)); }
public void ShowHelp() { var tt = new ToolTipController(HeaderExtensionLeft, "Click here to show more info"); tt.Show(); }
public void ResetLanguage(string langID) { if (Localizer.SupportedLanguages.ContainsKey(langID) == false) { langID = Localizer.lngEn; } if (m_LangageInitialized && ModelUserContext.CurrentLanguage == langID) { return; } if (!BaseFormManager.CloseNonListForms(true)) { return; } //if (BaseForm.SaveAllOpenedForms == false) //{ // return; //} Cursor = Cursors.WaitCursor; try { Enabled = false; //BaseForm.SetEnabled(false); SuspendLayout(); ModelUserContext.CurrentLanguage = langID; //Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName if (LookupCache.Language != langID) { LookupCache.Reload(); } langID = CustomCultureHelper.GetCustomCultureName(langID); var cultureInfo = new CultureInfo(langID); EidssSiteContext.Instance.UpdateDateTimeFormat(cultureInfo); //EidssSiteContext.Instance.Clear(); if (m_LangageInitialized) { EidssEventLog.Instance.CreateEvent(EventType.ClientUILanguageChanged, null, null); } m_LangageInitialized = true; Thread.CurrentThread.CurrentUICulture = cultureInfo; Thread.CurrentThread.CurrentCulture = cultureInfo; WinClientContext.InitFont(); CommonResourcesCache.Reset(); ToolTipController.InitTooltipController(); DefaultBarAndDockingController1.InitBarAppearance(); tbToolbar.Appearance.InitAppearance(); tbMenu.Appearance.InitAppearance(); tbStatusbar.Appearance.InitAppearance(); Appearance.InitAppearance(); WinClientContext.ApplicationCaption = EidssMessages.Get("EIDSS_Caption", "Electronic Integrated Disease Surveillance System"); Text = GetCaption(WinClientContext.ApplicationCaption); barManager1.RightToLeft = (Localizer.IsRtl) ? DefaultBoolean.True : DefaultBoolean.False; RightToLeft = (Localizer.IsRtl) ? RightToLeft.Yes : RightToLeft.No; RightToLeftLayout = Localizer.IsRtl; sbiUser.Caption = EidssUserContext.User.FullName; sbiOrganization.Caption = EidssSiteContext.Instance.OrganizationName; sbiSite.Caption = (EidssSiteContext.Instance.SiteType + @"-" + EidssSiteContext.Instance.SiteCode); sbiCountry.Caption = EidssSiteContext.Instance.CountryName; var resources = new ResourceManager(typeof(MainForm)); sbiCountryLabel.Caption = resources.GetString("sbiCountryLabel.Caption"); sbiCountryLabel.Description = resources.GetString("sbiCountryLabel.Description"); sbiCountryLabel.Hint = resources.GetString("sbiCountryLabel.Hint"); sbiSiteLable.Caption = resources.GetString("sbiSiteLable.Caption"); sbiSiteLable.Description = resources.GetString("sbiSiteLable.Description"); sbiSiteLable.Hint = resources.GetString("sbiSiteLable.Hint"); sbiOrganizationLable.Caption = resources.GetString("sbiOrganizationLable.Caption"); sbiOrganizationLable.Description = resources.GetString("sbiOrganizationLable.Description"); sbiOrganizationLable.Hint = resources.GetString("sbiOrganizationLable.Hint"); sbiUserLabel.Caption = resources.GetString("sbiUserLabel.Caption"); sbiUserLabel.Description = resources.GetString("sbiUserLabel.Description"); sbiUserLabel.Hint = resources.GetString("sbiUserLabel.Hint"); DesignControlManager.Create(this); RegisterActions(); BaseFormManager.ResetLanguage(); EidssSiteContext.ReportFactory.ResetLanguage(); WinUtils.SwitchInputLanguage(); BasicSyndromicSurveillanceListItem.Init(); } catch (Exception ex) { Dbg.Debug(ex.ToString()); } finally { if (m_LanguageMenu.ToolbarItem != null && m_LanguageMenu.MenuItem != null) { if (IsLangMenuWithoutFlags) { m_LanguageMenu.ToolbarItem.Caption = Localizer.GetMenuLanguageName(ModelUserContext.CurrentLanguage); } else { if (ModelUserContext.CurrentLanguage == Localizer.lngEn) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.English; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.English; } else if (ModelUserContext.CurrentLanguage == Localizer.lngRu) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Russian; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Russian; } else if (ModelUserContext.CurrentLanguage == Localizer.lngAzLat) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Azery; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Azery; } else if (ModelUserContext.CurrentLanguage == Localizer.lngGe) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Georgian; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Georgian; } else if (ModelUserContext.CurrentLanguage == Localizer.lngKz) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Kazakhstan; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Kazakhstan; } else if (ModelUserContext.CurrentLanguage == Localizer.lngAr) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Armenian; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Armenian; } else if (ModelUserContext.CurrentLanguage == Localizer.lngUk) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Ukrainian; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Ukrainian; } else if (ModelUserContext.CurrentLanguage == Localizer.lngIraq) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Iraq; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Iraq; } else if (ModelUserContext.CurrentLanguage == Localizer.lngLaos) { m_LanguageMenu.ToolbarItem.LargeImageIndex = -1; m_LanguageMenu.MenuItem.ImageIndex = -1; } else if (ModelUserContext.CurrentLanguage == Localizer.lngVietnam) { m_LanguageMenu.ToolbarItem.LargeImageIndex = -1; m_LanguageMenu.MenuItem.ImageIndex = -1; } else if (ModelUserContext.CurrentLanguage == Localizer.lngThai) { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.Thailand; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.Thailand; } else { m_LanguageMenu.ToolbarItem.LargeImageIndex = (int)MenuIcons.English; m_LanguageMenu.MenuItem.ImageIndex = (int)MenuIconsSmall.English; } } m_LanguageMenu.ToolbarItem.Hint = Localizer.GetLanguageName(ModelUserContext.CurrentLanguage); } Enabled = true; //BaseForm.SetEnabled(true); Cursor = Cursors.Default; ResumeLayout(); BringToFront(); Activate(); } }
/// <summary> /// 展现ToolTip /// </summary> /// <param name="toolTip">ToolTipController</param> /// <param name="title">ToolTip标题</param> /// <param name="content">ToolTip内容</param> /// <param name="point">Point</param> public static void ShowToolTip(ToolTipController toolTip, string title, string content, Point point) { ShowToolTip(toolTip, title, content, point, null); }
private void InitializeComponent() { this.components = new Container(); ComponentResourceManager manager = new ComponentResourceManager(typeof(DlgLogin)); this.barAndDockingController1 = new BarAndDockingController(this.components); this.toolTipController1 = new ToolTipController(this.components); this.checkBoxRemember = new CheckBox(); this.cbAutlogin = new CheckBox(); this.skinButtonOK = new SkinButton(); this.skinButtonCancel = new SkinButton(); this.gpgLabelLostPwd = new GPGLabel(); this.gpgLabelChangePwd = new GPGLabel(); this.gpgLabelCreateAcct = new GPGLabel(); this.ddServer = new GPGDropDownList(); this.lServer = new GPGLabel(); this.labelError = new GPGLabel(); this.gpgLabel1 = new GPGLabel(); this.labelLogin = new GPGLabel(); this.gpgLabel2 = new GPGLabel(); this.msMainMenu = new GPGMenuStrip(this.components); this.gpgLabelChangeAccount = new GPGLabel(); this.lLostUsername = new GPGLabel(); this.gpgPictureBox1 = new GPGPictureBox(); this.ddGame = new GPGDropDownList(); this.lGame = new GPGLabel(); this.lManageGames = new GPGLabel(); this.pbCurrentGame = new GPGPictureBox(); this.miMainGroup = new ToolStripMenuItem(); this.lOCRegisterNewUserToolStripMenuItem = new ToolStripMenuItem(); this.lOCChangePasswordToolStripMenuItem = new ToolStripMenuItem(); this.lOCResetPasswordToolStripMenuItem = new ToolStripMenuItem(); this.textBoxPassword = new GPGTextBox(); this.textBoxUsername = new GPGTextBox(); ((ISupportInitialize) base.pbBottom).BeginInit(); this.barAndDockingController1.BeginInit(); ((ISupportInitialize) this.gpgPictureBox1).BeginInit(); ((ISupportInitialize) this.pbCurrentGame).BeginInit(); this.textBoxPassword.Properties.BeginInit(); this.textBoxUsername.Properties.BeginInit(); base.SuspendLayout(); base.pbBottom.Size = new Size(0x12f, 0x39); base.ttDefault.SetSuperTip(base.pbBottom, null); this.toolTipController1.SetSuperTip(base.pbBottom, null); base.ttDefault.DefaultController.AutoPopDelay = 0x3e8; base.ttDefault.DefaultController.ToolTipLocation = ToolTipLocation.RightTop; this.barAndDockingController1.PropertiesBar.AllowLinkLighting = false; this.checkBoxRemember.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.checkBoxRemember.AutoSize = true; this.checkBoxRemember.Checked = true; this.checkBoxRemember.CheckState = CheckState.Checked; this.checkBoxRemember.Location = new Point(0x18, 0x13b); this.checkBoxRemember.Margin = new Padding(3, 4, 3, 4); this.checkBoxRemember.Name = "checkBoxRemember"; this.checkBoxRemember.Size = new Size(0xe2, 0x11); this.toolTipController1.SetSuperTip(this.checkBoxRemember, null); base.ttDefault.SetSuperTip(this.checkBoxRemember, null); this.checkBoxRemember.TabIndex = 2; this.checkBoxRemember.Text = "<LOC>Remember my account info"; this.checkBoxRemember.UseVisualStyleBackColor = true; this.cbAutlogin.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.cbAutlogin.AutoSize = true; this.cbAutlogin.Location = new Point(0x18, 0x14c); this.cbAutlogin.Margin = new Padding(3, 4, 3, 4); this.cbAutlogin.Name = "cbAutlogin"; this.cbAutlogin.Size = new Size(0x115, 0x11); this.toolTipController1.SetSuperTip(this.cbAutlogin, null); base.ttDefault.SetSuperTip(this.cbAutlogin, null); this.cbAutlogin.TabIndex = 13; this.cbAutlogin.Text = "<LOC>Login automatically with this account"; this.cbAutlogin.UseVisualStyleBackColor = true; this.cbAutlogin.CheckedChanged += new EventHandler(this.cbAutlogin_CheckedChanged); this.skinButtonOK.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this.skinButtonOK.AutoStyle = true; this.skinButtonOK.BackColor = Color.Black; this.skinButtonOK.ButtonState = 0; this.skinButtonOK.DialogResult = DialogResult.OK; this.skinButtonOK.DisabledForecolor = Color.Gray; this.skinButtonOK.DrawColor = Color.White; this.skinButtonOK.DrawEdges = true; this.skinButtonOK.FocusColor = Color.Yellow; this.skinButtonOK.Font = new Font("Verdana", 8f, FontStyle.Bold); this.skinButtonOK.ForeColor = Color.White; this.skinButtonOK.HorizontalScalingMode = ScalingModes.Tile; this.skinButtonOK.IsStyled = true; this.skinButtonOK.Location = new Point(0x9f, 0x1c9); this.skinButtonOK.Name = "skinButtonOK"; this.skinButtonOK.Size = new Size(0x5d, 0x1c); this.skinButtonOK.SkinBasePath = @"Controls\Button\Round Edge"; base.ttDefault.SetSuperTip(this.skinButtonOK, null); this.toolTipController1.SetSuperTip(this.skinButtonOK, null); this.skinButtonOK.TabIndex = 0x16; this.skinButtonOK.TabStop = true; this.skinButtonOK.Text = "<LOC>Login"; this.skinButtonOK.TextAlign = ContentAlignment.MiddleCenter; this.skinButtonOK.TextPadding = new Padding(0); this.skinButtonOK.Click += new EventHandler(this.skinButtonOK_Click); this.skinButtonCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this.skinButtonCancel.AutoStyle = true; this.skinButtonCancel.BackColor = Color.Black; this.skinButtonCancel.ButtonState = 0; this.skinButtonCancel.DialogResult = DialogResult.OK; this.skinButtonCancel.DisabledForecolor = Color.Gray; this.skinButtonCancel.DrawColor = Color.White; this.skinButtonCancel.DrawEdges = true; this.skinButtonCancel.FocusColor = Color.Yellow; this.skinButtonCancel.Font = new Font("Verdana", 8f, FontStyle.Bold); this.skinButtonCancel.ForeColor = Color.White; this.skinButtonCancel.HorizontalScalingMode = ScalingModes.Tile; this.skinButtonCancel.IsStyled = true; this.skinButtonCancel.Location = new Point(0x101, 0x1c9); this.skinButtonCancel.Name = "skinButtonCancel"; this.skinButtonCancel.Size = new Size(0x5d, 0x1c); this.skinButtonCancel.SkinBasePath = @"Controls\Button\Round Edge"; base.ttDefault.SetSuperTip(this.skinButtonCancel, null); this.toolTipController1.SetSuperTip(this.skinButtonCancel, null); this.skinButtonCancel.TabIndex = 0x17; this.skinButtonCancel.TabStop = true; this.skinButtonCancel.Text = "<LOC>Cancel"; this.skinButtonCancel.TextAlign = ContentAlignment.MiddleCenter; this.skinButtonCancel.TextPadding = new Padding(0); this.skinButtonCancel.Click += new EventHandler(this.skinButtonCancel_Click); this.gpgLabelLostPwd.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabelLostPwd.AutoGrowDirection = GrowDirections.None; this.gpgLabelLostPwd.AutoSize = true; this.gpgLabelLostPwd.AutoStyle = true; this.gpgLabelLostPwd.Font = new Font("Arial", 9.75f); this.gpgLabelLostPwd.ForeColor = Color.White; this.gpgLabelLostPwd.IgnoreMouseWheel = false; this.gpgLabelLostPwd.IsStyled = false; this.gpgLabelLostPwd.Location = new Point(13, 0x18c); this.gpgLabelLostPwd.Name = "gpgLabelLostPwd"; this.gpgLabelLostPwd.Size = new Size(170, 0x10); base.ttDefault.SetSuperTip(this.gpgLabelLostPwd, null); this.toolTipController1.SetSuperTip(this.gpgLabelLostPwd, null); this.gpgLabelLostPwd.TabIndex = 0x15; this.gpgLabelLostPwd.Text = "<LOC>Lost your password?"; this.gpgLabelLostPwd.TextStyle = TextStyles.Link; this.gpgLabelLostPwd.Click += new EventHandler(this.gpgLabelLostPwd_Click); this.gpgLabelChangePwd.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabelChangePwd.AutoGrowDirection = GrowDirections.None; this.gpgLabelChangePwd.AutoSize = true; this.gpgLabelChangePwd.AutoStyle = true; this.gpgLabelChangePwd.Font = new Font("Arial", 9.75f); this.gpgLabelChangePwd.ForeColor = Color.White; this.gpgLabelChangePwd.IgnoreMouseWheel = false; this.gpgLabelChangePwd.IsStyled = false; this.gpgLabelChangePwd.Location = new Point(13, 380); this.gpgLabelChangePwd.Name = "gpgLabelChangePwd"; this.gpgLabelChangePwd.Size = new Size(0xb6, 0x10); base.ttDefault.SetSuperTip(this.gpgLabelChangePwd, null); this.toolTipController1.SetSuperTip(this.gpgLabelChangePwd, null); this.gpgLabelChangePwd.TabIndex = 20; this.gpgLabelChangePwd.Text = "<LOC>Change your password"; this.gpgLabelChangePwd.TextStyle = TextStyles.Link; this.gpgLabelChangePwd.Click += new EventHandler(this.gpgLabelChangePwd_Click); this.gpgLabelCreateAcct.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabelCreateAcct.AutoGrowDirection = GrowDirections.None; this.gpgLabelCreateAcct.AutoSize = true; this.gpgLabelCreateAcct.AutoStyle = true; this.gpgLabelCreateAcct.Font = new Font("Arial", 9.75f); this.gpgLabelCreateAcct.ForeColor = Color.White; this.gpgLabelCreateAcct.IgnoreMouseWheel = false; this.gpgLabelCreateAcct.IsStyled = false; this.gpgLabelCreateAcct.Location = new Point(13, 0x16c); this.gpgLabelCreateAcct.Name = "gpgLabelCreateAcct"; this.gpgLabelCreateAcct.Size = new Size(0xb0, 0x10); base.ttDefault.SetSuperTip(this.gpgLabelCreateAcct, null); this.toolTipController1.SetSuperTip(this.gpgLabelCreateAcct, null); this.gpgLabelCreateAcct.TabIndex = 0x13; this.gpgLabelCreateAcct.Text = "<LOC>Create a new account"; this.gpgLabelCreateAcct.TextStyle = TextStyles.Link; this.gpgLabelCreateAcct.Click += new EventHandler(this.gpgLabelCreateAcct_Click); this.ddServer.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.ddServer.BackColor = Color.Black; this.ddServer.BorderColor = Color.Black; this.ddServer.DoValidate = true; this.ddServer.FlatStyle = FlatStyle.Flat; this.ddServer.FocusBackColor = Color.White; this.ddServer.FocusBorderColor = Color.White; this.ddServer.ForeColor = Color.White; this.ddServer.FormattingEnabled = true; this.ddServer.Items.AddRange(new object[] { "Beta Server", "GPG Test Server 1", "GPG Test Server 2", "Test Staging Server" }); this.ddServer.Location = new Point(0x10, 0x8a); this.ddServer.Name = "ddServer"; this.ddServer.Size = new Size(0x144, 0x15); base.ttDefault.SetSuperTip(this.ddServer, null); this.toolTipController1.SetSuperTip(this.ddServer, null); this.ddServer.TabIndex = 0x11; this.ddServer.SelectedValueChanged += new EventHandler(this.gpgDropDownList1_SelectedValueChanged); this.lServer.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.lServer.AutoGrowDirection = GrowDirections.None; this.lServer.AutoSize = true; this.lServer.AutoStyle = true; this.lServer.Font = new Font("Arial", 9.75f, FontStyle.Bold); this.lServer.ForeColor = Color.White; this.lServer.IgnoreMouseWheel = false; this.lServer.IsStyled = false; this.lServer.Location = new Point(13, 0x77); this.lServer.Name = "lServer"; this.lServer.Size = new Size(0x5d, 0x10); base.ttDefault.SetSuperTip(this.lServer, null); this.toolTipController1.SetSuperTip(this.lServer, null); this.lServer.TabIndex = 0x10; this.lServer.Text = "<LOC>Server"; this.lServer.TextStyle = TextStyles.Title; this.labelError.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.labelError.AutoGrowDirection = GrowDirections.None; this.labelError.AutoStyle = true; this.labelError.Font = new Font("Arial", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0); this.labelError.ForeColor = Color.Red; this.labelError.IgnoreMouseWheel = false; this.labelError.IsStyled = false; this.labelError.Location = new Point(0x12, 0x1d7); this.labelError.Name = "labelError"; this.labelError.Size = new Size(0x142, 0x40); base.ttDefault.SetSuperTip(this.labelError, null); this.toolTipController1.SetSuperTip(this.labelError, null); this.labelError.TabIndex = 8; this.labelError.Text = "<LOC>This is a test error. This is not usually visible. It only happens when a login error occurs."; this.labelError.TextAlign = ContentAlignment.MiddleCenter; this.labelError.TextStyle = TextStyles.Error; this.labelError.Visible = false; this.gpgLabel1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabel1.AutoGrowDirection = GrowDirections.None; this.gpgLabel1.AutoSize = true; this.gpgLabel1.AutoStyle = true; this.gpgLabel1.Font = new Font("Arial", 9.75f, FontStyle.Bold); this.gpgLabel1.ForeColor = Color.White; this.gpgLabel1.IgnoreMouseWheel = false; this.gpgLabel1.IsStyled = false; this.gpgLabel1.Location = new Point(13, 0xd8); this.gpgLabel1.Name = "gpgLabel1"; this.gpgLabel1.Size = new Size(0x73, 0x10); base.ttDefault.SetSuperTip(this.gpgLabel1, null); this.toolTipController1.SetSuperTip(this.gpgLabel1, null); this.gpgLabel1.TabIndex = 1; this.gpgLabel1.Text = "<LOC>Username"; this.gpgLabel1.TextStyle = TextStyles.Title; this.labelLogin.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.labelLogin.AutoGrowDirection = GrowDirections.None; this.labelLogin.AutoStyle = true; this.labelLogin.Font = new Font("Arial", 12f, FontStyle.Bold, GraphicsUnit.Point, 0); this.labelLogin.ForeColor = Color.White; this.labelLogin.IgnoreMouseWheel = false; this.labelLogin.IsStyled = false; this.labelLogin.Location = new Point(0x11, 0x1ec); this.labelLogin.Name = "labelLogin"; this.labelLogin.Size = new Size(0x149, 0x15); base.ttDefault.SetSuperTip(this.labelLogin, null); this.toolTipController1.SetSuperTip(this.labelLogin, null); this.labelLogin.TabIndex = 7; this.labelLogin.Text = "<LOC>Logging In"; this.labelLogin.TextAlign = ContentAlignment.TopCenter; this.labelLogin.TextStyle = TextStyles.Status; this.labelLogin.Visible = false; this.gpgLabel2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabel2.AutoGrowDirection = GrowDirections.None; this.gpgLabel2.AutoSize = true; this.gpgLabel2.AutoStyle = true; this.gpgLabel2.Font = new Font("Arial", 9.75f, FontStyle.Bold); this.gpgLabel2.ForeColor = Color.White; this.gpgLabel2.IgnoreMouseWheel = false; this.gpgLabel2.IsStyled = false; this.gpgLabel2.Location = new Point(13, 0x10a); this.gpgLabel2.Name = "gpgLabel2"; this.gpgLabel2.Size = new Size(0x70, 0x10); base.ttDefault.SetSuperTip(this.gpgLabel2, null); this.toolTipController1.SetSuperTip(this.gpgLabel2, null); this.gpgLabel2.TabIndex = 3; this.gpgLabel2.Text = "<LOC>Password"; this.gpgLabel2.TextStyle = TextStyles.Title; this.msMainMenu.BackColor = Color.Transparent; this.msMainMenu.BackgroundImage = (Image) manager.GetObject("msMainMenu.BackgroundImage"); this.msMainMenu.Dock = DockStyle.None; this.msMainMenu.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0); this.msMainMenu.Location = new Point(0x31, 0x1b); this.msMainMenu.Name = "msMainMenu"; this.msMainMenu.Padding = new Padding(0, 2, 0, 2); this.msMainMenu.Size = new Size(0xca, 0x18); this.toolTipController1.SetSuperTip(this.msMainMenu, null); base.ttDefault.SetSuperTip(this.msMainMenu, null); this.msMainMenu.TabIndex = 12; this.msMainMenu.Text = "menuStrip1"; this.msMainMenu.Visible = false; this.gpgLabelChangeAccount.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.gpgLabelChangeAccount.AutoGrowDirection = GrowDirections.None; this.gpgLabelChangeAccount.AutoSize = true; this.gpgLabelChangeAccount.AutoStyle = true; this.gpgLabelChangeAccount.Font = new Font("Arial", 9.75f); this.gpgLabelChangeAccount.ForeColor = Color.White; this.gpgLabelChangeAccount.IgnoreMouseWheel = false; this.gpgLabelChangeAccount.IsStyled = false; this.gpgLabelChangeAccount.Location = new Point(13, 0x19c); this.gpgLabelChangeAccount.Name = "gpgLabelChangeAccount"; this.gpgLabelChangeAccount.Size = new Size(180, 0x10); base.ttDefault.SetSuperTip(this.gpgLabelChangeAccount, null); this.toolTipController1.SetSuperTip(this.gpgLabelChangeAccount, null); this.gpgLabelChangeAccount.TabIndex = 0x18; this.gpgLabelChangeAccount.Text = "<LOC>Change account name"; this.gpgLabelChangeAccount.TextStyle = TextStyles.Link; this.gpgLabelChangeAccount.Click += new EventHandler(this.gpgLabelChangeAccount_Click); this.lLostUsername.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.lLostUsername.AutoGrowDirection = GrowDirections.None; this.lLostUsername.AutoSize = true; this.lLostUsername.AutoStyle = true; this.lLostUsername.Font = new Font("Arial", 9.75f); this.lLostUsername.ForeColor = Color.White; this.lLostUsername.IgnoreMouseWheel = false; this.lLostUsername.IsStyled = false; this.lLostUsername.Location = new Point(13, 0x1ac); this.lLostUsername.Name = "lLostUsername"; this.lLostUsername.Size = new Size(0xac, 0x10); base.ttDefault.SetSuperTip(this.lLostUsername, null); this.toolTipController1.SetSuperTip(this.lLostUsername, null); this.lLostUsername.TabIndex = 0x19; this.lLostUsername.Text = "<LOC>Lost your username?"; this.lLostUsername.TextStyle = TextStyles.Link; this.lLostUsername.Click += new EventHandler(this.lLostUsername_Click); this.gpgPictureBox1.Image = Resources.gpgnetlogo; this.gpgPictureBox1.Location = new Point(0x41, 0x45); this.gpgPictureBox1.Name = "gpgPictureBox1"; this.gpgPictureBox1.Size = new Size(0xeb, 0x2d); this.gpgPictureBox1.SizeMode = PictureBoxSizeMode.AutoSize; base.ttDefault.SetSuperTip(this.gpgPictureBox1, null); this.toolTipController1.SetSuperTip(this.gpgPictureBox1, null); this.gpgPictureBox1.TabIndex = 0x1a; this.gpgPictureBox1.TabStop = false; this.ddGame.BackColor = Color.Black; this.ddGame.BorderColor = Color.Black; this.ddGame.DoValidate = true; this.ddGame.FlatStyle = FlatStyle.Flat; this.ddGame.FocusBackColor = Color.White; this.ddGame.FocusBorderColor = Color.White; this.ddGame.ForeColor = Color.White; this.ddGame.FormattingEnabled = true; this.ddGame.Items.AddRange(new object[] { "Supreme Commander" }); this.ddGame.Location = new Point(0x10, 0xba); this.ddGame.Name = "ddGame"; this.ddGame.Size = new Size(0x123, 0x15); base.ttDefault.SetSuperTip(this.ddGame, null); this.toolTipController1.SetSuperTip(this.ddGame, null); this.ddGame.TabIndex = 0x1c; this.ddGame.SelectedValueChanged += new EventHandler(this.ddGame_SelectedValueChanged); this.lGame.AutoGrowDirection = GrowDirections.None; this.lGame.AutoSize = true; this.lGame.AutoStyle = true; this.lGame.Font = new Font("Arial", 9.75f, FontStyle.Bold); this.lGame.ForeColor = Color.White; this.lGame.IgnoreMouseWheel = false; this.lGame.IsStyled = false; this.lGame.Location = new Point(13, 0xa7); this.lGame.Name = "lGame"; this.lGame.Size = new Size(0x59, 0x10); base.ttDefault.SetSuperTip(this.lGame, null); this.toolTipController1.SetSuperTip(this.lGame, null); this.lGame.TabIndex = 0x1b; this.lGame.Text = "<LOC>Game"; this.lGame.TextStyle = TextStyles.Title; this.lManageGames.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top; this.lManageGames.AutoGrowDirection = GrowDirections.None; this.lManageGames.AutoStyle = true; this.lManageGames.Font = new Font("Arial", 9.75f); this.lManageGames.ForeColor = Color.White; this.lManageGames.IgnoreMouseWheel = false; this.lManageGames.IsStyled = false; this.lManageGames.Location = new Point(110, 0xa7); this.lManageGames.Name = "lManageGames"; this.lManageGames.Size = new Size(0xc5, 0x10); this.toolTipController1.SetSuperTip(this.lManageGames, null); base.ttDefault.SetSuperTip(this.lManageGames, null); this.lManageGames.TabIndex = 0x1d; this.lManageGames.Text = "<LOC>Manage Games"; this.lManageGames.TextAlign = ContentAlignment.TopRight; this.lManageGames.TextStyle = TextStyles.Link; this.lManageGames.Click += new EventHandler(this.lManageGames_Click); this.pbCurrentGame.Location = new Point(0x139, 0xae); this.pbCurrentGame.Name = "pbCurrentGame"; this.pbCurrentGame.Size = new Size(0x20, 0x20); base.ttDefault.SetSuperTip(this.pbCurrentGame, null); this.toolTipController1.SetSuperTip(this.pbCurrentGame, null); this.pbCurrentGame.TabIndex = 30; this.pbCurrentGame.TabStop = false; this.miMainGroup.DropDownItems.AddRange(new ToolStripItem[] { this.lOCRegisterNewUserToolStripMenuItem, this.lOCChangePasswordToolStripMenuItem, this.lOCResetPasswordToolStripMenuItem }); this.miMainGroup.Name = "miMainGroup"; this.miMainGroup.Padding = new Padding(0, 0, 4, 0); this.miMainGroup.Size = new Size(0x6a, 20); this.miMainGroup.Text = "<LOC>Account"; this.lOCRegisterNewUserToolStripMenuItem.Name = "lOCRegisterNewUserToolStripMenuItem"; this.lOCRegisterNewUserToolStripMenuItem.Size = new Size(210, 0x16); this.lOCRegisterNewUserToolStripMenuItem.Text = "<LOC>Register New User"; this.lOCRegisterNewUserToolStripMenuItem.Click += new EventHandler(this.lOCRegisterNewUserToolStripMenuItem_Click); this.lOCChangePasswordToolStripMenuItem.Name = "lOCChangePasswordToolStripMenuItem"; this.lOCChangePasswordToolStripMenuItem.Size = new Size(210, 0x16); this.lOCChangePasswordToolStripMenuItem.Text = "<LOC>Change Password"; this.lOCChangePasswordToolStripMenuItem.Click += new EventHandler(this.lOCChangePasswordToolStripMenuItem_Click); this.lOCResetPasswordToolStripMenuItem.Name = "lOCResetPasswordToolStripMenuItem"; this.lOCResetPasswordToolStripMenuItem.Size = new Size(210, 0x16); this.lOCResetPasswordToolStripMenuItem.Text = "<LOC>Email Password"; this.textBoxPassword.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.textBoxPassword.Location = new Point(0x10, 0x11c); this.textBoxPassword.Margin = new Padding(3, 4, 3, 4); this.textBoxPassword.Name = "textBoxPassword"; this.textBoxPassword.Properties.Appearance.BackColor = Color.Black; this.textBoxPassword.Properties.Appearance.BorderColor = Color.FromArgb(0x52, 0x83, 190); this.textBoxPassword.Properties.Appearance.ForeColor = Color.White; this.textBoxPassword.Properties.Appearance.Options.UseBackColor = true; this.textBoxPassword.Properties.Appearance.Options.UseBorderColor = true; this.textBoxPassword.Properties.Appearance.Options.UseForeColor = true; this.textBoxPassword.Properties.AppearanceFocused.BackColor = Color.FromArgb(0x10, 0x21, 0x4f); this.textBoxPassword.Properties.AppearanceFocused.BackColor2 = Color.FromArgb(4, 6, 9); this.textBoxPassword.Properties.AppearanceFocused.BorderColor = Color.FromArgb(0xbb, 0xc9, 0xe2); this.textBoxPassword.Properties.AppearanceFocused.GradientMode = LinearGradientMode.ForwardDiagonal; this.textBoxPassword.Properties.AppearanceFocused.Options.UseBackColor = true; this.textBoxPassword.Properties.AppearanceFocused.Options.UseBorderColor = true; this.textBoxPassword.Properties.BorderStyle = BorderStyles.Simple; this.textBoxPassword.Properties.LookAndFeel.SkinName = "London Liquid Sky"; this.textBoxPassword.Properties.LookAndFeel.Style = LookAndFeelStyle.Office2003; this.textBoxPassword.Properties.LookAndFeel.UseDefaultLookAndFeel = false; this.textBoxPassword.Properties.LookAndFeel.UseWindowsXPTheme = true; this.textBoxPassword.Properties.PasswordChar = '*'; this.textBoxPassword.Size = new Size(0x144, 20); this.textBoxPassword.TabIndex = 1; this.textBoxUsername.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.textBoxUsername.Location = new Point(0x10, 0xec); this.textBoxUsername.Margin = new Padding(3, 4, 3, 4); this.textBoxUsername.Name = "textBoxUsername"; this.textBoxUsername.Properties.Appearance.BackColor = Color.Black; this.textBoxUsername.Properties.Appearance.BorderColor = Color.FromArgb(0x52, 0x83, 190); this.textBoxUsername.Properties.Appearance.ForeColor = Color.White; this.textBoxUsername.Properties.Appearance.Options.UseBackColor = true; this.textBoxUsername.Properties.Appearance.Options.UseBorderColor = true; this.textBoxUsername.Properties.Appearance.Options.UseForeColor = true; this.textBoxUsername.Properties.AppearanceFocused.BackColor = Color.FromArgb(0x10, 0x21, 0x4f); this.textBoxUsername.Properties.AppearanceFocused.BackColor2 = Color.FromArgb(4, 6, 9); this.textBoxUsername.Properties.AppearanceFocused.BorderColor = Color.FromArgb(0xbb, 0xc9, 0xe2); this.textBoxUsername.Properties.AppearanceFocused.GradientMode = LinearGradientMode.ForwardDiagonal; this.textBoxUsername.Properties.AppearanceFocused.Options.UseBackColor = true; this.textBoxUsername.Properties.AppearanceFocused.Options.UseBorderColor = true; this.textBoxUsername.Properties.BorderStyle = BorderStyles.Simple; this.textBoxUsername.Properties.LookAndFeel.SkinName = "London Liquid Sky"; this.textBoxUsername.Properties.LookAndFeel.UseDefaultLookAndFeel = false; this.textBoxUsername.Size = new Size(0x144, 20); this.textBoxUsername.TabIndex = 0; base.AcceptButton = this.skinButtonOK; base.AutoScaleMode = AutoScaleMode.None; this.BackColor = Color.Black; base.CancelButton = this.skinButtonCancel; base.ClientSize = new Size(0x16a, 0x23f); base.Controls.Add(this.pbCurrentGame); base.Controls.Add(this.lManageGames); base.Controls.Add(this.ddGame); base.Controls.Add(this.lGame); base.Controls.Add(this.gpgPictureBox1); base.Controls.Add(this.lLostUsername); base.Controls.Add(this.gpgLabelChangeAccount); base.Controls.Add(this.skinButtonCancel); base.Controls.Add(this.skinButtonOK); base.Controls.Add(this.gpgLabelLostPwd); base.Controls.Add(this.gpgLabelChangePwd); base.Controls.Add(this.gpgLabelCreateAcct); base.Controls.Add(this.ddServer); base.Controls.Add(this.lServer); base.Controls.Add(this.cbAutlogin); base.Controls.Add(this.labelError); base.Controls.Add(this.textBoxPassword); base.Controls.Add(this.gpgLabel1); base.Controls.Add(this.labelLogin); base.Controls.Add(this.gpgLabel2); base.Controls.Add(this.textBoxUsername); base.Controls.Add(this.checkBoxRemember); base.Controls.Add(this.msMainMenu); this.DoubleBuffered = true; this.Font = new Font("Verdana", 8f); base.Location = new Point(0, 0); base.Margin = new Padding(3, 5, 3, 5); base.MaximizeBox = false; this.MaximumSize = new Size(0x16a, 0x23f); this.MinimumSize = new Size(0x16a, 0x23f); base.Name = "DlgLogin"; this.toolTipController1.SetSuperTip(this, null); base.ttDefault.SetSuperTip(this, null); this.Text = "<LOC>Sign in to GPGnet: Supreme Commander"; base.Load += new EventHandler(this.DlgLogin_Load); base.Controls.SetChildIndex(this.msMainMenu, 0); base.Controls.SetChildIndex(this.checkBoxRemember, 0); base.Controls.SetChildIndex(this.textBoxUsername, 0); base.Controls.SetChildIndex(this.gpgLabel2, 0); base.Controls.SetChildIndex(this.labelLogin, 0); base.Controls.SetChildIndex(this.gpgLabel1, 0); base.Controls.SetChildIndex(this.textBoxPassword, 0); base.Controls.SetChildIndex(this.labelError, 0); base.Controls.SetChildIndex(this.cbAutlogin, 0); base.Controls.SetChildIndex(this.lServer, 0); base.Controls.SetChildIndex(this.ddServer, 0); base.Controls.SetChildIndex(this.gpgLabelCreateAcct, 0); base.Controls.SetChildIndex(this.gpgLabelChangePwd, 0); base.Controls.SetChildIndex(this.gpgLabelLostPwd, 0); base.Controls.SetChildIndex(this.skinButtonOK, 0); base.Controls.SetChildIndex(this.skinButtonCancel, 0); base.Controls.SetChildIndex(this.gpgLabelChangeAccount, 0); base.Controls.SetChildIndex(this.lLostUsername, 0); base.Controls.SetChildIndex(this.gpgPictureBox1, 0); base.Controls.SetChildIndex(this.lGame, 0); base.Controls.SetChildIndex(this.ddGame, 0); base.Controls.SetChildIndex(this.lManageGames, 0); base.Controls.SetChildIndex(this.pbCurrentGame, 0); ((ISupportInitialize) base.pbBottom).EndInit(); this.barAndDockingController1.EndInit(); ((ISupportInitialize) this.gpgPictureBox1).EndInit(); ((ISupportInitialize) this.pbCurrentGame).EndInit(); this.textBoxPassword.Properties.EndInit(); this.textBoxUsername.Properties.EndInit(); base.ResumeLayout(false); base.PerformLayout(); }
public static ToolTipController For(this ToolTipController toolTipController, EditorContainer editorContainer) { editorContainer.ToolTipController = toolTipController; return(toolTipController); }
public static void MostrarMensajeCampoVacio(TextEdit txt, string mensaje, ToolTipController tooltip) { tooltip.HideHint(); tooltip.ShowHint(mensaje, txt, DevExpress.Utils.ToolTipLocation.LeftTop); }
public void HideHint(bool clearCurrentObject, ToolTipController toolTipController) { if (clearCurrentObject) _editObject = null; toolTipController.HideHint(); _hintIsShown = false; }
public ObjectToolTipController(Control parent) { this.parent = parent; this.parent.Disposed += new EventHandler(delegate { Dispose(); }); this.controller = new ToolTipController(); this.controller.ToolTipType = ToolTipType.SuperTip; this.controller.AllowHtmlText = true; this.controller.ReshowDelay = controller.InitialDelay; this.controller.AutoPopDelay = 10000; parent.MouseDown += new MouseEventHandler(delegate { HideHint(false); }); parent.MouseLeave += new EventHandler(delegate { HideHint(true); }); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RolesChangeRibbonForm)); this.sccRoles = new DevExpress.XtraEditors.SplitContainerControl(); this.cgcRole = new CommonLibrary.GridControlFolder.CommonGridControl(); this.bsRole = new System.Windows.Forms.BindingSource(); this.cgvRole = new CommonLibrary.GridControlFolder.CommonGridView(); this.colRoleName = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.cgcUsers = new CommonLibrary.GridControlFolder.CommonGridControl(); this.bsRoleUsers = new System.Windows.Forms.BindingSource(); this.cgvUsers = new CommonLibrary.GridControlFolder.CommonGridView(); this.colSurnameInitials = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.riccbeUsers = new DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit(); this.toolTip = new DevExpress.Utils.ToolTipController(); this.sccUsers = new DevExpress.XtraEditors.SplitContainerControl(); this.cgcAllUsers = new CommonLibrary.GridControlFolder.CommonGridControl(); this.bsUser = new System.Windows.Forms.BindingSource(); this.cgvAllUsers = new CommonLibrary.GridControlFolder.CommonGridView(); this.colUserId = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.colLastName = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.colFirstName = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.colMiddleName = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.colIsLocked = new CommonLibrary.GridControlFolder.CommonGridColumn(); this.pmUsers = new DevExpress.XtraBars.PopupMenu(); this.bbiChangePassword = new DevExpress.XtraBars.BarButtonItem(); this.bbiRemovePassword = new DevExpress.XtraBars.BarButtonItem(); this.bbiLockUser = new DevExpress.XtraBars.BarButtonItem(); this.bbiUnlock = new DevExpress.XtraBars.BarButtonItem(); this.bm = new DevExpress.XtraBars.BarManager(); this.barDockControlTop = new DevExpress.XtraBars.BarDockControl(); this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); this.barDockControlRight = new DevExpress.XtraBars.BarDockControl(); ((System.ComponentModel.ISupportInitialize)(this.sccRoles)).BeginInit(); this.sccRoles.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cgcRole)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bsRole)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvRole)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cgcUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bsRoleUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.riccbeUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sccUsers)).BeginInit(); this.sccUsers.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cgcAllUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bsUser)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvAllUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pmUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bm)).BeginInit(); this.SuspendLayout(); // // sccRoles // this.sccRoles.Dock = System.Windows.Forms.DockStyle.Fill; this.sccRoles.Horizontal = false; this.sccRoles.Location = new System.Drawing.Point(0, 0); this.sccRoles.Name = "sccRoles"; this.sccRoles.Panel1.Controls.Add(this.cgcRole); this.sccRoles.Panel1.Text = "Panel1"; this.sccRoles.Panel2.Controls.Add(this.cgcUsers); this.sccRoles.Panel2.Text = "Panel2"; this.sccRoles.Size = new System.Drawing.Size(404, 681); this.sccRoles.SplitterPosition = 276; this.sccRoles.TabIndex = 2; this.sccRoles.Text = "sccRoles"; // // cgcRole // this.cgcRole.Cursor = System.Windows.Forms.Cursors.Default; this.cgcRole.DataSource = this.bsRole; this.cgcRole.Dock = System.Windows.Forms.DockStyle.Fill; this.cgcRole.Location = new System.Drawing.Point(0, 0); this.cgcRole.MainView = this.cgvRole; this.cgcRole.Name = "cgcRole"; this.cgcRole.Size = new System.Drawing.Size(404, 276); this.cgcRole.TabIndex = 3; this.cgcRole.UseEmbeddedNavigator = false; this.cgcRole.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.cgvRole}); // // bsRole // this.bsRole.DataSource = typeof(ServerInformation.Role); this.bsRole.CurrentChanged += new System.EventHandler(this.RoleCurrentChanged); // // cgvRole // this.cgvRole.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.colRoleName}); this.cgvRole.CustomPopupMenu = null; this.cgvRole.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; this.cgvRole.GridControl = this.cgcRole; this.cgvRole.Name = "cgvRole"; this.cgvRole.NewItemRowText = "Кликните здесь для добавления новой роли"; this.cgvRole.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDownFocused; this.cgvRole.OptionsCustomization.AllowQuickCustomisation = false; this.cgvRole.OptionsView.ShowDetailButtons = false; this.cgvRole.OptionsView.ShowGroupPanel = false; this.cgvRole.OptionsView.ShowViewCaption = true; this.cgvRole.ViewCaption = "Список ролей в системе"; this.cgvRole.DoBeforeDeleteRow += new CommonLibrary.GridControlFolder.CommonGridView.EventBeforeDelete(this.RoleBeforeDelete); this.cgvRole.DoCheckBeforeDrawIndicator += new System.EventHandler<CommonLibrary.UIFolder.GridControlFolder.EventRowHandlerArgs>(this.RoleDoCheckBeforeDrawIndicator); // // colRoleName // this.colRoleName.Caption = "Название роли"; this.colRoleName.FieldName = "Name"; this.colRoleName.Name = "colRoleName"; this.colRoleName.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways; this.colRoleName.Visible = true; this.colRoleName.VisibleIndex = 0; this.colRoleName.Width = 256; // // cgcUsers // this.cgcUsers.AllowDrop = true; this.cgcUsers.Cursor = System.Windows.Forms.Cursors.Default; this.cgcUsers.DataSource = this.bsRoleUsers; this.cgcUsers.Dock = System.Windows.Forms.DockStyle.Fill; this.cgcUsers.Location = new System.Drawing.Point(0, 0); this.cgcUsers.MainView = this.cgvUsers; this.cgcUsers.Name = "cgcUsers"; this.cgcUsers.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.riccbeUsers}); this.cgcUsers.Size = new System.Drawing.Size(404, 400); this.cgcUsers.TabIndex = 2; this.cgcUsers.UseEmbeddedNavigator = false; this.cgcUsers.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.cgvUsers}); // // bsRoleUsers // this.bsRoleUsers.AllowNew = false; this.bsRoleUsers.DataSource = typeof(ServerInformation.User); // // cgvUsers // this.cgvUsers.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.colSurnameInitials}); this.cgvUsers.CustomPopupMenu = null; this.cgvUsers.FixedLineWidth = 1; this.cgvUsers.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; this.cgvUsers.GridControl = this.cgcUsers; this.cgvUsers.Name = "cgvUsers"; this.cgvUsers.NewItemRowText = "Кликните здесь для добавления пользователей к роли"; this.cgvUsers.OptionsCustomization.AllowAdd = false; this.cgvUsers.OptionsCustomization.AllowQuickCustomisation = false; this.cgvUsers.OptionsCustomization.AllowSelectionColumn = true; this.cgvUsers.OptionsSelection.CheckBoxSelectorColumnWidth = 25; this.cgvUsers.OptionsSelection.MultiSelect = true; this.cgvUsers.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; this.cgvUsers.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top; this.cgvUsers.OptionsView.ShowGroupPanel = false; this.cgvUsers.OptionsView.ShowViewCaption = true; this.cgvUsers.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] { new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.colSurnameInitials, DevExpress.Data.ColumnSortOrder.Ascending)}); this.cgvUsers.ViewCaption = "Сотрудники, относящиеся к выбранной роли"; this.cgvUsers.CustomRowCellEdit += new DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventHandler(this.UsersCustomRowCellEdit); this.cgvUsers.ShowingEditor += new System.ComponentModel.CancelEventHandler(this.UsersShowingEditor); // // colSurnameInitials // this.colSurnameInitials.Caption = "Сотрудник"; this.colSurnameInitials.FieldName = "SurnameInitials"; this.colSurnameInitials.Name = "colSurnameInitials"; this.colSurnameInitials.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways; this.colSurnameInitials.Visible = true; this.colSurnameInitials.VisibleIndex = 1; this.colSurnameInitials.Width = 193; // // riccbeUsers // this.riccbeUsers.AutoHeight = false; this.riccbeUsers.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.riccbeUsers.DisplayMember = "SurnameInitials"; this.riccbeUsers.Name = "riccbeUsers"; this.riccbeUsers.SelectAllItemCaption = "Выбрать всё"; this.riccbeUsers.ValueMember = "Id"; this.riccbeUsers.EditValueChanged += new System.EventHandler(this.UsersEditValueChanged); // // toolTip // this.toolTip.Rounded = true; this.toolTip.ShowBeak = true; // // sccUsers // this.sccUsers.Dock = System.Windows.Forms.DockStyle.Fill; this.sccUsers.Location = new System.Drawing.Point(0, 0); this.sccUsers.Name = "sccUsers"; this.sccUsers.Panel1.Controls.Add(this.sccRoles); this.sccUsers.Panel1.Text = "Panel1"; this.sccUsers.Panel2.Controls.Add(this.cgcAllUsers); this.sccUsers.Panel2.Text = "Panel2"; this.sccUsers.Size = new System.Drawing.Size(1086, 681); this.sccUsers.SplitterPosition = 404; this.sccUsers.TabIndex = 3; this.sccUsers.Text = "sccUsers"; // // cgcAllUsers // this.cgcAllUsers.AllowDrop = true; this.cgcAllUsers.Cursor = System.Windows.Forms.Cursors.Default; this.cgcAllUsers.DataSource = this.bsUser; this.cgcAllUsers.Dock = System.Windows.Forms.DockStyle.Fill; this.cgcAllUsers.Location = new System.Drawing.Point(0, 0); this.cgcAllUsers.MainView = this.cgvAllUsers; this.cgcAllUsers.Name = "cgcAllUsers"; this.cgcAllUsers.Size = new System.Drawing.Size(677, 681); this.cgcAllUsers.TabIndex = 5; this.cgcAllUsers.UseEmbeddedNavigator = false; this.cgcAllUsers.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.cgvAllUsers}); // // bsUser // this.bsUser.DataSource = typeof(ServerInformation.User); // // cgvAllUsers // this.cgvAllUsers.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.colUserId, this.colLastName, this.colFirstName, this.colMiddleName, this.colIsLocked}); this.cgvAllUsers.CustomPopupMenu = null; this.cgvAllUsers.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; this.cgvAllUsers.GridControl = this.cgcAllUsers; this.cgvAllUsers.Name = "cgvAllUsers"; this.cgvAllUsers.NewItemRowText = "Кликните здесь для добавления нового сотрудника"; this.cgvAllUsers.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDownFocused; this.cgvAllUsers.OptionsCustomization.AllowDelete = false; this.cgvAllUsers.OptionsCustomization.AllowQuickCustomisation = false; this.cgvAllUsers.OptionsDetail.EnableMasterViewMode = false; this.cgvAllUsers.OptionsView.ShowGroupPanel = false; this.cgvAllUsers.OptionsView.ShowViewCaption = true; this.cgvAllUsers.ViewCaption = "Список всех пользователей в системе"; this.cgvAllUsers.DoCheckBeforeDrawIndicator += new System.EventHandler<CommonLibrary.UIFolder.GridControlFolder.EventRowHandlerArgs>(this.CheckBeforeDrawImage); this.cgvAllUsers.PopupMenuShowing += new DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventHandler(this.UserPopupMenuShowing); this.cgvAllUsers.CellValueChanging += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.AllUsersCellValueChanging); this.cgvAllUsers.ValidateRow += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(this.AllUsersValidateRow); // // colUserId // this.colUserId.FieldName = "Id"; this.colUserId.Name = "colUserId"; this.colUserId.OptionsColumn.ReadOnly = true; // // colLastName // this.colLastName.Caption = "Фамилия"; this.colLastName.FieldName = "LastName"; this.colLastName.Name = "colLastName"; this.colLastName.Visible = true; this.colLastName.VisibleIndex = 0; // // colFirstName // this.colFirstName.Caption = "Имя"; this.colFirstName.FieldName = "FirstName"; this.colFirstName.Name = "colFirstName"; this.colFirstName.Visible = true; this.colFirstName.VisibleIndex = 1; // // colMiddleName // this.colMiddleName.Caption = "Отчество"; this.colMiddleName.FieldName = "MiddleName"; this.colMiddleName.Name = "colMiddleName"; this.colMiddleName.Visible = true; this.colMiddleName.VisibleIndex = 2; // // colIsLocked // this.colIsLocked.Caption = "Заблокирован"; this.colIsLocked.FieldName = "IsLocked"; this.colIsLocked.Name = "colIsLocked"; this.colIsLocked.Visible = true; this.colIsLocked.VisibleIndex = 3; // // pmUsers // this.pmUsers.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(this.bbiChangePassword), new DevExpress.XtraBars.LinkPersistInfo(this.bbiRemovePassword), new DevExpress.XtraBars.LinkPersistInfo(this.bbiLockUser), new DevExpress.XtraBars.LinkPersistInfo(this.bbiUnlock)}); this.pmUsers.Manager = this.bm; this.pmUsers.Name = "pmUsers"; this.pmUsers.BeforePopup += new System.ComponentModel.CancelEventHandler(this.UsersBeforePopup); // // bbiChangePassword // this.bbiChangePassword.Caption = "Изменить пароль"; this.bbiChangePassword.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiChangePassword.Glyph"))); this.bbiChangePassword.Id = 4; this.bbiChangePassword.Name = "bbiChangePassword"; this.bbiChangePassword.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.NewPasswordUserClick); // // bbiRemovePassword // this.bbiRemovePassword.Caption = "Удалить пароль"; this.bbiRemovePassword.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRemovePassword.Glyph"))); this.bbiRemovePassword.Id = 3; this.bbiRemovePassword.Name = "bbiRemovePassword"; this.bbiRemovePassword.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RemovePasswordUserClick); // // bbiLockUser // this.bbiLockUser.Caption = "Заблокировать сотрудника"; this.bbiLockUser.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiLockUser.Glyph"))); this.bbiLockUser.Id = 5; this.bbiLockUser.Name = "bbiLockUser"; this.bbiLockUser.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.LockUserClick); // // bbiUnlock // this.bbiUnlock.Caption = "Разблокировать сотрудника"; this.bbiUnlock.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiUnlock.Glyph"))); this.bbiUnlock.Id = 6; this.bbiUnlock.Name = "bbiUnlock"; this.bbiUnlock.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.UnlockUserClick); // // bm // this.bm.DockControls.Add(this.barDockControlTop); this.bm.DockControls.Add(this.barDockControlBottom); this.bm.DockControls.Add(this.barDockControlLeft); this.bm.DockControls.Add(this.barDockControlRight); this.bm.Form = this; this.bm.Items.AddRange(new DevExpress.XtraBars.BarItem[] { this.bbiRemovePassword, this.bbiChangePassword, this.bbiLockUser, this.bbiUnlock}); this.bm.MaxItemId = 9; // // barDockControlTop // this.barDockControlTop.CausesValidation = false; this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top; this.barDockControlTop.Location = new System.Drawing.Point(0, 0); this.barDockControlTop.Size = new System.Drawing.Size(1086, 0); // // barDockControlBottom // this.barDockControlBottom.CausesValidation = false; this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; this.barDockControlBottom.Location = new System.Drawing.Point(0, 681); this.barDockControlBottom.Size = new System.Drawing.Size(1086, 0); // // barDockControlLeft // this.barDockControlLeft.CausesValidation = false; this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left; this.barDockControlLeft.Location = new System.Drawing.Point(0, 0); this.barDockControlLeft.Size = new System.Drawing.Size(0, 681); // // barDockControlRight // this.barDockControlRight.CausesValidation = false; this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right; this.barDockControlRight.Location = new System.Drawing.Point(1086, 0); this.barDockControlRight.Size = new System.Drawing.Size(0, 681); // // RolesChangeRibbonForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1086, 681); this.Controls.Add(this.sccUsers); this.Controls.Add(this.barDockControlLeft); this.Controls.Add(this.barDockControlRight); this.Controls.Add(this.barDockControlBottom); this.Controls.Add(this.barDockControlTop); this.Name = "RolesChangeRibbonForm"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Настройка ролей и сотрудников"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.RolesChangeRibbonFormLoad); this.Shown += new System.EventHandler(this.RolesChangeRibbonFormShown); ((System.ComponentModel.ISupportInitialize)(this.sccRoles)).EndInit(); this.sccRoles.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.cgcRole)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bsRole)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvRole)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cgcUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bsRoleUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.riccbeUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.sccUsers)).EndInit(); this.sccUsers.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.cgcAllUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bsUser)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cgvAllUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pmUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bm)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// 设置RepositoryItem是否可编辑 /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="TProperty">The type of the property.</typeparam> /// <param name="view">The view.</param> /// <param name="title">当不可编辑的时候,提示标题</param> /// <param name="content">当不可编辑的时候,提示内容</param> /// <param name="toolTip">ToolTipController.</param> /// <param name="keySelector">The key selector.</param> /// <param name="conditonHanlder">The conditon hanlder.</param> /// 创建时间:2015-05-26 13:48 /// 备注说明:<c>null</c> public static void ConditionRepositoryItemEdit <T, TProperty>(this GridView view, string title, string content, ToolTipController toolTip, Expression <Func <T, TProperty> > keySelector, Func <T, bool> conditonHanlder) where T : class { string _filedName = keySelector.GetTPropertyName <T, TProperty>(); view.ShowingEditor += (sender, e) => { GridView _curView = sender as GridView; if (_curView.FocusedColumn.FieldName.Equals(_filedName)) { T _item = (T)view.GetFocusedRow(); if (conditonHanlder(_item)) { e.Cancel = true; Point _mousePoint = Control.MousePosition; toolTip.ShowHint(content, title, _mousePoint); } } }; }
/// <summary> /// Initialize a new instance of the ViewDrawNavRibbonTab class. /// </summary> /// <param name="navigator">Owning navigator instance.</param> /// <param name="page">Page this ribbon tab represents.</param> public ViewDrawNavRibbonTab(KryptonNavigator navigator, KryptonPage page) { Debug.Assert(navigator != null); Debug.Assert(page != null); Navigator = navigator; Page = page; _lastClick = DateTime.Now.AddDays(-1); // Associate the page component with this view element Component = page; // Create a controller for managing button behavior _buttonController = new PageButtonController(this, OnNeedPaint) { ClickOnDown = true }; _buttonController.Click += OnClick; _buttonController.RightClick += OnRightClick; // Allow the page to be dragged and hook into drag events _buttonController.AllowDragging = true; _buttonController.DragStart += OnDragStart; _buttonController.DragMove += OnDragMove; _buttonController.DragEnd += OnDragEnd; _buttonController.DragQuit += OnDragQuit; _buttonController.ButtonDragRectangle += OnButtonDragRectangle; _buttonController.ButtonDragOffset += OnButtonDragOffset; // A tab is selected on being pressed and not on the mouse up _buttonController.ClickOnDown = true; // We need to be notified of got/lost focus and keyboard events SourceController = _buttonController; KeyController = _buttonController; // Create a decorator to interface with the tooltip manager ToolTipController toolTipController = new ToolTipController(Navigator.ToolTipManager, this, _buttonController); ToolTipController hoverController = new ToolTipController(Navigator.HoverManager, this, toolTipController); // Assign controller for handing mouse input MouseController = hoverController; // Create overrides for handling a focus state _paletteGeneral = Navigator.StateCommon.RibbonGeneral; _overrideStateNormal = new PaletteRibbonTabContentInheritOverride(Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.Content, Page.StateNormal.RibbonTab.TabDraw, Page.StateNormal.RibbonTab.TabDraw, Page.StateNormal.RibbonTab.Content, PaletteState.FocusOverride); _overrideStateTracking = new PaletteRibbonTabContentInheritOverride(Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.Content, Page.StateTracking.RibbonTab.TabDraw, Page.StateTracking.RibbonTab.TabDraw, Page.StateTracking.RibbonTab.Content, PaletteState.FocusOverride); _overrideStatePressed = new PaletteRibbonTabContentInheritOverride(Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.Content, Page.StatePressed.RibbonTab.TabDraw, Page.StatePressed.RibbonTab.TabDraw, Page.StatePressed.RibbonTab.Content, PaletteState.FocusOverride); _overrideStateSelected = new PaletteRibbonTabContentInheritOverride(Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.TabDraw, Page.OverrideFocus.RibbonTab.Content, Page.StateSelected.RibbonTab.TabDraw, Page.StateSelected.RibbonTab.TabDraw, Page.StateSelected.RibbonTab.Content, PaletteState.FocusOverride); // Use a class to convert from ribbon tab to content interface _contentProvider = new RibbonTabToContent(_paletteGeneral, _overrideStateNormal, _overrideStateNormal); // Create the content view element and use the content provider as a way to // convert from the ribbon palette entries to the content palette entries _viewContent = new ViewDrawContent(_contentProvider, this, VisualOrientation.Top); // Add content to the view _layoutDocker = new ViewLayoutDocker { { _viewContent, ViewDockStyle.Fill } }; Add(_layoutDocker); // Create button specification collection manager ButtonSpecManager = new ButtonSpecNavManagerLayoutBar(Navigator, Navigator.InternalRedirector, Page.ButtonSpecs, null, new ViewLayoutDocker[] { _layoutDocker }, new IPaletteMetric[] { Navigator.StateCommon }, new PaletteMetricInt[] { PaletteMetricInt.PageButtonInset }, new PaletteMetricInt[] { PaletteMetricInt.PageButtonInset }, new PaletteMetricPadding[] { PaletteMetricPadding.PageButtonPadding }, Navigator.CreateToolStripRenderer, OnNeedPaint) { // Hook up the tooltip manager so that tooltips can be generated ToolTipManager = Navigator.ToolTipManager, RemapTarget = ButtonSpecNavRemap.ButtonSpecRemapTarget.ButtonStandalone }; // Ensure current button specs are created ButtonSpecManager.RecreateButtons(); // Create the state specific memento array _mementos = new IDisposable[Enum.GetValues(typeof(PaletteState)).Length]; // Cache the last shape encountered _lastRibbonShape = PaletteRibbonShape.Office2010; }
/// <summary> /// 展现ToolTip /// </summary> /// <typeparam name="T">泛型</typeparam> /// <param name="t">控件</param> /// <param name="toolTip">ToolTipController</param> /// <param name="content">ToolTip内容</param> public static void ShowToolTip <T>(this T t, ToolTipController toolTip, string content) where T : Control { ShowToolTip(t, toolTip, content, null); }
private void init(Form formMain, int MinuteForDelaying) { //init toolTipStyleController toolTipStyleController = new ToolTipController(); toolTipStyleController.Active = true; toolTipStyleController.AllowHtmlText = true; toolTipStyleController.Rounded = true; toolTipStyleController.ShowBeak = true; toolTipStyleController.ToolTipType = ToolTipType.SuperTip; //controlBroadCast controlBroadCast = new AlertControl(); controlBroadCast.ButtonClick += new AlertButtonClickEventHandler(controlBroadCast_ButtonClick); btnDelete = new AlertButton(HelpImage.getImage2020("stop.png")); btnDelete.Hint = "Không xem lại thông báo lần sau"; btnDelete.Name = "btnDelete"; controlBroadCast.Buttons.Add(btnDelete); this.formMain = formMain; this.delay = MinuteForDelaying * 60000; this.timer = new Timer(); timer.Interval = 2000; timer.Tick += new EventHandler(timer_Tick); }
/// <summary> /// 展现ToolTip /// </summary> /// <param name="toolTip">ToolTipController</param> /// <param name="title">ToolTip标题</param> /// <param name="content">ToolTip内容</param> public static void ShowToolTip(this ToolTipController toolTip, string title, string content) { Point _mousePoint = Control.MousePosition; toolTip.ShowHint(content, title, _mousePoint); }
private void hideToolTip(HotTrackEventArgs e) { e.Cancel = true; ToolTipController.HideHint(); }
public void ShowHint(object editObject, Point location, IObjectSpace objectSpace, ToolTipController toolTipController) { if (Equals(editObject, _editObject)) { return; } _objectSpace = objectSpace; _editObject = editObject; var info = new ToolTipControlInfo(); var item = new ToolTipItem(); InitToolTipItem(item); item.ImageToTextDistance = 10; info.Object = DateTime.Now.Ticks; info.SuperTip = new SuperToolTip(); info.SuperTip.Items.Add(item); info.ToolTipPosition = _parent.PointToScreen(location); toolTipController.ShowHint(info); _hintIsShown = true; }
private void InitializeComponent() { this.components = new Container(); this.toolTipController = new ToolTipController(this.components); base.SuspendLayout(); this.toolTipController.BeforeShow += new ToolTipControllerBeforeShowEventHandler(this.toolTipController_BeforeShow); this.AutoScroll = true; base.Name = "AbstractDataForm"; base.Size = new Size(0x1d0, 0x180); this.toolTipController.SetSuperTip(this, null); base.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdminTool)); this.tlControls = new CommonTreeList(); this.tlcType = new CommonTreeListColumn(); this.tlcText = new CommonTreeListColumn(); this.lueForms = new DevExpress.XtraEditors.LookUpEdit(); this.bsForms = new System.Windows.Forms.BindingSource(this.components); this.lcAdmin = new DevExpress.XtraLayout.LayoutControl(); this.pgFilter = new FilterPropertyGrid(); this.lueRoles = new DevExpress.XtraEditors.LookUpEdit(); this.lcgAdmin = new DevExpress.XtraLayout.LayoutControlGroup(); this.lciForm = new DevExpress.XtraLayout.LayoutControlItem(); this.lciTree = new DevExpress.XtraLayout.LayoutControlItem(); this.lciRole = new DevExpress.XtraLayout.LayoutControlItem(); this.lciProperty = new DevExpress.XtraLayout.LayoutControlItem(); this.splitterItem1 = new DevExpress.XtraLayout.SplitterItem(); this.rcAdmin = new DevExpress.XtraBars.Ribbon.RibbonControl(); this.bbiDefault = new DevExpress.XtraBars.BarButtonItem(); this.bbiRestore = new DevExpress.XtraBars.BarButtonItem(); this.bbiSave = new DevExpress.XtraBars.BarButtonItem(); this.rpMain = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.rpgSettings = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.toolTip = new DevExpress.Utils.ToolTipController(this.components); this.pmControls = new DevExpress.XtraBars.PopupMenu(this.components); this.bbiExpand = new DevExpress.XtraBars.BarButtonItem(); ((System.ComponentModel.ISupportInitialize)(this.tlControls)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lueForms.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bsForms)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lcAdmin)).BeginInit(); this.lcAdmin.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.lueRoles.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lcgAdmin)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lciForm)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lciTree)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lciRole)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.lciProperty)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rcAdmin)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pmControls)).BeginInit(); this.SuspendLayout(); // // tlControls // this.tlControls.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { this.tlcType, this.tlcText}); this.tlControls.KeyFieldName = "Name"; this.tlControls.Location = new System.Drawing.Point(7, 85); this.tlControls.Name = "tlControls"; this.tlControls.OptionsBehavior.Editable = false; this.tlControls.OptionsView.ShowAutoFilterRow = true; this.tlControls.ParentFieldName = "Parent"; this.tlControls.Size = new System.Drawing.Size(377, 397); this.tlControls.TabIndex = 2; this.tlControls.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.ControlsFocusedNodeChanged); this.tlControls.PopupMenuShowing += new DevExpress.XtraTreeList.PopupMenuShowingEventHandler(this.ControlsPopupMenuShowing); // // tlcType // this.tlcType.Caption = "Тип элемента"; this.tlcType.FieldName = "Type"; this.tlcType.Name = "tlcType"; this.tlcType.OptionsColumn.AllowEdit = false; this.tlcType.OptionsFilter.AutoFilterCondition = DevExpress.XtraTreeList.Columns.AutoFilterCondition.Contains; this.tlcType.Visible = true; this.tlcType.VisibleIndex = 0; this.tlcType.Width = 190; // // tlcText // this.tlcText.Caption = "Текст элемента"; this.tlcText.FieldName = "Caption"; this.tlcText.Name = "tlcText"; this.tlcText.OptionsColumn.AllowEdit = false; this.tlcText.OptionsFilter.AutoFilterCondition = DevExpress.XtraTreeList.Columns.AutoFilterCondition.Contains; this.tlcText.Visible = true; this.tlcText.VisibleIndex = 1; this.tlcText.Width = 113; // // lueForms // this.lueForms.Location = new System.Drawing.Point(94, 17); this.lueForms.MaximumSize = new System.Drawing.Size(0, 20); this.lueForms.Name = "lueForms"; this.lueForms.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.lueForms.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] { new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Value", "Заголовок формы", 20, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.Ascending)}); this.lueForms.Properties.DataSource = this.bsForms; this.lueForms.Properties.DisplayMember = "Value"; this.lueForms.Properties.DropDownRows = 10; this.lueForms.Properties.NullText = ""; this.lueForms.Properties.ValueMember = "Key"; this.lueForms.Size = new System.Drawing.Size(290, 20); this.lueForms.StyleController = this.lcAdmin; this.lueForms.TabIndex = 4; this.lueForms.EditValueChanged += new System.EventHandler(this.FormsEditValueChanged); // // bsForms // this.bsForms.DataSource = typeof(System.Collections.Generic.KeyValuePair<string, string>); // // lcAdmin // this.lcAdmin.Controls.Add(this.pgFilter); this.lcAdmin.Controls.Add(this.tlControls); this.lcAdmin.Controls.Add(this.lueForms); this.lcAdmin.Controls.Add(this.lueRoles); this.lcAdmin.Dock = System.Windows.Forms.DockStyle.Fill; this.lcAdmin.Location = new System.Drawing.Point(0, 96); this.lcAdmin.Name = "lcAdmin"; this.lcAdmin.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(655, 271, 250, 350); this.lcAdmin.Root = this.lcgAdmin; this.lcAdmin.Size = new System.Drawing.Size(391, 692); this.lcAdmin.TabIndex = 1; this.lcAdmin.Text = "lcAdmin"; // // pgFilter // this.pgFilter.Location = new System.Drawing.Point(7, 491); this.pgFilter.Name = "pgFilter"; this.pgFilter.PropertySort = System.Windows.Forms.PropertySort.Alphabetical; this.pgFilter.Size = new System.Drawing.Size(377, 194); this.pgFilter.TabIndex = 0; this.pgFilter.ToolbarVisible = false; this.pgFilter.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.FilterPropertyValueChanged); // // lueRoles // this.lueRoles.Location = new System.Drawing.Point(94, 51); this.lueRoles.MaximumSize = new System.Drawing.Size(0, 20); this.lueRoles.Name = "lueRoles"; this.lueRoles.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.lueRoles.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] { new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Name", "Name", 20, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.Ascending)}); this.lueRoles.Properties.DisplayMember = "Name"; this.lueRoles.Properties.DropDownRows = 10; this.lueRoles.Properties.ImmediatePopup = true; this.lueRoles.Properties.NullText = ""; this.lueRoles.Properties.NullValuePrompt = "Выберите роль для настройки"; this.lueRoles.Properties.PopupSizeable = false; this.lueRoles.Properties.ShowHeader = false; this.lueRoles.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.lueRoles.Properties.ValueMember = "Id"; this.lueRoles.Size = new System.Drawing.Size(290, 20); this.lueRoles.StyleController = this.lcAdmin; this.lueRoles.TabIndex = 0; this.lueRoles.EditValueChanged += new System.EventHandler(this.RolesEditValueChanged); // // lcgAdmin // this.lcgAdmin.CustomizationFormText = "Root"; this.lcgAdmin.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.lcgAdmin.GroupBordersVisible = false; this.lcgAdmin.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.lciForm, this.lciTree, this.lciRole, this.lciProperty, this.splitterItem1}); this.lcgAdmin.Location = new System.Drawing.Point(0, 0); this.lcgAdmin.Name = "Root"; this.lcgAdmin.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5); this.lcgAdmin.Size = new System.Drawing.Size(391, 692); this.lcgAdmin.Text = "Root"; this.lcgAdmin.TextVisible = false; // // lciForm // this.lciForm.Control = this.lueForms; this.lciForm.CustomizationFormText = "Активная форма"; this.lciForm.Location = new System.Drawing.Point(0, 0); this.lciForm.Name = "lciForm"; this.lciForm.Size = new System.Drawing.Size(381, 34); this.lciForm.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 10, 0); this.lciForm.Text = "Активная форма"; this.lciForm.TextSize = new System.Drawing.Size(84, 13); // // lciTree // this.lciTree.Control = this.tlControls; this.lciTree.CustomizationFormText = "lciTree"; this.lciTree.Location = new System.Drawing.Point(0, 68); this.lciTree.Name = "lciTree"; this.lciTree.Size = new System.Drawing.Size(381, 411); this.lciTree.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 10, 0); this.lciTree.Text = "lciTree"; this.lciTree.TextSize = new System.Drawing.Size(0, 0); this.lciTree.TextToControlDistance = 0; this.lciTree.TextVisible = false; // // lciRole // this.lciRole.Control = this.lueRoles; this.lciRole.CustomizationFormText = "Активная роль"; this.lciRole.Location = new System.Drawing.Point(0, 34); this.lciRole.Name = "lciRole"; this.lciRole.Size = new System.Drawing.Size(381, 34); this.lciRole.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 10, 0); this.lciRole.Text = "Активная роль"; this.lciRole.TextSize = new System.Drawing.Size(84, 13); // // lciProperty // this.lciProperty.Control = this.pgFilter; this.lciProperty.CustomizationFormText = "lciProperty"; this.lciProperty.Location = new System.Drawing.Point(0, 484); this.lciProperty.Name = "lciProperty"; this.lciProperty.Size = new System.Drawing.Size(381, 198); this.lciProperty.Text = "lciProperty"; this.lciProperty.TextSize = new System.Drawing.Size(0, 0); this.lciProperty.TextToControlDistance = 0; this.lciProperty.TextVisible = false; // // splitterItem1 // this.splitterItem1.AllowHotTrack = true; this.splitterItem1.CustomizationFormText = "splitterItem1"; this.splitterItem1.Location = new System.Drawing.Point(0, 479); this.splitterItem1.Name = "splitterItem1"; this.splitterItem1.Size = new System.Drawing.Size(381, 5); // // rcAdmin // this.rcAdmin.ExpandCollapseItem.Id = 0; this.rcAdmin.Items.AddRange(new DevExpress.XtraBars.BarItem[] { this.rcAdmin.ExpandCollapseItem, this.bbiDefault, this.bbiRestore, this.bbiSave, this.bbiExpand}); this.rcAdmin.Location = new System.Drawing.Point(0, 0); this.rcAdmin.MaxItemId = 7; this.rcAdmin.Name = "rcAdmin"; this.rcAdmin.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { this.rpMain}); this.rcAdmin.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; this.rcAdmin.ShowCategoryInCaption = false; this.rcAdmin.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; this.rcAdmin.ShowFullScreenButton = DevExpress.Utils.DefaultBoolean.False; this.rcAdmin.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; this.rcAdmin.ShowToolbarCustomizeItem = false; this.rcAdmin.Size = new System.Drawing.Size(391, 96); this.rcAdmin.Toolbar.ShowCustomizeItem = false; this.rcAdmin.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // bbiDefault // this.bbiDefault.Caption = "По умолчанию"; this.bbiDefault.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537"); this.bbiDefault.Enabled = false; this.bbiDefault.Hint = "Вернуть настройки элементов интерфеса для выбранной формы к изначальным"; this.bbiDefault.Id = 3; this.bbiDefault.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiDefault.LargeGlyph"))); this.bbiDefault.Name = "bbiDefault"; this.bbiDefault.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.DefaultItemClick); // // bbiRestore // this.bbiRestore.Caption = "Последние сохранённые"; this.bbiRestore.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537"); this.bbiRestore.Enabled = false; this.bbiRestore.Hint = "Вернуть настройки элементов интерфеса для выбранной формы к последним сохранённым" + ""; this.bbiRestore.Id = 4; this.bbiRestore.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiRestore.LargeGlyph"))); this.bbiRestore.Name = "bbiRestore"; this.bbiRestore.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RestoreItemClick); // // bbiSave // this.bbiSave.Caption = "Сохранить"; this.bbiSave.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537"); this.bbiSave.Enabled = false; this.bbiSave.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiSave.Glyph"))); this.bbiSave.Hint = "Сохранить текущие настройки для выбранной формы и роли "; this.bbiSave.Id = 5; this.bbiSave.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiSave.LargeGlyph"))); this.bbiSave.Name = "bbiSave"; this.bbiSave.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.SaveItemClick); // // rpMain // this.rpMain.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.rpgSettings}); this.rpMain.Name = "rpMain"; this.rpMain.Text = "Администрирование"; // // rpgSettings // this.rpgSettings.Glyph = ((System.Drawing.Image)(resources.GetObject("rpgSettings.Glyph"))); this.rpgSettings.ItemLinks.Add(this.bbiDefault); this.rpgSettings.ItemLinks.Add(this.bbiRestore); this.rpgSettings.ItemLinks.Add(this.bbiSave); this.rpgSettings.Name = "rpgSettings"; this.rpgSettings.Text = "Настройки"; // // toolTip // this.toolTip.Rounded = true; this.toolTip.ShowBeak = true; this.toolTip.ToolTipLocation = DevExpress.Utils.ToolTipLocation.LeftCenter; // // pmControls // this.pmControls.ItemLinks.Add(this.bbiExpand); this.pmControls.Name = "pmControls"; this.pmControls.Ribbon = this.rcAdmin; // // bbiExpand // this.bbiExpand.Caption = "Развернуть всё"; this.bbiExpand.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiExpand.Glyph"))); this.bbiExpand.Id = 6; this.bbiExpand.Name = "bbiExpand"; this.bbiExpand.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ExpandButtonClick); // // AdminTool // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(391, 788); this.Controls.Add(this.lcAdmin); this.Controls.Add(this.rcAdmin); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "AdminTool"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Настройка интерфейса"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AdminToolFormClosed); this.Load += new System.EventHandler(this.AdminToolLoad); this.Shown += new System.EventHandler(this.AdminToolShown); ((System.ComponentModel.ISupportInitialize)(this.tlControls)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lueForms.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bsForms)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lcAdmin)).EndInit(); this.lcAdmin.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.lueRoles.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lcgAdmin)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lciForm)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lciTree)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lciRole)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.lciProperty)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rcAdmin)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pmControls)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public static bool ValidarCampoVacio(ComboBoxEdit cmb, string mensaje, ToolTipController tooltip) { bool flag; if (string.IsNullOrEmpty(cmb.Text)) { tooltip.HideHint(); tooltip.ShowHint(mensaje, cmb, DevExpress.Utils.ToolTipLocation.LeftTop); flag = true; } else { flag = false; } return flag; }