Example #1
0
        public UpdateStudent(string e, string nm)
        {
            InitializeComponent();

            NavigationPage.SetHasNavigationBar(this, false);

            InternetConnection connection = new InternetConnection();

            if (!connection.ConnectivityCheck())
            {
                Connectivity.Text = "الرجاء التحقق من الاتصال بشبكة الإنترنت";
                DisplayAlert("Cloud Gaming Application", Connectivity.Text, "موافق");
            }
            else
            {
                studnt = nm;


                email = e;

                GetCities();

                string idStrng = Regex.Replace(studnt, "[^0-9]+", string.Empty);
                id = Int32.Parse(idStrng);
            }
        }
        public SpeciaLists(string e)
        {
            InitializeComponent();

            NavigationPage.SetHasNavigationBar(this, false);

            InternetConnection connection = new InternetConnection();

            if (!connection.ConnectivityCheck())
            {
                Connectivity.Text = "الرجاء التحقق من الاتصال بشبكة الإنترنت";
                DisplayAlert("Cloud Gaming Application", Connectivity.Text, "موافق");
            }
            else
            {
                email = e;
                GetConfirmed();
                GetUnConfirmed();

                instructions.GestureRecognizers.Add(new TapGestureRecognizer()
                {
                    Command = new Command(() =>
                    {
                        DisplayAlert("تعليمات", "من قائمة 'تفعيل الحساب' اختر الأخصائي لتفعيل حسابه حتى يتمكن من استخدام التطبيق" + '\n' + "من قائمة 'إلغاء التفعيل' اختر الأخصائي لإلغاء تأكيد حسابه", "موافق");
                    })
                });
            }
        }
        public async void MainInitialization()
        {
            MainWindow main = new MainWindow();

            MainVars mv = new MainVars();

            InitLabel.Content = "Загрузка...";
            await Task.Delay(1000);

            InitLabel.Content = "Инициализация команд...";
            await Task.Delay(1000);

            SearchAnswer.InitCommandList();

            InitLabel.Content = "Проверка интернет соединения...";
            await Task.Delay(1000);

            InternetConnection ic = new InternetConnection();

            MainVars.InternetConnection = ic.TryToConnect();
            ic.InternetConnectionTimerStart();

            InitLabel.Content = "Настройка Telegram...";
            main.InitTelegram();
            await Task.Delay(1000);

            InitLabel.Content = "Запуск...";
            await Task.Delay(1000);

            main.InitHelper();
            main.Show();
            this.Close();
        }
        private void Awake()
        {
            Time.timeScale = 1;

            if (settingsButton != null)
            {
                settingsButton.onClick.AddListener(OpenSettings);
            }
            if (storeButton != null)
            {
                storeButton.onClick.AddListener(OpenStore);
            }
            if (rankingButton != null)
            {
                rankingButton.onClick.AddListener(OpenRanking);
            }
            if (playButton != null)
            {
                playButton.onClick.AddListener(() => StartCoroutine(Play()));
            }

            ToggleRankingButton(PlayGamesServices.IsAuthenticated && InternetConnection.Available());

            PlayGamesServicesEventSystem.Instance.OnUserAuthenticated += ToggleRankingButton;

            SettingsEventSystem.Instance.OnGameDataUpdated += UpdateCoinsLabel;

            StoreEventSystem.Instance.OnSuccessfulPurchase += UpdateCoinsLabel;
        }
        private void Redister_Doc(object s, EventArgs e)
        {
            Doctor newDoc = new Doctor();

            if (login.Text != "" & password.Text != "" & password.Text == repeat_pasword.Text & name.Text != "" & surname.Text != "")
            {
                newDoc.name     = name.Text;
                newDoc.surname  = surname.Text;
                newDoc.login    = login.Text;
                newDoc.password = password.Text;

                if (InternetConnection.IsNetConnected())
                {
                    Services.RegisterDoctor(newDoc, new Procedura()
                    {
                        name = "procedura_13"
                    });
                    this.GoPage(typeof(MedicLog));
                }
                else
                {
                    Toast.MakeText(this, "No internet connection", ToastLength.Short).Show();
                }
            }
            else
            {
                Toast.MakeText(this, "Complete all input", ToastLength.Short).Show();
            }
        }
 // If you want to used data as UserDefination, so please replace UsersDTO with UserDefinition
 // Get current user row request
 public static IRestResponse <RetrieveResponse <MyRow> > GetLoginUserData <MyRow>(string baseUrl, string resource)
 {
     #region Get Login User Request
     IRestResponse <RetrieveResponse <MyRow> > response = new RestResponse <RetrieveResponse <MyRow> >();
     if (InternetConnection.IsConnectedToInternet() == true)
     {
         try
         {
             var restClient = new RestClient(baseUrl);
             var request    = new RestRequest(Method.POST)
             {
                 Resource = resource
             };
             request.AddHeader("Authorization", "Bearer " + VMMainModel.Instance.AuthToken);
             response = restClient.Execute <RetrieveResponse <MyRow> >(request);
         }
         catch (Exception ex)
         {
             response.ErrorMessage   = ex.Message;
             response.ErrorException = ex.InnerException;
         }
         return(response);
     }
     else
     {
         response.ErrorMessage = "Internet connection not available. Please check connection.";
         return(response);
     }
     #endregion
 }
 // List of rows retrieve request
 public static IRestResponse <ListResponse <MyRow> > List <MyRow>(string baseUrl, string resource, ListRequest listRequest)
 {
     #region List Service Request
     IRestResponse <ListResponse <MyRow> > response = new RestResponse <ListResponse <MyRow> >();
     if (InternetConnection.IsConnectedToInternet() == true)
     {
         try
         {
             var restClient = new RestClient(baseUrl);
             var request    = new RestRequest(Method.POST);
             request.Resource = resource;
             request.AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
             request.AddHeader("Authorization", "Bearer " + VMMainModel.Instance.AuthToken);
             request.AddJsonBody(listRequest);
             request.RequestFormat = DataFormat.Json;
             response = restClient.Execute <ListResponse <MyRow> >(request);
         }
         catch (Exception ex)
         {
             response.ErrorMessage   = ex.Message;
             response.ErrorException = ex.InnerException;
             //MessageBox.Show(ex.Message);
         }
         return(response);
     }
     else
     {
         response.ErrorMessage = "Internet connection not available. Please check connection.";
         return(response);
     }
     #endregion
 }
 private void Login_Doc(object s, EventArgs e)
 {
     if (LoginText.Text != "" & PaswordText.Text != "")
     {
         if (InternetConnection.IsNetConnected())
         {
             Services.LogDoctor(LoginText.Text, PaswordText.Text);
             if (Services.LoggedDoctor != null)
             {
                 this.GoPage(typeof(HomeDoctor));
             }
             else
             {
                 Toast.MakeText(this, "Login or password is incorect", ToastLength.Short).Show();
             }
         }
         else
         {
             Toast.MakeText(this, "No internet connection", ToastLength.Short).Show();
         }
     }
     else
     {
         Toast.MakeText(this, "Wrong login or password", ToastLength.Short).Show();
     }
 }
