Initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
public partial class MessageWindow
|
||||
{
|
||||
public class CMessageData
|
||||
{
|
||||
public string Tag { get; set; }
|
||||
public string Message { get; set; }
|
||||
public eWindowType WindowType { get; set; }
|
||||
public System.Drawing.Size WindowSize { get; set; }
|
||||
public Boolean EnableClose { get; set; }
|
||||
public System.Drawing.Font FontTitle { get; set; }
|
||||
public System.Drawing.Font FontContent { get; set; }
|
||||
// public System.Windows.Forms.Form msgForm { get; set; }
|
||||
public CMessageData()
|
||||
{
|
||||
Tag = string.Empty;
|
||||
WindowType = eWindowType.information;
|
||||
WindowSize = new System.Drawing.Size(900, 500);
|
||||
EnableClose = true;
|
||||
FontContent = null;
|
||||
FontTitle = null;
|
||||
// msgForm = null;
|
||||
}
|
||||
~CMessageData()
|
||||
{
|
||||
// if (msgForm != null) msgForm.Dispose();
|
||||
if (FontTitle != null) FontTitle.Dispose();
|
||||
if (FontContent != null) FontContent.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
public partial class MessageWindow
|
||||
{
|
||||
public enum eWindowPosition
|
||||
{
|
||||
center = 0,
|
||||
top = 1,
|
||||
bottom = 2
|
||||
}
|
||||
|
||||
public enum eWindowType
|
||||
{
|
||||
information,
|
||||
error,
|
||||
attention,
|
||||
}
|
||||
|
||||
fMsgWindow msgwin;
|
||||
|
||||
public MessageWindow()
|
||||
{
|
||||
msgwin = new fMsgWindow("");
|
||||
msgwin.VisibleChanged += msgwin_VisibleChanged;
|
||||
}
|
||||
|
||||
public bool needClose = false;
|
||||
public Boolean needShow = false;
|
||||
private CMessageData msgBuffer = new CMessageData();
|
||||
|
||||
public void setMessage(CMessageData msgData)
|
||||
{
|
||||
//마지막데잍와 동일하고 버퍼에 데이터가 있다면 처리하지 않는다.
|
||||
if (msgBuffer == msgData) return;
|
||||
|
||||
//신규 메세지를 추가
|
||||
msgBuffer = msgData;
|
||||
|
||||
//화면이 표시되어야하므로 플래그 설정
|
||||
needShow = true;
|
||||
}
|
||||
|
||||
public void setMessage(string msg,string tag,
|
||||
eWindowType winType = eWindowType.error,
|
||||
int width = 900, int height = 500,
|
||||
Boolean enbClose = true,
|
||||
Font fontTitle = null,
|
||||
Font fontBody = null)
|
||||
{
|
||||
setMessage(new CMessageData()
|
||||
{
|
||||
Tag = tag,
|
||||
EnableClose = enbClose,
|
||||
FontContent = fontBody,
|
||||
FontTitle = fontTitle,
|
||||
Message = msg,
|
||||
WindowSize = new Size(width, height),
|
||||
WindowType = winType
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void setMessage(string msg,
|
||||
eWindowType winType = eWindowType.error,
|
||||
int width = 900, int height = 500,
|
||||
Boolean enbClose = true,
|
||||
Font fontTitle = null,
|
||||
Font fontBody = null)
|
||||
{
|
||||
setMessage(new CMessageData()
|
||||
{
|
||||
EnableClose = enbClose,
|
||||
FontContent = fontBody,
|
||||
FontTitle = fontTitle,
|
||||
Message = msg,
|
||||
WindowSize = new Size(width, height),
|
||||
WindowType = winType
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 메세지 버퍼의 내용을 폼으로 표시합니다.
|
||||
/// UI 쓰레드를 사용하므로 invoke 를 이용해 호출 하거나
|
||||
/// UI 쓰레드내에서 실행 하시기 바랍니다.
|
||||
/// </summary>
|
||||
public void showMessage()
|
||||
{
|
||||
//개체가 없어졌다면 새로생성해서 사용한다
|
||||
if (msgwin == null || msgwin.Disposing || msgwin.IsDisposed)
|
||||
{
|
||||
msgwin = new fMsgWindow("");
|
||||
msgwin.VisibleChanged += msgwin_VisibleChanged;
|
||||
}
|
||||
|
||||
|
||||
//등록된 메세지 버퍼의 내용을 화면에 표시한다.
|
||||
msgwin.TopMost = true;
|
||||
// msgwin.Disposed += (s1, e1) => { CloseMsg(item.Key); };
|
||||
msgwin.Width = this.msgBuffer.WindowSize.Width;
|
||||
msgwin.Height = msgBuffer.WindowSize.Height;
|
||||
msgwin.BackColor = Color.FromArgb(200, 200, 200);
|
||||
msgwin.StartPosition = FormStartPosition.CenterScreen;
|
||||
|
||||
msgwin.setMessage(msgBuffer.Message);
|
||||
//set font
|
||||
if (msgBuffer.FontTitle != null) msgwin.lbTitle.Font = msgBuffer.FontTitle;
|
||||
if (msgBuffer.FontContent != null)
|
||||
{
|
||||
msgwin.lb1.Font = msgBuffer.FontContent;
|
||||
msgwin.lb2.Font = msgBuffer.FontContent;
|
||||
msgwin.lb3.Font = msgBuffer.FontContent;
|
||||
msgwin.lb4.Font = msgBuffer.FontContent;
|
||||
msgwin.lb5.Font = msgBuffer.FontContent;
|
||||
msgwin.lb6.Font = msgBuffer.FontContent;
|
||||
msgwin.lb7.Font = msgBuffer.FontContent;
|
||||
}
|
||||
|
||||
switch (msgBuffer.WindowType)
|
||||
{
|
||||
case eWindowType.attention:
|
||||
msgwin.lbTitle.BackColor = Color.Gold;
|
||||
msgwin.lbTitle.BackColor2 = Color.Khaki;
|
||||
msgwin.lbTitle.ShadowColor = Color.FromArgb(150, 150, 150);
|
||||
msgwin.lbTitle.ForeColor = Color.FromArgb(50, 50, 50);
|
||||
break;
|
||||
case eWindowType.error:
|
||||
msgwin.lbTitle.BackColor = Color.Tomato;
|
||||
msgwin.lbTitle.BackColor2 = Color.Red;
|
||||
msgwin.lbTitle.ShadowColor = Color.FromArgb(50, 50, 50);
|
||||
msgwin.lbTitle.ForeColor = Color.WhiteSmoke;
|
||||
break;
|
||||
default:
|
||||
msgwin.lbTitle.BackColor = Color.DarkTurquoise;
|
||||
msgwin.lbTitle.BackColor2 = Color.LightSkyBlue;
|
||||
msgwin.lbTitle.ShadowColor = Color.FromArgb(50, 50, 50);
|
||||
msgwin.lbTitle.ForeColor = Color.WhiteSmoke;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!msgBuffer.EnableClose) msgwin.EnableUserClose = false;
|
||||
if (msgwin.Visible == false) msgwin.Show();
|
||||
else
|
||||
{
|
||||
msgwin.Visible = true;
|
||||
msgwin.Activate();
|
||||
}
|
||||
|
||||
needShow = false;
|
||||
needClose = false; //닫히게되어잇다면 그것을 off해줘야 다시 닫히지 않음 200923
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sende는 CMessageData
|
||||
/// </summary>
|
||||
public event EventHandler WindowClose;
|
||||
/// <summary>
|
||||
/// sender는 CMessageData
|
||||
/// </summary>
|
||||
public event EventHandler WindowOpen;
|
||||
void msgwin_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
var f = sender as Form;
|
||||
if (f.Visible == false)
|
||||
{
|
||||
if (WindowClose != null) WindowClose(msgBuffer, new EventArgs());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WindowOpen != null) WindowOpen(msgBuffer, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean Visible
|
||||
{
|
||||
get
|
||||
{
|
||||
if (msgwin == null || msgwin.Disposing || msgwin.IsDisposed) return false;
|
||||
return msgwin.Visible;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (msgwin == null || msgwin.Disposing || msgwin.IsDisposed)
|
||||
{
|
||||
needShow = false;
|
||||
needClose = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (value == true)
|
||||
{
|
||||
if (msgwin.Visible == false)
|
||||
{
|
||||
msgwin.Show();
|
||||
msgwin.Activate();
|
||||
}
|
||||
else
|
||||
{
|
||||
msgwin.Activate();
|
||||
}
|
||||
needShow = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
msgwin.Visible = false;
|
||||
needClose = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
472
Handler/Project_form2/Don't change it/MessageWindow/fMsgWindow.Designer.cs
generated
Normal file
472
Handler/Project_form2/Don't change it/MessageWindow/fMsgWindow.Designer.cs
generated
Normal file
@@ -0,0 +1,472 @@
|
||||
namespace Project
|
||||
{
|
||||
partial class fMsgWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.lb1 = new arCtl.arLabel();
|
||||
this.arPanel1 = new arCtl.arPanel();
|
||||
this.lb7 = new arCtl.arLabel();
|
||||
this.lb6 = new arCtl.arLabel();
|
||||
this.lb5 = new arCtl.arLabel();
|
||||
this.lb4 = new arCtl.arLabel();
|
||||
this.lb3 = new arCtl.arLabel();
|
||||
this.lb2 = new arCtl.arLabel();
|
||||
this.lbTitle = new arCtl.arLabel();
|
||||
this.tmBlink = new System.Windows.Forms.Timer(this.components);
|
||||
this.arPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lb1
|
||||
//
|
||||
this.lb1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb1.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb1.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb1.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb1.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb1.ForeColor = System.Drawing.Color.White;
|
||||
this.lb1.GradientEnable = true;
|
||||
this.lb1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb1.GradientRepeatBG = false;
|
||||
this.lb1.isButton = false;
|
||||
this.lb1.Location = new System.Drawing.Point(8, 85);
|
||||
this.lb1.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb1.msg = null;
|
||||
this.lb1.Name = "lb1";
|
||||
this.lb1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb1.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb1.ProgressEnable = false;
|
||||
this.lb1.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb1.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb1.ProgressMax = 100F;
|
||||
this.lb1.ProgressMin = 0F;
|
||||
this.lb1.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb1.ProgressValue = 0F;
|
||||
this.lb1.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb1.Sign = "";
|
||||
this.lb1.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb1.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb1.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb1.TabIndex = 2;
|
||||
this.lb1.Text = "*";
|
||||
this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb1.TextShadow = true;
|
||||
this.lb1.TextVisible = true;
|
||||
//
|
||||
// arPanel1
|
||||
//
|
||||
this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.arPanel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.arPanel1.BorderColor = System.Drawing.Color.DimGray;
|
||||
this.arPanel1.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.arPanel1.Controls.Add(this.lb7);
|
||||
this.arPanel1.Controls.Add(this.lb6);
|
||||
this.arPanel1.Controls.Add(this.lb5);
|
||||
this.arPanel1.Controls.Add(this.lb4);
|
||||
this.arPanel1.Controls.Add(this.lb3);
|
||||
this.arPanel1.Controls.Add(this.lb2);
|
||||
this.arPanel1.Controls.Add(this.lbTitle);
|
||||
this.arPanel1.Controls.Add(this.lb1);
|
||||
this.arPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic);
|
||||
this.arPanel1.ForeColor = System.Drawing.Color.Khaki;
|
||||
this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.arPanel1.GradientRepeatBG = false;
|
||||
this.arPanel1.Location = new System.Drawing.Point(1, 1);
|
||||
this.arPanel1.Name = "arPanel1";
|
||||
this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.arPanel1.ProgressMax = 100F;
|
||||
this.arPanel1.ProgressMin = 0F;
|
||||
this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.arPanel1.ProgressValue = 0F;
|
||||
this.arPanel1.ShadowColor = System.Drawing.Color.Black;
|
||||
this.arPanel1.ShowBorder = true;
|
||||
this.arPanel1.Size = new System.Drawing.Size(892, 488);
|
||||
this.arPanel1.TabIndex = 4;
|
||||
this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.arPanel1.TextShadow = false;
|
||||
this.arPanel1.UseProgressBar = false;
|
||||
//
|
||||
// lb7
|
||||
//
|
||||
this.lb7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb7.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb7.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb7.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb7.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb7.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb7.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb7.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb7.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb7.ForeColor = System.Drawing.Color.White;
|
||||
this.lb7.GradientEnable = true;
|
||||
this.lb7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb7.GradientRepeatBG = false;
|
||||
this.lb7.isButton = false;
|
||||
this.lb7.Location = new System.Drawing.Point(8, 427);
|
||||
this.lb7.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb7.msg = null;
|
||||
this.lb7.Name = "lb7";
|
||||
this.lb7.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb7.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb7.ProgressEnable = false;
|
||||
this.lb7.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb7.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb7.ProgressMax = 100F;
|
||||
this.lb7.ProgressMin = 0F;
|
||||
this.lb7.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb7.ProgressValue = 0F;
|
||||
this.lb7.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb7.Sign = "";
|
||||
this.lb7.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb7.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb7.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb7.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb7.TabIndex = 9;
|
||||
this.lb7.Text = "*";
|
||||
this.lb7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb7.TextShadow = true;
|
||||
this.lb7.TextVisible = true;
|
||||
//
|
||||
// lb6
|
||||
//
|
||||
this.lb6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb6.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb6.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb6.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb6.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb6.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb6.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb6.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb6.ForeColor = System.Drawing.Color.White;
|
||||
this.lb6.GradientEnable = true;
|
||||
this.lb6.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb6.GradientRepeatBG = false;
|
||||
this.lb6.isButton = false;
|
||||
this.lb6.Location = new System.Drawing.Point(8, 370);
|
||||
this.lb6.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb6.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb6.msg = null;
|
||||
this.lb6.Name = "lb6";
|
||||
this.lb6.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb6.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb6.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb6.ProgressEnable = false;
|
||||
this.lb6.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb6.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb6.ProgressMax = 100F;
|
||||
this.lb6.ProgressMin = 0F;
|
||||
this.lb6.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb6.ProgressValue = 0F;
|
||||
this.lb6.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb6.Sign = "";
|
||||
this.lb6.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb6.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb6.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb6.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb6.TabIndex = 8;
|
||||
this.lb6.Text = "*";
|
||||
this.lb6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb6.TextShadow = true;
|
||||
this.lb6.TextVisible = true;
|
||||
//
|
||||
// lb5
|
||||
//
|
||||
this.lb5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb5.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb5.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb5.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb5.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb5.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb5.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb5.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb5.ForeColor = System.Drawing.Color.White;
|
||||
this.lb5.GradientEnable = true;
|
||||
this.lb5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb5.GradientRepeatBG = false;
|
||||
this.lb5.isButton = false;
|
||||
this.lb5.Location = new System.Drawing.Point(8, 313);
|
||||
this.lb5.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb5.msg = null;
|
||||
this.lb5.Name = "lb5";
|
||||
this.lb5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb5.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb5.ProgressEnable = false;
|
||||
this.lb5.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb5.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb5.ProgressMax = 100F;
|
||||
this.lb5.ProgressMin = 0F;
|
||||
this.lb5.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb5.ProgressValue = 0F;
|
||||
this.lb5.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb5.Sign = "";
|
||||
this.lb5.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb5.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb5.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb5.TabIndex = 7;
|
||||
this.lb5.Text = "*";
|
||||
this.lb5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb5.TextShadow = true;
|
||||
this.lb5.TextVisible = true;
|
||||
//
|
||||
// lb4
|
||||
//
|
||||
this.lb4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb4.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb4.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb4.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb4.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb4.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb4.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb4.ForeColor = System.Drawing.Color.White;
|
||||
this.lb4.GradientEnable = true;
|
||||
this.lb4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb4.GradientRepeatBG = false;
|
||||
this.lb4.isButton = false;
|
||||
this.lb4.Location = new System.Drawing.Point(8, 256);
|
||||
this.lb4.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb4.msg = null;
|
||||
this.lb4.Name = "lb4";
|
||||
this.lb4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb4.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb4.ProgressEnable = false;
|
||||
this.lb4.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb4.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb4.ProgressMax = 100F;
|
||||
this.lb4.ProgressMin = 0F;
|
||||
this.lb4.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb4.ProgressValue = 0F;
|
||||
this.lb4.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb4.Sign = "";
|
||||
this.lb4.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb4.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb4.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb4.TabIndex = 6;
|
||||
this.lb4.Text = "*";
|
||||
this.lb4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb4.TextShadow = true;
|
||||
this.lb4.TextVisible = true;
|
||||
//
|
||||
// lb3
|
||||
//
|
||||
this.lb3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb3.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb3.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb3.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb3.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb3.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb3.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb3.ForeColor = System.Drawing.Color.White;
|
||||
this.lb3.GradientEnable = true;
|
||||
this.lb3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb3.GradientRepeatBG = false;
|
||||
this.lb3.isButton = false;
|
||||
this.lb3.Location = new System.Drawing.Point(8, 199);
|
||||
this.lb3.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb3.msg = null;
|
||||
this.lb3.Name = "lb3";
|
||||
this.lb3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb3.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb3.ProgressEnable = false;
|
||||
this.lb3.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb3.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb3.ProgressMax = 100F;
|
||||
this.lb3.ProgressMin = 0F;
|
||||
this.lb3.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb3.ProgressValue = 0F;
|
||||
this.lb3.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb3.Sign = "";
|
||||
this.lb3.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb3.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb3.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb3.TabIndex = 5;
|
||||
this.lb3.Text = "*";
|
||||
this.lb3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb3.TextShadow = true;
|
||||
this.lb3.TextVisible = true;
|
||||
//
|
||||
// lb2
|
||||
//
|
||||
this.lb2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.lb2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lb2.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lb2.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lb2.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lb2.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lb2.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold);
|
||||
this.lb2.ForeColor = System.Drawing.Color.White;
|
||||
this.lb2.GradientEnable = true;
|
||||
this.lb2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||
this.lb2.GradientRepeatBG = false;
|
||||
this.lb2.isButton = false;
|
||||
this.lb2.Location = new System.Drawing.Point(8, 142);
|
||||
this.lb2.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lb2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lb2.msg = null;
|
||||
this.lb2.Name = "lb2";
|
||||
this.lb2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.lb2.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lb2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lb2.ProgressEnable = false;
|
||||
this.lb2.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lb2.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lb2.ProgressMax = 100F;
|
||||
this.lb2.ProgressMin = 0F;
|
||||
this.lb2.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lb2.ProgressValue = 0F;
|
||||
this.lb2.ShadowColor = System.Drawing.Color.Black;
|
||||
this.lb2.Sign = "";
|
||||
this.lb2.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lb2.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lb2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lb2.Size = new System.Drawing.Size(874, 50);
|
||||
this.lb2.TabIndex = 4;
|
||||
this.lb2.Text = "*";
|
||||
this.lb2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lb2.TextShadow = true;
|
||||
this.lb2.TextVisible = true;
|
||||
//
|
||||
// lbTitle
|
||||
//
|
||||
this.lbTitle.BackColor = System.Drawing.Color.Red;
|
||||
this.lbTitle.BackColor2 = System.Drawing.Color.Red;
|
||||
this.lbTitle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0);
|
||||
this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
|
||||
this.lbTitle.BorderColorOver = System.Drawing.Color.Gray;
|
||||
this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1);
|
||||
this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom;
|
||||
this.lbTitle.Cursor = System.Windows.Forms.Cursors.Arrow;
|
||||
this.lbTitle.Font = new System.Drawing.Font("맑은 고딕", 30F, System.Drawing.FontStyle.Bold);
|
||||
this.lbTitle.ForeColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.lbTitle.GradientEnable = true;
|
||||
this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal;
|
||||
this.lbTitle.GradientRepeatBG = false;
|
||||
this.lbTitle.isButton = false;
|
||||
this.lbTitle.Location = new System.Drawing.Point(8, 9);
|
||||
this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow;
|
||||
this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lbTitle.msg = null;
|
||||
this.lbTitle.Name = "lbTitle";
|
||||
this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue;
|
||||
this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue;
|
||||
this.lbTitle.ProgressEnable = false;
|
||||
this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F);
|
||||
this.lbTitle.ProgressForeColor = System.Drawing.Color.Black;
|
||||
this.lbTitle.ProgressMax = 100F;
|
||||
this.lbTitle.ProgressMin = 0F;
|
||||
this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0);
|
||||
this.lbTitle.ProgressValue = 0F;
|
||||
this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
|
||||
this.lbTitle.Sign = "";
|
||||
this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.lbTitle.SignColor = System.Drawing.Color.Yellow;
|
||||
this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic);
|
||||
this.lbTitle.Size = new System.Drawing.Size(874, 67);
|
||||
this.lbTitle.TabIndex = 3;
|
||||
this.lbTitle.Text = "TITLE";
|
||||
this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lbTitle.TextShadow = true;
|
||||
this.lbTitle.TextVisible = true;
|
||||
this.lbTitle.Click += new System.EventHandler(this.lbTitle_Click);
|
||||
//
|
||||
// tmBlink
|
||||
//
|
||||
this.tmBlink.Enabled = true;
|
||||
this.tmBlink.Interval = 300;
|
||||
this.tmBlink.Tick += new System.EventHandler(this.tmBlink_Tick);
|
||||
//
|
||||
// fMsgWindow
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
|
||||
this.ClientSize = new System.Drawing.Size(894, 490);
|
||||
this.Controls.Add(this.arPanel1);
|
||||
this.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "fMsgWindow";
|
||||
this.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Message Window";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.fMsg_Load);
|
||||
this.arPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public arCtl.arLabel lb1;
|
||||
private arCtl.arPanel arPanel1;
|
||||
public arCtl.arLabel lbTitle;
|
||||
public arCtl.arLabel lb7;
|
||||
public arCtl.arLabel lb6;
|
||||
public arCtl.arLabel lb5;
|
||||
public arCtl.arLabel lb4;
|
||||
public arCtl.arLabel lb3;
|
||||
public arCtl.arLabel lb2;
|
||||
private System.Windows.Forms.Timer tmBlink;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
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 Project
|
||||
{
|
||||
public partial class fMsgWindow : Form
|
||||
{
|
||||
private Boolean fMove = false;
|
||||
private Point MDownPos;
|
||||
private string _msg = string.Empty;
|
||||
public Boolean DialogMode = false;
|
||||
|
||||
/// <summary>
|
||||
/// 사용자가 이 창을 닫을수 있는가?
|
||||
/// </summary>
|
||||
public Boolean EnableUserClose
|
||||
{
|
||||
get { return _enableuserclose; }
|
||||
set
|
||||
{
|
||||
_enableuserclose = value;
|
||||
// if (!EnableUserClose) btClose.Visible = false;
|
||||
}
|
||||
}
|
||||
private Boolean _enableuserclose = true;
|
||||
|
||||
public void setMessage(string msg)
|
||||
{
|
||||
//msg를 분리해서 표시를 한다.
|
||||
var lbs = new arCtl.arLabel[] { lbTitle, lb1, lb2, lb3, lb4, lb5, lb6, lb7 };
|
||||
var lineBuf = msg.Replace("\r", "").Split('\n');
|
||||
int maxLine = Math.Min(lbs.Length, lineBuf.Length);
|
||||
|
||||
for (int i = 0; i < lbs.Length; i++) //최대줄을 넘어가는건 표시불가
|
||||
{
|
||||
if (i >= lineBuf.Length)
|
||||
{
|
||||
lbs[i].Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i > 0) lbs[i].Text = string.Format("{1}", i, lineBuf[i]);
|
||||
else lbs[i].Text = lineBuf[i];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//Dialog.fBlurPanel fb;
|
||||
public fMsgWindow(string msg, string filename = "")
|
||||
{
|
||||
EnableUserClose = true;
|
||||
InitializeComponent();
|
||||
|
||||
if (System.Diagnostics.Debugger.IsAttached == false)
|
||||
{
|
||||
//fb = new Dialog.fBlurPanel();
|
||||
//fb.Show();
|
||||
}
|
||||
|
||||
|
||||
this.FormClosing += fMsgWindow_FormClosing;
|
||||
this.KeyDown += (s1, e1) => { if (EnableUserClose && e1.KeyCode == Keys.Escape) this.Close(); };
|
||||
this._msg = msg;
|
||||
|
||||
|
||||
if (filename != "")
|
||||
{
|
||||
string fullname = AppDomain.CurrentDomain.BaseDirectory + "Image\\" + filename;
|
||||
if (System.IO.File.Exists(fullname))
|
||||
{
|
||||
var img = this.lb1.BackgroundImage;
|
||||
this.lb1.BackgroundImage = Image.FromFile(fullname);
|
||||
if (img != null) img.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
msg += "\nNo Image File\n" + filename;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var img = this.lb1.BackgroundImage;
|
||||
this.lb1.BackgroundImage = null;
|
||||
if (img != null) img.Dispose();
|
||||
}
|
||||
setMessage(msg);
|
||||
this.lbTitle.MouseMove += label1_MouseMove;
|
||||
lbTitle.MouseUp += label1_MouseUp;
|
||||
lbTitle.MouseDown += label1_MouseDown;
|
||||
lbTitle.MouseDoubleClick += label1_MouseDoubleClick;
|
||||
this.VisibleChanged += FMsgWindow_VisibleChanged;
|
||||
//btClose.Click += arLabel1_Click;
|
||||
}
|
||||
|
||||
private void FMsgWindow_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
//if (fb != null)
|
||||
//{
|
||||
// if (this.Visible) fb.Show();
|
||||
// else fb.Hide();
|
||||
//}
|
||||
}
|
||||
|
||||
private void FMsgWindow_Shown(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void fMsgWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
//if (fb != null) fb.Dispose();
|
||||
//if (DialogMode==false)
|
||||
//{
|
||||
// e.Cancel = true;
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
|
||||
private void fMsg_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label1_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (fMove)
|
||||
{
|
||||
Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y);
|
||||
this.Left += offset.X;
|
||||
this.Top += offset.Y;
|
||||
offset = new Point(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void label1_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
fMove = false;
|
||||
}
|
||||
|
||||
private void label1_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
MDownPos = new Point(e.X, e.Y);
|
||||
fMove = true;
|
||||
}
|
||||
|
||||
private void label1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (EnableUserClose)
|
||||
{
|
||||
if (DialogMode == false)
|
||||
{
|
||||
//if (fb != null) fb.Visible = false;
|
||||
this.Visible = false;
|
||||
}
|
||||
else this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void lbTitle_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (EnableUserClose)
|
||||
{
|
||||
if (DialogMode == false)
|
||||
{
|
||||
//if (fb != null) fb.Visible = false;
|
||||
this.Visible = false;
|
||||
|
||||
}
|
||||
else this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void tmBlink_Tick(object sender, EventArgs e)
|
||||
{
|
||||
var bg1 = lbTitle.BackColor;
|
||||
var bg2 = lbTitle.BackColor2;
|
||||
lbTitle.BackColor = bg2;
|
||||
lbTitle.BackColor2 = bg1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
||||
<metadata name="tmBlink.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user