Skip to content

Commit

Permalink
The notes-tab works. added buttons for delete incubation-timer.
Browse files Browse the repository at this point in the history
  • Loading branch information
cadaei committed Mar 27, 2017
1 parent 4096af3 commit 34e217a
Show file tree
Hide file tree
Showing 11 changed files with 174 additions and 32 deletions.
1 change: 1 addition & 0 deletions ARKBreedingStats/ArkOCR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public ArkOCR()
else if (l < 165) charWeighting[l] = 0.97; // letters with accents
else charWeighting[l] = 0.8; // symbols
}
charWeighting[108] = 0.98;// l (i is often mistaken for l)

screenCaptureApplicationName = "ShooterGame";
}
Expand Down
26 changes: 21 additions & 5 deletions ARKBreedingStats/Form1.Designer.cs

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

7 changes: 7 additions & 0 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public Form1()
raisingControl1.extractBaby += new RaisingControl.ExtractBabyEventHandler(extractBaby);
raisingControl1.setSpeciesIndex += new setSpeciesIndexEventHandler(setSpeciesIndex);
raisingControl1.timerControl = timerList1;
notesControl1.changed += new collectionChangedEventHandler(setCollectionChanged);

extractor = new Extraction();

Expand Down Expand Up @@ -2272,6 +2273,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
toolStripButtonAddNote.Visible = tabControlMain.SelectedTab == tabPageNotes;
toolStripButtonRemoveNote.Visible = tabControlMain.SelectedTab == tabPageNotes;
raisingControl1.updateListView = tabControlMain.SelectedTab == tabPageRaising;
toolStripButtonDeleteExpiredIncubationTimers.Visible = tabControlMain.SelectedTab == tabPageRaising;

if (tabControlMain.SelectedTab == tabPageStatTesting)
{
Expand Down Expand Up @@ -3587,6 +3589,11 @@ private void cbEvolutionEvent_CheckedChanged(object sender, EventArgs e)
tamingControl1.EvolutionEvent = cbEvolutionEvent.Checked;
}

private void toolStripButtonDeleteExpiredIncubationTimers_Click(object sender, EventArgs e)
{
raisingControl1.deleteAllExpiredIncubationTimers();
}

/// <summary>
/// fixes typos saved in earlier versions. is called right after loading a library
/// </summary>
Expand Down
15 changes: 15 additions & 0 deletions ARKBreedingStats/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,21 @@ The TE can differ 0.1% due to ingame-rounding.</value>
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButtonDeleteExpiredIncubationTimers.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Expand Down
26 changes: 22 additions & 4 deletions ARKBreedingStats/NotesControl.Designer.cs

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

34 changes: 32 additions & 2 deletions ARKBreedingStats/NotesControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace ARKBreedingStats
public partial class NotesControl : UserControl
{
private List<Note> noteList;
private Note selectedNote;
public event Form1.collectionChangedEventHandler changed;

public NotesControl()
{
Expand Down Expand Up @@ -43,7 +45,10 @@ private void listViewNoteTitles_SelectedIndexChanged(object sender, EventArgs e)
{
if (listViewNoteTitles.SelectedIndices.Count > 0)
{
richTextBoxNote.Text = ((Note)(listViewNoteTitles.SelectedItems[0].Tag)).Text;
selectedNote = (Note)listViewNoteTitles.SelectedItems[0].Tag;
tbNoteTitle.Text = selectedNote.Title;
richTextBoxNote.Text = selectedNote.Text;

}
}

Expand All @@ -53,16 +58,41 @@ public void AddNote()
ListViewItem lvi = new ListViewItem(n.Title);
lvi.Tag = n;
listViewNoteTitles.Items.Add(lvi);
listViewNoteTitles.Items[listViewNoteTitles.Items.Count - 1].Selected = true;
tbNoteTitle.Focus();
tbNoteTitle.SelectAll();
}

public void RemoveSelectedNote()
{
if (listViewNoteTitles.SelectedItems.Count > 0
&& MessageBox.Show("Delete note with the title \"" + ((Note)(listViewNoteTitles.SelectedItems[0].Tag)).Title + "\"?", "Delete Note?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
listViewNoteTitles.Items.Remove(listViewNoteTitles.SelectedItems[0]);
Note n = (Note)listViewNoteTitles.SelectedItems[0].Tag;
noteList.Remove(n);
listViewNoteTitles.Items.Remove(listViewNoteTitles.SelectedItems[0]);
}
}

private void richTextBoxNote_Leave(object sender, EventArgs e)
{
if (selectedNote != null)
{
selectedNote.Text = richTextBoxNote.Text;
changed?.Invoke();
}
}

private void tbNoteTitle_Leave(object sender, EventArgs e)
{
if (selectedNote != null)
{
if (listViewNoteTitles.SelectedIndices.Count > 0)
{
listViewNoteTitles.SelectedItems[0].Text = tbNoteTitle.Text;
}
selectedNote.Title = tbNoteTitle.Text;
changed?.Invoke();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.22.0")]
[assembly: AssemblyFileVersion("0.22.1")]
Loading

0 comments on commit 34e217a

Please sign in to comment.