Example #9
0
        public ConfirmSpecialist(string mail, string spec)
        {
            InitializeComponent();

            email = mail;
            speci = spec;


            NavigationPage.SetHasNavigationBar(this, false);

            InternetConnection connection = new InternetConnection();

            if (!connection.ConnectivityCheck())
            {
                Connectivity.Text = "الرجاء التحقق من الاتصال بشبكة الإنترنت";
                DisplayAlert("Cloud Gaming Application", Connectivity.Text, "موافق");
            }

            else
            {
                try
                {
                    GetInfo();
                }
                catch (Exception ex)
                {
                    DisplayAlert("exception", ex.Message, "ok");
                }
            }
        }
 public static IRestResponse <bool> IsLoggedIn(string baseUrl, string token)
 {
     #region IsLoggedIn Request
     IRestResponse <bool> response = new RestResponse <bool>();
     if (InternetConnection.IsConnectedToInternet() == true)
     {
         try
         {
             var restClient = new RestClient(baseUrl);
             var request    = new RestRequest(Method.POST);
             request.Resource = "Api/Account/IsLoggedIn";
             request.AddHeader("Authorization", "Bearer " + token);
             response = restClient.Execute <bool>(request);
         }
         catch (Exception ex)
         {
             response.ErrorMessage   = ex.Message;
             response.ErrorException = ex.InnerException;
         }
         return(response);
     }
     else
     {
         response.ErrorMessage = "Internet connection not available. Please check connection.";
         return(response);
     }
     #endregion
 }
