Exemplo n.º 1
0
        public void SetMessageInfo(string sTitle, string sMsg, GifAnimationMode iAnimationMode)
        {
            SuspendLayout();

            this.Size = determineSize(sMsg);

            FormTitle = sTitle;
            message   = sMsg;

            if (this.animationMode != iAnimationMode)
            {
                this.animationMode = iAnimationMode;

                switch (iAnimationMode)
                {
                case GifAnimationMode.eUploadingMultipleFiles:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.uploading_animation;
                    break;

                case GifAnimationMode.eExportSingleFile:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.exporting_animation;
                    break;

                case GifAnimationMode.eConnecting:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.connecting_animation;
                    break;
                }
            }

            SetDialogProperties();
            ResumeLayout();
            this.Refresh();
        }
Exemplo n.º 2
0
        public RoboMessagePanel5(Form PrevForm, string Title, string Message, GifAnimationMode iAnimationMode)
        {
            InitializeComponent();

            GetSpacings();

            // set previous form
            PreviousForm = PrevForm;
            SuspendLayout();

            this.DoubleBuffered = true;
            this.UpdateStyles();

            // set size of form based on amount of text
            this.Size = determineSize(Message);
            // create region for form based on size
            drawRegion();
            // set message to given message
            message = Message;

            if (this.animationMode != iAnimationMode)
            {
                this.animationMode = iAnimationMode;

                switch (iAnimationMode)
                {
                case GifAnimationMode.eUploadingMultipleFiles:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.uploading_animation;
                    break;

                case GifAnimationMode.eExportSingleFile:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.exporting_animation;
                    break;

                case GifAnimationMode.eConnecting:
                    pictureBox1.Image = global::GUI_Controls.Properties.Resources.connecting_animation;
                    break;
                }
            }


            if (!string.IsNullOrEmpty(Title))
            {
                FormTitle = Title;
            }

            // set offset
            Offset = new Point((PreviousForm.Size.Width - this.Width) / 2, (PreviousForm.Size.Height - this.Size.Height) / 2 + 25);

            SetDialogProperties();
            ResumeLayout();
            pictureBox1.PerformLayout();
            pictureBox1.Refresh();
        }