コード例 #1
0
 public InvoiceController(UserManager <ApplicationUser> userManager, IInvoiceManager invoiceManager, IDateHelper dateHelper, IAttachmentManager attachmentManager)
 {
     UserManager       = userManager;
     InvoiceManager    = invoiceManager;
     DateHelper        = dateHelper;
     AttachmentManager = attachmentManager;
 }
コード例 #2
0
        public DefaultFireLogic(
            NewWeaponConfigItem newWeaponConfig,
            DefaultFireLogicConfig config,
            IWeaponLogicComponentsFactory componentsFactory,
            IAttachmentManager attachmentManager,
            IWeaponSoundLogic soundLogic,
            IWeaponEffectLogic effectLogic,
            IBulletFireInfoProviderDispatcher bulletFireInfoProviderDispatcher) : base(config)
        {
            _attachmentManager      = attachmentManager;
            _accuracyLogic          = componentsFactory.CreateAccuracyLogic(config.AccuracyLogic, config.Basic);
            _spreadLogic            = componentsFactory.CreateSpreadLogic(config.SpreadLogic, config.Basic);
            _autoFireLogic          = componentsFactory.CreateAutoFireLogic(config.FireModeLogic, config.Basic);
            _bulletLogic            = componentsFactory.CreateBulletLogic(config.Basic);
            _soundLogic             = soundLogic;
            _weaponEffectLogic      = effectLogic;
            _bulletFireInfoProvider = bulletFireInfoProviderDispatcher;

            _bulletFactory       = componentsFactory.CreateBulletFactory(config.Bullet, config.Basic);
            _kickbackLogic       = componentsFactory.CreateKickbackLogic(config.KickbackLogic, config.Basic);
            _fireBulletModeLogic = componentsFactory.CreateFireReadyLogic(config.FireModeLogic, config.Basic);
            _fireBulletCounter   = componentsFactory.CreateContinuesShootLogic(config.FireCounter, config.Basic);
            _fireActionLogic     = componentsFactory.CreateFireActionLogic(newWeaponConfig, config.Basic, _soundLogic);

            AddLogic(_accuracyLogic);
            AddLogic(_spreadLogic);
            AddLogic(_kickbackLogic);
            AddLogic(_autoFireLogic);
            AddLogic(_fireBulletModeLogic);
            AddLogic(_fireActionLogic);
            AddLogic(_fireBulletCounter);
        }
コード例 #3
0
 private void InitAttachment()
 {
     this.toolStripDropDownButton1.DropDownItems.Clear();
     if (this.m_pObject.Class is ITableAttachments)
     {
         ITableAttachments attachments = (ITableAttachments)this.m_pObject.Class;
         if (attachments.HasAttachments)
         {
             ToolStripItem      item;
             IAttachmentManager attachmentManager = attachments.AttachmentManager;
             ILongArray         oids = new LongArrayClass();
             oids.Add(this.m_pObject.OID);
             IEnumAttachment attachmentsByParentIDs = attachmentManager.GetAttachmentsByParentIDs(oids, false);
             attachmentsByParentIDs.Reset();
             IAttachment attachment2 = null;
             string[]    strArray    = new string[2];
             int         num         = 0;
             while ((attachment2 = attachmentsByParentIDs.Next()) != null)
             {
                 item = new ToolStripButton(attachment2.Name)
                 {
                     Tag = attachment2
                 };
                 this.toolStripDropDownButton1.DropDownItems.Add(item);
                 num++;
             }
             item = new ToolStripButton("打开附件管理器");
             this.toolStripDropDownButton1.DropDownItems.Add(item);
             this.toolAttachmentLabel.Text = string.Format("附件({0})", num);
         }
     }
 }
コード例 #4
0
        private List <IAttachment> method_4(IObject iobject_0)
        {
            List <IAttachment> list   = new List <IAttachment>();
            IClass             class2 = iobject_0.Class;

            if (class2 is ITableAttachments)
            {
                ITableAttachments attachments = (ITableAttachments)class2;
                if (!attachments.HasAttachments)
                {
                    return(list);
                }
                IAttachmentManager attachmentManager = attachments.AttachmentManager;
                ILongArray         oids = new LongArrayClass();
                oids.Add(iobject_0.OID);
                IEnumAttachment attachmentsByParentIDs = attachmentManager.GetAttachmentsByParentIDs(oids, false);
                attachmentsByParentIDs.Reset();
                IAttachment item = null;
                while ((item = attachmentsByParentIDs.Next()) != null)
                {
                    list.Add(item);
                }
            }
            return(list);
        }