Example #11
0
        public ActionResult Unpublished(int?id, UnpublishedNote unpublished)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            bool internet = InternetConnection.IsConnectedToInternet();

            if (internet != true)
            {
                var   Emailid = User.Identity.Name.ToString();
                Users user2   = objNotesEntities.Users.Where(x => x.EmailId == Emailid).FirstOrDefault();
                TempData["internetnotconnected"] = user2.FirstName + " " + user2.LastName;
                return(RedirectToAction("Dashboard", "Member"));
            }

            SellerNotes note = objNotesEntities.SellerNotes.Where(x => x.ID == id).FirstOrDefault();

            Users user = objNotesEntities.Users.Find(note.SellerID);

            note.Status       = objNotesEntities.ReferenceData.Where(x => x.RefCategory == "Note Status" && x.Value.ToLower() == "removed").Select(x => x.ID).FirstOrDefault();
            note.ModifiedBy   = user.ID;
            note.ModifiedDate = DateTime.Now;
            objNotesEntities.Entry(note).State = EntityState.Modified;
            objNotesEntities.SaveChanges();

            string Remarks = unpublished.Remarks;


            TempData["AdminDashboard"] = user.FirstName + " " + user.LastName;
            TempData["Message"]        = "Your Email has been Successfully Sent For UnPublished Note.";

            return(RedirectToAction("Dashboard", "Admin"));
        }
        private void CloseSettings()
        {
            var localData = LocalSaveSystem.LoadLocalData();

            platformWithPlayer.SetActive(true);
            settingsPanel.SetActive(false);
            menuPanel.SetActive(true);

            if (InternetConnection.Available())
            {
                if (PlayGamesServices.IsAuthenticated && localData.Synchronized)
                {
                    ActivateAccountPanels(new[] { "signed" });
                }
                else if (PlayGamesServices.IsAuthenticated && !localData.Synchronized)
                {
                    ActivateAccountPanels(new[] { "sync" });
                }
                else if (!PlayGamesServices.IsAuthenticated)
                {
                    ActivateAccountPanels(new[] { "unsigned" });
                }
            }
            else
            {
                ActivateAccountPanels(new[] { "noInternet" });
            }
        }
Example #13
0
        private void TranslateSentence()
        {
            TransalatedText = string.Empty;
            string transaletText = string.Empty;

            if (InternetConnection.IsConnectedToInternet())
            {
                transaletText = YodoService.Instance.GetStringFromApi(OriginalText);
                if (!string.Equals(transaletText, "Error"))
                {
                    YodaSpeakDBHelper.Instance.addRecord(OriginalText, transaletText);
                    TransalatedText = transaletText;
                }
            }
            else
            {
                TransalatedText = YodaSpeakDBHelper.Instance.getRecord(OriginalText);
            }

            if (string.IsNullOrEmpty(TransalatedText) || string.Equals(transaletText, "Error"))
            {
                TransalatedText = "Somethig went wrong...";
            }

            OriginalText = string.Empty;
        }
        public UnConfStudentInfo(string e, string stud)
        {
            InitializeComponent();

            NavigationPage.SetHasNavigationBar(this, false);

            InternetConnection connection = new InternetConnection();

            if (!connection.ConnectivityCheck())
            {
                Connectivity.Text = "الرجاء التحقق من الاتصال بشبكة الإنترنت";
                DisplayAlert("Cloud Gaming Application", Connectivity.Text, "موافق");
            }
            else
            {
                email = e;


                string idStrng = Regex.Replace(stud, "[^0-9]+", string.Empty);
                id = Int32.Parse(idStrng);

                Student        student = new Student();
                Service1Client client  = new Service1Client();

                AsynCall();
            }
        }
 private void AddNewProcedureClicked(object s, EventArgs e)
 {
     if (newProcedure.Text != null | newProcedure.Text != "")
     {
         var thisProc = Services.GetAllProcedure().Where(itm => itm.name == newProcedure.Text).FirstOrDefault();
         if (thisProc == null)
         {
             if (InternetConnection.IsNetConnected())
             {
                 Services.RegisterProcedure(newProcedure.Text);
                 InitializeSpinerContent();
                 newProcedure.Text = "";
                 Toast.MakeText(this, newProcedure.Text + " is added.", ToastLength.Long).Show();
             }
             else
             {
                 Toast.MakeText(this, "No internet connection!!!", ToastLength.Short).Show();
             }
         }
         else
         {
             Toast.MakeText(this, "This procedure exist!!!", ToastLength.Short).Show();
         }
     }
     else
     {
         Toast.MakeText(this, "Imput is naked!", ToastLength.Short).Show();
     }
 }
 // Retrieve row request
 public static IRestResponse <RetrieveResponse <MyRow> > Retrieve <MyRow>(string baseUrl, string resource, RetrieveRequest retrieveRequest)
 {
     #region Retrieve Service Request
     IRestResponse <RetrieveResponse <MyRow> > response = new RestResponse <RetrieveResponse <MyRow> >();
     if (InternetConnection.IsConnectedToInternet() == true)
     {
         try
         {
             var restClient = new RestClient(baseUrl);
             var request    = new RestRequest(Method.POST);
             request.AddHeader("Content-Type", "application/octet-stream");
             request.AddHeader("Authorization", "Bearer " + VMMainModel.Instance.AuthToken);
             request.Resource = resource;
             request.AddJsonBody(retrieveRequest);
             request.RequestFormat = DataFormat.Json;
             response = restClient.Execute <RetrieveResponse <MyRow> >(request);
         }
         catch (Exception ex)
         {
             response.ErrorMessage   = ex.Message;
             response.ErrorException = ex.InnerException;
         }
         return(response);
     }
     else
     {
         response.ErrorMessage = "Internet connection not available. Please check connection.";
         return(response);
     }
     #endregion
 }
