<commit_before>//*******************************************************//
// Copyright  2014-2016 ZXTeam http://www.zxteam.org    //
// License: http://opensource.org/licenses/MIT           //
//*******************************************************//
// Author: <NAME> <<EMAIL>>        //
// Web: http://www.anurin.name                           //
// SkypeId: maxim.anurin                                 //
//*******************************************************//

#include "org/zxteam/lib/reusable/Object.hpp"
#include "org/zxteam/lib/reusable/app/DesktopApplication.hpp"

#include "../contract/FeatureHost.hpp"
#include "ZXAssistApplication.hpp"

#include <iostream>
#include "boost/intrusive_ptr.hpp"
#include "org/zxteam/lib/reusable/String.hpp"
#include "org/zxteam/lib/reusable/runtime/DynamicLibrary.hpp"
#include "org/zxteam/lib/reusable/fs/FileSystem.hpp"
#include "Windows.h"

using namespace org::zxteam::lib::reusable;
using namespace org::zxteam::lib::reusable::app;
using namespace org::zxteam::lib::reusable::runtime;

using namespace org::zxteam::zxassist::host;

int main(int argc, wchar_t** argv)
{
	ZXAssistApplicationPtr app = new ZXAssistApplication(GetModuleHandle(NULL));
	return app->Run();
}<commit_msg>[Refs #11] TrayIcon + several menu items in ZXAssistCPP<commit_after>//*******************************************************//
// Copyright  2014-2016 ZXTeam http://www.zxteam.org    //
// License: http://opensource.org/licenses/MIT           //
//*******************************************************//
// Author: <NAME> <<EMAIL>>        //
// Web: http://www.anurin.name                           //
// SkypeId: maxim.anurin                                 //
//*******************************************************//

#include "org/zxteam/lib/reusable/Object.hpp"
#include "org/zxteam/lib/reusable/Action.hpp"
#include "org/zxteam/lib/reusable/windows/Application.hpp"
#include "org/zxteam/lib/reusable/windows/Menu.hpp"
#include "org/zxteam/lib/reusable/windows/TrayIcon.hpp"

#include "Windows.h"


//#include "../contract/FeatureHost.hpp"
//#include "ZXAssistApplication.hpp"
//#include <iostream>
//#include "org/zxteam/lib/reusable/runtime/DynamicLibrary.hpp"
//#include "org/zxteam/lib/reusable/fs/FileSystem.hpp"

using namespace org::zxteam::lib::reusable;
using namespace org::zxteam::lib::reusable::windows;

//using namespace org::zxteam::zxassist::host;

class MyApplication : public Application
{
public:
	virtual void Run()
	{
		typedef Action0Instance<MyApplication> MenuAction;
		MenuAction onScreenshotAction(this, &MyApplication::OnScreenshot);
		MenuAction onPreferencesAction(this, &MyApplication::OnPreferences);
		MenuAction onExitAction(this, &MyApplication::OnExit);

		TrayIcon ti;
		ti.SetIcon("zxassist_48x48.png");
		ti.SetToolTip("ZXAssist C++");
		Menu mainMenu;
		mainMenu.AddAction("Make Screenshot",  onScreenshotAction);
		mainMenu.AddAction("Preferences",  onPreferencesAction);
		mainMenu.AddAction("Exit", onExitAction);
		ti.SetMenu(mainMenu);
		
		Application::Run();
	}
private:
	void OnExit(void) { this->Shutdown(); }
	void OnScreenshot(void) { MessageBoxA(0, "TODO Make Screenshot", "ZXAssist C++", MB_OK); }
	void OnPreferences(void) { MessageBoxA(0, "TODO Open Preferences Window", "ZXAssist C++", MB_OK); }
}/* MyApplication */;

int main(int argc, char** argv)
{
	if(TrayIcon::IsTraySubsystemAvailable())
	{
		MyApplication app;
		app.Run();
	}
	return 0;
} 
{'fraction_non_alphanumeric': 0.24318840579710144, 'fraction_numerical': 0.007536231884057971, 'mean_word_length': 4.342105263157895, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6974885', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1092, 'n_words': 180}