Beispiel #1
0
        /// <summary>
        /// <para>Process a color theme change for this widget.</para>
        /// </summary>
        public override void ThemeChange()
        {
            // Pass the theme change on to all of the child widgets.
            base.ThemeChange();

            // Change the background pixel to match the new theme
            // settings, and then force a repaint on the widget.
            try
            {
                IntPtr        display = dpy.Lock();
                XWindow       window  = GetWidgetHandle();
                StandardColor sc      = background.Index;
                if (sc != StandardColor.Inherit &&
                    sc != StandardColor.Pixmap &&
                    sc != StandardColor.RGB)
                {
                    Xlib.XSetWindowBackground
                        (display, window, ToPixel(background));
                }
                if (mapped && AncestorsMapped)
                {
                    Xlib.XClearArea(display, window,
                                    0, 0, (uint)0, (uint)0,
                                    XBool.True);
                }
            }
            finally
            {
                dpy.Unlock();
            }
        }
Beispiel #2
0
    public void Add(StandardColor color)
    {
        var key = playerState.Keys.FirstOrDefault(k => k.Color == StandardColor.None);

        if (key != null)
        {
            key.Color        = color;
            key.Render.color = color.GetColor();
            key.GameObject.SetActive(true);
        }
    }
Beispiel #3
0
 // Expand a standard color into a full color value.
 internal Color ToColor(StandardColor color)
 {
     if (color > StandardColor.RGB && color < StandardColor.Last)
     {
         return(standardColors[((int)color) - 1]);
     }
     else
     {
         return(new Color(0x00, 0x00, 0x00));
     }
 }
Beispiel #4
0
 public static void OutputStandardColor(List <byte[]> data, StandardColor color, ExporterVersion version, ExporterVersion fcurveVersion, ExporterVersion gradientVersion)
 {
     OutputStandardColor(
         data,
         color.Type,
         color.Fixed,
         color.Random,
         color.Easing,
         version >= fcurveVersion ? color.FCurve : null,
         version >= gradientVersion ? color.Gradient : null);
 }
Beispiel #5
0
 public EmbedBuilder StandardGuildEmbed(SocketCommandContext Context, StandardColor color)
 {
     return(new EmbedBuilder
     {
         Author = new EmbedAuthorBuilder
         {
             IconUrl = Context.Guild.IconUrl,
             Name = Context.Guild.Name
         },
         Color = GetStandardColor(color)
     });
 }
Beispiel #6
0
        public Color GetStandardColor(StandardColor color)
        {
            switch (color)
            {
            case StandardColor.Success:
                return(new Color(67, 181, 129));

            case StandardColor.Failure:
            default:
                return(new Color(240, 71, 71));
            }
        }
        public override bool Update(NodeRoot rootNode)
        {
            Action <Data.NodeBase> convert = null;

            convert = (n) =>
            {
                var n_ = n as Data.Node;

                if (n_ != null && (n_.DrawingValues.Type.Value == Data.RendererValues.ParamaterType.Ribbon || n_.DrawingValues.Type.Value == Data.RendererValues.ParamaterType.Track))
                {
                    var rp = n_.DrawingValues;
                    rp.TrailSmoothing.SetValueDirectly(TrailSmoothingType.Disabled);
                    rp.TrailTimeSource.SetValueDirectly(TrailTimeSourceType.FirstParticle);
                }

                if (n_ != null && n_.DrawingValues.Type.Value == RendererValues.ParamaterType.Sprite)
                {
                    StandardColor sc = new StandardColor();
                    sc.Type   = n_.DrawingValues.Sprite.ColorAll;
                    sc.Fixed  = n_.DrawingValues.Sprite.ColorAll_Fixed;
                    sc.Random = n_.DrawingValues.Sprite.ColorAll_Random;
                    sc.Easing = n_.DrawingValues.Sprite.ColorAll_Easing;
                    sc.FCurve = n_.DrawingValues.Sprite.ColorAll_FCurve;
                    var text = Core.Copy("Temp", sc);
                    Core.Paste("Temp", n_.DrawingValues.ColorAll, text);
                }

                if (n_ != null && n_.DrawingValues.Type.Value == RendererValues.ParamaterType.Model)
                {
                    StandardColor sc = new StandardColor();
                    sc.Type   = n_.DrawingValues.Model.Color;
                    sc.Fixed  = n_.DrawingValues.Model.Color_Fixed;
                    sc.Random = n_.DrawingValues.Model.Color_Random;
                    sc.Easing = n_.DrawingValues.Model.Color_Easing;
                    sc.FCurve = n_.DrawingValues.Model.Color_FCurve;

                    var text = Core.Copy("Temp", sc);
                    Core.Paste("Temp", n_.DrawingValues.ColorAll, text);
                }

                for (int i = 0; i < n.Children.Count; i++)
                {
                    convert(n.Children[i]);
                }
            };

            convert(rootNode);

            return(true);
        }