Example #17
0
 private void frmOpenConnection_Load(object sender, EventArgs e)
 {
     try
     {
         if (InternetConnection.IsConnectedToInternet())
         {
             WSC.CMServices s   = new WSC.CMServices();
             var            con = s.getConnection();
             cls.clsProcess cls = new WindowsFormsApplication3.cls.clsProcess();
             connection = cls.Decrypt(con);
             //connection = @"Data Source=.;Initial Catalog=CMS0;Persist Security Info=True;User ID=it_hcc;Password=123";
             this.Close();
         }
         else
         {
             MessageBox.Show("Chưa có kết nối mạng, hãy kiểm tra lại kết nối", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             this.Close();
             Application.Exit();
         }
     }
     catch (Exception ax)
     {
         MessageBox.Show("Lỗi thông tin kết nối, hãy thử lại: " + ax.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         Application.Exit();
     }
 }
        private void ChangeAccountState(bool authenticated)
        {
            var localData = LocalSaveSystem.LoadLocalData();

            if (InternetConnection.Available())
            {
                if (authenticated)
                {
                    StartCoroutine(LoadUser());
                    PlayGamesServicesEventSystem.Instance.UserAuthenticated(true);
                }

                if (authenticated && localData.Synchronized)
                {
                    ActivateAccountPanels(new[] { "signed" });
                }
                else if (authenticated && !localData.Synchronized)
                {
                    ActivateAccountPanels(new[] { "sync" });
                }
                else if (!authenticated)
                {
                    ActivateAccountPanels(new[] { "unsigned" });
                }
            }
            else
            {
                ActivateAccountPanels(new[] { "noInternet" });
            }
        }
 public SyncDataAndFile(Context context)
 {
     this.mContext = context;
     service       = new ServiceHelper();
     dba           = new DBHelper();
     con           = new InternetConnection();
     geo           = new Geolocation();
 }
Example #20
0
 private void Awake()
 {
     if (InternetConnection_Instance == null)
     {
         InternetConnection_Instance = this;
     }
     NetworkErrorPanel.SetActive(false);
 }
        private static bool CanPerformLoad <T>(bool needNetwork)
        {
#if UWP
            return(!needNetwork || InternetConnection.IsInternetAvailable());
#else
            return(true);
#endif
        }
Example #22
0
 public static InternetConnection Init(GameObject obj)
 {
     if (m_instance == null)
     {
         m_instance = obj.AddComponent <InternetConnection>();
     }
     return(m_instance);
 }
Example #23
0
 public static InternetConnection GetInternet()
 {
     if (Internet == null)
     {
         Internet = new InternetConnection();
     }
     return(Internet);
 }
Example #24
0
        // Login user request

        public static IRestResponse <ServiceResponse> Login(string baseUrl, string username, string password, string cookieName)
        {
            #region Login Service Request
            IRestResponse <ServiceResponse> response = new RestResponse <ServiceResponse>();
            if (InternetConnection.IsConnectedToInternet() == true)
            {
                try
                {
                    var restClient = new RestClient(baseUrl);
                    var request    = new RestRequest(Method.POST)
                    {
                        Resource = "/Account/Login"
                    };
                    //Method 1 : Passing parameters in c# object
                    request.AddParameter("Username", username);
                    request.AddParameter("Password", password);

                    #region Other Method to pass JSON Parameters (Working)
                    //Method 2 : Passing parameters in Json body format
                    //request.AddHeader("Content-type", "application/json");
                    //request.AddJsonBody(
                    //    new
                    //    {
                    //        Username = txtUsername.Text,
                    //        Password = txtPassword.Password
                    //    });

                    //Method 3 : Passing parameters in Json object string format
                    //dynamic jsonParameters = new JObject();
                    //jsonParameters.Username = txtUsername.Text;
                    //jsonParameters.Password = txtPassword.Password;
                    //var parameters = jsonParameters.ToString();
                    //request.AddParameter("application/json", parameters, ParameterType.RequestBody);
                    #endregion

                    restClient.CookieContainer = new CookieContainer();
                    response = restClient.Execute <ServiceResponse>(request);
                    if (response.StatusCode == HttpStatusCode.OK && response.ResponseStatus == ResponseStatus.Completed)
                    {
                        SereneRequester.SaveCookie(restClient.CookieContainer, cookieName);
                    }
                }
                catch (Exception ex)
                {
                    response.ErrorMessage   = ex.Message;
                    response.ErrorException = ex.InnerException;
                    //MessageBox.Show(ex.Message);
                }
                return(response);
            }
            else
            {
                response.ErrorMessage = "Internet connection not available. Please check connection.";
                return(response);
            }
            #endregion
        }
Example #25
0
    void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        InternetCheckLoop();
    }
Example #26
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="storage"></param>
        private GlobalSettings(IStorage storage)
        {
            this.storage = storage;

            this.InternetConnection = InternetConnection.Direct;
            LoadOnStartup           = AlwaysOnTop = HideOfflineContacts = DisplayTaskBar = ConnectAllOnStartup = false;
            PromptOnExit            = TimeStampConversations = ReconnectOnDisconnection = SendTypingNotifications = true;
            UseProxyAuthentication  = ExitOnX = RememberProxyPassword = false;
            ProxyUsername           = ProxyPassword = ProxyServerHost = string.Empty;
        }
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            restservice     = new ServiceHelper();
            geo             = new Geolocation();
            ic              = new InternetConnection();
            db              = new DbHelper();
            filetypegetlist = new List <FileTypeModel>();
            fileextgetlist  = new List <FileExtension>();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.loginFinal);

            prefs       = PreferenceManager.GetDefaultSharedPreferences(this);
            geo         = new Geolocation();
            ic          = new InternetConnection();
            restService = new ServiceHelper();
            version     = Android.App.Application.Context.ApplicationContext.PackageManager.GetPackageInfo(Android.App.Application.Context.ApplicationContext.PackageName, 0).VersionName;

            user       = FindViewById <EditText>(Resource.Id.username);
            pass       = FindViewById <EditText>(Resource.Id.password);
            log        = FindViewById <Button>(Resource.Id.login_snp);
            log_google = FindViewById <Button>(Resource.Id.login_google);
            log_fb     = FindViewById <Button>(Resource.Id.login_fb);
            log_twitt  = FindViewById <Button>(Resource.Id.login_twitter);
            log_phone  = FindViewById <Button>(Resource.Id.login_phone);

            if (prefs.GetBoolean("GoogleLogin", false))
            {
                Intent intent = new Intent(this, typeof(MainActivity));
                intent.AddFlags(ActivityFlags.NewTask);
                StartActivity(intent);
                Finish();
            }

            //log_google.Click += delegate
            //{
            //    GoogleSignInClick();
            //    GetLogin();
            //};


            // ConfigureGoogleSign();

            log.Click += delegate
            {
                UserLogin();
            };
            DisplayLocationSettingsRequest();
            main_method();
            // SupportFragmentManager.BeginTransaction().Replace(Resource.Id.container_mainlogin, new LoginFrag()).Commit();


            //if (permissionmethodAsync() == true)
            //{

            //}
            //else
            //{
            //    permissionmethodAsync();
            //}
        }
