Esempio n. 1
0
 public InputSystem(GameplayContext context, ICamera camera, ICommonConfig commonConfig)
 {
     _deltaProvider = new List <IInputDeltaProvider>
     {
         new MouseInputDeltaProvider(camera, () => commonConfig.MouseMovementSensitivity),
         new KeyboardInputDeltaProvider(() => commonConfig.KeyboardMovementSensitivity)
     };
     _wispGroup = context.GetGroup(GameplayMatcher.WispMovementDelta);
 }
Esempio n. 2
0
 public HomeController(IProductRepository productRepository, IMapper mapper, ICommonConfig configs)
 {
     this.productRepository = productRepository;
     this.mapper            = mapper;
     this.configs           = configs;
 }
Esempio n. 3
0
 private void InitConfig(IPipelineConfig config)
 {
     this.fontName      = "华文中宋";
     this.fontSize      = 12.0;
     this.fontColor     = -16776961;
     this.fontBold      = false;
     this.fontItalic    = false;
     this.fontUnderline = false;
     this.lineName      = "1033B";
     this.lineColor     = 33554432;
     this.lineWidth     = 1.7;
     try
     {
         ICommonConfig commonConfig = config.CommonConfigs.FirstOrDefault(c => c.Name.ToUpper() == "MAPNOTETEXT");
         if (commonConfig != null)
         {
             string[] values = commonConfig.Value.Split(';');
             for (int i = 0; i < values.Length; i++)
             {
                 string[] pairs     = values[i].Split(':');
                 string   pairName  = pairs[0].ToUpper();
                 string   pairValue = pairs[1].ToUpper();
                 if (pairName == "FONT")
                 {
                     this.fontName = pairValue;
                     continue;
                 }
                 if (pairName == "SIZE")
                 {
                     this.fontSize = Convert.ToDouble(pairValue);
                     continue;
                 }
                 if (pairName == "COLOR")
                 {
                     this.fontColor = Convert.ToInt32(pairValue);
                     continue;
                 }
                 if (pairName.Contains("BOLD"))
                 {
                     this.fontBold = pairValue.StartsWith("T") ? true : false;
                     continue;
                 }
                 if (pairName.Contains("ITAL"))
                 {
                     this.fontItalic = pairValue.StartsWith("T") ? true : false;
                     continue;
                 }
                 if (pairName.Contains("UNDER"))
                 {
                     this.fontUnderline = pairValue.StartsWith("T") ? true : false;
                     continue;
                 }
             }
         }
         commonConfig = config.CommonConfigs.FirstOrDefault(c => c.Name.ToUpper() == "MAPNOTELINE");
         if (commonConfig != null)
         {
             string[] values = commonConfig.Value.Split(';');
             for (int i = 0; i < values.Length; i++)
             {
                 string[] pairs     = values[i].Split(':');
                 string   pairName  = pairs[0].ToUpper();
                 string   pairValue = pairs[1].ToUpper();
                 if (pairName == "NAME")
                 {
                     this.lineName = pairValue;
                     continue;
                 }
                 if (pairName == "WIDTH")
                 {
                     this.lineWidth = Convert.ToDouble(pairValue);
                     continue;
                 }
                 if (pairName == "COLOR")
                 {
                     this.lineColor = Convert.ToInt32(pairValue);
                     continue;
                 }
             }
         }
     }
     catch
     {
     }
 }