コード例 #5
0
        public AttachmentMangerForm(IFeatureClass featurecls, int id)
            : this()
        {
            fc  = featurecls;
            fid = id;
            this.FormBorderStyle                       = FormBorderStyle.FixedToolWindow;
            this.StartPosition                         = FormStartPosition.CenterParent;
            this.dataGridView1.ColumnCount             = 4;
            this.dataGridView1.Columns[0].Name         = "attcName";
            this.dataGridView1.Columns[0].HeaderText   = "附件";
            this.dataGridView1.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.dataGridView1.Columns[0].Visible      = true;
            this.dataGridView1.Columns[1].Name         = "attcExt";
            this.dataGridView1.Columns[1].Visible      = false;
            this.dataGridView1.Columns[2].Name         = "attcId";
            this.dataGridView1.Columns[2].Visible      = false;
            this.dataGridView1.Columns[3].Name         = "attcPath";
            this.dataGridView1.Columns[3].Visible      = false;
            attcMgr = fc.GetAttachmentManager();
            IAttachmentCollection attclist = attcMgr.GetAttachmentsByFeatureId(id);

            for (int i = 0; i < attclist.Count; i++)
            {
                IAttachment attc   = attclist.Get(i);
                string[]    newRow = { attc.Name, "", attc.Id.ToString(), "" };
                this.dataGridView1.Rows.Add(newRow);
            }
        }
コード例 #6
0
ファイル: FileManager.cs プロジェクト: ImanRezaeipour/clinic
 /// <summary>
 ///
 /// </summary>
 /// <param name="imageValidation"></param>
 /// <param name="imageBuilder"></param>
 /// <param name="attachmentManager"></param>
 /// <param name="videoManager"></param>
 /// <param name="videoValidator"></param>
 public FileManager(IImageValidator imageValidation, IImageBuilder imageBuilder, IAttachmentManager attachmentManager, IVideoManager videoManager, IVideoValidator videoValidator, IConfigurationManager configurationManager)
 {
     _imageValidation      = imageValidation;
     _imageBuilder         = imageBuilder;
     _attachmentManager    = attachmentManager;
     _videoManager         = videoManager;
     _videoValidator       = videoValidator;
     _configurationManager = configurationManager;
 }
コード例 #7
0
 public DoubleWeaponLogic(NewWeaponConfigItem newCfg,
                          DoubleWeaponLogicConfig config,
                          IWeaponLogicComponentsFactory componentsFactory,
                          IWeaponSoundLogic soundLogic,
                          IWeaponEffectLogic effectLogic,
                          IAttachmentManager attachmentManager,
                          IBulletFireInfoProviderDispatcher bulletFireInfoProviderDispatcher) : base(config, componentsFactory)
 {
     _leftFireLogic     = componentsFactory.CreateFireLogic(newCfg, config.LeftFireLogic, soundLogic, effectLogic, bulletFireInfoProviderDispatcher);
     _rightFireLogic    = componentsFactory.CreateFireLogic(newCfg, config.RightFireLogic, soundLogic, effectLogic, bulletFireInfoProviderDispatcher);
     _attachmentManager = attachmentManager;
 }
コード例 #8
0
        public ThrowingFireAction(
            NewWeaponConfigItem newWeaponConfig,
            ThrowingFireLogicConfig config,
            IWeaponLogicComponentsFactory componentsFactory,
            IAttachmentManager attachmentManager,
            IWeaponSoundLogic soundLogic,
            IWeaponEffectLogic effectLogic) : base(config)
        {
            _attachmentManager = attachmentManager;
            _soundLogic        = soundLogic;
            _weaponEffectLogic = effectLogic;

            _throwingLogic   = componentsFactory.CreateThrowingLogic(config.Basic);
            _throwingFactory = componentsFactory.CreateThrowingFactory(newWeaponConfig, config.Throwing);
        }
コード例 #9
0
ファイル: Character.cs プロジェクト: zxcvbnmascq/CRYENGINE
        /// <summary>
        /// Get the <see cref="CharacterAttachment"/> with the specified <paramref name="name"/>
        /// </summary>
        /// <returns>The <see cref="CharacterAttachment"/> or null if no attachment was found.</returns>
        /// <param name="name">Name of the required attachment.</param>
        public CharacterAttachment GetAttachment(string name)
        {
            if (_attachmentManager == null)
            {
                _attachmentManager = NativeHandle.GetIAttachmentManager();
            }

            var nativeAttachment = _attachmentManager.GetInterfaceByName(name);

            if (nativeAttachment == null)
            {
                return(null);
            }
            return(new CharacterAttachment(nativeAttachment));
        }
コード例 #10
0
ファイル: frmAttachment.cs プロジェクト: secondii/Yutai
        private void frmAttachment_Load(object sender, EventArgs e)
        {
            ListViewItem item;

            string[] strArray;
            if (this.Attachments != null)
            {
                this.btnAdd.Visible    = false;
                this.btnDelete.Visible = false;
                item     = null;
                strArray = new string[2];
                foreach (IAttachment attachment in this.Attachments)
                {
                    strArray[0] = attachment.Name;
                    strArray[1] = attachment.Size.ToString();
                    item        = new ListViewItem(strArray)
                    {
                        Tag = attachment
                    };
                    this.listView1.Items.Add(item);
                }
                this.btnAllSaveAs.Enabled = this.listView1.Items.Count > 0;
            }
            else
            {
                ITableAttachments  attachments       = (ITableAttachments)this.Object.Class;
                IAttachmentManager attachmentManager = attachments.AttachmentManager;
                ILongArray         oids = new LongArrayClass();
                oids.Add(this.Object.OID);
                IEnumAttachment attachmentsByParentIDs = attachmentManager.GetAttachmentsByParentIDs(oids, true);
                attachmentsByParentIDs.Reset();
                IAttachment attachment = null;
                item     = null;
                strArray = new string[2];
                while ((attachment = attachmentsByParentIDs.Next()) != null)
                {
                    strArray[0] = attachment.Name;
                    strArray[1] = attachment.Size.ToString();
                    item        = new ListViewItem(strArray)
                    {
                        Tag = attachment
                    };
                    this.listView1.Items.Add(item);
                }
                this.btnAllSaveAs.Enabled = this.listView1.Items.Count > 0;
            }
        }
