Skip to content

Instantly share code, notes, and snippets.

@ekwus
ekwus / Controller.cs
Created May 20, 2014 08:48
XSockets Binary Messaging Client-Server-Client
using Smots.Common.Database;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XSockets.Core.XSocket;
using XSockets.Core.XSocket.Helpers;
using Smots.Interface.Model;
using System.IO;
@ekwus
ekwus / gist:9184990
Created February 24, 2014 10:08
Call 45 From 40
static void Main(string[] args)
{
string path = Path.GetDirectoryName( Assembly.GetEntryAssembly().Location);
string name = Path.Combine(path, "TestCOM45.dll");
Assembly ass = Assembly.LoadFile(name);
object obj = ass.CreateInstance("TestCOM45.TestCOMLib");
ITestCom test = obj as ITestCom;
@ekwus
ekwus / MainViewModel
Created September 10, 2013 09:05
Example of binding MahApps.Metro Flyout IsOpen using MVVM Light
using System;
using System.Collections.ObjectModel;
using System.Threading;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using TrinityToolkit;
using TrinityPlayer.Model;
The property on the MainViewModel should look like this
public ViewModelBase MyViewModel
{
get
{
return ServiceLocator.Current.GetInstance<SettingsViewModel>();
}
set
{