コード例 #1
0
    // Adding stuff:
    //   Get URL from user
    //   Then run AddNewChannel
    private void OnChannelAdded(Channel c)
    {
        ListStore store = (ListStore) list.Model;

        if (c.Error != "") {
            c.Delete ();

            ErrorDialog ed = new ErrorDialog (
                Catalog.GetString ("Error Adding Channel - Monopod Podcast Client"),
                Catalog.GetString ("Channel could not be added"),
                Catalog.GetString ("The channel either could not be found or contains errors."));
            ed.Run ();
            ed.Destroy ();
        } else {
            if (TestInclusion (c, showbox.Active)) {
                store.AppendValues (c);
            }
        }
    }
コード例 #2
0
        public static void Main(string[] args)
        {
            //foreach(string str in args)
            //	Logger.Log("arg ->{0}",str);

            Application.Init();
            Logger.Log(Languages.Translate("start_app"));

            ExceptionManager.UnhandledException += delegate(UnhandledExceptionArgs argsum)
            {
                StringBuilder sb = new StringBuilder();

                Exception ex = (Exception)argsum.ExceptionObject;

                sb.AppendLine(ex.Message);
                sb.AppendLine(ex.StackTrace);
                Logger.Error(ex.Message);
                Logger.Error(ex.StackTrace);
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);

                if (ex.InnerException != null)
                {
                    Logger.Error(ex.InnerException.Message);
                    Logger.Error(ex.InnerException.StackTrace);
                    Logger.Error(ex.InnerException.Source);
                    Console.WriteLine(ex.InnerException.Message);
                    Console.WriteLine(ex.InnerException.StackTrace);
                    Console.WriteLine(ex.InnerException.Source);
                    sb.AppendLine(ex.InnerException.Message);
                    sb.AppendLine(ex.InnerException.StackTrace);
                    sb.AppendLine(ex.InnerException.Source);
                }

                ErrorDialog ed = new ErrorDialog();
                ed.ErrorMessage = sb.ToString();
                ed.Run();
                ed.Destroy();

                argsum.ExitApplication = true;
            };

            Gdk.Global.InitCheck(ref args);
            if (Platform.IsWindows)
            {
                string themePath = Paths.DefaultTheme;
                if (System.IO.File.Exists(themePath))
                {
                    Gtk.Rc.AddDefaultFile(themePath);
                    Gtk.Rc.Parse(themePath);
                }
            }

            mainWindow = new MainWindow(args);
            MainWindow.Show();

            if ((MainClass.Settings.Account == null) || (String.IsNullOrEmpty(MainClass.Settings.Account.Token)))
            {
                LoginRegisterDialog ld = new LoginRegisterDialog(null);
                ld.Run();
                ld.Destroy();
            }
            else
            {
                LoggingInfo log = new LoggingInfo();
                log.LoggWebThread(LoggingInfo.ActionId.IDEStart);
            }

            if (!String.IsNullOrEmpty(Paths.TempDir))
            {
                Application.Run();
            }
        }
コード例 #3
0
ファイル: IPod.cs プロジェクト: BackupTheBerlios/monopod-svn
 private bool ShowIPodFull()
 {
     ErrorDialog ed = new ErrorDialog (
         Catalog.GetString ("Not Enough Space - Monopod Podcast Client"),
         Catalog.GetString ("Not enough space on iPod"),
         Catalog.GetString ("Monopod automatically removes podcasts you have listened to. ") +
         Catalog.GetString ("Try clearing space by removing other music from your iPod.")
         );
     ed.Run ();
     ed.Destroy ();
     return false;
 }