Exemple #1
0
 private void GetMDIProgessBar()
 {
     try
     {
         FrmA3DBhavCopy _RadFormParent = (FrmA3DBhavCopy)this.Parent.Parent.Parent.Parent.Parent;
         RdStatusStrip = _RadFormParent.RdStatusStrip;
         //RdProgressBar = _RadFormParent.RdProgressBar;
         //RdLlbMessage = _RadFormParent.RdLlbMessage;
         RdLlbDateRange = _RadFormParent.RdLlbDateRange;
     }
     catch (Exception ex)
     {
         ClsMessage._IClsMessage.ProjectExceptionMessage(ex);
     }
 }
            public void SetupJDownloaderTree(RadTreeView RadTree, RadStatusStrip Strip = null, bool StartDLWatchTimer = true)
            {
                if (Strip != null)
                {
                    JDLStatusBar = Strip;
                }
                if (RadTree == null)
                {
                    return;
                }

                JDownloadTree = RadTree;

                RadTree.SelectedNodeChanged  += new Telerik.WinControls.UI.RadTreeView.RadTreeViewEventHandler(JDownloadTree_SelectedNodeChanged);
                RadTree.NodeMouseDoubleClick += new Telerik.WinControls.UI.RadTreeView.TreeViewEventHandler(JDownloadTree_NodeMouseDoubleClick);

                if (StartDLWatchTimer)
                {
                    _timer          = new System.Timers.Timer(10000); // Set up the timer for 10 seconds
                    _timer.Elapsed += new ElapsedEventHandler(JDownloader_TimerEvent);
                    _timer.Enabled  = true;                           // Enable it
                }
            }
        public void sb(string Text = "", RadStatusStrip radstatstrip = null, RadLabelElement radlabelelement = null)
        {
            if (radstatstrip != null)
            {
                StatStrip = radstatstrip;
            }
            if (radlabelelement != null)
            {
                StripElement = radlabelelement;
            }

            if (StatStrip != null && StripElement != null)
            {
                if (StatStrip.InvokeRequired)  // if currently on a different thread, invoke
                {
                    StatStrip.BeginInvoke((MethodInvoker) delegate() { StripElement.Text = Text; });
                }
                else
                {
                    StripElement.Text = Text;
                }
            }
        }