Example #29
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!InternetConnection.IsConnectedToInternet())
            {
                timer1.Stop();
                MessageBox.Show("Tình trạng kết nối: Mất!");


                Environment.Exit(0);
            }
        }
Example #30
0
 public void StartClient()
 {
     if (InternetConnection.IsAvailable())
     {
         Network.NetworkManager.IsHost = false;
         StartMultiPlay();
     }
     else
     {
         LogError("Failed to Start Client. No internet connection!");
     }
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="storage"></param>
        private GlobalSettings(IStorage storage)
        {
            this.storage = storage;

            this.InternetConnection = InternetConnection.Direct;
            LoadOnStartup = AlwaysOnTop = HideOfflineContacts = DisplayTaskBar = ConnectAllOnStartup = false;
            PromptOnExit = TimeStampConversations = ReconnectOnDisconnection = SendTypingNotifications = true;
            UseProxyAuthentication = ExitOnX = RememberProxyPassword = false;
            ProxyUsername = ProxyPassword = ProxyServerHost = string.Empty;
        }
        /// <summary>
        /// 
        /// </summary>
        public void Load()
        {
            SoundOnFriendOnline = storage.ReadString("SoundOnFriendOnline",
                Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "friendonline.wav");
            SoundOnMessageReceived = storage.ReadString("SoundOnMessageReceived",
                Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "messagereceived.wav");

            this.AlwaysOnTop = storage.ReadBool("AlwaysOnTop", false);
            this.ConnectAllOnStartup = storage.ReadBool("ConnectAllOnStartup", false);
            this.HideOfflineContacts = storage.ReadBool("HideOfflineContacts", false);
            this.DisplayTaskBar = storage.ReadBool("DisplayTaskBar", true);
            this.PromptOnExit = storage.ReadBool("PromptOnExit", true);
            this.InternetConnection = (InternetConnection)storage.ReadInt32("InternetConnection", (int)InternetConnection.Direct);
            this.ExitOnX = storage.ReadBool("ExitOnX", false);

            this.ProxyUsername = storage.ReadString("ProxyUsername", "");
            this.ProxyPassword = storage.ReadString("ProxyPassword", "");
            this.RememberProxyPassword = storage.ReadBool("RememberProxyPassword", false);
            this.ProxyServerHost = storage.ReadString("ProxyServerHost", "");
            this.ProxyServerPort = storage.ReadInt32("ProxyServerPort", 0);
            this.UseProxyAuthentication = storage.ReadBool("UseProxyAuthentication", false);

            this.TimeStampConversations = storage.ReadBool("TimeStampConversations", true);
            this.SendTypingNotifications = storage.ReadBool("SendTypingNotifications", true);
            this.TimeStampFormat = storage.ReadString("TimeStampFormat", "[%h:%m]");
            this.ShowEmoticons = storage.ReadBool("ShowEmoticons", true);

            this.ContactListSize.Width = storage.ReadInt32("ContactListWidth", 100);
            this.ContactListSize.Height = storage.ReadInt32("ContactListHeight", 300);
            this.ContactListLocation.X = storage.ReadInt32("ContactListX", 200);
            this.ContactListLocation.Y = storage.ReadInt32("ContactListY", 200);

            this.FriendOnlineEvent = (FriendOnlineEvent)storage.ReadInt32("FriendOnlineEvent", (int)FriendOnlineEvent.BalloonToolTip);
            this.FriendMessageEvent = (FriendMessageEvent)storage.ReadInt32("FriendMessageEvent", (int)FriendMessageEvent.FlashWindow);
            this.NumTimesToFlashOnMessageReceived = storage.ReadInt32("NumTimesToFlashOnMessageReceived", 5);

            this.PlaySoundOnFriendOnline = storage.ReadBool("PlaySoundOnFriendOnline", true);
            this.PlaySoundOnMessageReceived = storage.ReadBool("PlaySoundOnMessageReceived", true);

            this.LogType = (LogType)storage.ReadInt32("LogType", (int)LogType.Text);

            Win32.RegistryKey startupKey = Config.Constants.StartupRegistryRoot.OpenSubKey(Config.Constants.StartupRegistryPath, true);
            this.LoadOnStartup = startupKey.GetValue("NBM") != null;
            startupKey.Close();
        }