コード例 #11
0
 public WeaponLogicComponentsFactory(
     Contexts contexts,
     IEntityIdGenerator entityIdGenerator,
     ICurrentTime currentTime,
     IAttachmentManager attachmentManager,
     ISoundEntityFactory soundEntityFactory,
     IBulletEntityFactory bulletEntityFactory) : base(attachmentManager)
 {
     _bulletContext       = contexts.bullet;
     _throwingContext     = contexts.throwing;
     _clientEffectContext = contexts.clientEffect;
     _soundContext        = contexts.sound;
     _entityIdGenerator   = entityIdGenerator;
     _currentTime         = currentTime;
     _attachmentManager   = attachmentManager;
     _soundEntityFactory  = soundEntityFactory;
     _bulletEntityFactory = bulletEntityFactory;
 }
コード例 #12
0
ファイル: frmAttachment.cs プロジェクト: secondii/Yutai
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (this.Attachments == null)
     {
         ITableAttachments  attachments       = (ITableAttachments)this.Object.Class;
         IAttachmentManager attachmentManager = attachments.AttachmentManager;
         foreach (IAttachment attachment in this.m_DeleteAttachment)
         {
             attachmentManager.DeleteAttachment(attachment.AttachmentID);
         }
         for (int i = 0; i < this.listView1.Items.Count; i++)
         {
             IAttachment tag = this.listView1.Items[i].Tag as IAttachment;
             if (tag.AttachmentID == -1)
             {
                 attachmentManager.AddAttachment(this.Object.OID, tag);
             }
         }
     }
     base.DialogResult = DialogResult.OK;
 }
コード例 #13
0
ファイル: frmAttachment.cs プロジェクト: secondii/Yutai
        private void btnAdd_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog
            {
                Filter      = "所有文件|*.*",
                Multiselect = true
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                ITableAttachments  attachments       = (ITableAttachments)this.Object.Class;
                IAttachmentManager attachmentManager = attachments.AttachmentManager;
                ListViewItem       item  = null;
                string[]           items = new string[2];
                foreach (string str in dialog.FileNames)
                {
                    IMemoryBlobStream stream = new MemoryBlobStreamClass();
                    stream.LoadFromFile(str);
                    string          fileName = Path.GetFileName(str);
                    AttachmentClass class2   = new AttachmentClass
                    {
                        ContentType = this.GetType(str),
                        Data        = stream,
                        Name        = fileName
                    };
                    IAttachment attachment = class2;
                    items[0] = attachment.Name;
                    items[1] = attachment.Size.ToString();
                    item     = new ListViewItem(items)
                    {
                        Tag = attachment
                    };
                    this.listView1.Items.Add(item);
                }
            }
        }
コード例 #14
0
 public AttachmentService(IAttachmentManager officeAttachmentManager)
 {
     _officeAttachmentManager = officeAttachmentManager;
 }
コード例 #15
0
 public AttachmentController(UserManager <ApplicationUser> userManager, IAttachmentManager attachmentManager, IHostingEnvironment hostingEnvironment)
 {
     UserManager        = userManager;
     AttachmentManager  = attachmentManager;
     HostingEnvironment = hostingEnvironment;
 }
コード例 #16
0
 public PostAppService(ILocalizableContentManager <Post, Content> postLocalizableContentManager, IPostManager postManager, IAttachmentManager <Post> attachmentManager)
 {
     _postLocalizableContentManager = postLocalizableContentManager;
     _postManager       = postManager;
     _attachmentManager = attachmentManager;
 }
コード例 #17
0
 public AttachmentAppService(IAttachmentManager attachmentManager)
 {
     _attachmentManager = attachmentManager;
 }
コード例 #18
0
 public BaseWeaponThrowingLogic(CommonFireConfig config, IAttachmentManager attachmentManager) : base(config)
 {
     _config            = config;
     _attachmentManager = attachmentManager;
 }
コード例 #19
0
 public AbstractWeaponLogicComponentsFactory(IAttachmentManager attachManager)
 {
     _attachmentManager = attachManager;
 }
コード例 #20
0
 public BaseWeaponBulletLogic(CommonFireConfig config, IAttachmentManager attachmentManager) : base(config)
 {
     _attachmentManager = attachmentManager;
 }
コード例 #21
0
 public AttachmentController(IAttachmentManager attachmentManager)
 {
     _attachmentManager = attachmentManager;
 }