Beispiel #8
0
    public Boolean Use(StandardColor color)
    {
        var key = playerState.Keys.FirstOrDefault(k => k.Color == color);

        if (key != null)
        {
            key.Color        = StandardColor.None;
            key.Render.color = key.Color.GetColor();
            key.GameObject.SetActive(false);

            return(true);
        }

        return(false);
    }
Beispiel #9
0
 /// <summary>
 /// <para>Constructs a new <see cref="T:Xsharp.Color"/> value
 /// from an index into a standardised palette.</para>
 /// </summary>
 ///
 /// <param name="index">
 /// <para>The index into the standard color palette.</para>
 /// </param>
 ///
 /// <remarks>
 /// <para>It is recommended that you use standard colors where
 /// possible, so that the application is sensitive to theme changes.</para>
 /// </remarks>
 public Color(StandardColor index)
 {
     value = (((uint)index) << 24);
 }
        public override bool Update(NodeRoot rootNode)
        {
            Action <Data.NodeBase> convert = null;

            convert = (n) =>
            {
                var n_ = n as Data.Node;

                if (n_ != null && n_.DrawingValues.Type.Value == RendererValues.ParamaterType.Track)
                {
                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorLeft;
                        sc.Fixed  = n_.DrawingValues.Track.ColorLeft_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorLeft_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorLeft_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorLeft_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorLeft, text);
                    }

                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorLeftMiddle;
                        sc.Fixed  = n_.DrawingValues.Track.ColorLeftMiddle_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorLeftMiddle_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorLeftMiddle_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorLeftMiddle_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorLeftMiddle, text);
                    }

                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorCenter;
                        sc.Fixed  = n_.DrawingValues.Track.ColorCenter_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorCenter_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorCenter_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorCenter_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorCenter, text);
                    }

                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorCenterMiddle;
                        sc.Fixed  = n_.DrawingValues.Track.ColorCenterMiddle_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorCenterMiddle_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorCenterMiddle_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorCenterMiddle_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorCenterMiddle, text);
                    }

                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorRight;
                        sc.Fixed  = n_.DrawingValues.Track.ColorRight_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorRight_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorRight_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorRight_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorRight, text);
                    }

                    {
                        StandardColor sc = new StandardColor();
                        sc.Type   = n_.DrawingValues.Track.ColorRightMiddle;
                        sc.Fixed  = n_.DrawingValues.Track.ColorRightMiddle_Fixed;
                        sc.Random = n_.DrawingValues.Track.ColorRightMiddle_Random;
                        sc.Easing = n_.DrawingValues.Track.ColorRightMiddle_Easing;
                        sc.FCurve = n_.DrawingValues.Track.ColorRightMiddle_FCurve;
                        var text = Core.Copy("Temp", sc);
                        Core.Paste("Temp", n_.DrawingValues.TrailColorRightMiddle, text);
                    }
                }

                for (int i = 0; i < n.Children.Count; i++)
                {
                    convert(n.Children[i]);
                }
            };

            convert(rootNode);

            return(true);
        }
Beispiel #11
0
 public PaginatedMessage StandardPaginatedMessage(SocketCommandContext Context, StandardColor color)
 {
     return(new PaginatedMessage
     {
         Author = new EmbedAuthorBuilder
         {
             IconUrl = Context.Guild.IconUrl,
             Name = Context.Guild.Name
         },
         Color = GetStandardColor(color),
         Options = new PaginatedAppearanceOptions
         {
             DisplayInformationIcon = false,
             Stop = new Emoji("❌")
         }
     });
 }
Beispiel #12
0
 public KeyWrapper(StandardColor color)
 {
     Color = color;
 }
Beispiel #13
0
	/// <summary>
	/// <para>Constructs a new <see cref="T:Xsharp.Color"/> value
	/// from an index into a standardised palette.</para>
	/// </summary>
	///
	/// <param name="index">
	/// <para>The index into the standard color palette.</para>
	/// </param>
	///
	/// <remarks>
	/// <para>It is recommended that you use standard colors where
	/// possible, so that the application is sensitive to theme changes.</para>
	/// </remarks>
	public Color(StandardColor index)
			{
				value = (((uint)index) << 24);
			}
