Skip to content

Instantly share code, notes, and snippets.

View BartDM's full-sized avatar

Bart De Meyer BartDM

View GitHub Profile
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
using Greenshot.Plugin;
[assembly: AssemblyTitle("GreenshotDemoPlugin")]
[assembly: AssemblyDescription("")]
public IEnumerable<IDestination> Destinations()
{
yield return new DemoDestination(this);
}
using System;
using System.IO;
using System.Windows.Forms;
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
namespace GreenshotDemoPlugin
{
using System;
using System.Collections.Generic;
using Greenshot.IniFile;
using Greenshot.Plugin;
namespace GreenshotDemoPlugin
{
public class DemoPlugin: IGreenshotPlugin
{
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(DemoPlugin));
using Greenshot.IniFile;
using GreenshotPlugin.Core;
namespace GreenshotDemoPlugin
{
[IniSection("Demo", Description = "Greenshot Demo Plugin configuration")]
public class DemoConfiguration:IniSection
{
private const string DEFAULT_URL = "https://THE_URL_TO_YOUR_APPLICATION";
using System;
using System.Collections.Specialized;
using System.Net;
using Greenshot.IniFile;
using GreenshotPlugin.Core;
namespace GreenshotDemoPlugin
{
public class DemoConnector: IDisposable
{
@BartDM
BartDM / gist:5161080
Last active December 14, 2015 22:48
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
using System.ComponentModel;
using OxyPlotDemo.Annotations;
namespace OxyPlotDemo.ViewModels
{
public class MainWindowModel: INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
@BartDM
BartDM / gist:5161138
Created March 14, 2013 13:05
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
using System.ComponentModel;
using OxyPlot;
using OxyPlotDemo.Annotations;
namespace OxyPlotDemo.ViewModels
{
public class MainWindowModel: INotifyPropertyChanged
{
private PlotModel plotModel;
public PlotModel PlotModel
@BartDM
BartDM / gist:5161184
Created March 14, 2013 13:12
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
<Window x:Class="OxyPlotDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.codeplex.com"
Title="MainWindow" Height="350" Width="525">
<Grid>
<oxy:Plot x:Name="Plot1" Title="A Graph" Model="{Binding PlotModel}" Margin="10" Grid.Row="1">
</oxy:Plot>
</Grid>
</Window>
@BartDM
BartDM / gist:5161269
Created March 14, 2013 13:25
Code samples of blog post Creating graphs in WPF using OxyPlot on http://blog.bartdemeyer.be
private void SetUpModel()
{
PlotModel.LegendTitle = "Legend";
PlotModel.LegendOrientation = LegendOrientation.Horizontal;
PlotModel.LegendPlacement = LegendPlacement.Outside;
PlotModel.LegendPosition = LegendPosition.TopRight;
PlotModel.LegendBackground = OxyColor.FromAColor(200, OxyColors.White);
PlotModel.LegendBorder = OxyColors.Black;
var dateAxis = new DateTimeAxis(AxisPosition.Bottom, "Date", "dd/MM/yy HH:mm") { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, IntervalLength = 80 };