Beispiel #1
0
 private void SoundView_MouseDown(object sender, MouseEventArgs e)
 {
     if (SoundView.SelectedItems.Count > 0)
     {
         if (e.Button == MouseButtons.Left)
         {
             DraggingFromSoundView = true;
             SoundView.DoDragDrop(new DataObject(DataFormats.FileDrop, GetSelectedSoundPaths()), DragDropEffects.Copy);
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            m_gameModel = new GameModel();
            m_gameView  = new GameView(spriteBatch, m_gameModel, Content);
            m_sound     = new SoundView(Content, m_gameModel);
            m_menuView  = new MenuView(spriteBatch, graphics, m_gameModel);
            m_menuView.LoadContent(Content);
        }
Beispiel #3
0
 void UpdateSoundList()
 {
     if (FileIsOpen)
     {
         SoundView.Items.Clear();
         foreach (SoundFile file in OpenedFile.Sounds)
         {
             SoundView.Items.Add(new ListViewItem(file.GetFields()));
         }
         SoundView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PagePresenter"/> class.
 /// </summary>
 /// <param name="initial">The initial.</param>
 /// <param name="textBoxHolder">The text box holder.</param>
 /// <param name="actionGrid">The action grid.</param>
 /// <param name="left">The left portraits.</param>
 /// <param name="right">The right portraits.</param>
 /// <param name="header">The header.</param>
 /// <param name="sound">The sound.</param>
 public PagePresenter(Page initial, TextBoxHolderView textBoxHolder, ActionGridView actionGrid, PortraitHolderView left, PortraitHolderView right, HeaderView header, SoundView sound)
 {
     this.textBoxHolder       = textBoxHolder;
     this.actionGrid          = actionGrid;
     this.left                = left;
     this.right               = right;
     this.header              = header;
     this.sound               = sound;
     this.characterPresenters = new List <CharacterPresenter>();
     InitializeFunctions();
     this.presenters = new Dictionary <Character, CharacterPresenter>(new IdNumberEqualityComparer <Character>());
     this.Page       = initial;
 }