Beispiel #14
0
        /// <summary>
        /// Adding Menu to Header
        /// </summary>
        protected override void ProcessMenus()
        {
            try
            {
                Footer.SoftwareLogo = "/images/BFS.gif";
                if (Request.Cookies["bfp_logo"] != null)
                {
                    if (Request.Cookies["bfp_logo"].Value != null)
                    {
                        Header.ClientLogo = "/images/" + Request.Cookies["bfp_logo"].Value;
                    }
                    else
                    {
                        Header.ClientLogo = "";
                    }
                }
                else
                {
                    Header.ClientLogo = "";
                }

                Link.Help.Instance.Visible      = false;
                Link.MyProfile.Instance.Visible = false;
                Link.Support.Instance.Visible   = false;
                Link.LogOff.Instance.Visible    = false;

                //Header.DisableGlobalNav = true;
                Header.ShowLeftBar       = false;
                Header.ShowRightBar      = false;
                Header.ShowSubMenuOnLeft = false;
                Header.ShowPageTitle     = true;
                Footer.VisibleLinks      = false;

                if (Request.IsAuthenticated && Header.MainMenuVisible)
                {
                    bool IsMode = false;
                    if (Request.Cookies["bfp_mode"] != null)
                    {
                        if (Request.Cookies["bfp_mode"].Value != null)
                        {
                            if (Request.Cookies["bfp_mode"].Value.Length > 0)
                            {
                                IsMode = true;
                            }
                        }
                    }

                    if (IsMode &&
                        Header.MainMenuSelectedItem == "Home" &&
                        (Request.Cookies["bfp_mode"].Value == "OperatorKiosk" ||
                         Request.Cookies["bfp_mode"].Value == "TechnicianMode"))
                    {
                        IsMode = false;
                    }
                    if (IsMode)
                    {
                        if (Request.Cookies["bfp_mode"].Value == "TechnicianMode")
                        {
                            Link.LogOff.Instance.Visible = false;
//							Link.LogOff.Instance.AltText = "Deactivate Technician Terminal";
//							Link.LogOff.Instance.Name = "Deactivate Technician Terminal";
//							Link.LogOff.Instance.Path = "/selectMode.aspx";

                            Header.MainMenuVisible = false;
                            if (Header.MainMenuSelectedItem != "&nbsp;Home&nbsp;")
                            {
                                Header.ShowLeftBar       = true;
                                Header.ShowRightBar      = true;
                                Header.ShowSubMenuOnLeft = true;
                                Micajah.Common.StandardColor myColor;

                                myColor = new StandardColor(Micajah.Common.StandardColorScheme.White);
                                Header.SubMenuBGColor = myColor;
                                //Header.AddSubMenuItem("Home", "/main.aspx", true);
                                Header.AddSubMenuItem("Work Orders", "", true);
                                Header.AddSubMenuItem("Create New Work Order", "/wo_default.aspx?select=AddOrder");
                                Header.AddSubMenuItem("Roadside Repair", "/wo_default.aspx?select=AddRoadside");
                                Header.AddSubMenuItem("Create Future Inspections", "/wo_showEquipsForInspect.aspx");
                                Header.AddSubMenuItem("Create Past Work Order", "/wo_default.aspx?select=AddPastOrder");
                                Header.AddSubMenuItem("View Work Orders", "", false);
                                Header.AddSubMenuItem("<nobr>Next 7 Days + Overdue</nobr>", "/wo_showOrdersForToday.aspx");
                                Header.AddSubMenuItem("Daily", "/wo_showOrdersForDaily.aspx");
                                Header.AddSubMenuItem("Weekly", "/wo_showOrdersForWeekly.aspx");
                                Header.AddSubMenuItem("Monthly", "/wo_showOrdersForMonthly.aspx");
                                Header.AddSubMenuItem("Service Completed", "/wo_showCompletedOrders.aspx");
                                Header.AddSubMenuItem("Scheduled", "/wo_showUnassignedOrders.aspx");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Equipments", "", true);
                                Header.AddSubMenuItem("View Equipment List", "/e_list.aspx");
                                Header.AddSubMenuItem("Add New Equipment", "/e_addEquip.aspx");
                                Header.AddSubMenuItem("Manage Reported Issues", "/wo_default.aspx?select=AddIssue");
                                Header.AddSubMenuItem("Change Temporary Operator", "/wo_default.aspx?select=ChangeTempOper");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Reports", "", true);
                                Header.AddSubMenuItem("Temporary Operator Assigment Report", "/e_viewTempOperatorReport.aspx");
                                Header.AddSubMenuItem("Equipment Work Order Report", "/wo_viewEquipWorkOrderReport.aspx");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Training", "", true);
                                Header.AddSubMenuItem("Adding PM and Inspections to a Work Order", "/t_OpenWorkOrder.htm");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Logoff", "", true);
                                Header.AddSubMenuItem("Deactivate Technician Terminal", "/selectMode.aspx");
                            }
                        }
                    }
                    else
                    {
                        if (Header.MainMenuSelectedItem != "Deactivate Operator Kiosk Terminal")
                        {
                            Link.LogOff.Instance.Visible = true;
                            Link.LogOff.Instance.AltText = "Logoff";
                            Link.LogOff.Instance.Name    = "Logoff";
                            Link.LogOff.Instance.Path    = "/default.aspx";

                            if (CheckPermission("selectMode.aspx"))
                            {
                                Header.AddMainMenuItem("Home", "/selectMode.aspx");
                            }
                            if (CheckPermission("admin.aspx"))
                            {
                                Header.AddMainMenuItem("Administration", "/admin.aspx");
                            }
//							if(CheckPermission("error_report.aspx"))
//								Header.AddMainMenuItem("Error Reports","/error_report.aspx");
//							if(CheckPermission("main.aspx"))
//								Header.AddMainMenuItem("Setup Technician Terminal","/main.aspx");
//							if(CheckPermission("ok_mainMenu.aspx"))
//								Header.AddMainMenuItem("Setup Operator Kiosk Terminal","/ok_mainMenu.aspx");
//							Header.AddMainMenuItem("Logoff","/default.aspx");

                            switch (Header.MainMenuSelectedItem)
                            {
                            case "Home":
                                break;

                            case "Administration":
                                Header.ShowLeftBar       = true;
                                Header.ShowRightBar      = true;
                                Header.ShowSubMenuOnLeft = true;
                                Micajah.Common.StandardColor myColor;

                                myColor = new StandardColor(Micajah.Common.StandardColorScheme.White);
                                Header.SubMenuBGColor = myColor;

                                Header.AddSubMenuItem("Inspections", "", true);
                                if (CheckPermission("admin_inspections.aspx"))
                                {
                                    Header.AddSubMenuItem("Inspections Manager", "/admin_inspections.aspx");
                                }
                                if (CheckPermission("admin_inspectschedules.aspx"))
                                {
                                    Header.AddSubMenuItem("Inspections Schedules Manager", "/admin_inspectschedules.aspx");
                                }
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Preventive Maintenances", "", true);
                                if (CheckPermission("admin_pmitems.aspx"))
                                {
                                    Header.AddSubMenuItem("PM Services Manager", "/admin_pmitems.aspx");
                                }
                                if (CheckPermission("admin_pmschedules.aspx"))
                                {
                                    Header.AddSubMenuItem("PM Schedules Manager", "/admin_pmschedules.aspx");
                                }
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Security", "", true);
                                if (CheckPermission("admin_permissions.aspx"))
                                {
                                    Header.AddSubMenuItem("Permissions Manager", "/admin_permissions.aspx");
                                }
                                if (CheckPermission("admin_groups.aspx"))
                                {
                                    Header.AddSubMenuItem("Groups Manager", "/admin_groups.aspx");
                                }
                                if (CheckPermission("admin_users.aspx"))
                                {
                                    Header.AddSubMenuItem("Users Manager", "/admin_users.aspx");
                                }
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Others", "", true);
                                if (CheckPermission("admin_holidays.aspx"))
                                {
                                    Header.AddSubMenuItem("<nobr>Holidays Date Manager</nobr>", "/admin_holidays.aspx");
                                }
                                if (CheckPermission("admin_kiosk_customtext.aspx"))
                                {
                                    Header.AddSubMenuItem("Kiosk Instruction Texts Manager", "/admin_kiosk_customtext.aspx");
                                }
                                break;

                            case "Error Reports":
                                break;

                            default:
                                Link.LogOff.Instance.Visible = false;
                                Header.ClientLogo            = "";
                                break;
                            }
                        }
                    }
                }
                else
                {
                    Header.MainMenuVisible = false;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #15
0
        /// <summary>
        /// Adding Menu to Header
        /// </summary>
        protected override void ProcessMenus()
        {
            try
            {
                Footer.SoftwareLogo = "/images/BFS.gif";
                if(Request.Cookies["bfp_logo"] != null)
                    if(Request.Cookies["bfp_logo"].Value != null)
                        Header.ClientLogo = "/images/" + Request.Cookies["bfp_logo"].Value;
                    else
                        Header.ClientLogo = "";
                else
                    Header.ClientLogo = "";

                Link.Help.Instance.Visible = false;
                Link.MyProfile.Instance.Visible = false;
                Link.Support.Instance.Visible = false;
                Link.LogOff.Instance.Visible = false;

                //Header.DisableGlobalNav = true;
                Header.ShowLeftBar=false;
                Header.ShowRightBar=false;
                Header.ShowSubMenuOnLeft = false;
                Header.ShowPageTitle = true;
                Footer.VisibleLinks = false;

                if(Request.IsAuthenticated && Header.MainMenuVisible)
                {
                    bool IsMode = false;
                    if(Request.Cookies["bfp_mode"] != null)
                        if(Request.Cookies["bfp_mode"].Value != null)
                            if(Request.Cookies["bfp_mode"].Value.Length > 0)
                                IsMode = true;

                    if(IsMode &&
                        Header.MainMenuSelectedItem == "Home" &&
                        (Request.Cookies["bfp_mode"].Value == "OperatorKiosk" ||
                        Request.Cookies["bfp_mode"].Value == "TechnicianMode"))
                        IsMode = false;
                    if(IsMode)
                    {
                        if(Request.Cookies["bfp_mode"].Value == "TechnicianMode")
                        {
                            Link.LogOff.Instance.Visible = false;
            //							Link.LogOff.Instance.AltText = "Deactivate Technician Terminal";
            //							Link.LogOff.Instance.Name = "Deactivate Technician Terminal";
            //							Link.LogOff.Instance.Path = "/selectMode.aspx";

                            Header.MainMenuVisible = false;
                            if(Header.MainMenuSelectedItem != "&nbsp;Home&nbsp;")
                            {
                                Header.ShowLeftBar = true;
                                Header.ShowRightBar = true;
                                Header.ShowSubMenuOnLeft = true;
                                Micajah.Common.StandardColor myColor;

                                myColor = new StandardColor(Micajah.Common.StandardColorScheme.White);
                                Header.SubMenuBGColor = myColor;
                                //Header.AddSubMenuItem("Home", "/main.aspx", true);
                                Header.AddSubMenuItem("Work Orders", "", true);
                                Header.AddSubMenuItem("Create New Work Order", "/wo_default.aspx?select=AddOrder");
                                Header.AddSubMenuItem("Roadside Repair", "/wo_default.aspx?select=AddRoadside");
                                Header.AddSubMenuItem("Create Future Inspections", "/wo_showEquipsForInspect.aspx");
                                Header.AddSubMenuItem("Create Past Work Order", "/wo_default.aspx?select=AddPastOrder");
                                Header.AddSubMenuItem("View Work Orders", "", false);
                                Header.AddSubMenuItem("<nobr>Next 7 Days + Overdue</nobr>", "/wo_showOrdersForToday.aspx");
                                Header.AddSubMenuItem("Daily", "/wo_showOrdersForDaily.aspx");
                                Header.AddSubMenuItem("Weekly", "/wo_showOrdersForWeekly.aspx");
                                Header.AddSubMenuItem("Monthly", "/wo_showOrdersForMonthly.aspx");
                                Header.AddSubMenuItem("Service Completed", "/wo_showCompletedOrders.aspx");
                                Header.AddSubMenuItem("Scheduled", "/wo_showUnassignedOrders.aspx");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Equipments", "", true);
                                Header.AddSubMenuItem("View Equipment List", "/e_list.aspx");
                                Header.AddSubMenuItem("Add New Equipment", "/e_addEquip.aspx");
                                Header.AddSubMenuItem("Manage Reported Issues", "/wo_default.aspx?select=AddIssue");
                                Header.AddSubMenuItem("Change Temporary Operator", "/wo_default.aspx?select=ChangeTempOper");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Reports", "", true);
                                Header.AddSubMenuItem("Temporary Operator Assigment Report", "/e_viewTempOperatorReport.aspx");
                                Header.AddSubMenuItem("Equipment Work Order Report", "/wo_viewEquipWorkOrderReport.aspx");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Training", "", true);
                                Header.AddSubMenuItem("Adding PM and Inspections to a Work Order", "/t_OpenWorkOrder.htm");
                                Header.AddSubMenuItemDivider();
                                Header.AddSubMenuItem("Logoff", "", true);
                                Header.AddSubMenuItem("Deactivate Technician Terminal", "/selectMode.aspx");
                            }
                        }
                    }
                    else
                    {
                        if(Header.MainMenuSelectedItem != "Deactivate Operator Kiosk Terminal")
                        {
                            Link.LogOff.Instance.Visible = true;
                            Link.LogOff.Instance.AltText = "Logoff";
                            Link.LogOff.Instance.Name = "Logoff";
                            Link.LogOff.Instance.Path = "/default.aspx";

                            if(CheckPermission("selectMode.aspx"))
                                Header.AddMainMenuItem("Home","/selectMode.aspx");
                            if(CheckPermission("admin.aspx"))
                                Header.AddMainMenuItem("Administration","/admin.aspx");
            //							if(CheckPermission("error_report.aspx"))
            //								Header.AddMainMenuItem("Error Reports","/error_report.aspx");
            //							if(CheckPermission("main.aspx"))
            //								Header.AddMainMenuItem("Setup Technician Terminal","/main.aspx");
            //							if(CheckPermission("ok_mainMenu.aspx"))
            //								Header.AddMainMenuItem("Setup Operator Kiosk Terminal","/ok_mainMenu.aspx");
            //							Header.AddMainMenuItem("Logoff","/default.aspx");

                            switch(Header.MainMenuSelectedItem)
                            {
                                case "Home":
                                    break;
                                case "Administration":
                                    Header.ShowLeftBar = true;
                                    Header.ShowRightBar = true;
                                    Header.ShowSubMenuOnLeft = true;
                                    Micajah.Common.StandardColor myColor;

                                    myColor = new StandardColor(Micajah.Common.StandardColorScheme.White);
                                    Header.SubMenuBGColor = myColor;

                                    Header.AddSubMenuItem("Inspections", "", true);
                                    if(CheckPermission("admin_inspections.aspx"))Header.AddSubMenuItem("Inspections Manager", "/admin_inspections.aspx");
                                    if(CheckPermission("admin_inspectschedules.aspx"))Header.AddSubMenuItem("Inspections Schedules Manager", "/admin_inspectschedules.aspx");
                                    Header.AddSubMenuItemDivider();
                                    Header.AddSubMenuItem("Preventive Maintenances", "", true);
                                    if(CheckPermission("admin_pmitems.aspx"))Header.AddSubMenuItem("PM Services Manager", "/admin_pmitems.aspx");
                                    if(CheckPermission("admin_pmschedules.aspx"))Header.AddSubMenuItem("PM Schedules Manager", "/admin_pmschedules.aspx");
                                    Header.AddSubMenuItemDivider();
                                    Header.AddSubMenuItem("Security", "", true);
                                    if(CheckPermission("admin_permissions.aspx"))Header.AddSubMenuItem("Permissions Manager", "/admin_permissions.aspx");
                                    if(CheckPermission("admin_groups.aspx"))Header.AddSubMenuItem("Groups Manager", "/admin_groups.aspx");
                                    if(CheckPermission("admin_users.aspx"))Header.AddSubMenuItem("Users Manager", "/admin_users.aspx");
                                    Header.AddSubMenuItemDivider();
                                    Header.AddSubMenuItem("Others", "", true);
                                    if(CheckPermission("admin_holidays.aspx"))Header.AddSubMenuItem("<nobr>Holidays Date Manager</nobr>", "/admin_holidays.aspx");
                                    if(CheckPermission("admin_kiosk_customtext.aspx"))Header.AddSubMenuItem("Kiosk Instruction Texts Manager", "/admin_kiosk_customtext.aspx");
                                    break;
                                case "Error Reports":
                                    break;
                                default:
                                    Link.LogOff.Instance.Visible = false;
                                    Header.ClientLogo = "";
                                    break;
                            }
                        }
                    }
                }
                else
                    Header.MainMenuVisible = false;
            }
            catch(Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #16
0
	// Expand a standard color into a full color value.
	internal Color ToColor(StandardColor color)
			{
				if(color > StandardColor.RGB && color < StandardColor.Last)
				{
					return standardColors[((int)color) - 1];
				}
				else
				{
					return new Color(0x00, 0x00, 0x00);
				}
			}