Exemplo n.º 1
0
        public ScenesWindowAppearance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, SceneEditor sceneEditor, params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, sceneEditor, aOptions)
        {
            appearanceEditor                    = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height             = 160;
            appearanceEditor.onResourceSelected = sceneEditor.RefreshSceneResources;
            PreviewTitle = "Scene.Preview".Traslate();

            // Fields
            background = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionSceneBackground"),
                FileType = FileType.SCENE_BACKGROUND,
                Empty    = SpecialAssetPaths.ASSET_EMPTY_BACKGROUND
            };

            foreground = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionSceneForeground"),
                FileType = FileType.SCENE_FOREGROUND
            };

            music = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionSceneMusic"),
                FileType = FileType.SCENE_MUSIC
            };
        }
Exemplo n.º 2
0
 public override void ApplyResources(string cultureCode)
 {
     ResourcesList.Clear();
     EditableControlsList.Clear();
     foreach (GridColumn col in GridView.Columns)
     {
         string captionId = GetKeyForComponent(col, DesignElement.Caption);
         var    resValue  = CommonResourcesCache.Get("EidssFields", cultureCode, captionId, GetViewNameForSplittedResources());
         string propName  = TranslationToolHelper.GetPropertyName(col.Name, TranslationToolHelper.CaptionPropName);
         if (resValue != null && resValue.Value is string)
         {
             if (!ResourcesList.ContainsKey(propName))
             {
                 ResourcesList.Add(propName, resValue);
             }
             col.Caption = resValue.Value.ToString();
         }
         else
         {
             if (!ResourcesList.ContainsKey(propName))
             {
                 ResourcesList.Add(propName, new ResourceValue
                 {
                     Value = col.Caption,
                     //RawValue = col.Caption,
                     //SourceFileName = string.Format("EidssFields.{0}.resx", cultureCode),
                     EnglishText  = WinClientContext.FieldCaptions.GetString(captionId, null, common.Core.Localizer.lngEn),
                     SourceKey    = captionId,
                     ResourceName = CommonResource.EidssFields.ToString()
                 });
             }
         }
         EditableControlsList.Add(propName, col);
     }
 }
Exemplo n.º 3
0
        public override void ApplyResources(string cultureCode)
        {
            ResourcesList.Clear();
            foreach (Control ctl in Controls)
            {
                var action = ctl.Tag as ActionMetaItem;
                if (action != null)
                {
                    string s        = action.CaptionId(BusinessObject, Permissions);
                    var    resValue = CommonResourcesCache.Get(CommonResource.BvMessages.ToString(), cultureCode, s, GetViewNameForSplittedResources());
                    var    propName = TranslationToolHelper.GetPropertyName(ctl.Name, TranslationToolHelper.TextPropName);
                    if (resValue == null && Messages != null)
                    {
                        resValue = CommonResourcesCache.Get(Messages.GetType().Name, cultureCode, s, GetViewNameForSplittedResources());
                    }
                    if (resValue != null)
                    {
                        ResourcesList.Add(propName, resValue);
                        ctl.Text = resValue.Value.ToString();

                        if (!EditableControlsList.ContainsKey(propName))
                        {
                            EditableControlsList.Add(propName, ctl);
                        }
                    }
                }
                else if (BasePanel != null && !(ctl is TranslationButton))
                {
                    TranslationToolHelperWinClient.ApplyResources(ctl, BasePanel as ITranslationView, cultureCode);
                }
            }
        }
