Skip to content

Commit

Permalink
always ontop
Browse files Browse the repository at this point in the history
  • Loading branch information
BitBaboonSteve committed Feb 25, 2018
1 parent 34a98e9 commit 9045e54
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
7 changes: 1 addition & 6 deletions EVEData/EveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,6 @@ public void LoadFromDisk()
}







Init();
}

Expand Down Expand Up @@ -1312,7 +1307,7 @@ public void StartUpdateCharacterThread()
Character c = LocalCharacters.ElementAt(i);
c.Update();
}
Thread.Sleep(1000);
Thread.Sleep(2000);
}
}).Start();
}
Expand Down
4 changes: 2 additions & 2 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
xmlns:zoombox1="clr-namespace:WpfHelpers.WpfControls.Zoombox;assembly=WpfHelpers"
xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
mc:Ignorable="d"
Title="Slazanger's Map Tool 0.36" Height="800" Width="1024" Background="#FFEEEEEE" WindowState="Maximized" Icon="Images/smt_icon.ico">
Title="Slazanger's Map Tool 0.37" Height="800" Width="1024" Background="#FFEEEEEE" WindowState="Maximized" Icon="Images/smt_icon.ico">

<Window.Resources>
</Window.Resources>
Expand Down Expand Up @@ -68,7 +68,7 @@
<Label Content="{Binding Path=ActiveSystem.SystemName}" FontSize="18" FontWeight="Bold" />
</StackPanel>

<DataGrid x:Name="AnomSigList" Grid.Row="1" AreRowDetailsFrozen="True" AutoGenerateColumns="False" ItemsSource="{Binding Path=ActiveSystem.Anoms.Values, diag:PresentationTraceSources.TraceLevel=High}">
<DataGrid x:Name="AnomSigList" Grid.Row="1" AreRowDetailsFrozen="True" AutoGenerateColumns="False" ItemsSource="{Binding Path=ActiveSystem.Anoms.Values}">

<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
Expand Down
16 changes: 16 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,29 @@ public MainWindow()
ColoursPropertyGrid.SelectedObject = selectedColours;
MapConf.ActiveColourScheme = selectedColours;
ColoursPropertyGrid.PropertyChanged += ColoursPropertyGrid_PropertyChanged;
MapConf.PropertyChanged += MapConf_PropertyChanged;

Closed += MainWindow_Closed;

EVEManager.IntelAddedEvent += OnIntelAdded;
//MapConf.PropertyChanged += RegionRC.MapObjectChanged;
}

private void MapConf_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if(e.PropertyName == "AlwaysOnTop")
{
if(MapConf.AlwaysOnTop)
{
this.Topmost = true;
}
else
{
this.Topmost = false;
}
}
}

private void MainWindow_Closed(object sender, EventArgs e)
{
// save off the dockmanager layout
Expand Down
17 changes: 17 additions & 0 deletions MapConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,34 @@ public int MaxIntelSeconds
m_MaxIntelSeconds = 30;
}
}
}

private bool m_AlwaysOnTop;
[Category("General")]
[DisplayName("Always on top")]
public bool AlwaysOnTop
{
get
{
return m_AlwaysOnTop;
}
set
{
m_AlwaysOnTop = value;
OnPropertyChanged("AlwaysOnTop");
}
}





public void SetDefaults()
{
DefaultRegion = "Molden Heath";
ShowSystemPopup = true;
MaxIntelSeconds = 120;
AlwaysOnTop = false;
MapColours = new List<MapColours>();
}

Expand Down

0 comments on commit 9045e54

Please sign in to comment.