private void Init() { Model.SettingsRow settings = model.GetSettings(); checkAcceptOnlyLocal.Checked = settings.SlaveHost.ToLower() == "localhost"; editRemoteComputer.Text = settings.SlaveHost; editPort.SetValue(settings.Port); checkForUpdates.Checked = settings.CheckForUpdates; checkUsageStatistics.Checked = settings.SendUsage; }
private void Init() { editSettingsFile.Text = Utils.GetSettingsPath(); checkSaveSettings.Checked = Utils.IsSettingsPathDefault(editSettingsFile.Text); Model.SettingsRow settings = model.GetSettings(); checkRunOnStartup.Checked = settings.RunOnWindowsStartup; checkPlaySoundOnRefresh.Checked = settings.PlaySoundOnRefresh; checkFlashIconOnRefresh.Checked = settings.FlashIconOnRefresh; checkEnableLogging.Checked = settings.EnableLogging; editSoundFile.Text = settings.SoundFile; editWaitTimeout.SetValue(settings.WaitingTimeout); }
private void CustomType_FormClosing(object sender, FormClosingEventArgs e) { if (inImportMode) { // we are in import mode, cancel import mode before saving buttonCancelImport_Click(null, null); } SaveTo(folder); Model.SettingsRow settings = model.GetSettings(); settings.ShowGlobalIncludes = checkBoxGlobalIncludes.Checked; settings.ShowGlobalExcludes = checkBoxGlobalExcludes.Checked; tableTester.CancelAll(); }
private void UpdateStartupSettings() { if (model.GetSettings().RunOnWindowsStartup) { if (!Utils.IsStartupPathPresent(Application.ExecutablePath)) { Utils.SetStartupPath(Application.ExecutablePath); } } else { Utils.RemoveStartupPath(); } }
public ProjectFilters(Model model, Model.FoldersRow folder) { this.model = model; this.folder = folder; // this must go after InitFrom ! Model.SettingsRow settings = model.GetSettings(); this.tableIncludes = new XRefresh.FilterTable(settings.ShowGlobalIncludes, false); this.tableExcludes = new XRefresh.FilterTable(settings.ShowGlobalExcludes, false); ((System.ComponentModel.ISupportInitialize)(this.tableIncludes)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tableExcludes)).BeginInit(); InitializeComponent(); // // tableIncludes // this.tableIncludes.AllowDrop = true; this.tableIncludes.AlternatingRowColor = System.Drawing.Color.WhiteSmoke; this.tableIncludes.CustomEditKey = System.Windows.Forms.Keys.Return; this.tableIncludes.Dock = System.Windows.Forms.DockStyle.Fill; this.tableIncludes.EnableHeaderContextMenu = false; this.tableIncludes.ForeColor = System.Drawing.Color.Black; this.tableIncludes.FullRowSelect = true; this.tableIncludes.GridLines = XPTable.Models.GridLines.Both; this.tableIncludes.GridLineStyle = XPTable.Models.GridLineStyle.Dot; this.tableIncludes.Location = new System.Drawing.Point(349, 25); this.tableIncludes.Name = "tableIncludes"; this.tableIncludes.NoItemsText = "There are no file filters. Drag and drop a file here ..."; this.tableIncludes.SelectionBackColor = System.Drawing.Color.Yellow; this.tableIncludes.SelectionForeColor = System.Drawing.Color.Black; this.tableIncludes.Size = new System.Drawing.Size(340, 140); this.tableIncludes.TabIndex = 0; this.tableIncludes.Text = "tableIncludes"; // // tableExcludes // this.tableExcludes.AllowDrop = true; this.tableExcludes.AlternatingRowColor = System.Drawing.Color.WhiteSmoke; this.tableExcludes.CustomEditKey = System.Windows.Forms.Keys.Return; this.tableExcludes.Dock = System.Windows.Forms.DockStyle.Fill; this.tableExcludes.EnableHeaderContextMenu = false; this.tableExcludes.ForeColor = System.Drawing.Color.Black; this.tableExcludes.FullRowSelect = true; this.tableExcludes.GridLines = XPTable.Models.GridLines.Both; this.tableExcludes.GridLineStyle = XPTable.Models.GridLineStyle.Dot; this.tableExcludes.Location = new System.Drawing.Point(3, 25); this.tableExcludes.Name = "tableExcludes"; this.tableExcludes.NoItemsText = "There are no file filters. Drag and drop a file here ..."; this.tableExcludes.SelectionBackColor = System.Drawing.Color.Yellow; this.tableExcludes.SelectionForeColor = System.Drawing.Color.Black; this.tableExcludes.Size = new System.Drawing.Size(340, 140); this.tableExcludes.TabIndex = 3; this.tableExcludes.Text = "table2"; ((System.ComponentModel.ISupportInitialize)(this.tableIncludes)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tableExcludes)).EndInit(); this.tableLayoutPanel.Controls.Add(this.tableIncludes, 1, 1); this.tableLayoutPanel.Controls.Add(this.tableExcludes, 0, 1); HideDebugger(); this.Text = folder.Name + " Filters Designer"; editGlobalIncludes = checkBoxGlobalIncludes.Checked = settings.ShowGlobalIncludes; editGlobalExcludes = checkBoxGlobalExcludes.Checked = settings.ShowGlobalExcludes; this.checkBoxGlobalIncludes.CheckedChanged += new System.EventHandler(this.checkBoxGlobalIncludes_CheckedChanged); this.checkBoxGlobalExcludes.CheckedChanged += new System.EventHandler(this.checkBoxGlobalExcludes_CheckedChanged); InitFrom(folder); editTestPath.Text = folder.Path; tableIncludes.Changed += new FilterTable.ChangedHandler(tableIncludes_Changed); tableExcludes.Changed += new FilterTable.ChangedHandler(tableExcludes_Changed); }