public ResponseDetail AddColorDetails(ColorDetails model) { ResponseDetail objResponse = new ResponseDetail(); objResponse = objProductRepository.AddColorDetails(model); return(objResponse); }
private void ShowColorForm() { ColorDetails Itm = new ColorDetails(); Itm.TopLevel = false; this.Controls.Add(Itm); Itm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; Itm.Dock = DockStyle.Fill; Itm.BringToFront(); Itm.Show(); }
/// <summary> /// Initializes a new instance of the ButtonWithStyle class. /// </summary> public ButtonWithStyle() { // NAG processing NAG.NAG_Start(); // Prevent drawing flicker by blitting from memory in WM_PAINT SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.ResizeRedraw, true); // Prevent base class from trying to generate double click events and // so testing clicks against the double click time and rectangle. Getting // rid of this allows the user to press then button very quickly. SetStyle(ControlStyles.StandardDoubleClick, false); // Should not be allowed to select this control SetStyle(ControlStyles.Selectable, false); // We do not want a mouse up to always cause a click, we decide that SetStyle(ControlStyles.StandardClick, false); // We are happy to allow a transparent background color SetStyle(ControlStyles.SupportsTransparentBackColor, true); // Set initial state _image = new CommandImage(); _mouseOver = false; _staticIDE = false; _mouseCapture = false; _mouseButton = MouseButtons.None; _colorDetails = new ColorDetails(); // Update with the tracking colors for the IDE style _colorDetails.DefineTrackColors(SystemColors.Highlight); // We need to know when our text changes TextChanged += new EventHandler(OnTextChanged); // Reset all properties to default values ResetImage(); ResetStyle(); ResetDirection(); ResetTextEdge(); ResetButtonStyle(); ResetPushed(); ResetBackColor(); ResetAlwaysDrawEnabled(); ResetAlwaysDrawBorder(); ResetOffice2003GradBack(); ResetIDE2005GradBack(); }
public ActionResult SaveColorMaster(ColorDetails model) { ResponseDetail objResponse = new ResponseDetail(); if (model != null) { objResponse = objProductManager.AddColorDetails(model); //Added log string hostName = Dns.GetHostName(); string myIP = Dns.GetHostEntry(hostName).AddressList[0].ToString(); string currentDate = DateTime.Now.ToString("yyyyMMddHHmmssfff"); objLogManager.SaveLog(Session["LoginUser"] as User, model.IsAdd + " Color -" + model.ColorName, myIP + currentDate); } return(Json(objResponse, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Initialize a new instance of the OfficeExtender class. /// </summary> public OfficeExtender() { // List of controls being managed _controls = new Hashtable(); // Helper for Office2003 colors _colorDetails = new ColorDetails(); // Need to know when system colors change Microsoft.Win32.SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(OnPreferenceChanged); // Required for Windows.Forms Class Composition Designer support InitializeComponent(); }
/// <summary> /// Initializes a new instance of the ResizeBar class. /// </summary> /// <param name="direction">Direction for resizing.</param> /// <param name="resizeSource">Source of additional information.</param> public ResizeBar(LayoutDirection direction, IResizeSource resizeSource) { // Define initial state _direction = direction; _resizing = false; _resizeSource = resizeSource; _colorDetails = new ColorDetails(); // Always default to Control color this.BackColor = _resizeSource.ResizeBarColor; this.ForeColor = SystemColors.ControlText; UpdateStyle(_resizeSource.Style); // We need to know when the system colours have changed Microsoft.Win32.SystemEvents.UserPreferenceChanged += new Microsoft.Win32.UserPreferenceChangedEventHandler(OnUserPreferenceChanged); }
/// <summary> /// Initializes a new instance of the StatusBarControl class. /// </summary> public StatusBarControl() { // NAG processing NAG.NAG_Start(); // Prevent drawing flicker by blitting from memory in WM_PAINT SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); // Should not be allowed to select this control SetStyle(ControlStyles.Selectable, false); // Create collection to hold panels _panels = new StatusPanelCollection(); // Hook into collection changes _panels.Inserted += new CollectionChange(OnPanelInserted); _panels.Removed += new CollectionChange(OnPanelRemoved); _panels.Clearing += new CollectionClear(OnPanelsClearing); _panels.Cleared += new CollectionClear(OnPanelsCleared); // Create helper for drawing themes _colorDetails = new ColorDetails(); // Background color is defaulted _defaultBackColor = true; ResetBackColor(); ResetStyle(); ResetSizingGrip(); ResetDock(); ResetPadLeft(); ResetPadRight(); ResetPadTop(); ResetPadBottom(); ResetOffice2003GradBack(); ResetIDE2005GradBack(); // Set default height of control to be the font plus 4 pixels for panel // border control and also the padding at top and bottom this.Height = Font.Height + PadTop + PadBottom + 4; }
public ActionResult ColorMaster() { ColorDetails objCategoryModel = new ColorDetails(); objCategoryModel.IsAdd = "Add"; objCategoryModel.IsActive = true; var AccessTo = new UserController().UserCanAccess((Session["LoginUser"] as User).UserId, "ColorMaster"); if (!string.IsNullOrEmpty(AccessTo)) { ViewBag.UserCanAccess = AccessTo; return(View(objCategoryModel)); } else { return(RedirectToAction("Dashboard", "Home")); } }
/// <summary> /// Initializes a new instance of the TabStub class. /// </summary> /// <param name="style">Visual style for drawing.</param> /// <param name="stubsShowAll">Initial stubs value.</param> private TabStub(VisualStyle style, bool stubsShowAll) { // Default state _wct = null; _style = style; _hoverOver = -1; _hoverItem = -1; _selectedIndex = -1; _defaultFont = true; _defaultColor = true; _stubsShowAll = stubsShowAll; _edge = Edge.None; _drawTabs = new ArrayList(); _tabPages = new TabPageCollection(); _colorDetails = new ColorDetails(); _colorDetails.Style = _style; base.Font = new Font(SystemInformation.MenuFont, FontStyle.Regular); // Hookup to collection events _tabPages.Cleared += new CollectionClear(OnClearedPages); _tabPages.Inserted += new CollectionChange(OnInsertedPage); _tabPages.Removing += new CollectionChange(OnRemovingPage); _tabPages.Removed += new CollectionChange(OnRemovedPage); // Need notification when the MenuFont is changed Microsoft.Win32.SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(OnPreferenceChanged); // Default default colors DefineBackColor(SystemColors.Control); // Create the Timer for handling hovering over items _hoverTimer = new Timer(); _hoverTimer.Interval = _hoverInterval; _hoverTimer.Tick += new EventHandler(OnTimerExpire); }