private void StartItem_Click(object sender, EventArgs e) { if (Directory.Exists(ThereIsConstants.Path.Profile_Folder_Path) && File.Exists(ThereIsConstants.Path.ProfileInfo_File_Path)) { ProfileInfo myInfo = ProfileInfo.FromFile(ThereIsConstants.Path.ProfileInfo_File_Path); CreateProfileSandBox myCreate = new CreateProfileSandBox(this, myInfo, true); this.IsShowingSandBox = true; this.ShowingSandBox = myCreate; myCreate.Show(); this.Enabled = false; myCreate.Location = new Point((this.Width / 2) - (myCreate.Width / 2), (this.Height / 2) - (myCreate.Height / 2)); myCreate.FormClosed += CreateNewProfileSandBox_FormClosed; } else { this.IsShowingSandBox = true; this.ShowingSandBox = new CreateProfileSandBox(this); this.ShowingSandBox.Show(); this.Enabled = false; this.ShowingSandBox.Location = new Point((this.Width / 2) - (ShowingSandBox.Width / 2), (this.Height / 2) - (ShowingSandBox.Height / 2)); this.ShowingSandBox.FormClosed += CreateNewProfileSandBox_FormClosed; } this.StartItem.HasMouseClickedOnce = false; }
//--------------------------------------- private async void PriLinkStartWorker(object sender, EventArgs e) { ((Timer)sender).Enabled = false; ((Timer)sender).Dispose(); //MessageBox.Show("I am"); var targetFile = _username + endFileName; var ExistingFile = await ThereIsServer.Actions.GetAllContentsByRef(ThereIsServer.ServersInfo.MyServers[0], targetFile); if (ExistingFile.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed) { NoInternetConnectionSandBox.PrepareConnectionClosedSandBox(); return; } StrongString[] myStrings = ExistingFile.Decode().Split(charSeparater); for (int i = 2; i < myStrings.Length; i++) { if (_token == myStrings[i]) { Father.HasLogin = true; break; } else { continue; } } if (Father.IsOnSecondStepOfLinkStart) { ProfileInfo myInfo = ProfileInfo.FromFile(ThereIsConstants.Path.ProfileInfo_File_Path); myInfo.LastLogin = ThereIsConstants.AppSettings.GlobalTiming.GetForServer().GetValue(); ProfileInfo.UpdateInfo(myInfo, ThereIsConstants.Path.ProfileInfo_File_Path); } Father.IsSecuredMeWorkingOver = true; }