public TopBar() { InitializeComponent(); try { Pandora.Localization.LocalizeMenu(contextMenuStrip); _huePicker = new HuePicker(); } catch(Exception) { // For designer } }
public Box(ProfileManager profileManager, ISplash splash) { _profileManager = profileManager; _splash = splash; _splash.SetStatusText("Loading appearance"); InitializeComponent(); _splash.SetStatusText("Initializing maps and artwork"); Map.MulManager = _profileManager.Profile.MulManager; Art.MulFileManager = _profileManager.Profile.MulManager; Pandora.Map = Map; Pandora.Art = Art; Pandora.Prop = ucPropManager; if ( Pandora.Hues != null ) { _splash.SetStatusText("Reading hues"); m_HuePicker = new HuePicker(); } _splash.SetStatusText("Restoring options"); ApplyOptions(); _splash.SetStatusText("Building travel destinations"); InitPages(); // Update Title when online change! Pandora.BoxConnection.OnlineChanged += new EventHandler(delegate(Object sender, EventArgs e) { this.Text = string.Format(Pandora.Localization.TextProvider["Misc.BoxTitle"], _profileManager.Profile.Name, Pandora.BoxConnection.Connected ? Pandora.Localization.TextProvider["Misc.Online"] : Pandora.Localization.TextProvider["Misc.Offline"]); }); }