Esempio n. 1
0
 public ManageDlls(ClientDataSource ds)
 {
     InitializeComponent();
     _ds = ds;
     RefreshDlls();
     ShowDialog();
 }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
 public LoginWindow()
 {
     InitializeComponent();
     _mainWindow = new MainWindow();
     _dataSource = new ClientDataSource();
     textBox.Focus();
 }
Esempio n. 4
0
        public ProcessWindow(StreamReader reader, StreamWriter writer, ClientDataSource ds)
        {
            InitializeComponent();
            _reader = reader;
            _writer = writer;
            _ds = ds;

            FillListView();

            if (!_erroFillingList)
                ShowDialog();
        }
Esempio n. 5
0
 protected override void TearDown()
 {
     DataSource = null;
     base.TearDown();
 }
Esempio n. 6
0
 protected override void SetUp()
 {
     base.SetUp();
     DataSource = new ClientDataSource();
 }
Esempio n. 7
0
        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();
        }
Esempio n. 8
0
        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};
        }
Esempio n. 9
0
 public AddUserWindow(ClientDataSource ds)
 {
     InitializeComponent();
     _ds = ds;
     textBox.Focus();
 }
Esempio n. 10
0
        /*=============================================================================
            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();
        }