示例#1
0
        public UploadFileItem(DC_FileInformation file_info)
        {
            connector = new ServerConnector();

            connector.upload_progress  += uploadProgress;
            connector.upload_completed += uploadCompleted;
            connector.upload_canceled  += uploadCanceled;

            this.file_info = file_info;
            InitializeComponent();

            file_info.status   = DC_FileInformationStatus.PendingUpload;
            _barProgress.Value = 0;
            _lblFileName.Text  = file_info.file_name;
            _lblStatus.Text    = "[WAITING] File Size: " + file_info.file_size.ToString();
        }
        public UploadFileItem(DC_FileInformation file_info)
        {
            connector = new ServerConnector();

            connector.upload_progress += uploadProgress;
            connector.upload_completed += uploadCompleted;
            connector.upload_canceled += uploadCanceled;

            this.file_info = file_info;
            InitializeComponent();

            file_info.status = DC_FileInformationStatus.PendingUpload;
            _barProgress.Value = 0;
            _lblFileName.Text = file_info.file_name;
            _lblStatus.Text = "[WAITING] File Size: " + file_info.file_size.ToString();
        }
示例#3
0
        public frmLogin()
        {
            Client.form_Login = this;
            connector         = new ServerConnector(this);

            InitializeComponent();

            tween_image_height      = new Tween(_picLogo, "Height", dtxCore.EasingEquations.expoEaseOut);
            _picLogo.LoadCompleted += new AsyncCompletedEventHandler(_picLogo_LoadCompleted);

            // Threading
            loadLogoWorker.DoWork             += new DoWorkEventHandler(loadLogoWorker_DoWork);
            loadLogoWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(loadLogoWorker_RunWorkerCompleted);

            // Add the native context menu.
            _notifyIcon.ContextMenu = _contextMenu;

            // Make sure the form is the correct size.  Windows XP's form widths are less than 7's.
            OperatingSystemInfo osi = Utilities.getOSInfo();

            if (osi.os.Contains("XP"))
            {
                Size min_size = new Size()
                {
                    Height = this.MinimumSize.Height - 8,
                    Width  = this.MinimumSize.Width - 8
                };

                Size max_size = new Size()
                {
                    Height = this.MaximumSize.Height - 8,
                    Width  = this.MaximumSize.Width - 8
                };

                this.MinimumSize = min_size;
                this.MaximumSize = max_size;
                this.Size        = min_size;
            }

            // Timer to ensure the session does not expire.
            ping_timer.Enabled  = false;
            ping_timer.Tick    += new EventHandler(ping_timer_Tick);
            ping_timer.Interval = 1000 * 30;             // 20 seconds.


            frmLogin_Activated(new object(), new EventArgs());
        }
        private void DirectoryTreeList_Load(object sender, EventArgs e)
        {
            _imlDirectories.Images.Add("directory", Properties.Resources.asset_blue_16_ns);
            _imlDirectories.Images.Add("directory_private", Properties.Resources.asset_grey_16_ns);
            _imlDirectories.Images.Add("server", Properties.Resources.circle_blue_16_ns);
            _imlDirectories.Images.Add("updating", Properties.Resources.lightening_16_ns);

            // Hide the search bar.
            _layout.RowStyles[1].Height = 0;

            string server_name = Client.server_info.server_name;

            if (server_name == "")
            {
                server_name = "Server";
            }
            _treDirectories.ContextMenu = _contextMenuDirectory;
            node_root = _treDirectories.Nodes.Add("root", server_name, "server", "server");
            updatingDirectory(node_root);
            node_root.Expand();
            connector = new ServerConnector(this);
        }
 /// <param name="connector">Associated connector class that will call the action's methods.</param>
 /// <param name="tag">Object that is associated with this instance of the class.</param>
 public ClientActions(ServerConnector connector, object tag)
 {
     this.tag       = tag;
     this.connector = connector;
 }
        private void DirectoryTreeList_Load(object sender, EventArgs e)
        {
            _imlDirectories.Images.Add("directory", Properties.Resources.asset_blue_16_ns);
            _imlDirectories.Images.Add("directory_private", Properties.Resources.asset_grey_16_ns);
            _imlDirectories.Images.Add("server", Properties.Resources.circle_blue_16_ns);
            _imlDirectories.Images.Add("updating", Properties.Resources.lightening_16_ns);

            // Hide the search bar.
            _layout.RowStyles[1].Height = 0;

            string server_name = Client.server_info.server_name;
            if(server_name == "") {
                server_name = "Server";
            }
            _treDirectories.ContextMenu = _contextMenuDirectory;
            node_root = _treDirectories.Nodes.Add("root", server_name, "server", "server");
            updatingDirectory(node_root);
            node_root.Expand();
            connector = new ServerConnector(this);
        }