예제 #1
0
 private void            colorEdit_Color_EditValueChanged(object aSender, EventArgs aEventArgse)
 {
     if (mLine.LineColor != colorEdit_Color.Color)
     {
         mLine.LineColor = colorEdit_Color.Color;
         mRedraw.Redraw();
     }
 }
 private void            colorEdit_BorderColor_EditValueChanged(object aSender, EventArgs aEventArgse)
 {
     if (mEllipse.BorderColor != colorEdit_BorderColor.Color)
     {
         mEllipse.BorderColor = colorEdit_BorderColor.Color;
         mRedraw.Redraw();
     }
 }
예제 #3
0
        /// <summary>
        /// Redraws all forms
        /// </summary>
        internal void Redraw()
        {
            foreach (Control c in desktop.Controls)
            {
                if (!(c is IObjectLabelUI))
                {
                    continue;
                }
                IObjectLabelUI label = c as IObjectLabelUI;

                Form f = null;
                if (label is IShowForm)
                {
                    IShowForm sf = label as IShowForm;
                    f = sf.Form as Form;
                }
                if (f == null)
                {
                    Redraw(c);
                    continue;
                }
                if (f.IsDisposed)
                {
                    Redraw(c);
                    continue;
                }
                if (!(f is IRedraw))
                {
                    continue;
                }
                IRedraw r = f as IRedraw;
                r.Redraw();
            }
        }
예제 #4
0
        private void buttonApplyCoord_Click(object sender, EventArgs e)
        {
            acceptPar();
            IRedraw r = this;

            r.Redraw();
        }
예제 #5
0
 private void            spinEdit_X_EditValueChanged(object aSender, EventArgs aEventArgs)
 {
     if (mEllipse.mX != spinEdit_X.Value)
     {
         mEllipse.mX = (int)spinEdit_X.Value;
         mRedraw.Redraw();
     }
 }
예제 #6
0
 void IRedraw.Redraw()
 {
     if (pIndicator != null)
     {
         if (pIndicator is IRedraw)
         {
             IRedraw r = pIndicator as IRedraw;
             r.Redraw();
         }
     }
 }
예제 #7
0
 private void        spinEdit_X1_EditValueChanged(object aSender, EventArgs aEventArgs)
 {
     if (mLine.mX1 != spinEdit_X1.Value)
     {
         mLine.mX1 = (int)spinEdit_X1.Value;
         mRedraw.Redraw();
     }
 }
예제 #8
0
 void IRedraw.Redraw()
 {
     if (blocked)
     {
         return;
     }
     if (pIndicator != null)
     {
         if (pIndicator is IRedraw)
         {
             IRedraw r = pIndicator as IRedraw;
             r.Redraw();
         }
     }
 }
예제 #9
0
 private bool Redraw(Control control)
 {
     IRedraw r = control.GetSimpleObject<IRedraw>();
     if (r != null)
     {
         r.Redraw();
         return true;
     }
     foreach (Control c in control.Controls)
     {
         if (Redraw(c))
         {
             return true;
         }
     }
     return false;
 }
예제 #10
0
        private void                tsButton_Import_Click(object aSender, EventArgs aEventArgs)
        {
            using (var lOpenDlg = new OpenFileDialog())
            {
                lOpenDlg.CheckFileExists = true;
                lOpenDlg.AddExtension    = true;
                lOpenDlg.Filter          = "Images|*.bmp;*.png;*.gif;*.exif;*.jpg;*.tif";
                lOpenDlg.Multiselect     = false;

                if (lOpenDlg.ShowDialog() == DialogResult.OK)
                {
                    var lMemStrm = new MemoryStream();
                    try
                    {
                        using (FileStream lFileStrm = new FileStream(lOpenDlg.FileName, FileMode.Open))
                        {
                            lFileStrm.CopyTo(lMemStrm);
                        }

                        var lOldStrm = mImage.mImgMemStrm;
                        mImage.mImgMemStrm = lMemStrm;

                        if (lOldStrm != null)
                        {
                            lOldStrm.Close();
                            lOldStrm = null;
                        }

                        updateForm();
                        mRedraw.Redraw();
                    }
                    catch (Exception lExc)
                    {
                        lMemStrm.Close();
                        Log.Error("Unable to load image from '" + lOpenDlg.FileName + "'. " + lExc.Message, lExc.ToString());
                        MessageForm.showMessage(lExc.Message, this);
                        return;
                    }
                }
            }
        }
예제 #11
0
        private void refresh()
        {
            IRedraw r = this;

            r.Redraw();
        }