Exemple #4
0
 private void InitializeComponent()
 {
     this.components    = new Container();
     this.radStatusBar1 = new RadStatusStrip();
     this.textBox1      = new RadTextBoxElement();
     this.radToolStripSeparatorItem1 = new RadToolStripSeparatorItem();
     this.radLabelElement0           = new RadLabelElement();
     this.radProgressBarElement1     = new RadProgressBarElement();
     this.radToolStripSeparatorItem2 = new RadToolStripSeparatorItem();
     this.radLabelElement1           = new RadLabelElement();
     this.radToolStripSeparatorItem3 = new RadToolStripSeparatorItem();
     this.radButtonElementL          = new RadButtonElement();
     this.radButtonElementR          = new RadButtonElement();
     this.radLabelElement2           = new RadLabelElement();
     this.radToolStripSeparatorItem5 = new RadToolStripSeparatorItem();
     this.radLabelElement3           = new RadLabelElement();
     this.radToolStripSeparatorItem6 = new RadToolStripSeparatorItem();
     this.radLabelElement4           = new RadLabelElement();
     this.radToolStripSeparatorItem4 = new RadToolStripSeparatorItem();
     this.timer1 = new Timer(this.components);
     ((ISupportInitialize)this.radStatusBar1).BeginInit();
     base.SuspendLayout();
     this.radStatusBar1.AutoSize  = true;
     this.radStatusBar1.BackColor = SystemColors.ControlLightLight;
     this.radStatusBar1.Items.AddRange(new RadItem[]
     {
         this.textBox1,
         this.radToolStripSeparatorItem1,
         this.radLabelElement0,
         this.radProgressBarElement1,
         this.radToolStripSeparatorItem2,
         this.radLabelElement1,
         this.radToolStripSeparatorItem3,
         this.radButtonElementL,
         this.radButtonElementR,
         this.radToolStripSeparatorItem3,
         this.radLabelElement2,
         this.radToolStripSeparatorItem5,
         this.radLabelElement3,
         this.radToolStripSeparatorItem6,
         this.radLabelElement4
     });
     this.radStatusBar1.LayoutStyle = RadStatusBarLayoutStyle.Stack;
     this.radStatusBar1.Location    = new Point(0, 1);
     this.radStatusBar1.Margin      = new Padding(5, 4, 5, 4);
     this.radStatusBar1.Name        = "radStatusBar1";
     this.radStatusBar1.RootElement.ControlBounds     = new Rectangle(0, 1, 300, 24);
     this.radStatusBar1.RootElement.StretchVertically = true;
     this.radStatusBar1.Size       = new Size(1155, 23);
     this.radStatusBar1.SizingGrip = true;
     this.radStatusBar1.TabIndex   = 0;
     this.radStatusBar1.Text       = "radStatusBar1";
     this.textBox1.CanFocus        = true;
     this.textBox1.Margin          = new Padding(1);
     this.textBox1.Name            = "radButtonElement1";
     this.radStatusBar1.SetSpring(this.textBox1, true);
     this.textBox1.StretchVertically = false;
     this.textBox1.Text = "";
     this.radToolStripSeparatorItem1.Margin  = new Padding(1);
     this.radToolStripSeparatorItem1.MinSize = new Size(2, 17);
     this.radToolStripSeparatorItem1.Name    = "radToolStripSeparatorItem1";
     this.radStatusBar1.SetSpring(this.radToolStripSeparatorItem1, false);
     this.radToolStripSeparatorItem1.Text = "radToolStripSeparatorItem1";
     this.radLabelElement0.Margin         = new Padding(1);
     this.radLabelElement0.MinSize        = new Size(2, 17);
     this.radLabelElement0.Name           = "radLabelElement0";
     this.radStatusBar1.SetSpring(this.radLabelElement0, false);
     this.radLabelElement0.Text               = "任务进度";
     this.radLabelElement0.TextWrap           = true;
     this.radProgressBarElement1.AutoSize     = false;
     this.radProgressBarElement1.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
     this.radProgressBarElement1.Bounds       = new Rectangle(0, 0, 133, 16);
     this.radProgressBarElement1.ClipDrawing  = true;
     this.radProgressBarElement1.DefaultSize  = new Size(130, 16);
     this.radProgressBarElement1.Margin       = new Padding(1);
     this.radProgressBarElement1.Name         = "radProgressBarElement1";
     this.radStatusBar1.SetSpring(this.radProgressBarElement1, false);
     this.radProgressBarElement1.Text          = "";
     this.radProgressBarElement1.TextAlignment = ContentAlignment.MiddleCenter;
     this.radToolStripSeparatorItem2.Margin    = new Padding(1);
     this.radToolStripSeparatorItem2.MinSize   = new Size(2, 17);
     this.radToolStripSeparatorItem2.Name      = "radToolStripSeparatorItem2";
     this.radStatusBar1.SetSpring(this.radToolStripSeparatorItem2, false);
     this.radToolStripSeparatorItem2.Text = "radToolStripSeparatorItem2";
     this.radLabelElement1.Margin         = new Padding(1);
     this.radLabelElement1.MinSize        = new Size(2, 17);
     this.radLabelElement1.Name           = "radLabelElement1";
     this.radStatusBar1.SetSpring(this.radLabelElement1, false);
     this.radLabelElement1.Text              = "";
     this.radLabelElement1.TextWrap          = true;
     this.radToolStripSeparatorItem3.Margin  = new Padding(1);
     this.radToolStripSeparatorItem3.MinSize = new Size(2, 17);
     this.radToolStripSeparatorItem3.Name    = "radToolStripSeparatorItem3";
     this.radStatusBar1.SetSpring(this.radToolStripSeparatorItem3, false);
     this.radToolStripSeparatorItem3.Text = "radToolStripSeparatorItem3";
     this.radButtonElementL.Margin        = new Padding(1);
     this.radButtonElementL.MinSize       = new Size(2, 17);
     this.radButtonElementL.Name          = "radLabelElementL";
     this.radStatusBar1.SetSpring(this.radButtonElementL, false);
     this.radButtonElementL.Text    = "<";
     this.radButtonElementR.Margin  = new Padding(1);
     this.radButtonElementR.MinSize = new Size(2, 17);
     this.radButtonElementR.Name    = "radLabelElementR";
     this.radStatusBar1.SetSpring(this.radButtonElementR, false);
     this.radButtonElementR.Text   = ">";
     this.radLabelElement2.Margin  = new Padding(1);
     this.radLabelElement2.MinSize = new Size(2, 17);
     this.radLabelElement2.Name    = "radLabelElement1";
     this.radStatusBar1.SetSpring(this.radLabelElement2, false);
     this.radLabelElement2.Text              = "";
     this.radLabelElement2.TextWrap          = true;
     this.radToolStripSeparatorItem5.Margin  = new Padding(1);
     this.radToolStripSeparatorItem5.MinSize = new Size(2, 17);
     this.radToolStripSeparatorItem5.Name    = "radToolStripSeparatorItem5";
     this.radStatusBar1.SetSpring(this.radToolStripSeparatorItem5, false);
     this.radToolStripSeparatorItem5.Text = "radToolStripSeparatorItem5";
     this.radLabelElement3.Margin         = new Padding(1);
     this.radLabelElement3.Name           = "radLabelElement2";
     this.radStatusBar1.SetSpring(this.radLabelElement3, false);
     this.radLabelElement3.Text              = "";
     this.radLabelElement3.TextWrap          = true;
     this.radToolStripSeparatorItem6.Margin  = new Padding(1);
     this.radToolStripSeparatorItem6.MinSize = new Size(2, 17);
     this.radToolStripSeparatorItem6.Name    = "radToolStripSeparatorItem4";
     this.radStatusBar1.SetSpring(this.radToolStripSeparatorItem6, false);
     this.radToolStripSeparatorItem6.Text = "radToolStripSeparatorItem4";
     this.radLabelElement4.Margin         = new Padding(1);
     this.radLabelElement4.Name           = "radLabelElement3";
     this.radStatusBar1.SetSpring(this.radLabelElement4, false);
     this.radLabelElement4.Text              = "";
     this.radLabelElement4.TextWrap          = true;
     this.radToolStripSeparatorItem4.Margin  = new Padding(1);
     this.radToolStripSeparatorItem4.MinSize = new Size(2, 17);
     this.radToolStripSeparatorItem4.Name    = "radToolStripSeparatorItem4";
     this.radToolStripSeparatorItem4.Text    = "radToolStripSeparatorItem4";
     this.timer1.Interval     = 1000;
     this.timer1.Tick        += new EventHandler(this.timer1_Tick);
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.AutoScaleMode       = AutoScaleMode.Font;
     this.BackColor           = Color.White;
     base.Controls.Add(this.radStatusBar1);
     base.Name = "UCStatusBar";
     base.Size = new Size(1155, 24);
     ((ISupportInitialize)this.radStatusBar1).EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }