OpenMRU.WinForm
1.0.0
See the version list below for details.
dotnet add package OpenMRU.WinForm --version 1.0.0
NuGet\Install-Package OpenMRU.WinForm -Version 1.0.0
<PackageReference Include="OpenMRU.WinForm" Version="1.0.0" />
paket add OpenMRU.WinForm --version 1.0.0
#r "nuget: OpenMRU.WinForm, 1.0.0"
// Install OpenMRU.WinForm as a Cake Addin #addin nuget:?package=OpenMRU.WinForm&version=1.0.0 // Install OpenMRU.WinForm as a Cake Tool #tool nuget:?package=OpenMRU.WinForm&version=1.0.0
OpenMRU.WinForm
About
OpenMRU.WinForm is a part of OpenMRUSuite and contains WinForm GUI controls for "MRU (Most resently used) files" functionality. (Similar to VisualStudio start window)
Quick start
For to use controls from package, add them to your Toolbox palette by reference this package, then drag-and-drop MRUItemsControl to your form and initialize it with manager and localization. See code below for details (consider you have a form 'Form1', MRUItemsControl 'mruItemsControl1' and Button 'ButtonOpen' on it):
public partial class Form1 : Form
{
// link to manager.
private readonly MRUManager manager;
public Form1()
{
InitializeComponent();
// create IMRUItemStorage implementation using default xml-based storage from OpenMRU.Core
MRUItemFileStorage storage = new MRUItemFileStorage("demo_mru_storage.xml");
// create default manager from OpenMRU.Core
manager = new MRUManager();
// init manager with storage
manager.Initialize(storage);
// subscribe to 'item selected' event
manager.MRUItemSelected += Manager_MRUItemSelected;
// init GUI control with created manager and default (eng) localization
mruItemsControl1.Initialize(manager, new MRUGuiLocalization());
}
private void Manager_MRUItemSelected(string path)
{
MessageBox.Show("Select file from MRU: " + path);
}
// handle open file event
private void ButtonOpen_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
string path = ofd.FileName;
// add file that was selected by user to manager (begin track it and display on GUI)
manager.AddFile(path);
}
}
}
Links
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
- OpenMRU.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial version.