public void SaveEmployeeId() { //Save employee id to TTSETTINGS for next time it opens TTSettings t = new TTSettings(); t.SetTTSettingsEmployeeId(TxtEmployeeId.Text); }
public void SavePosition() { //Save position of form to TTSETTINGS for next time it opens TTSettings t = new TTSettings(); t.SetTTSettingsLocation(this); }
private void Main_Load(object sender, EventArgs e) { //MessageBox.Show(Application.StartupPath)); //MessageBox.Show(Path.GetDirectoryName(Application.ExecutablePath)); // Load settings TTSetting t; TTSettings tts = new TTSettings(); t = tts.GetTTSettings(); TxtEmployeeId.Text = t.EmployeeId; TTStatic.ttPathToDataLocal = t.PathToDataLocal; TTStatic.ttPathToDataCentral = t.PathToDataCentral; TTStatic.ttPathToWBS = t.PathToWBS; TTStatic.ttAppPath = Application.StartupPath; TimTimer.Interval = t.Interval; DteDate.MinDate = DateTime.Now.AddDays(-42); // Position form this.Left = t.Left; this.Top = t.Top; //Call methid to create WBS buttons (and hidden text fields) from WBS.TXT file CreateWBSButtons("WBS"); //Get week number based on date TxtWeek.Text = TTStatic.GetWeekNumber(DteDate.Text).ToString(); //Get version, interval, hours per day and week for top of window GetThisText(); }
private void FrmSettings_Load(object sender, EventArgs e) { //Set seconds to current interval when loading settings form TTSettings t = new TTSettings(); TxtSeconds.Text = (t.GetTTSettingsInterval() / 1000).ToString(); }
private void BtnTimer_Click(object sender, EventArgs e) { //Create settings form object frmSettings f = new frmSettings(); //Show settings form as modal (has to be closed before application continues) f.ShowDialog(); //Update settings based on form TTSettings t = new TTSettings(); //update Timer and refresh window header TimTimer.Interval = t.GetTTSettingsInterval(); GetThisText(); }
private void BtnSave_Click(object sender, EventArgs e) { //Save interval if seconds field has a valid value try { if (TxtSeconds.Text != "") { TTSettings t = new TTSettings(); t.SetTTSettingsInterval(Int32.Parse(TxtSeconds.Text) * 1000); } } catch { this.Close(); } this.Close(); }