Beispiel #1
0
        public Station(int id)
        {
            IsLoaded    = false;
            ForcePixbuf = DockServices.Drawing.LoadIcon("nprlogo.gif@" + GetType().Assembly.FullName, 128, -1);
            ID          = id;

            if (ID > 0)
            {
                DockServices.System.RunOnThread(() => {
                    LoadDataFromXElement(NPR.StationXElement(ID));
                });
                // this is how we create our "null" station entry
            }
            else
            {
                Name             = Catalog.GetString("No stations found.");
                Description      = Catalog.GetString("Please try your search again.");
                ShowActionButton = false;
                IsLoaded         = true;
            }

            DockServices.System.ConnectionStatusChanged += HandleConnectionStatusChanged;
        }
Beispiel #2
0
 void HandleConnectionStatusChanged(object o, EventArgs args)
 {
     DockServices.System.RunOnThread(() => {
         LoadDataFromXElement(NPR.StationXElement(ID));
     });
 }