public PlayListWnd(MainWndPlayer parent) { InitializeComponent(); rm = new System.Resources.ResourceManager(typeof(GoStreamAudioGUI.PlayListWnd)); lblPlistInfo.Visible = false; this.Left = parent.Location.X + parent.Size.Width - 15; this.Top = parent.Location.Y; this.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.ShowInTaskbar = false; this.parent = parent; this.parent.CurrentTrackCompleted += parent_CurrentTrackCompleted; this.parent.NextTrackStarted += parent_NextTrackStarted; this.btnClear.Enabled = this.btnSave.Enabled = false; //ColumnHeader cHeader = new ColumnHeader(); cHeader0.Name = "cHeader0"; //cHeader.Text = rm.GetString("lvColHeader0"); cHeader0.Width = (int)(this.Width * 3) / 4; l.Columns.Add(cHeader0); l.Columns.Add(""); l.MouseDoubleClick += new MouseEventHandler(l_MouseDoubleClick); l.Scrollable = true; l.View = View.Details; l.FullRowSelect = true; l.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; //l.Dock = DockStyle.Fill; l.Width = this.Width - 15; l.Height = this.Height - 90; l.Columns[1].TextAlign = HorizontalAlignment.Right; l.Columns[1].Width = 0; l.SuspendLayout(); this.Controls.Add(l); //Inspectors = new List<IAudioFileInspector>(); //Inspectors.Add(new Mp3FileInspector()); hasUserSelTrack = false; }
private void ApplyResources(Control parent, CultureInfo culture) { this.resManager.ApplyResources(parent, parent.Name, culture); foreach (Control ctl in parent.Controls) { if (ctl.GetType() == typeof(AppMenuStrip)) { AppMenuStrip mStrip = (AppMenuStrip)ctl; foreach (ToolStripMenuItem item in mStrip.Items) { ApplyMenus(item.DropDownItems, culture); this.resManager.ApplyResources(item, item.Name, culture); } } else if (ctl.GetType() == typeof(ListView)) { ListView mList = (ListView)ctl; foreach (ColumnHeader item in mList.Columns) { resManager.ApplyResources(item, item.Name, culture); } } else { this.ApplyResources(ctl, culture); } } if (parent.GetType() == typeof(MainWndPlayer)) { MainWndPlayer frm = (MainWndPlayer)parent; resManager.ApplyResources(frm.OpenSFileDlg, "openSFileDlg", culture); frm.ToolTipShuffle.SetToolTip(frm.CheckBoxShuffle, resManager.GetString("toolTipShuffle.Title", culture)); frm.MarqueeLbl.Width = frm.Width + frm.MarqueeLbl.Text.Length + 5; //resManager.ApplyResources(frm.ToolTipShuffle, "toolTipShuffle", culture); } }