public ManageDlls(ClientDataSource ds) { InitializeComponent(); _ds = ds; RefreshDlls(); ShowDialog(); }
protected void Login_click(object sender, EventArgs e) { var dataSource = new ClientDataSource(); var tmp = ""; try { dataSource.Login(LoginUser.UserName, LoginUser.Password); } catch (ArgumentNullException) { tmp = "Username and/or password are null, please retry!"; } catch (InvalidEmailException) { tmp = "Email is not valid, please retry!"; } catch (InvalidPasswordException) { tmp = "Password is not valid, please retry!"; } catch (UserNotExistingException) { tmp = "User with this credentials does not exists, please retry!"; } finally { LoginUser.FailureText = tmp; } if (LoginUser.FailureText != "") return; Session["ClientDataSource"] = dataSource; Session["UserEmail"] = LoginUser.UserName; Response.Redirect("../MemberOnly.aspx"); }
public LoginWindow() { InitializeComponent(); _mainWindow = new MainWindow(); _dataSource = new ClientDataSource(); textBox.Focus(); }
public ProcessWindow(StreamReader reader, StreamWriter writer, ClientDataSource ds) { InitializeComponent(); _reader = reader; _writer = writer; _ds = ds; FillListView(); if (!_erroFillingList) ShowDialog(); }
protected override void TearDown() { DataSource = null; base.TearDown(); }
protected override void SetUp() { base.SetUp(); DataSource = new ClientDataSource(); }
protected void TearDown() { DataSource.Logout(); DataSource = null; try { _reader.Close(); _writer.Close(); _server.Close(); } catch { } _server = null; _reader = null; _writer = null; try { _processedFileStream.Close(); _fileToUpload.Close(); } catch { } CloudStorageSetup.ResetStorage(); }
protected void SetUp() { CloudStorageSetup.ResetStorage(); DataSource = new ClientDataSource(); DataSource.Login(DefaultAdminEmail, DefaultAdminPwd); _server = new TcpClient(); /* estabilishing tcp connection with dispatcher */ _server.Connect(IPAddress.Parse(ServerString), ServerPort); _reader = new StreamReader(_server.GetStream()); _writer = new StreamWriter(_server.GetStream()) {AutoFlush = true}; }
public AddUserWindow(ClientDataSource ds) { InitializeComponent(); _ds = ds; textBox.Focus(); }
/*============================================================================= Event handlers =============================================================================*/ protected void Page_Load(object sender, EventArgs e) { var loggedUser = (String)Session["UserEmail"]; _dataSource = (ClientDataSource) Session["ClientDataSource"]; if (loggedUser == null) Response.Redirect("Account/Login.aspx"); Literal_Logged.Text = loggedUser; RefreshFilesTable(); RefreshAdminUsersTable(); RefreshCommonUsersTable(); }