Esempio n. 1
0
        /// <summary>Creates an upload form. Upload will start as soon as the form is shown.</summary>
        /// <param name="RemoteFile"></param>
        /// <param name="LocalFile"></param>
        /// <param name="Overwrite"></param>
        /// <param name="Connection"></param>
        public UploadForm(string RemoteFile, string LocalFile, bool Overwrite, LBLConnection Connection) : base(RemoteFile, LocalFile, Connection)
        {
            HeaderLabel.Text = "Uploading File";

            this.Overwrite = Overwrite;
            Text           = "Uploading " + LocalFile;
            Image.Image    = Resources.FileOut;
        }
Esempio n. 2
0
        //------------------------------[Constructor]------------------------------

        /// <summary>Creates a download form. Download will start as soon as the form is launched.</summary>
        /// <param name="RemoteFile"></param>
        /// <param name="LocalFile"></param>
        /// <param name="Connection"></param>
        public DownloadForm(string RemoteFile, string LocalFile, LBLConnection Connection) : base("Downloading File", RemoteFile)
        {
            TransferHandler = new LBLClientTransferHandler(Connection);
            this.LocalFile  = LocalFile;
            this.RemoteFile = RemoteFile;
            Image.Image     = Resources.FileIn;

            Text = "Downloading " + RemoteFile;
            CancelBTN.Enabled = true;

            MainProgBar.Style = ProgressBarStyle.Continuous;
        }
Esempio n. 3
0
        //------------------------------[Button]------------------------------

        /// <summary>Starts a Login Request</summary>
        private void LoginButton_Click(object sender, System.EventArgs e)
        {
            Enabled = false;
            Form    = new ServerContactForm("Logging in to the server", "Please wait...");

            try { Connection = new LBLConnection(IPBox.Text, int.Parse(PortBox.Text)); }
            catch (System.Exception) { MessageBox.Show("Unable to parse " + PortBox.Text + " to an integer", "LBL", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }

            Username = UsernameTXB.Text;
            Password = PasswordTXB.Text;
            Form.Show();
            LoginBW.RunWorkerAsync();
        }
Esempio n. 4
0
        //------------------------------[Constructor]------------------------------

        /// <summary>Creates a main form that'll use the specified connection to run the show</summary>
        /// <param name="Connection"></param>
        public MainForm(LBLConnection Connection)
        {
            InitializeComponent();
            Icon = Resources.LBL_Standalone;

            this.Connection = Connection;
            if (!Connection.Connected)
            {
                throw new ArgumentException("Connection has to be connected!");
            }

            Path = new Stack <string>();
        }