2tochnoful

This commit is contained in:
platoff aeeee 2024-10-29 10:34:40 +04:00
parent 5f69ab5c5f
commit 5061f2c41e
4 changed files with 0 additions and 210 deletions

View File

@ -1,6 +0,0 @@
namespace Library15Gerimovich
{
public class Class1
{
}
}

View File

@ -1,81 +0,0 @@
namespace Library15Gerimovich
{
partial class UserControl1
{
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
this.buttonLoad = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.pictureBoxAvatar = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAvatar)).BeginInit();
this.SuspendLayout();
//
// buttonLoad
//
this.buttonLoad.Location = new System.Drawing.Point(38, 118);
this.buttonLoad.Name = "buttonLoad";
this.buttonLoad.Size = new System.Drawing.Size(75, 23);
this.buttonLoad.TabIndex = 0;
this.buttonLoad.Text = "Загрузить";
this.buttonLoad.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(87, 49);
this.panel1.TabIndex = 1;
//
// pictureBoxAvatar
//
this.pictureBoxAvatar.Location = new System.Drawing.Point(38, 58);
this.pictureBoxAvatar.Name = "pictureBoxAvatar";
this.pictureBoxAvatar.Size = new System.Drawing.Size(100, 50);
this.pictureBoxAvatar.TabIndex = 2;
this.pictureBoxAvatar.TabStop = false;
//
// UserControl1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pictureBoxAvatar);
this.Controls.Add(this.panel1);
this.Controls.Add(this.buttonLoad);
this.Name = "UserControl1";
this.Size = new System.Drawing.Size(150, 144);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAvatar)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Button buttonLoad;
private Panel panel1;
private PictureBox pictureBoxAvatar;
}
}

View File

@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Library15Gerimovich
{
public partial class UserControl1 : UserControl
{
private event EventHandler? _avatarChanged;
private event Action? _errorOccured;
public string Error { get; private set; }
public Image Avatar
{
get
{
return pictureBoxAvatar.Image;
}
set
{
pictureBoxAvatar.Image = value;
}
}
public event EventHandler AvatarChanged
{
add { _avatarChanged += value; }
remove { _avatarChanged -= value; }
}
public event Action AnErrorOccurred
{
add { _errorOccured += value; }
remove { _errorOccured -= value; }
}
public UserControl1()
{
InitializeComponent();
Error = string.Empty;
}
private void ButtonLoad_Click(object sender, EventArgs e)
{
var ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
try
{
pictureBoxAvatar.Image =
Image.FromFile(ofd.FileName);
_avatarChanged?.Invoke(this, e);
}
catch (Exception ex)
{
Error = ex.Message;
_errorOccured?.Invoke();
}
}
}
}
}

View File

@ -1,60 +0,0 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>