public void updateUpdatesThread(message messageWindow) { this.mw = messageWindow; System.Threading.ThreadStart mt = new System.Threading.ThreadStart(updateUpdates); System.Threading.Thread thread1 = new System.Threading.Thread( mt ) ; Form1.debugMessage("Starting updateUpdates Thread..."); thread1.Start() ; Form1.debugMessage("... Done Starting updateUpdates Thread."); }
public void updateUpdates(message messageWindow) { string updates = "-------------UPDATE HISTORY----------------\n" + parent.updateHistory; updates = updates.Replace("-------------UPDATE HISTORY----------------","\\b\\cf0\\fs30 Updates & Messages Recieved: \\b0\\cf0\\fs16"); updates = updates.Replace("\n","\n\\b\\cf1"); updates = updates.Replace(":"," : \\b0\\cf1"); updates = updates.Replace("\n","\\par\n"); messageWindow.updatesBox.Rtf="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}\n{\\colortbl ;\\red0\\green0\\blue0;\\red255\\green0\\blue0;}\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 "+updates+"\\cf0\\b0\\par\n}"; }
public void updateMessageWindow(message messageWindow) { String vi = ""; Form1.debugMessage("Starting getVersionInfo() ..."); vi = getVersionInfo(); Form1.debugMessage("Done getVersionInfo() ..."); int loc = vi.IndexOf("-------------UPDATE HISTORY----------------"); if (loc < 1 || loc > vi.Length) loc = vi.Length; vi = vi.Substring(0,loc); vi = vi.Replace("\\","\\\\"); vi = "\\b\\cf1" + vi; String[] hldr1 = vi.Split("\n".ToCharArray()); vi = ""; string rep = " :\\b0\\cf1 "; for (int x=0;x<hldr1.Length;x++) { string[] hldr = hldr1[x].Split(":".ToCharArray()); rep = ""; for (int i=0;i<hldr.Length;i++) { if (hldr[i].Trim().Length > 0) { vi += rep + hldr[i]; if (i == 0) rep = " :\\b0\\cf1 "; else rep = ":"; } } vi += "\n"; } //vi = vi.Replace(":"," :\\b0\\cf1 "); vi = vi.Replace("\n","\n\\b\\cf1"); vi = vi.Replace("---bad","\\b\\cf2 - bad "); vi = vi.Replace("---\n","\\b0\\cf1 \n"); vi = vi.Replace("\n","\\par\n"); messageWindow.logoBox2.Visible=false; Form1.debugMessage("Setting Window Text ..."); messageWindow.messageText.Rtf="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}\n{\\colortbl ;\\red0\\green0\\blue0;\\red255\\green0\\blue0;}\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 "+vi+"\\cf0\\b0\\par\n}"; Form1.debugMessage("Done Setting Window Text ..."); }
public void updateSysLog(message messageWindow) { string updates = "-------------SYSLOG----------------\n" + parent.systemLog; updates = updates.Replace("-------------SYSLOG----------------","\\b\\cf0\\fs30 System Log: \\b0\\cf0\\fs16"); updates = updates.Replace("\n","\n\\b\\cf1"); updates = updates.Replace(":"," : \\b0\\cf1"); updates = updates.Replace("\n","\\par\n"); updates = updates.Replace("Error","\\b\\cf2 Error \\b0\\cf1"); updates = updates.Replace("Information","\\b\\cf3 Information \\b0\\cf1"); updates = updates.Replace("Warning","\\b\\cf4 Warning \\b0\\cf1"); updates = updates.Replace("#C#",":"); messageWindow.sysLogBox.Rtf="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}\n{\\colortbl ;\\red0\\green0\\blue0;\\red255\\green0\\blue0;\\red0\\green255\\blue0;\\red0\\green0\\blue255;}\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 "+updates+"\\cf0\\b0\\par\n}"; }
private void menuItem5_Click(object sender, System.EventArgs e) { //MessageBox.Show(getVersionInfo(),"VeraciTek Workstation - System Info"); message messageWindow = new message(this); messageWindow.version.Text = "Version " + cver; messageWindow.logoBox2.Height = messageWindow.logoBox.Image.Height; messageWindow.logoBox2.Width = messageWindow.logoBox.Image.Width; messageWindow.logoBox2.Image = messageWindow.logoBox.Image; messageWindow.messageText.Rtf="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}\n{\\colortbl ;\\red0\\green128\\blue0;}\n\\viewkind4\\uc1\\pard\\cf1\\b\\f0\\fs30 Loading System Information... please wait.\\cf0\\b0\\par\n}"; messageWindow.Icon = this.Icon; si.updateUpdatesThread(messageWindow); messageWindow.Show(); messageWindow.Refresh(); }