Beispiel #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            InitLogsWithNLog();
            log = Rainbow.LogFactory.CreateLogger <App>();

            string appFolderPath = Path.Combine(Helper.GetTempFolder(), LogFolderName);

            RbApplication = new Rainbow.Application(appFolderPath);
            RbApplication.SetTimeout(10000);

            RbApplication.SetApplicationInfo(AppConfiguration.APP_ID, AppConfiguration.APP_SECRET_KEY);
            RbApplication.SetHostInfo(AppConfiguration.HOST_NAME);
            RbApplication.SetWebProxyInfo(null);

            RbBubbles          = RbApplication.GetBubbles();
            RbContacts         = RbApplication.GetContacts();
            RbConversations    = RbApplication.GetConversations();
            RbFavorites        = RbApplication.GetFavorites();
            RbInstantMessaging = RbApplication.GetInstantMessaging();
            RbFileStorage      = RbApplication.GetFileStorage();

            InitAvatarPool();
            InitFilePool();

            if (!USE_DUMMY_DATA)
            {
                LoginWindow = new LoginView();
                LoginWindow.Show();
            }
            else
            {
                CurrentUserId  = "1";
                CurrentUserJid = "1";

                if (USE_DUMMY_DATA && USE_LOGIN_FORM_WITH_DUMMY_DATA)
                {
                    LoginWindow = new LoginView();
                    LoginWindow.Show();
                }
                else
                {
                    ApplicationMainWindow = new MainView();
                    ApplicationMainWindow.Show();
                }
            }
        }
Beispiel #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            InitLogsWithNLog();
            log = Rainbow.LogFactory.CreateLogger <App>();

            string appFolderPath = Path.Combine(Helper.GetTempFolder(), LogFolderName);

            RbApplication = new Rainbow.Application(appFolderPath);
            RbApplication.SetTimeout(10000);

            RbApplication.SetApplicationInfo(AppConfiguration.APP_ID, AppConfiguration.APP_SECRET_KEY);
            RbApplication.SetHostInfo(AppConfiguration.HOST_NAME);
            RbApplication.SetWebProxyInfo(null);

            LoginWindow = new LoginView();
            LoginWindow.Show();
        }