コード例 #1
0
        private Binary GetBinary(PictureBox pictureBox, Binary binary)
        {
            Image image = ImageMethods.GetDirectoryImage();

            pictureBox.Image = image;
            return(image != null ? binary = ImageMethods.ImageToBinary(image) : null);
        }
コード例 #2
0
        private void Guide_Load(object sender, EventArgs e)
        {
            pictureBoxGuide.SizeMode = PictureBoxSizeMode.StretchImage;
            StructGuide structGuide = DataMethods.GetGuide(_knotID);

            pictureBoxGuide.Image   = ImageMethods.BinaryToImage(structGuide.guideBinary);
            richTextBoxGuide.Text   = structGuide.guideComment;
            structGuide.guideBinary = _guideBinary;
        }
コード例 #3
0
        private void FillForms()
        {
            comboBoxTypes.DataSource    = DataMethods.GetTypes();
            comboBoxTypes.DisplayMember = "name";
            comboBoxTypes.ValueMember   = "id";

            if (_update == true)
            {
                Text                  = "Изменение";
                buttonEdit.Text       = "Изменить";
                textBoxName.Text      = _knotName;
                comboBoxTypes.Text    = _typeName;
                richTextBoxKnot.Text  = _knotComment;
                richTextBoxGuide.Text = _guideComment;
                pictureBoxKnot.Image  = ImageMethods.BinaryToImage(_knotBinary);
                pictureBoxGuide.Image = ImageMethods.BinaryToImage(_guideBinary);
            }
            else
            {
                Text            = "Добавление";
                buttonEdit.Text = "Добавить";
                CleanerForms();
            }
        }
コード例 #4
0
ファイル: Main.cs プロジェクト: bittbn/KnotInfo
 private void FillForms(Binary knotBinary, string knotComment)
 {
     pictureBoxKnot.Image    = knotBinary != null ? _knotImage = ImageMethods.BinaryToImage(knotBinary) : null;
     richTextBoxComment.Text = knotComment;
 }