Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/phaselden/FlipIt
Browse files Browse the repository at this point in the history
  • Loading branch information
phaselden committed Feb 6, 2021
2 parents cb96e8e + b044d49 commit 058234b
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 138 deletions.
3 changes: 3 additions & 0 deletions src/FlipIt/FlipItSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ private FlipItSettings()
}

public bool Display24HrTime { get; set; }
public bool ShowDstIndicator { get; set; }
public int Scale { get; set; } = 70;

public List<ScreenSetting> ScreenSettings { get; set; } = new List<ScreenSetting>();
Expand All @@ -35,6 +36,7 @@ public static FlipItSettings Load(Screen[] allScreens)
{
iniFile = new IniFile(iniFilePath);
settings.Display24HrTime = iniFile.GetBool("General", "Display24Hr", false);
settings.ShowDstIndicator = iniFile.GetBool("General", "ShowDstIndicator", true);
settings.Scale = iniFile.GetInt("General", "Scale", 70);
}
else
Expand Down Expand Up @@ -101,6 +103,7 @@ public void Save()

var iniFile = new IniFile(iniFilePath);
iniFile.SetBool("General", "Display24Hr", Display24HrTime);
iniFile.SetBool("General", "ShowDstIndicator", ShowDstIndicator);
iniFile.SetInt("General", "Scale", Scale);

foreach (var screenSetting in ScreenSettings)
Expand Down
4 changes: 2 additions & 2 deletions src/FlipIt/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ private void PaintTime()
else if (_screenSetting.DisplayType == DisplayType.WorldTime)
{
_timeScreen = _screenSetting.Locations.Count > 0
? new WorldTimesScreen(_screenSetting.Locations, this, _settings.Display24HrTime)
: new WorldTimesScreen(GetDefaultLocations(), this, _settings.Display24HrTime);
? new WorldTimesScreen(_screenSetting.Locations, this, _settings.Display24HrTime, _settings.ShowDstIndicator)
: new WorldTimesScreen(GetDefaultLocations(), this, _settings.Display24HrTime, _settings.ShowDstIndicator);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/FlipIt/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.5.*")]
[assembly: AssemblyFileVersion("1.2.5")]
[assembly: AssemblyVersion("1.3.0.*")]
[assembly: AssemblyFileVersion("1.3.0")]
92 changes: 66 additions & 26 deletions src/FlipIt/SettingsForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/FlipIt/SettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ private void SettingsForm_Load(object sender, EventArgs e)
display12hrRadioButton.Checked = true;
}

showDstIndicatorCheckBox.Checked = _settings.ShowDstIndicator;

scaleTrackBar.Value = _settings.Scale / 10;

screensListBox.Items.Clear();
Expand Down Expand Up @@ -423,9 +425,9 @@ private bool IsValidCity(string cityName)
return cityName.Length > 0 && _availableCities.Exists(c => c.DisplayName.HasSameText(cityName));
}

private void worldTimesListView_BeforeLabelEdit(object sender, LabelEditEventArgs e)
private void showDstIndicatorCheckBox_CheckedChanged(object sender, EventArgs e)
{
MessageBox.Show("ioins");
_settings.ShowDstIndicator = showDstIndicatorCheckBox.Checked;
}
}
}
Loading

0 comments on commit 058234b

Please sign in to comment.