Skip to content

Commit

Permalink
a bit better statusbar
Browse files Browse the repository at this point in the history
  • Loading branch information
preseverence committed Mar 25, 2018
1 parent f48fd10 commit db55f94
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 17 deletions.
1 change: 0 additions & 1 deletion ObfuscarMappingParser/Forms/LauncherForm.Designer.cs

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

31 changes: 25 additions & 6 deletions ObfuscarMappingParser/Forms/MainForm.Designer.cs

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

18 changes: 13 additions & 5 deletions ObfuscarMappingParser/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ private void BeginLoading(string operation)
{
this.SetTaskbarProgressState(Taskbar.ThumbnailProgressState.Indeterminate);
spbLoading.Visible = true;
slblType.Visible = false;
slblType.Text = "";
slblModule.Visible = false;
slblModule.Text = "";
menuStrip.Enabled = ptvElements.Enabled = tsTools.Enabled = false;
commandManager.BeginDisable();
slblSelected.Text = operation;
Expand All @@ -144,6 +148,7 @@ private void EndLoading(string result)
{
menuStrip.Enabled = ptvElements.Enabled = tsTools.Enabled = true;
spbLoading.Visible = false;
slblType.Visible = slblModule.Visible = true;
commandManager.EndDisable();
slblSelected.Text = result;
this.SetTaskbarProgressState(Taskbar.ThumbnailProgressState.NoProgress);
Expand Down Expand Up @@ -177,7 +182,7 @@ private async void OpenFile(string filename)
Text = $"{APP_TITLE} - {PathUtils.GetFilename(filename)}";
Configs.Instance.AddRecent(filename);

BeginLoading("Loading: " + filename);
BeginLoading($"Loading: {filename}");

while (openedForms.Count > 0)
openedForms[0].Close();
Expand All @@ -196,7 +201,7 @@ private async void OpenFile(string filename)
pdbfiles.Clear();
BuildMapping();
EnableMappingActions(true);
EndLoading("Mapping loaded in " + mapping.LoadTime + " ms");
EndLoading($"Mapping loaded in {mapping.LoadTime} ms");

AttachRelatedPdbs(Configs.Instance.GetRecentPdb(mapping.Filename), false);
AttachRelatedPdbs(pdbToAttach, true);
Expand All @@ -207,7 +212,7 @@ private async void OpenFile(string filename)

private async void ReloadFile()
{
BeginLoading("Reloading: " + mapping.Filename);
BeginLoading($"Reloading: {mapping.Filename}");
while (openedForms.Count > 0)
openedForms[0].Close();

Expand All @@ -224,7 +229,7 @@ private async void ReloadFile()

BuildMapping();
EnableMappingActions(true);
EndLoading("Mapping reloaded in " + mapping.LoadTime + " ms");
EndLoading($"Mapping reloaded in {mapping.LoadTime} ms");
tbSearch.AutoCompleteCustomSource = mapping.GetNewNamesCollection();
}

Expand Down Expand Up @@ -258,7 +263,7 @@ private void BuildMapping()
ptvElements.CollapseAll();
ptvElements.EndUpdate();
sw.Stop();
Debug.WriteLine("Tree building: " + sw.ElapsedMilliseconds + " ms");
Debug.WriteLine($"Tree building: {sw.ElapsedMilliseconds} ms");
}

private void tbSearch_KeyDown(object sender, KeyEventArgs e)
Expand Down Expand Up @@ -414,6 +419,8 @@ private void ptvElements_NodeSelect(object sender, NodeSelectEventArgs e)

EnableSelectionActions(focusedItem != null);
slblSelected.Text = focusedItem == null ? "" : focusedItem.TransformSimple;
slblType.Text = focusedItem == null ? "" : focusedItem.EntityType.ToString();
slblModule.Text = focusedItem == null ? "" : focusedItem.ModuleOld;
commandManager.SetEnabled(Actions.OpenInEditor, focusedItem != null && DetectMarkersForVS(out focusedFilename, out focusedLine, focusedItem));
}

Expand Down Expand Up @@ -928,5 +935,6 @@ private async void miVersionHistory_Click(object sender, EventArgs e)
process.WaitForInputIdle();
File.Delete(filename);
}

}
}
7 changes: 4 additions & 3 deletions ObfuscarMappingParser/Forms/PDBManagerForm.Designer.cs

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

1 change: 0 additions & 1 deletion ObfuscarMappingParser/Forms/SettingsForm.Designer.cs

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

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

0 comments on commit db55f94

Please sign in to comment.