Exemplo n.º 4
0
        public ItemsWindowAppearance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, aOptions)
        {
            appearanceEditor                    = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height             = 160;
            appearanceEditor.onResourceSelected = RefreshResources;

            PreviewTitle = "Item.Preview".Traslate();
            // File selectors

            image = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionItemImage"),
                FileType = FileType.ITEM_IMAGE,
                Empty    = SpecialAssetPaths.ASSET_EMPTY_IMAGE
            };

            icon = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionItemIcon"),
                FileType = FileType.ITEM_ICON,
                Empty    = SpecialAssetPaths.ASSET_EMPTY_ICON
            };

            image_over = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionItemImageOver"),
                FileType = FileType.ITEM_IMAGE_OVER
            };
        }
        public CharactersWindowAppearance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle,
                                          params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, aOptions)
        {
            IsPlayer = false;

            PreviewTitle = "Character.Preview".Traslate();

            appearanceEditor                    = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height             = 160;
            appearanceEditor.onResourceSelected = RefreshPathInformation;

            if (groups == null)
            {
                groups = Enum.GetValues(typeof(CharacterAnimationsGroup)).Cast <CharacterAnimationsGroup>().ToArray();
            }
            if (types == null)
            {
                types = Enum.GetValues(typeof(CharacterAnimationType)).Cast <CharacterAnimationType>().ToArray();
            }

            foreach (var animationType in types)
            {
                fields[animationType] = new AnimationField()
                {
                    Label    = TC.get(fieldNames[animationType]),
                    FileType = FileType.CHARACTER_ANIM
                };
            }
        }
        public CutscenesWindowAppearance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle,
                                         params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, aOptions)
        {
            appearanceEditor        = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height = 160;

            video = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionVideoscenes"),
                FileType = FileType.CUTSCENE_VIDEO
            };

            slides = new AnimationField()
            {
                Label    = TC.get("Resources.DescriptionSlidesceneSlides"),
                FileType = FileType.CUTSCENE_SLIDES
            };

            music = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionSceneMusic"),
                FileType = FileType.CUTSCENE_MUSIC
            };
        }
