private void FormAbout_Load(object sender, System.EventArgs e) { string softwareName = PrefC.GetString(PrefName.SoftwareName); if (Programs.GetCur(ProgramName.BencoPracticeManagement).Enabled) { pictureOpenDental.Image = Properties.Resources.bencoLogo; } if (softwareName != "Open Dental Software" && !Programs.GetCur(ProgramName.BencoPracticeManagement).Enabled) { pictureOpenDental.Visible = false; } labelVersion.Text = Lan.g(this, "Version:") + " " + Application.ProductVersion; UpdateHistory updateHistory = UpdateHistories.GetForVersion(Application.ProductVersion); if (updateHistory != null) { labelVersion.Text += " " + Lan.g(this, "Since:") + " " + updateHistory.DateTimeUpdated.ToShortDateString(); } //keeps the trailing year up to date labelCopyright.Text = softwareName + " " + Lan.g(this, "Copyright 2003-") + DateTime.Now.ToString("yyyy") + ", Jordan S. Sparks, D.M.D."; labelMySQLCopyright.Text = Lan.g(this, "MySQL - Copyright 1995-") + DateTime.Now.ToString("yyyy") + Lan.g(this, ", www.mysql.com"); //Database Server---------------------------------------------------------- List <string> serviceList = Computers.GetServiceInfo(); labelName.Text += serviceList[2].ToString(); //MiscData.GetODServer();//server name labelService.Text += serviceList[0].ToString(); //service name labelMySqlVersion.Text += serviceList[3].ToString(); //service version labelServComment.Text += serviceList[1].ToString(); //service comment labelMachineName.Text += Environment.MachineName.ToUpper(); //current client or remote application machine name }
private void FillListComps() { listBoxComputers.Items.Clear(); foreach (Computer computer in Computers.GetDeepCopy()) { listBoxComputers.Items.Add(new ODBoxItem <Computer>(computer.CompName, computer)); } }
private void butDelete_Click(object sender, System.EventArgs e) { if (listComputer.SelectedIndex == -1) { return; } Computers.Delete(_listComputers[listComputer.SelectedIndex]); changed = true; FillList(); }
private void FillList() { Computers.Refresh(); listComputer.Items.Clear(); string itemName = ""; for (int i = 0; i < Computers.List.Length; i++) { itemName = Computers.List[i].CompName + " (" + Computers.List[i].PrinterName + ")"; listComputer.Items.Add(itemName); } }
private void FormShutdown_Load(object sender, EventArgs e) { List <string> runningComps = Computers.GetRunningComputers(); for (int i = 0; i < runningComps.Count; i++) { listMain.Items.Add(runningComps[i]); } if (IsUpdate) { butShutdown.Text = Lan.g(this, "Continue"); } }
private void FormShutdown_Load(object sender, EventArgs e) { List <string> runningComps = Computers.GetRunningComputers(); for (int i = 0; i < runningComps.Count; i++) { listMain.Items.Add(runningComps[i]); } if (IsUpdate) { butShutdown.Text = Lan.g(this, "Continue"); butCancel.Text = Lan.g(this, "Skip"); //used to say "cancel" but still continues with the update, just skips the "shutdown all workstations" step. } }
private void FillServerGrid() { Computer[] computers = Computers.GetList(); gridReplicationComputers.BeginUpdate(); gridReplicationComputers.Rows.Clear(); for (int i = 0; i < computers.Length; i++) { ODGridRow row = new ODGridRow(); row.Cells.Add(computers[i].CompName); //row.Cells.Add(); gridReplicationComputers.Rows.Add(row); } gridReplicationComputers.EndUpdate(); }
///<summary>Gets the set printer whether or not it is valid.</summary> public static Printer GetForSit(PrintSituation sit) { Computer compCur = Computers.GetCur(); for (int i = 0; i < List.Length; i++) { if (List[i].ComputerNum == compCur.ComputerNum && List[i].PrintSit == sit) { return(List[i]); } } return(null); }
///<summary></summary> public static void Refresh() { //first, make sure this computer is in the db: string command = "SELECT * from computer " + "WHERE compname = '" + SystemInformation.ComputerName + "'"; DataTable table = General.GetTable(command); if (table.Rows.Count == 0) { Computer Cur = new Computer(); Cur.CompName = SystemInformation.ComputerName; Computers.Insert(Cur); } //then, refresh List: List = GetList(); }
private void FormMessagingButSetup_Load(object sender, EventArgs e) { _listComputers = Computers.GetDeepCopy(); listComputers.Items.Clear(); listComputers.Items.Add(Lan.g(this, "All")); string s; for (int i = 0; i < _listComputers.Count; i++) { s = _listComputers[i].CompName; if (SystemInformation.ComputerName == _listComputers[i].CompName) { s += " " + Lan.g(this, "(this computer)"); } listComputers.Items.Add(s); } listComputers.SelectedIndex = 0; _arraySigButDefs = SigButDefs.GetByComputer(""); FillList(); }
///<summary>Called from FormPrinterSetup if user selects the easy option. Since the other options will be hidden, we have to clear them. User should be sternly warned before this happens.</summary> public static void ClearAll() { //first, delete all entries string command = "DELETE FROM printer"; General.NonQ(command); //then, add one printer for each computer. Default and show prompt Computers.Refresh(); Printer cur; for (int i = 0; i < Computers.List.Length; i++) { cur = new Printer(); cur.ComputerNum = Computers.List[i].ComputerNum; cur.PrintSit = PrintSituation.Default; cur.PrinterName = ""; cur.DisplayPrompt = true; Insert(cur); } }
private void FillList() { Computers.RefreshCache(); _listComputers = Computers.GetDeepCopy(); listComputer.Items.Clear(); //Database Server---------------------------------------------------------- List <string> serviceList = Computers.GetServiceInfo(); textName.Text = MiscData.GetODServer(); //server name textService.Text = (serviceList[0].ToString()); //service name textVersion.Text = (serviceList[3].ToString()); //service version textServComment.Text = (serviceList[1].ToString()); //service comment //workstation-------------------------------------------------------------- textCurComp.Text = Environment.MachineName.ToUpper(); //current computer name string itemName = ""; for (int i = 0; i < _listComputers.Count; i++) { itemName = _listComputers[i].CompName; //+" ("+Computers.List[i].PrinterName+")"; listComputer.Items.Add(itemName); } }