public CommonData.MessageTypeResult Display(CommonData.MessageType type) { DataTable tb = new DataTable(); tb.Columns.Add("MessageText", Type.GetType("System.String")); //tb.Columns.Add("ErrorType", Type.GetType("System.Drawing.Image")); _type = type; foreach (IvsMessage ms in _list) { DataRow dr = tb.NewRow(); dr["MessageText"] = ms.MessageText; tb.Rows.Add(dr); } //this._firstIvsMessage = _list[0].MessageText; dgcMain.DataSource = tb; if (!this.Modal) { this.ShowDialog(); } return(_typeResult); }
public CommonData.MessageTypeResult Display(CommonData.MessageType type) { DataTable tb = new DataTable(); tb.Columns.Add("ErrorType", typeof(string)); tb.Columns.Add("MessageText", typeof(string)); tb.Columns.Add("TypeImage", typeof(Image)); _type = type; foreach (IvsMessage ms in _list) { DataRow dr = tb.NewRow(); dr["MessageText"] = ms.MessageText; dr["ErrorType"] = ms.MessageIcon; switch (ms.MessageIcon) { case CommonData.MessageIcon.Infomation: dr["TypeImage"] = ConvertIcon2Bitmap(SystemIcons.Information); break; case CommonData.MessageIcon.Warning: dr["TypeImage"] = ConvertIcon2Bitmap(SystemIcons.Warning); break; case CommonData.MessageIcon.Error: dr["TypeImage"] = ConvertIcon2Bitmap(SystemIcons.Error); break; case CommonData.MessageIcon.Question: dr["TypeImage"] = ConvertIcon2Bitmap(SystemIcons.Question); break; case CommonData.MessageIcon.OK: System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); dr["TypeImage"] = ConvertIcon2Bitmap(new Icon(assembly.GetManifestResourceStream("Ivs.Controls.Resources.icon_ok.ico"))); break; default: break; } tb.Rows.Add(dr); } //this._firstIvsMessage = _list[0].MessageText; dgcMain.DataSource = tb; //Update form's icon this.Icon = GetMainIcon(); if (!this.Modal) { this.ShowDialog(); } return(_typeResult); }
public MessageBoxs(CommonData.MessageType type) { this._type = type; InitializeComponent(); this.Load += new EventHandler(MessageBoxForm_Load); this.btnExport.Click += new EventHandler(this.Export); this.btnOKClose.Click += new EventHandler(btn_OKClose_Click); this.btnYes.Click += new EventHandler(btnYes_Click); this.btnNo.Click += new EventHandler(btnNo_Click); this.btnCancel.Click += new EventHandler(btnCancel_Click); this.lbl_EN.Click += new EventHandler(lbl_EN_Click); this.lbl_JP.Click += new EventHandler(lbl_JP_Click); this.lbl_VN.Click += new EventHandler(lbl_VN_Click); }
public void ReDisplay() { if (dgcMain.DataSource != null) { //Set Base Name string baseName = "Ivs.Core.Properties.COM_MSG_{0}"; //Set List Control For Main ResourceManager resources = new ResourceManager(this.GetType()); // change main form resources this.Text = resources.GetString("$this.Text"); //Change Language For Main Form LanguageUltility.ChangeLanguage(baseName, Assembly.GetAssembly(typeof(LanguageUltility)), this, LstControls, (UserSession.LangId)); this.ChangeMessage(); _type = CommonData.MessageType.Ok; if (!this.Modal) { this.ShowDialog(); } } }