Example #1
0
 public void Initialize(MainStudio mainForm, ToolStripStatusLabel mainStatusLabel, ToolStripStatusLabel rightStatusLabel)
 {
     _mainForm         = mainForm;
     _mainStatusLabel  = mainStatusLabel;
     _rightStatusLabel = rightStatusLabel;
     _labelCallBack    = SetStatusLabel;
 }
Example #2
0
 private void SetLabel(Label lbl, string message)
 {
     if (lbl.InvokeRequired)
     {
         SetLabelCallBack d = new SetLabelCallBack(SetLabel);
         this.Invoke(d, new object[] { lbl, message });
     }
     else
     {
         if (lbl == lblAuthorized) // Update the User's Authroisation Status
         {
             if (message == "Authorised")
             {
                 lbl.ForeColor = Properties.Settings.Default.ForeColour;
                 Properties.Settings.Default.IsAuthorised = true;
             }
             else
             {
                 lbl.ForeColor = Properties.Settings.Default.ErrorForeColour;
                 lbl.BackColor = Properties.Settings.Default.ErrorBackColour;
                 Properties.Settings.Default.IsAuthorised = false;
             }
         }
         lbl.Text = message;
     }
 }
Example #3
0
 /// <summary>
 /// 스레드에서 라벨 텍스트 변경
 /// </summary>
 public static void SetLabel(System.Windows.Forms.Label label, string str)
 {
     if (label.InvokeRequired)
     {
         SetLabelCallBack dele = new SetLabelCallBack(SetLabel);
         label.Invoke(dele, label, str);
     }
     else
     {
         label.Text = str;
     }
 }
Example #4
0
 private void SetLabel(string str)
 {
     if (this.lblCopy.InvokeRequired)
     {
         SetLabelCallBack del = new SetLabelCallBack(SetLabel);
         this.Invoke(del, new object[] { str });
     }
     else
     {
         this.lblCopy.Text = str;
     }
 }
Example #5
0
 void SetLabel(string str)
 {
     if (lbCopy.InvokeRequired)
     {
         SetLabelCallBack callBack = new SetLabelCallBack(SetLabel);
         Invoke(callBack, new object[] { str });
     }
     else
     {
         lbCopy.Text = str;
     }
 }
Example #6
0
 // t1 스레드에서 만들어진 값(str)을 메인스레드(폼)의 레이블에 지정하기 위한 메소드
 private void SetLabel(string progStr)
 {
     if (this.label2.InvokeRequired)
     {
         SetLabelCallBack dele = new SetLabelCallBack(SetLabel);
         this.Invoke(dele, progStr);
     }
     else
     {
         this.label2.Text = progStr;
     }
 }
Example #7
0
 private void SetLabel()
 {
     if (this.label1.InvokeRequired)
     {
         SetLabelCallBack dele = new SetLabelCallBack(SetLabel);
         this.Invoke(dele);
     }
     else
     {
         this.label1.Text = "파일 복사 진행중";
     }
 }
Example #8
0
        private void SetServLabel(string str)
        {
            if (this.labelAsyncServFileTrans.InvokeRequired)
            {
                SetLabelCallBack dele = new SetLabelCallBack(SetServLabel);
                if (this.IsHandleCreated)
                {
                    this.Invoke(dele, new object[] { str });
                }

            }
            else
                this.labelAsyncServFileTrans.Text = str;
        }