private void AboutDlg_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Properties.Settings.Default.Mute = this.Mute;
     Properties.Settings.Default.Save();
     ModPlayer.Player_Stop();
     m_Player = null;
     m_Mod    = null;
 }
예제 #2
0
        public Form1()
        {
            InitializeComponent();

            m_Player = new MikMod();
            m_Player.PlayerStateChangeEvent += new ModPlayer.PlayerStateChangedEvent(m_Player_PlayerStateChangeEvent);

            trackBar1.Maximum = 99;
        }
예제 #3
0
 private void InitConstructor(string fileName, bool autoLoad = true)
 {
     this.Filename = fileName;
     this.mikMod   = new MikMod();
     this.mikMod.Init <NaudioDriverAdvanced>(_NAudioOptions);
     this.mikMod.PlayerStateChangeEvent += new ModPlayer.PlayerStateChangedEvent(PlayerChange);
     if (autoLoad)
     {
         this.Load();
     }
 }
예제 #4
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     Ok.Focus();
     _links = this.FindDescendants <RichTextBox>().SelectMany(b => b.Document.GetElementsOfType <Hyperlink>()).ToList();
     _links.ForEach(l =>
     {
         l.RequestNavigate += OnHyperlinkRequestNavigate;
     });
     _modPlayer = new MikMod();
     _modPlayer.Init <NaudioDriver>("");
     _modPlayer.Play(new MemoryStream(_resourceManager.GetContentByteArray("/Resources/Sounds/credits.xm")));
 }
예제 #5
0
        /// <summary>
        /// F*****g MusicPlayer must be in MainView
        /// </summary>
        private void InitializeBackgroundMusic()
        {
            m_Player       = new MikMod();
            ModDriver.Mode = (ushort)(ModDriver.Mode | SharpMikCommon.DMODE_NOISEREDUCTION);
            m_Player.Init <NaudioDriver>("");

            //TODO: Modify to stream
            m_Mod = ModuleLoader.Load("Resources\\music.xm");

#if !DEBUG
            m_Player.Play(m_Mod);
#endif
        }
예제 #6
0
        private void Form1_Load(object sender, EventArgs e)
        {
            LoadData();
            string path = Directory.GetCurrentDirectory();
            //File.WriteAllBytes("temp.mod", Properties.Resources.chcknbnk);
            Stream damod = new MemoryStream(Properties.Resources.chcknbnk);

            m_Player       = new MikMod();
            ModDriver.Mode = (ushort)(ModDriver.Mode | SharpMikCommon.DMODE_NOISEREDUCTION);
            m_Player.Init <NaudioDriver>("");
            m_Mod      = m_Player.LoadModule(damod);
            m_Mod.wrap = true;
            m_Player.Play(m_Mod);

            System.Timers.Timer atimer = new System.Timers.Timer();
            atimer.Interval  = 1000.0 / 60.0;
            atimer.Elapsed  += Refresh;
            atimer.AutoReset = true;
            atimer.Enabled   = true;
        }
예제 #7
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     m_Player = new MikMod();
 }
        public DatalessonAbout()
        {
            InitializeComponent();

            m_Player = new MikMod();
        }