public static void Main(string[] args) { Application.Init (); AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs e) { QSMain.ErrorMessage(MainWin, (Exception) e.ExceptionObject); }; CreateProjectParam(); //Настраиваем общую билиотеку QSMain.NewStatusText += delegate(object sender, QSProjectsLib.QSMain.NewStatusTextEventArgs e) { StatusMessage (e.NewText); }; // Создаем окно входа Login LoginDialog = new QSProjectsLib.Login (); LoginDialog.Logo = Gdk.Pixbuf.LoadFromResource ("earchive.icons.logo.png"); LoginDialog.SetDefaultNames ("earchive"); LoginDialog.DefaultLogin = "******"; LoginDialog.DefaultServer = "localhost"; LoginDialog.UpdateFromGConf (); ResponseType LoginResult; LoginResult = (ResponseType) LoginDialog.Run(); if (LoginResult == ResponseType.DeleteEvent || LoginResult == ResponseType.Cancel) return; LoginDialog.Destroy (); //Запускаем программу MainWin = new MainWindow (); if(QSMain.User.Login == "root") return; MainWin.Show (); Application.Run (); }
public static void Main(string[] args) { Application.Init (); QSMain.SubscribeToUnhadledExceptions (); QSMain.GuiThread = System.Threading.Thread.CurrentThread; CreateProjectParam(); // Создаем окно входа Login LoginDialog = new QSProjectsLib.Login (); LoginDialog.Logo = Gdk.Pixbuf.LoadFromResource ("earchive.icons.logo.png"); LoginDialog.SetDefaultNames ("earchive"); LoginDialog.DefaultLogin = "******"; LoginDialog.DefaultServer = "localhost"; LoginDialog.UpdateFromGConf (); ResponseType LoginResult; LoginResult = (ResponseType) LoginDialog.Run(); if (LoginResult == ResponseType.DeleteEvent || LoginResult == ResponseType.Cancel) return; LoginDialog.Destroy (); //Запускаем программу MainWin = new MainWindow (); if(QSMain.User.Login == "root") return; MainWin.Show (); Application.Run (); }