public ColorPicker(Control owner, int page, Rectangle closedArea, Rectangle openArea, int swatchWidth, int swatchHeight, int[] hues) : this(owner, page) { _isAnOpenSwatch = false; _openArea = openArea; buildGumpling(closedArea, swatchWidth, swatchHeight, hues); }
override object Evaluate (HttpContext ctx, Control control) { if (control == null) return null; if (control.Page == null) return null; if(String.IsNullOrEmpty(ControlID)) throw new ArgumentException ("The ControlID property is not set."); Control c = null, namingContainer = control.NamingContainer; while (namingContainer != null) { c = namingContainer.FindControl(ControlID); if (c != null) break; namingContainer = namingContainer.NamingContainer; } if (c == null) throw new InvalidOperationException ("Control '" + ControlID + "' not found."); string propName = PropertyName; if (String.IsNullOrEmpty (propName)) { object [] attrs = c.GetType ().GetCustomAttributes (typeof (ControlValuePropertyAttribute), true); if(attrs.Length==0) throw new ArgumentException ("The PropertyName property is not set and the Control identified by the ControlID property is not decorated with a ControlValuePropertyAttribute attribute."); ControlValuePropertyAttribute attr = (ControlValuePropertyAttribute) attrs [0]; propName = attr.Name; } return DataBinder.Eval (c, propName); }
public static void PrintWebControl(Control ctrl, string Script) { StringWriter stringWrite = new StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite); if (ctrl is WebControl) { Unit w = new Unit(100, UnitType.Percentage); ((WebControl)ctrl).Width = w; } Page pg = new Page(); pg.EnableEventValidation = false; if (Script != string.Empty) { pg.ClientScript.RegisterStartupScript(pg.GetType(), "PrintJavaScript", Script); } HtmlForm frm = new HtmlForm(); pg.Controls.Add(frm); frm.Attributes.Add("runat", "server"); frm.Controls.Add(ctrl); pg.DesignerInitialize(); pg.RenderControl(htmlWrite); string strHTML = stringWrite.ToString(); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Write(strHTML); HttpContext.Current.Response.Write("<script>window.print();</script>"); HttpContext.Current.Response.End(); }
public string GetControlsHTML(Control c) { System.IO.StringWriter sw = new System.IO.StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); c.RenderControl(hw); return sw.ToString(); }
public ExpandableScroll(Control owner, int page, int x, int y, int height) : base(0, 0) { m_owner = owner; Position = new Point(x, y); m_expandableScrollHeight = height; }
/// <summary> /// VerifyRenderingInServerForm. /// </summary> /// <param name="control">Control</param> public override void VerifyRenderingInServerForm(Control control) { if (!isSaved) { base.VerifyRenderingInServerForm(control); } }
public void InstantiateIn(Control container) { PlaceHolder templatePlaceHolder = new PlaceHolder(); container.Controls.Add(templatePlaceHolder); templatePlaceHolder.DataBinding += new EventHandler(DataBindTemplate); }
protected override bool FilterControl (Control control) { if (control is WebControl) return true; return false; }
public TreeNode(Control control) { Control = control; Type = control.GetType().Name; var classesChanged = Observable.FromEventPattern< NotifyCollectionChangedEventHandler, NotifyCollectionChangedEventArgs>( x => control.Classes.CollectionChanged += x, x => control.Classes.CollectionChanged -= x); classesChanged.Select(_ => Unit.Default) .StartWith(Unit.Default) .Subscribe(_ => { if (control.Classes.Count > 0) { Classes = "(" + string.Join(" ", control.Classes) + ")"; } else { Classes = string.Empty; } }); }
public static void DisplayScrollingCombatText(Unit unit, String text, ClientCommon.Font font) { Vector3 pos = Vector3.Project(unit.Position, Program.Instance.Device.Viewport.X, Program.Instance.Device.Viewport.Y, Program.Instance.Device.Viewport.Width, Program.Instance.Device.Viewport.Height, Program.Instance.Device.Viewport.MinZ, Program.Instance.Device.Viewport.MaxZ, GameScene.Camera.View * GameScene.Camera.Projection); Control f; scrollingCombatTexts.Add(new ScrollingCombatText { Timeout = 1, Unit = unit, Text = f = new Control(Program.Instance.InterfaceManager) { Size = new Vector2(300, 100), Background = new TextGraphic(Program.Instance.GlyphCache) { Text = text, Font = font, Anchor = Orientation.Bottom } } }); f.Position = pos - new Vector3(f.Size.X/2, f.Size.Y, 0); Program.Instance.InterfaceManager.Add(f); }
//------------------------------------------------------------------------------------------- public void DeleteCheckedItems(SqlTransaction transaction, Control parent) { //foreach (Control control in parent.Controls) //{ // if (control.GetType() == typeof(CheckBox)) // { // CheckBox item = (CheckBox)control; // if (item.Checked) // { // Guid itemId = new Guid(item.Attributes["datakey"]); // DataRowLookup reverseLookup = DatabaseHelper.Session.Get<DataRowLookup>(itemId); // if (reverseLookup != null) // { // SqlCommand command = new SqlCommand("delete from " + reverseLookup.TableName + " where id=@Id", wvvrdb.MSSQLDB); // command.Parameters.AddWithValue("Id", reverseLookup.RowId); // command.Transaction = transaction; // command.ExecuteNonQuery(); // } // string sql = "delete from system_datalinks where (object1=@object1 and object2=@object2) "; // sql += "or (object1=@object2 and object2=@object1)"; // SqlCommand dataLinks = new SqlCommand(sql, wvvrdb.MSSQLDB); // dataLinks.Parameters.AddWithValue("Object1", itemId); // dataLinks.Parameters.AddWithValue("Object2", new Guid(Request["id"])); // dataLinks.Transaction = transaction; // dataLinks.ExecuteNonQuery(); // } // } // if (control.HasControls()) // { // DeleteCheckedItems(transaction, control); // } //} }
public void Evaluate(GameTime gameTime, Control focused, UserInterface ui) { ui.FindControls(Position, _controls); foreach (var item in _cooled) item.HeatCount--; foreach (var item in _warmed) item.HeatCount++; var type = typeof(MouseDevice); for (int i = 0; i < _controls.Count; i++) { _controls[i].Gestures.Evaluate(gameTime, this); if (_controls[i].Gestures.BlockedDevices.Contains(type)) break; } ui.EvaluateGlobalGestures(gameTime, this); _previous.Clear(); _previous.AddRange(_controls); _blocked.Clear(); _controls.Clear(); }
public MainWindow() { InitializeComponent(); stackControls.Visibility = Visibility.Hidden; Control = new Control(); }
/// <summary> /// Returns <see langword="true"/> if the instance can render <paramref name="control"/>; otherwise <see langword="false"/>. /// </summary> /// <param name="control">The control to be rendered.</param> /// <returns><see langword="true"/> if the instance can render <paramref name="control"/>; otherwise <see langword="false"/>.</returns> public override bool CanRender(Control control) { Type controlType = control.GetType(); return controlType == typeof(HeadingControl) || controlType == typeof(LabelControl) || controlType == typeof(HtmlControl); }
public static void SuspendDrawing(Control c) { if (c == null) throw new ArgumentNullException("c"); WindowsApiMethods.SendMessage(c.Handle, (Int32)WM_SETREDRAW, (Int32)0, (Int32)0); }
public AddComponentView(Sidebar sidebar, Control parent, int Left, int Top, int Height) : base(sidebar, parent, Left, Top, false) { this.Height = Height; base.Initialize(); ItemCreator = Creator; ColorChangeOnSelect = false; Width = parent.Width - 15; sidebar.ui.detailedViews.Remove(this); lblCompName = new Label(manager); lblCompName.Init(); lblCompName.Parent = parent; lblCompName.Width = 400; //lblCompName.Height = 250; lblCompName.Top = backPanel.Height + Top; lblCompName.Left = 10; lblCompName.Text = ""; lblCompName.TextColor = UserInterface.TomShanePuke; lblDescription = new Label(manager); lblDescription.Init(); lblDescription.Parent = parent; lblDescription.Width = 400; lblDescription.Top = lblCompName.Top + lblCompName.Height;//backPanel.Height + Top + 10; lblDescription.Left = 10; lblDescription.Height = 70; lblDescription.Text = "l"; }
public DialogResult ShowDialog(Control parent, MessageBoxButtons buttons) { var caption = Caption ?? ((parent != null && parent.ParentWindow != null) ? parent.ParentWindow.Title : null); SWF.Control c = (parent == null) ? null : (SWF.Control)parent.ControlObject; SWF.DialogResult result = SWF.MessageBox.Show(c, Text, caption, Convert(buttons), Convert(Type)); return Generator.Convert(result); }
void LayoutDockedChildren (Control parent, Control[] controls) { Rectangle space = parent.DisplayRectangle; MdiClient mdi = null; // Deal with docking; go through in reverse, MS docs say that lowest Z-order is closest to edge for (int i = controls.Length - 1; i >= 0; i--) { Control child = controls[i]; Size child_size = child.Size; if (child.AutoSize) child_size = GetPreferredControlSize (child); if (!child.VisibleInternal || child.ControlLayoutType == Control.LayoutType.Anchor) continue; // MdiClient never fills the whole area like other controls, have to do it later if (child is MdiClient) { mdi = (MdiClient)child; continue; } switch (child.Dock) { case DockStyle.None: // Do nothing break; case DockStyle.Left: child.SetBoundsInternal (space.Left, space.Y, child_size.Width, space.Height, BoundsSpecified.None); space.X += child.Width; space.Width -= child.Width; break; case DockStyle.Top: child.SetBoundsInternal (space.Left, space.Y, space.Width, child_size.Height, BoundsSpecified.None); space.Y += child.Height; space.Height -= child.Height; break; case DockStyle.Right: child.SetBoundsInternal (space.Right - child_size.Width, space.Y, child_size.Width, space.Height, BoundsSpecified.None); space.Width -= child.Width; break; case DockStyle.Bottom: child.SetBoundsInternal (space.Left, space.Bottom - child_size.Height, space.Width, child_size.Height, BoundsSpecified.None); space.Height -= child.Height; break; case DockStyle.Fill: child.SetBoundsInternal (space.Left, space.Top, space.Width, space.Height, BoundsSpecified.None); break; } } // MdiClient gets whatever space is left if (mdi != null) mdi.SetBoundsInternal (space.Left, space.Top, space.Width, space.Height, BoundsSpecified.None); }
public SkinBuilder (ThemeProvider provider, Control control, ControlBuilder skinBuilder, string themePath) { throw new NotImplementedException (); }
/// <summary> /// Initializes a new instance of the <see cref="ImageBox"/> class. /// </summary> /// <param name="parent">This controls parent control.</param> /// <param name="texture">The texture.</param> /// <param name="colour">The colour.</param> /// <param name="sourceRectangle">The source rectangle.</param> public ImageBox(Control parent, Texture2D texture, Color colour, Rectangle? sourceRectangle) : base(parent) { Texture = texture; SourceRectangle = sourceRectangle; Colour = colour; }
protected override void AddedControl(Control control, int index) { if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1) this.Page.ClientTarget = "uplevel"; base.AddedControl(control, index); }
public TextureGumpling(Control owner, int page, int x, int y, int width, int height) : base(owner, page) { Position = new Point(x, y); Size = new Point(width, height); HandlesMouseInput = true; }
//Overwrite InstantiateIn() method of ITemplate interface. public void InstantiateIn(Control container) { if (Page == 1) { //Code to create the ItemTemplate and its field. if (myListItemType == ListItemType.Item) { Label lbl = new Label(); lbl.ID = "LblAttendanceType" + subjectID + subscript; lbl.Text = text; container.Controls.Add(lbl); } } else { //Code to create the ItemTemplate and its field. if (myListItemType == ListItemType.Item) { Label lbl = new Label(); lbl.ID = "LblAttendanceType" + date + lectureID; lbl.Text = "fedfesgdsg"; container.Controls.Add(lbl); } } }
protected void DrawGridFooter(HtmlTextWriter output, Control ctl) { for (int i = 1; i < 4; i++) { output.Write("<tr>"); output.Write("<td height='22'>预选"); output.Write(i.ToString() + "</td>"); output.Write("<td bgcolor='#ffffff'> </td>"); output.Write("<td bgcolor='#ffffff'> </td>"); for (int k = 0; k < 0x1c; k++) { output.Write("<td bgcolor='#fdfcdf' onClick=Style(this,'#ff0000','#fdfcdf') style='color:#fdfcdf; cursor:pointer;' ><strong>"); output.Write(k.ToString() + "</td>"); } } output.Write("<tr align='center' valign='center' bgcolor='#e8f1f8' height='18px'>"); output.Write("<td rowspan='3' >期号</td>"); output.Write("<td rowspan='3' >开奖号码</td>"); output.Write("<td rowspan='2' >和值</td>"); for (int j = 0; j < 0x1c; j++) { output.Write("<td ><font color='blue'>"); output.Write(j.ToString() + "</font></td>"); } output.Write("<tr align='center' valign='middle' bgcolor='#e8f1f8' >"); output.Write("<td colspan='28' height='18px'>位置分布</td>"); output.Write("<tr align='center' valign='middle' bgcolor='#e8f1f8'>"); output.Write("<td colspan='29' height='18px'><strong><font color='red'>和值走势</font></strong></td>"); }
public static TableLayoutPanel GetStacked(Control[] controls, string[] widths) { TableLayoutPanel layout = new TableLayoutPanel(); layout.Dock = DockStyle.Fill; layout.ColumnCount = 1; layout.RowCount = controls.Length; foreach (string width in widths) { float val = 0F; SizeType tp = SizeType.Absolute; if (width.EndsWith("%")) { val = (float) Convert.ToDouble(width.Remove(width.Length - 1)); tp = SizeType.Percent; } else { val = (float) Convert.ToDouble(width); } layout.RowStyles.Add(new RowStyle(tp, val)); } foreach (Control c in controls) { c.Dock = DockStyle.Fill; layout.Controls.Add(c); } return layout; }
public virtual void SetObject(Control control, object data) { if (control == null) { throw new ArgumentNullException("control"); } CallbackMethod.Invoke(control, new object[] {data}); }
public ControlInvokation(Token Source, Control Control, List<Node> Arguments, Node Body) : base(Source) { this.Control = Control; this.Arguments = Arguments; this.Body = Body; }
/// <summary> /// Init. /// </summary> public ControlAdapter(Control control) : base(PerspexAdapter.Instance) { ArgChecker.AssertArgNotNull(control, "control"); _control = control; }
private void DrawGridFooter(HtmlTextWriter output, Control ctl) { int num = this.RadioSelete(); output.Write("<td width = '100px' height='50px'>"); output.Write("出现次数</td>"); output.Write("<td width = '100px'>"); output.Write(" </td>"); for (int i = 2; i < this.GridView1.Columns.Count; i++) { int num3 = 0; for (int j = 0; j < this.GridView1.Rows.Count; j++) { if ((this.GridView1.Rows[j].Cells[i].Text == "0") || (this.GridView1.Rows[j].Cells[i].Text == "1")) { //num3 = num3; this.num[i - 2] = num3; this.sum[i - 2] = (num3 * 50) / num; } if ((((this.GridView1.Rows[j].Cells[i].Text == "2") || (this.GridView1.Rows[j].Cells[i].Text == "3")) || ((this.GridView1.Rows[j].Cells[i].Text == "4") || (this.GridView1.Rows[j].Cells[i].Text == "5"))) || ((this.GridView1.Rows[j].Cells[i].Text == "6") || (this.GridView1.Rows[j].Cells[i].Text == "7"))) { num3++; this.num[i - 2] = num3; this.sum[i - 2] = (num3 * 50) / num; } } output.Write("<td align='center' valign='bottom'>"); output.Write(this.num[i - 2].ToString() + "<br><img src='../image/01[1].gif' height='" + this.sum[i - 2].ToString() + "px' title = '" + this.num[i - 2].ToString() + "' width= '8px'></td>"); } }
public ATIGPU(string name, int adapterIndex, int busNumber, int deviceNumber, ISettings settings) : base(name, new Identifier("atigpu", adapterIndex.ToString(CultureInfo.InvariantCulture)), settings) { this.adapterIndex = adapterIndex; this.busNumber = busNumber; this.deviceNumber = deviceNumber; this.temperature = new Sensor("GPU Core", 0, SensorType.Temperature, this, settings); this.fan = new Sensor("GPU Fan", 0, SensorType.Fan, this, settings); this.coreClock = new Sensor("GPU Core", 0, SensorType.Clock, this, settings); this.memoryClock = new Sensor("GPU Memory", 1, SensorType.Clock, this, settings); this.coreVoltage = new Sensor("GPU Core", 0, SensorType.Voltage, this, settings); this.coreLoad = new Sensor("GPU Core", 0, SensorType.Load, this, settings); this.controlSensor = new Sensor("GPU Fan", 0, SensorType.Control, this, settings); ADLOD6ThermalControllerCaps adltcc = new ADLOD6ThermalControllerCaps(); if (ADL.ADL_Overdrive6_ThermalController_Caps(adapterIndex, ref adltcc) != ADL.ADL_OK) { adltcc.iFanMinPercent = 0; adltcc.iFanMaxPercent = 100; } this.fanControl = new Control(controlSensor, settings, adltcc.iFanMinPercent, adltcc.iFanMaxPercent); this.fanControl.ControlModeChanged += ControlModeChanged; this.fanControl.SoftwareControlValueChanged += SoftwareControlValueChanged; ControlModeChanged(fanControl); this.controlSensor.Control = fanControl; Update(); }
/// <summary> /// Redondea un objeto que hereda de Control /// _BoarderRaduis can be adjusted to your needs, try 15 to start. /// </summary> /// <param name="pControl"></param> public static void Round(Control pControl) { System.IntPtr ptr = WindowDllImport.CreateRoundRectRgn(0, 0, pControl.Width, pControl.Height, 50, 50); pControl.Region = System.Drawing.Region.FromHrgn(ptr); WindowDllImport.DeleteObject(ptr); }
protected virtual void BindProperties(Control target, string targetProperty, string sourceProperty) { BindProperties(target, targetProperty, sourceProperty, DataSourceUpdateMode.OnPropertyChanged); }
public static Win32_Handle_Hijack add_Handle_HijackGui(this Control hostPanel) { return hostPanel.add_Control<Win32_Handle_Hijack>();; }
public bool OnPreKeyEvent(IWebBrowser browserControl, CefSharp.IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut) { const int WM_SYSKEYDOWN = 0x104; const int WM_KEYDOWN = 0x100; const int WM_KEYUP = 0x101; const int WM_SYSKEYUP = 0x105; const int WM_CHAR = 0x102; const int WM_SYSCHAR = 0x106; const int VK_TAB = 0x9; bool result = false; isKeyboardShortcut = false; // Don't deal with TABs by default: // TODO: Are there any additional ones we need to be careful of? // i.e. Escape, Return, etc...? if (windowsKeyCode == VK_TAB) { return result; } Control control = browserControl as Control; int msgType = 0; switch (type) { case KeyType.RawKeyDown: if (isSystemKey) { msgType = WM_SYSKEYDOWN; } else { msgType = WM_KEYDOWN; } break; case KeyType.KeyUp: if (isSystemKey) { msgType = WM_SYSKEYUP; } else { msgType = WM_KEYUP; } break; case KeyType.Char: if (isSystemKey) { msgType = WM_SYSCHAR; } else { msgType = WM_CHAR; } break; default: break; } // We have to adapt from CEF's UI thread message loop to our fronting WinForm control here. // So, we have to make some calls that Application.Run usually ends up handling for us: PreProcessControlState state = PreProcessControlState.MessageNotNeeded; // We can't use BeginInvoke here, because we need the results for the return value // and isKeyboardShortcut. In theory this shouldn't deadlock, because // atm this is the only synchronous operation between the two threads. control.Invoke(new Action(() => { Message msg = new Message() { HWnd = control.Handle, Msg = msgType, WParam = new IntPtr(windowsKeyCode), LParam = new IntPtr(nativeKeyCode) }; // First comes Application.AddMessageFilter related processing: // 99.9% of the time in WinForms this doesn't do anything interesting. bool processed = Application.FilterMessage(ref msg); if (processed) { state = PreProcessControlState.MessageProcessed; } else { // Next we see if our control (or one of its parents) // wants first crack at the message via several possible Control methods. // This includes things like Mnemonics/Accelerators/Menu Shortcuts/etc... state = control.PreProcessControlMessage(ref msg); } })); if (state == PreProcessControlState.MessageNeeded) { // TODO: Determine how to track MessageNeeded for OnKeyEvent. isKeyboardShortcut = true; } else if (state == PreProcessControlState.MessageProcessed) { // Most of the interesting cases get processed by PreProcessControlMessage. result = true; } return result; }
public override void Remove(Control control) { base.Remove(control); clientArea.Remove(control); }
/// <param name="control">Child control to add to the clip control.</param> /// <summary> /// Adds a child control to the clip box. /// </summary> public override void Add(Control control) { Add(control, true); }
private void mouse_Move(object sender, MouseEventArgs e) { bool draw = false; bool drag = false; bool resize = false; Control source = (Control)sender; Point screen = source.PointToScreen(new Point(e.X, e.Y)); Point ClickPoint = PointToClient(screen); if (selectionOn) { CursorPosition(ClickPoint); } else { this.Cursor = Cursors.Arrow; } if (selectingArea && selectionOn) { if (ClickPoint.X > source.Width) { Cursor.Position = new Point(Cursor.Position.X - 1, Cursor.Position.Y); } if (ClickPoint.X < 0) { Cursor.Position = new Point(Cursor.Position.X + 1, Cursor.Position.Y); } if (ClickPoint.Y > source.Height) { Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y - 1); } if (ClickPoint.Y < 0) { Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y + 1); } if (LeftButtonDown && !RectangleDrawn) { draw = true; } if (RectangleDrawn) { if (CurrentAction == ClickAction.Dragging) { drag = true; draw = false; } if (CurrentAction != ClickAction.Dragging && CurrentAction != ClickAction.Outside) { resize = true; drag = false; draw = false; } } if (draw || drag || resize) { source.Refresh(); if (draw) { DrawSelection(ClickPoint); } if (drag) { DragSelection(ClickPoint, source.Width, source.Height); } if (resize) { ResizeSelection(ClickPoint, source.Width, source.Height); } } } else { if (rectDrawn) { source.Refresh(); drawRect ( CameraRig.ConnectedCameras[CameraRig.ConfigCam].cam.rectX, CameraRig.ConnectedCameras[CameraRig.ConfigCam].cam.rectY, CameraRig.ConnectedCameras[CameraRig.ConfigCam].cam.rectWidth, CameraRig.ConnectedCameras[CameraRig.ConfigCam].cam.rectHeight ); rectDrawn = false; } } }
public void ScrollControlIntoView(Control activeControl) { }
public void Show(Control control, System.Drawing.Point position, ToolStripDropDownDirection direction) { }
/// <summary> /// Check whether a control has the default value for a property. /// </summary> /// <param name="control">The control to check.</param> /// <param name="property">The property to check.</param> /// <returns> /// True if the property has the default value; false otherwise. /// </returns> private static bool HasDefaultValue(Control control, DependencyProperty property) { Debug.Assert(control != null, "control should not be null!"); Debug.Assert(property != null, "property should not be null!"); return(control.ReadLocalValue(property) == DependencyProperty.UnsetValue); }
public void Show(Control control, System.Drawing.Point position) { }
public void Show(Control control, int x, int y) { }
public bool SelectNextControl(Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) { }
public Control GetNextControl(Control ctl, bool forward) { }
private void UpdateKeyboard() { Control.ApplyKeyboard(Element.Keyboard); }
public bool Contains(Control ctl) { }
/// <summary> /// Indicates whether the specified control can be a child of the control managed by a designer. /// </summary> /// <param name="control">The Control to test.</param> /// <returns>true if the specified control can be a child of the control managed by this designer; otherwise, false.</returns> public override bool CanParent(Control control) { // We never allow anything to be added to the split container return(false); }
public void PerformLayout(Control affectedControl, string affectedProperty) { }
public void AddUnRequriedTextItem(Control control, string regex, string regexErrorMessage) { validater.AddUnRequiredTextItem(control, regex, regexErrorMessage); }
private void PopulateLabels() { Control c = Master.FindControl("Breadcrumbs"); if (c != null) { BreadcrumbsControl crumbs = (BreadcrumbsControl)c; crumbs.ForceShowBreadcrumbs = true; } Title = SiteUtils.FormatPageTitle(siteSettings, CurrentPage.PageName + " - " + WebStoreResources.ConfirmOrderHeading); heading.Text = WebStoreResources.ConfirmOrderHeading; litCartHeader.Text = WebStoreResources.CartHeader; SignInOrRegisterPrompt signinPrompt = srPrompt as SignInOrRegisterPrompt; if (canCheckoutWithoutAuthentication) { signinPrompt.Instructions = WebStoreResources.CheckoutSuggestLoginOrRegisterMessage; } else { signinPrompt.Instructions = WebStoreResources.CheckoutRequiresLoginOrRegisterMessage; } litOr.Text = WebStoreResources.LiteralOr; lnkCopyCustomerToBilling.Text = WebStoreResources.CopyCustomerToBillingLink; lnkCopyCustomerToBilling.ToolTip = WebStoreResources.CopyCustomerToBillingLink; lnkCopyCustomerToShipping.Text = WebStoreResources.CopyCustomerToShippingLink; lnkCopyCustomerToShipping.ToolTip = WebStoreResources.CopyCustomerToShippingLink; lnkCopyBillingToShipping.Text = WebStoreResources.CopyBillingToShippingLink; lnkCopyBillingToShipping.ToolTip = WebStoreResources.CopyBillingToShippingLink; reqBillingAddress1.Text = WebStoreResources.RequiredFieldSymbol; reqBillingAddress1.ErrorMessage = WebStoreResources.BillingAddress1RequiredMessage; reqBillingCity.Text = WebStoreResources.RequiredFieldSymbol; reqBillingCity.ErrorMessage = WebStoreResources.BillingCityRequiredMessage; reqBillingFirstName.Text = WebStoreResources.RequiredFieldSymbol; reqBillingFirstName.ErrorMessage = WebStoreResources.BillingFirstNameRequiredMessage; reqBillingLastName.Text = WebStoreResources.RequiredFieldSymbol; reqBillingLastName.ErrorMessage = WebStoreResources.BillingLastNameRequiredMessage; reqBillingPostalCode.Text = WebStoreResources.RequiredFieldSymbol; reqBillingPostalCode.ErrorMessage = WebStoreResources.BillingPostalCodeRequiredMessage; reqCustomerAddress1.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerAddress1.ErrorMessage = WebStoreResources.CustomerAddress1RequiredMessage; reqCustomerCity.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerCity.ErrorMessage = WebStoreResources.CustomerCityRequiredMessage; reqCustomerDayPhone.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerDayPhone.ErrorMessage = WebStoreResources.CustomerDayPhoneRequiredMessage; reqCustomerEmail.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerEmail.ErrorMessage = WebStoreResources.CustomerEmailRequiredMessage; reqCustomerFirstName.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerFirstName.ErrorMessage = WebStoreResources.CustomerFirstNameRequiredMessage; reqCustomerLastName.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerLastName.ErrorMessage = WebStoreResources.CustomerLastNameRequiredMessage; reqCustomerPostalCode.Text = WebStoreResources.RequiredFieldSymbol; reqCustomerPostalCode.ErrorMessage = WebStoreResources.CustomerPostalCodeRequiredMessage; reqDeliveryAddress1.Text = WebStoreResources.RequiredFieldSymbol; reqDeliveryAddress1.ErrorMessage = WebStoreResources.DeliveryAddress1RequiredMessage; reqDeliveryCity.Text = WebStoreResources.RequiredFieldSymbol; reqDeliveryCity.ErrorMessage = WebStoreResources.DeliveryCityRequiredMessage; reqDeliveryFirstName.Text = WebStoreResources.RequiredFieldSymbol; reqDeliveryFirstName.ErrorMessage = WebStoreResources.DeliveryFirstNameRequiredMessage; reqDeliveryLastName.Text = WebStoreResources.RequiredFieldSymbol; reqDeliveryLastName.ErrorMessage = WebStoreResources.DeliveryLastNameRequiredMessage; reqDeliveryPostalCode.Text = WebStoreResources.RequiredFieldSymbol; reqDeliveryPostalCode.ErrorMessage = WebStoreResources.DeliveryPostalCodeRequiredMessage; regexCustomerEmail.Text = WebStoreResources.RequiredFieldSymbol; regexCustomerEmail.ErrorMessage = WebStoreResources.CustomerEmailRegexFailureMessage; btnSaveAndValidate.Text = WebStoreResources.UpdateCustomerButton; btnContinue.Text = WebStoreResources.ContinueButton; btnGoogleCheckout.UseHttps = SiteUtils.SslIsAvailable(); lnkCart.PageID = pageId; lnkCart.ModuleID = moduleId; }
/// <summary> /// Constructor with starting color blend and starting position beneath specified control. /// </summary> /// <param name="blend">Starting color blend.</param> /// <param name="c">Control beneath which the dialog should be placed.</param> public ColorGradientEditorDialog(ColorBlend blend, Control c) { InitializeComponent(); colorGradientEditor.Blend = blend; Utils.SetStartPositionBelowControl(this, c); }
/// <summary> /// Initialize a new instance of the ViewContext class. /// </summary> /// <param name="control">Control associated with rendering.</param> /// <param name="renderer">Rendering provider.</param> public ViewLayoutContext(Control control, IRenderer renderer) : this(null, control, control, null, renderer, control.Size) { }
public FormField(Control parentCntrl) { FieldType = new FormFieldType(); this._name = ""; this._visible = true; this._enabled = true; this._title = ""; //this._toolTip = ""; this._parent = null; this._readOnly = false; this._parentControl = parentCntrl; this._choiceList = null; this._item = new TextBox(); this._methodName = ""; this._thisScript = null; this._methodNameDblClick = ""; this._thisScriptDblClick = null; this._methodOnChoice = ""; this._scriptOnChoice = null; this._methodOnKeyDown = ""; this._scriptOnKeyDown = null; //# По умолчанию поле ввода (обычный TextBox) this._formFieldType = 0; //# Создаем контейнер для элемента формы _panelMainContainer = new Panel(); _panelTitleContainer = new Panel(); _panelControlContainer = new Panel(); _panelMainContainer.Controls.Add(_panelControlContainer); _panelMainContainer.Controls.Add(_panelTitleContainer); _panelTitleContainer.Dock = DockStyle.Left; _panelTitleContainer.MinimumSize = new Size(10, 21); _panelTitleContainer.AutoSize = true; _panelTitleContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; _label = new Label(); _panelTitleContainer.Controls.Add(_label); _label.AutoSize = true; _label.Dock = DockStyle.Fill; //# Установка параметров панели для поля с данными _panelControlContainer.MinimumSize = new Size(10, 21); _panelControlContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; _panelControlContainer.AutoSize = true; _panelControlContainer.Dock = DockStyle.Fill; this._parentControl.Controls.Add(_panelMainContainer); _panelMainContainer.Dock = DockStyle.Top; _panelMainContainer.MinimumSize = new Size(150, 22); _panelMainContainer.AutoSize = true; _panelMainContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; _panelMainContainer.BringToFront(); }
public void AddRequiredTextItem(Control control, string requiredErrorMessage) { validater.AddRequiredTextItem(control, requiredErrorMessage); }
private void HandleMouseButton(ButtonState buttonState, ButtonState newState, MouseButton button, PointF position, Control control, Action <Control, MouseEventArgs> action) { if (buttonState != newState || MouseButtonStates[button] == newState) { return; } MouseButtonStates[button] = newState; var args = new MouseEventArgs(position, button); VisualTreeHelper.IterateVisualTree(control, args, (c, a) => c.BoundingRect.Contains(a.Position), action, null ); }
public void ShowMenu(Control control, Point location) { _tabMenu.Show(control, location); }
public override void VerifyRenderingInServerForm(Control control) { }
public override object GetItem(int row) { var item = Control.ItemAtRow(row) as EtoTreeItem; return(item != null ? item.Item : null); }
public static void InsertAfter(this Control.ControlCollection controls, Control after, Control newCtrl) { var newIndex = controls.Count; controls.Add(newCtrl); if (after != null) { var index = 0; foreach (var ctrl in controls) { if (ctrl == after) { break; } index++; } if (index < newIndex) { controls.SetChildIndex(newCtrl, index + 1); } } }
/// <summary>Registriert einen neuen Überprüfungseintrag.</summary> protected void registerValidationEntry(Control control, validationTypes validationType, string friendlyName) { registerValidationEntry(control, validationType, friendlyName, validationEntry.defaultValidationPropertyName); }