Exemplo n.º 7
0
 /// <summary>
 /// Display windows
 /// </summary>
 public virtual void initDB(ResourcesList resourcesList)
 {
     this.resourcesList = resourcesList;
     database           = Resources.Load <Database <T> >(databasePath);
     database.loadDB();
     databaseID = database.getFreeId();
 }
 /// <summary>
 /// LoadResources method override
 /// </summary>
 public override void LoadResources()
 {
     ResourcesList.Add(ResourcesLocaleKind.UIHtml, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Resources.SHtml"));
     ResourcesList.Add(ResourcesLocaleKind.UIErrors, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Resources.SErrors"));
     ResourcesList.Add(ResourcesLocaleKind.UIInformations, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Resources.SInfos"));
     ResourcesList.Add(ResourcesLocaleKind.UITitles, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Resources.STitle"));
     ResourcesList.Add(ResourcesLocaleKind.UIValidation, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Resources.SCheck"));
 }
Exemplo n.º 9
0
 /// <summary>
 /// LoadResources method override
 /// </summary>
 public override void LoadResources()
 {
     ResourcesList.Add(ResourcesLocaleKind.SamplesHtml, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Samples.Resources.CSHtml"));
     ResourcesList.Add(ResourcesLocaleKind.SamplesErrors, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Samples.Resources.CSErrors"));
     ResourcesList.Add(ResourcesLocaleKind.SamplesMail, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.MultiFactor.Samples.Resources.CSMail"));
     ResourcesList.Add(ResourcesLocaleKind.SMSHtml, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.Multifactor.Samples.Resources.SHtml"));
     ResourcesList.Add(ResourcesLocaleKind.SMSAzure, GetResourceManager(typeof(ResourcesLocale).Assembly, "Neos.IdentityServer.Multifactor.Samples.Resources.SAzure"));
 }
        public async Task ListPaymentMethodsAsync_Success()
        {
            ResourcesList <IdentificationType> identificationTypes =
                await identificationTypeClient.ListAsync();

            Assert.NotNull(identificationTypes);
            Assert.True(identificationTypes.Count > 0);
        }
        public void ListPaymentMethods_Success()
        {
            ResourcesList <IdentificationType> identificationTypes =
                identificationTypeClient.List();

            Assert.NotNull(identificationTypes);
            Assert.True(identificationTypes.Count > 0);
        }
Exemplo n.º 12
0
        public void ListPaymentMethods_Success()
        {
            ResourcesList <PaymentMethod> paymentMethods =
                paymentMethodClient.List();

            Assert.NotNull(paymentMethods);
            Assert.True(paymentMethods.Count > 0);
        }
Exemplo n.º 13
0
        public async Task ListPaymentMethodsAsync_Success()
        {
            ResourcesList <PaymentMethod> paymentMethods =
                await paymentMethodClient.ListAsync();

            Assert.NotNull(paymentMethods);
            Assert.True(paymentMethods.Count > 0);
        }
        public void RequestAuthorization(string operationType, string resourceType, string siteCode)
        {
            ResourcesList rs      = new ResourcesList();
            List <Guid>   rsGuids = new List <Guid>();

            rsGuids = rs.load(siteCode);
            HydroSecurityInternal HydroInternal = new HydroSecurityInternal();

            HydroInternal.QueueAuthorizationRequest(operationType, 2, rsGuids);
        }
Exemplo n.º 15
0
        public AuthorizationList GetApprovedAuthorizationInfo(string siteCode)
        {
            ResourcesList rsList  = new ResourcesList();
            List <Guid>   rsGuids = new List <Guid>();

            rsGuids = rsList.load(siteCode);
            AuthorizationList authList = new AuthorizationList();

            authList.Load(rsGuids);
            return(authList);
        }
Exemplo n.º 16
0
        public RequestManagementList GetPendingAuthorizationInfo(string siteCode)
        {
            ResourcesList rsList  = new ResourcesList();
            List <Guid>   rsGuids = new List <Guid>();

            rsGuids = rsList.load(siteCode);
            RequestManagementList rmList = new RequestManagementList();

            rmList.Load(rsGuids);
            return(rmList);
        }
        public ResourcesEditor()
        {
            resourcesList = ScriptableObject.CreateInstance <ResourcesList>();
            file          = new FileChooser()
            {
                FileType = FileType.BUTTON,
            };

            animation = new AnimationField()
            {
                FileType = FileType.CHARACTER_ANIM,
            };
        }
Exemplo n.º 18
0
        public void Refund_Total_Success()
        {
            AdvancedPaymentCreateRequest request = BuildCreateRequest(true, "approved");
            AdvancedPayment createdPayment       = Create(request);

            Thread.Sleep(7000);

            ResourcesList <AdvancedPaymentDisbursementRefund> results =
                RefundTotal(createdPayment.Id.GetValueOrDefault());

            Assert.NotNull(results);
            Assert.True(results.Count == 2);
        }
Exemplo n.º 19
0
 static void init()
 {
     hub                 = new DatabaseHub();
     resourcesList       = Resources.Load <ResourcesList>(ScriptableObjectConstant.resourceListPath);
     enemyDatabaseWindow = new EnemyDatabaseWindow();
     enemyDatabaseWindow.initDB(resourcesList);
     abilityDatabaseWindow = new AbilityDatabaseWindow();
     abilityDatabaseWindow.initDB(resourcesList);
     itemDatabaseWindow = new ItemDatabaseWindow();
     itemDatabaseWindow.initDB(resourcesList);
     hub.minSize = new Vector2(300 * 3, 300);
     hub.Show();
 }
Exemplo n.º 20
0
        public async Task RefundAsync_Total_Success()
        {
            AdvancedPaymentCreateRequest request = await BuildCreateRequestAsync(true, "approved");

            AdvancedPayment createdPayment = await CreateAsync(request);

            await Task.Delay(7000);

            ResourcesList <AdvancedPaymentDisbursementRefund> results =
                await RefundTotalAsync(createdPayment.Id.GetValueOrDefault());

            Assert.NotNull(results);
            Assert.True(results.Count == 2);
        }
Exemplo n.º 21
0
 public Sprite()
 {
     Images          = new ResourcesList();
     Sounds          = new ResourcesList();
     Positions       = new Dictionary <object, Point>();
     Variables       = new List <Variable>();
     Functions       = new List <Function>();
     Handlers        = new List <EventHandler>();
     Expressions     = new List <Expression>();
     BlockStatements = new List <BlockStatement>();
     CurrentImage    = 0;
     Size            = 100;
     Visible         = true;
 }
Exemplo n.º 22
0
        public SetItemsWindowApperance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, aOptions)
        {
            appearanceEditor        = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height = 160;

            PreviewTitle = "Atrezzo.Preview".Traslate();

            // File selectors

            image = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionItemImage"),
                FileType = FileType.SET_ITEM_IMAGE
            };
        }
Exemplo n.º 23
0
        private string GetLocationEmail(string locationName)
        {
            var location = LocationsList.FirstOrDefault(l => l.Name == locationName);

            if (location == null)
            {
                return(string.Empty);
            }
            var resource = ResourcesList.FirstOrDefault(r => r.Id == location.OwningResourceId);

            if (resource != null)
            {
                return(resource.EmailAddress);
            }

            return(string.Empty);
        }
Exemplo n.º 24
0
    /// <summary>
    /// This method attempts to make the requested transaction, checks if transaction is possible. If yes then the exchange happens.
    /// </summary>
    /// <param name="resourceToBuy"></param>
    /// <param name="quantityToBuy"></param>
    /// <param name="resourceRequired"></param>
    /// <param name="requiredQuantity"></param>
    void Transaction(ResourcesList resourceToBuy, int quantityToBuy, ResourcesList resourceRequired, int requiredQuantity)
    {
        switch (resourceToBuy)
        {
        case ResourcesList.CASH:
            if (CheckQuantity(resourceRequired, requiredQuantity))
            {
                BuyCash(quantityToBuy);
            }
            else
            {
                InvalidTransaction();
                return;
            }
            break;

        case ResourcesList.CRYSTAL:
            if (CheckQuantity(resourceRequired, requiredQuantity))
            {
                BuyCrystals(quantityToBuy);
            }
            else
            {
                InvalidTransaction();
                return;
            }
            break;

        case ResourcesList.CRATES:
            if (CheckQuantity(resourceRequired, requiredQuantity))
            {
                BuyCrates(quantityToBuy);
            }
            else
            {
                InvalidTransaction();
                return;
            }
            break;

        default: InvalidTransaction();
            return;
        }
        RemoveResource(resourceRequired, requiredQuantity);
    }
Exemplo n.º 25
0
    /// <summary>
    /// This method returns true if the player has enough of the required resource to make the transaction. Otherwise it returns false.
    /// </summary>
    /// <param name="resourceRequire"></param>
    /// <param name="requiredQuantity"></param>
    /// <returns></returns>
    bool CheckQuantity(ResourcesList resourceRequire, int requiredQuantity)
    {
        bool transactionIsValid = false;

        switch (resourceRequired)
        {
        case ResourcesList.CASH:
            if (resourceManager.TotalCash >= requiredQuantity)
            {
                transactionIsValid = true;
            }
            else
            {
                transactionIsValid = false;
            };
            break;

        case ResourcesList.CRYSTAL:
            if (resourceManager.CrystalTotal >= requiredQuantity)
            {
                transactionIsValid = true;
            }
            else
            {
                transactionIsValid = false;
            };
            break;

        /*case ResourcesList.CRATES:
         *  if (resourceManager.CratesTotal >= requiredQuantity)
         *  {
         *      transactionIsValid = true;
         *  }
         *  else
         *  {
         *      transactionIsValid = false;
         *  };
         *  break;*/
        default:
            transactionIsValid = false;
            break;
        }
        return(transactionIsValid);
    }
Exemplo n.º 26
0
        public BooksWindowAppearance(Rect aStartPos, GUIContent aContent, GUIStyle aStyle, params GUILayoutOption[] aOptions)
            : base(aStartPos, aContent, aStyle, aOptions)
        {
            appearanceEditor                    = ScriptableObject.CreateInstance <ResourcesList>();
            appearanceEditor.Height             = 160;
            appearanceEditor.onResourceSelected = RefreshPathInformation;

            PreviewTitle = "BackgroundAssets.Preview".Traslate();

            background = new FileChooser()
            {
                Label    = TC.get("Resources.DescriptionBookBackground"),
                FileType = FileType.SCENE_BACKGROUND,
                Empty    = SpecialAssetPaths.ASSET_EMPTY_IMAGE
            };

            left = new FileChooser()
            {
                Label    = TC.get("Resources.ArrowLeftNormal"),
                FileType = FileType.BOOK_ARROW_LEFT_NORMAL,
                Empty    = SpecialAssetPaths.ASSET_DEFAULT_ARROW_NORMAL
            };

            left_over = new FileChooser()
            {
                Label    = TC.get("Resources.ArrowLeftOver"),
                FileType = FileType.BOOK_ARROW_LEFT_OVER,
                Empty    = SpecialAssetPaths.ASSET_DEFAULT_ARROW_OVER
            };

            right = new FileChooser()
            {
                Label    = TC.get("Resources.ArrowRightNormal"),
                FileType = FileType.BOOK_ARROW_RIGHT_NORMAL,
                Empty    = SpecialAssetPaths.ASSET_DEFAULT_ARROW_NORMAL_RIGHT
            };

            right_over = new FileChooser()
            {
                Label    = TC.get("Resources.ArrowRightOver"),
                FileType = FileType.BOOK_ARROW_RIGHT_OVER,
                Empty    = SpecialAssetPaths.ASSET_DEFAULT_ARROW_OVER_RIGHT
            };
        }
Exemplo n.º 27
0
    /// <summary>
    /// This method removes the specified number of the specified resource from the players inventory.
    /// </summary>
    /// <param name="resourceRequired"></param>
    /// <param name="requiredQuantity"></param>
    void RemoveResource(ResourcesList resourceRequired, int requiredQuantity)
    {
        switch (resourceRequired)
        {
        case ResourcesList.CASH:
            resourceManager.RemoveCash(requiredQuantity);
            break;

        case ResourcesList.CRYSTAL:
            resourceManager.RemoveCrystals(requiredQuantity);
            break;

        /*case ResourcesList.CRATES:
         *  resourceManager.RemoveCrates(requiredQuantity);
         *  break;*/
        default:
            break;
        }
    }
Exemplo n.º 28
0
        public void ListRefunds_Total_Success()
        {
            // Creates a payment
            PaymentCreateRequest request = BuildCreateRequest(true, "approved");
            Payment createdPayment       = client.Create(request);

            Thread.Sleep(7000);

            // Creates a refund
            PaymentRefund createdRefund =
                client.Refund(createdPayment.Id.GetValueOrDefault());

            Thread.Sleep(3000);

            // List the refund
            ResourcesList <PaymentRefund> refunds = client.ListRefunds(
                createdPayment.Id.GetValueOrDefault());

            Assert.NotNull(refunds);
            Assert.Equal(createdRefund.Id, refunds.First().Id);
        }
Exemplo n.º 29
0
        public async Task ListRefundsAsync_Total_Success()
        {
            // Creates a payment
            PaymentCreateRequest request = await BuildCreateRequestAsync(true, "approved");

            Payment createdPayment = await client.CreateAsync(request);

            await Task.Delay(7000);

            // Creates a refund
            PaymentRefund createdRefund =
                await client.RefundAsync(createdPayment.Id.GetValueOrDefault());

            await Task.Delay(3000);

            // List the refund
            ResourcesList <PaymentRefund> refunds = await client.ListRefundsAsync(
                createdPayment.Id.GetValueOrDefault());

            Assert.NotNull(refunds);
            Assert.Equal(createdRefund.Id, refunds.First().Id);
        }
Exemplo n.º 30
0
        public void ListCards_Success()
        {
            CustomerRequest request  = BuildCreateRequest();
            Customer        customer = client.Create(request);

            Thread.Sleep(1000);

            try
            {
                CustomerCardCreateRequest cardRequest = BuildCardCreateRequest();
                CustomerCard createdCard = client.CreateCard(customer.Id, cardRequest);

                ResourcesList <CustomerCard> results = client.ListCards(customer.Id);

                Assert.NotNull(results);
                Assert.Equal(createdCard.Id, results.First().Id);
            }
            finally
            {
                client.Delete(customer.Id);
            }
        }