Beispiel #1
0
 public static TouchButtonIconWithText FactoryGetDialogButtonType(PosBaseDialogButtonType pButtonType, string pButtonName)
 {
     return(FactoryGetDialogButtonType(pButtonType, pButtonName, string.Empty, string.Empty));
 }
Beispiel #2
0
        public static TouchButtonIconWithText FactoryGetDialogButtonType(PosBaseDialogButtonType pButtonType, string pButtonName, string pButtonLabel, string pButtonImage)
        {
            System.Drawing.Size  sizeBaseDialogDefaultButton         = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogDefaultButton"]);
            System.Drawing.Size  sizeBaseDialogDefaultButtonIcon     = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogDefaultButtonIcon"]);
            System.Drawing.Size  sizeBaseDialogActionAreaButton      = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaButton"]);
            System.Drawing.Size  sizeBaseDialogActionAreaButtonIcon  = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaButtonIcon"]);
            System.Drawing.Color colorBaseDialogActionAreaButtonFont = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonFont"]);
            //System.Drawing.Color colorBaseDialogActionAreaButtonBackground = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonBackground"]);
            string fontBaseDialogActionAreaButton = FrameworkUtils.OSSlash(GlobalFramework.Settings["fontBaseDialogActionAreaButton"]);
            //Icons
            string fileActionDefault           = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_default.png");
            string fileActionOK                = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_ok.png");
            string fileActionCancel            = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_cancel.png");
            string fileActionYes               = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_yes.png");
            string fileActionNo                = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_no.png");
            string fileActionClose             = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_close.png");
            string fileActionPrint             = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_print.png");
            string fileActionPrintAs           = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_print_as.png");
            string fileActionHelp              = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_help.png");
            string fileActionCloneDocument     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_clone_document.png ");
            string fileActionOpenDocument      = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_open_document.png");
            string fileActionSendEmailDocument = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_send_email.png");

            //Assign ButtonType to Name, Override After Switch
            string buttonName  = (pButtonName != string.Empty) ? pButtonName : string.Format("touchButton{0}_DialogActionArea", pButtonType.ToString());
            string buttonLabel = string.Empty;
            string buttonImage = string.Empty;

            switch (pButtonType)
            {
            case PosBaseDialogButtonType.Default:
                //Required to be changed by Code
                buttonLabel = "Default";
                buttonImage = fileActionDefault;
                break;

            case PosBaseDialogButtonType.Ok:
                buttonLabel = Resx.global_button_label_ok;
                buttonImage = fileActionOK;
                break;

            case PosBaseDialogButtonType.Cancel:
                buttonLabel = Resx.global_button_label_cancel;
                buttonImage = fileActionCancel;
                break;

            case PosBaseDialogButtonType.Yes:
                buttonLabel = Resx.global_button_label_yes;
                buttonImage = fileActionYes;
                break;

            case PosBaseDialogButtonType.No:
                buttonLabel = Resx.global_button_label_no;
                buttonImage = fileActionNo;
                break;

            case PosBaseDialogButtonType.Close:
                buttonLabel = Resx.global_button_label_close;
                buttonImage = fileActionClose;
                break;

            case PosBaseDialogButtonType.Print:
                buttonLabel = Resx.global_button_label_print;
                buttonImage = fileActionPrint;
                break;

            case PosBaseDialogButtonType.PrintAs:
                buttonLabel = Resx.global_button_label_print_as;
                buttonImage = fileActionPrintAs;
                break;

            case PosBaseDialogButtonType.Help:
                buttonLabel = Resx.global_button_label_help;
                buttonImage = fileActionHelp;
                break;

            case PosBaseDialogButtonType.CloneDocument:
                buttonLabel = Resx.global_button_label_clone_document;
                buttonImage = fileActionCloneDocument;
                break;

            case PosBaseDialogButtonType.OpenDocument:
                buttonLabel = Resx.global_button_label_open_document;
                buttonImage = fileActionOpenDocument;
                break;

            case PosBaseDialogButtonType.SendEmailDocument:
                buttonLabel = Resx.global_button_label_send_email_document;
                buttonImage = fileActionSendEmailDocument;
                break;

            default:
                break;
            }

            //Overrride buttonName, buttonLabel, buttonImage if Defined form Parameters
            if (pButtonLabel != string.Empty)
            {
                buttonLabel = pButtonLabel;
            }
            if (pButtonImage != string.Empty)
            {
                buttonImage = pButtonImage;
            }

            //Result Button
            return(new TouchButtonIconWithText(buttonName, System.Drawing.Color.Transparent, buttonLabel, fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, buttonImage, sizeBaseDialogActionAreaButtonIcon, sizeBaseDialogActionAreaButton.Width, sizeBaseDialogActionAreaButton.Height));
        }
Beispiel #3
0
 //IN009257 Redimensionar botões para a resolução 1024 x 768.
 public static TouchButtonIconWithText FactoryGetDialogButtonTypeDocuments(PosBaseDialogButtonType pButtonType)
 {
     return(FactoryGetDialogButtonTypeDocuments(pButtonType, string.Empty, string.Empty, string.Empty));
 }