コード例 #1
0
		public void AddTabItem(AppSetting.TabItem savedTabItem)
		{

			var tabItem = AddTabItem();
			tabItem.HeaderText = savedTabItem.Name;

			foreach (var mItem in savedTabItem.tabItem)
			{
				((dmItemContent)tabItem.Content).musicList.Items.Add(mItem);
			}
		}
コード例 #2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            isTh = false;

            musicPlayer.DisablePlaybackStopped();
            musicPlayer.CleanupPlayback();

            AppSetting appSetting = new AppSetting();

            appSetting.volumn = 0;

            foreach (var item in extendedTabControl.Items)
            {
                AppSetting.TabItem appSettingTabItem = new AppSetting.TabItem();

                dmTabItem tabItem = (dmTabItem)item;

                appSettingTabItem.Name = tabItem.HeaderText;

                dmItemContent content = (dmItemContent)tabItem.Content;

                foreach (var musicItem in content.musicList.Items)
                {
                    var mItem = musicItem as MusicItem;
                    mItem.Playing = "";
                    appSettingTabItem.tabItem.Add(mItem);
                }

                appSetting.tabItemList.Add(appSettingTabItem);
            }

            appSetting.Left   = this.Left;
            appSetting.Top    = this.Top;
            appSetting.Width  = this.Width;
            appSetting.Height = this.Height;

            appSetting.volumn = musicPlayer.Volume;

            appSetting.Save();
        }