public GlobalSettingsRowChangeEvent(GlobalSettingsRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void AddGlobalSettingsRow(GlobalSettingsRow row) { this.Rows.Add(row); }
public void RemoveGlobalSettingsRow(GlobalSettingsRow row) { this.Rows.Remove(row); }
public TDSettings.GlobalSettingsRow GetGlobalSettings(System.Drawing.Rectangle screenSize) { if (_instance.GlobalSettings.Rows.Count == 0) { TDSettings.GlobalSettingsRow result = _instance.GlobalSettings.NewGlobalSettingsRow(); result.ShowLoadingForm = true; result.TreePanelWidth = 180; result.MainFormHeight = 768 - 20; result.MainFormWidth = 1024 - 50; result.MainFormLeft = (screenSize.Width - result.MainFormWidth) / 2; result.MainFormTop = (screenSize.Height - result.MainFormHeight) / 2; result.ConfirmSuccessfullyEditBug = true; result.ShowBugsCount = false; result.ReportFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); _instance.GlobalSettings.AddGlobalSettingsRow(result); _instance.GlobalSettings.AcceptChanges(); return(result); } else { GlobalSettingsRow settings = this.GlobalSettings.Rows[0] as TDSettings.GlobalSettingsRow; try{ if (settings.MainFormLeft == Int32.MaxValue) { } } catch { settings.MainFormLeft = (screenSize.Width - settings.MainFormWidth) / 2; } try { if (settings.MainFormTop == Int32.MaxValue) { } } catch { settings.MainFormTop = (screenSize.Height - settings.MainFormHeight) / 2; } try { if (settings.MainFormMaximized) { } } catch { settings.MainFormMaximized = false; } try { if (String.IsNullOrEmpty(settings.ReportFilesPath)) { } } catch { settings.ReportFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); } settings.AcceptChanges(); return(settings); } }