text:
static std::wstring wsPluginName;
static std::wstring wsDescription;

struct LinkedMem {
	UINT32  uiVersion;
	DWORD   dwcount;
	float	fAvatarPosition[3];
	float	fAvatarFront[3];
	float	fAvatarTop[3];
	wchar_t	name[256];
	float	fCameraPosition[3];
	float	fCameraFront[3];
	float	fCameraTop[3];
	wchar_t	identity[256];
	UINT32 context_len;
	unsigned char context[256];
	wchar_t description[2048];
};

static void about(void *h) {
	::MessageBox(reinterpret_cast<HWND>(h), L"Reads audio position information from linked game", L"Mumble Link Plugin", MB_OK);
}

static HANDLE hMapObject = NULL;
static LinkedMem *lm = NULL;
static DWORD last_count = 0;
static DWORD last_tick = 0;

static void unlock() {
	lm->dwcount = last_count = 0;
	lm->uiVersion = 0;
	lm->name[0] = 0;
	wsPluginName.assign(L"Link");
	wsDescription.clear();
}

static int trylock() {
	if ((lm->uiVersion == 1) || (lm->uiVersion == 2)) {
		if (lm->dwcount != last_count) {
			last_count = lm->dwcount;
			last_tick = GetTickCount();

			errno_t err = 0;
			wchar_t buff[2048];

			if (lm->name[0]) {
				err = wcscpy_s(buff, 256, lm->name);
				if (! err)
					wsPluginName.assign(buff);
			}
			if (!err && lm->description[0]) {
				err = wcscpy_s(buff, 2048, lm->description);
				if (! err)
					wsDescription.assign(buff);
			}
			if (err) {
				wsPluginName.assign(L"Link");
				wsDescription.clear();
				return false;
			}
			return true;
		}
	}
	return false;
}

static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, float *camera_pos, float *camera_front, float *camera_top, std::string &context, std::wstring &identity) {
	if (lm->dwcount != last_count) {
		last_count = lm->dwcount;
		last_tick = GetTickCount();
	} else 	if ((GetTickCount() - last_tick) > 5000)
		return false;

	if ((lm->uiVersion != 1) && (lm->uiVersion != 2))
		return false;

	for (int i=0;i<3;++i) {
		avatar_pos[i]=lm->fAvatarPosition[i];
		avatar_front[i]=lm->fAvatarFront[i];
		avatar_top[i]=lm->fAvatarTop[i];
	}

	if (lm->uiVersion == 2) {
		for (int i=0;i<3;++i) {
			camera_pos[i]=lm->fCameraPosition[i];
			camera_front[i]=lm->fCameraFront[i];
			camera_top[i]=lm->fCameraTop[i];
		}

		if (lm->context_len > 255)
			lm->context_len = 255;
		lm->identity[255] = 0;

		context.assign(reinterpret_cast<const char *>(lm->context), lm->context_len);
		identity.assign(lm->identity);
	} else {
		for (int i=0;i<3;++i) {
			camera_pos[i]=lm->fAvatarPosition[i];
			camera_front[i]=lm->fAvatarFront[i];
			camera_top[i]=lm->fAvatarTop[i];
		}
		context.clear();
		identity.clear();
	}

	return true;
}

static const std::wstring getdesc() {
	return wsDescription;
}

BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID) {
	bool bCreated = false;
	switch (fdwReason) {
		case DLL_PROCESS_ATTACH:
			wsPluginName.assign(L"Link");
			hMapObject = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, L"MumbleLink");
			if (hMapObject == NULL) {
				hMapObject = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LinkedMem), L"MumbleLink");
				bCreated = true;
				if (hMapObject == NULL)
					return false;
			}
			lm = static_cast<LinkedMem *>(MapViewOfFile(hMapObject, FILE_MAP_ALL_ACCESS, 0, 0, 0));
			if (lm == NULL) {
				CloseHandle(hMapObject);
				hMapObject = NULL;
				return false;
			}
			if (bCreated)
				memset(lm, 0, sizeof(LinkedMem));
			break;
		case DLL_PROCESS_DETACH:
			if (lm) {
				UnmapViewOfFile(lm);
				lm = NULL;
			}
			if (hMapObject) {
				CloseHandle(hMapObject);
				hMapObject = NULL;
			}
			break;
	}
	return true;
}

static std::wstring description(L"Link v1.2.0");

static MumblePlugin linkplug = {
	MUMBLE_PLUGIN_MAGIC,
	description,
	wsPluginName,
	about,
	NULL,
	trylock,
	unlock,
	getdesc,
	fetch
};

extern "C" MUMBLE_PLUGIN_EXPORT MumblePlugin *getMumblePlugin() {
	return &linkplug;
}


text:
"use strict";
const config = require("../../config");
const sa = require("chainfetch");
const APIBase = "https://discordapp.com/api/v6/oauth2";
const { Eris: { Client } } = require("sosamba");

class Cache {
    constructor(time, getter) {
        this.time = time;
        this._cache = {};
        this._getter = getter;
    }

    get(item) {
        if (this._cache[item]) {
            if (this._cache[item].error) {
                this._fetch(item);
                return Promise.resolve(this._cache[item].data);
            }
            if (Date.now() - this._cache[item].time < this.time) {
                return Promise.resolve(this._cache[item].data);
            }
            this._fetch(item);
            return Promise.resolve(this._cache[item].data);
        }
        return this._fetch(item);
    }

    _fetch(item) {
        return this._getter(item, this).then(data => {
            //eslint-disable-next-line no-console
            if (data.error) console.error(data.error);
            this._cache[item] = { time: Date.now(), data };
            return data;
        });
    }

    clear() {
        this._cache = {};
    }
}

const getUserInfo = async (token, cache) => {
    const e = new Client(`Bearer ${token}`, {
        restMode: true
    });
    try {
        const body = await e.requestHandler.request("GET", "/users/@me", true);
        const guilds = await e.requestHandler.request("GET", "/users/@me/guilds", true);
        return {
            ...body,
            guilds
        };
    } catch (err) {
        if (err.code === "ETIMEDOUT") return cache._cache[token].data;
        else throw err;
    }
};

const c = new Cache(6e4, async (token, cache) => {
    try {
        return await getUserInfo(token, cache);
    } catch (e) {
        return { error: e };
    }
});

const auth = {
    async checkAuth(rq, rs, nx) {
        if (!rq.session.tokenData) return nx();
        else {
            if (Date.now() - rq.session.tokenData.date >= rq.session.tokenData.expiry) {
                try {
                    await auth.refreshToken(rq.session.refreshToken, rq);
                } catch (err) {
                    return nx();
                }
            }

            const d = await c.get(rq.session.tokenData.accessToken);
            if (d.error) nx();
            rq.user = d;
            rq.signedIn = true;
            nx();
        }
    },

    async refreshToken(code, req) {
        let dat = await sa.post(`${APIBase}/token`)
            .set("Authorization", `Basic ${Buffer.from(`${config.clientID}:${config.clientSecret}`).toString("base64")}`)
            .attach({
                refresh_token: code,
                grant_type: "refresh_token",
            })
            .toJSON();
        const { body } = dat;
        const dateAfterReq = Date.now();
        const d = await c.get(body.access_token);
        req.session.tokenData = {
            accessToken: body.access_token,
            refreshToken: body.refreshToken,
            expiry: body.expires_in * 1000, // Expiry is in seconds, convert to ms
            date: dateAfterReq,
            redirURI: `${req.protocol}://${req.headers.host}/callback`,
        };
        req.user = d;
        return true;
    },

    async getAccessToken(code, req) {
        let r = await sa.post(`${APIBase}/token`)
            .attach({
                client_id: config.clientID,
                client_secret: config.clientSecret,
                code,
                grant_type: "authorization_code",
                redirect_uri: `${req.protocol}://${req.headers.host}/callback`
            })
            .toJSON();
        const { body } = r;
        const dateAfterReq = Date.now();
        const d = await auth.getUserInfo(body.access_token);
        if (d.error) console.error(d.error);
        req.session.tokenData = {
            accessToken: body.access_token,
            refreshToken: body.refresh_token,
            expiry: body.expires_in * 1000,
            date: dateAfterReq,
            redirURI: `${req.protocol}://${req.headers.host}/callback`,
        };
        req.user = d;
        return;
    },

    getUserInfo,

    async logout(req) {
        await sa.post(`${APIBase}/token/revoke`)
            .set("Authorization", `Basic ${Buffer.from(`${config.clientID}:${config.clientSecret}`).toString("base64")}`)
            .attach({
                token: req.session.tokenData.accessToken,
                token_type_hint: "access_token"
            });
        await sa.post(`${APIBase}/token/revoke`)
            .set("Authorization", `Basic ${Buffer.from(`${config.clientID}:${config.clientSecret}`).toString("base64")}`)
            .attach({
                token: req.session.tokenData.refreshToken,
                token_type_hint: "refresh_token"
            });
        req.session.destroy();
    }
};

module.exports = auth;

redpajama_set_name: RedPajamaGithub


text:
[//000000001]: # (page\_util\_quote \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_quote\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright © 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_quote\(n\) 1\.0 tcllib "Parser generator tools")

 [ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

# NAME

page\_util\_quote \- page character quoting utilities

# Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# SYNOPSIS

package require page::util::quote ?0\.1?
package require snit

[__::page::util::quote::unquote__ *char*](#1)
[__::page::util::quote::quote'tcl__ *char*](#2)
[__::page::util::quote::quote'tclstr__ *char*](#3)
[__::page::util::quote::quote'tclcom__ *char*](#4)

# DESCRIPTION

This package provides a few utility commands to convert characters into various
forms\.

# API

  - __::page::util::quote::unquote__ *char*

    A character, as stored in an abstract syntax tree by a PEG processor \(See
    the packages __grammar::peg::interpreter__, __grammar::me__, and
    their relations\), i\.e\. in some quoted form, is converted into the equivalent
    Tcl character\. The character is returned as the result of the command\.

  - __::page::util::quote::quote'tcl__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser, will regenerate the
    character in question and is 7bit ASCII\. The string is returned as the
    result of this command\.

  - __::page::util::quote::quote'tclstr__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser and will generate a human
    readable representation of the character in question\. The string is returned
    as the result of this command\.

    The string does not use any unprintable characters\. It may use
    backslash\-quoting\. High UTF characters are quoted to avoid problems with the
    still prevalent ascii terminals\. It is assumed that the string will be used
    in a double\-quoted environment\.

  - __::page::util::quote::quote'tclcom__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser when used within a Tcl
    comment\. The string is returned as the result of this command\.

# Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# KEYWORDS

[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator),
[quoting](\.\./\.\./\.\./\.\./index\.md\#quoting), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing)

# CATEGORY

Page Parser Generator

# COPYRIGHT

Copyright © 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>


text:
package com.neoneobeam.fu;

import android.content.ClipData;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.DragEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageButton;

public class MyDraggableImageButton extends ImageButton {

	public MyDraggableImageButton(Context context, AttributeSet attrs) {
		super(context, attrs);
		setFocusable(true);

		setOnTouchListener(new View.OnTouchListener() {

			@Override
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
				case MotionEvent.ACTION_DOWN:
					setStartDrag(v);
					return true;

				default:
					return false;
				}

			}
		});
	}

	private void setStartDrag(View v) {
		ClipData data = ClipData.newPlainText("text", "text : " + v.toString());
		v.startDrag(data, new DragShadowBuilder(v),(Object)v, 0);
	}
	/*
	@Override
	public boolean onDragEvent(DragEvent event) {
	boolean result = false;
	switch (event.getAction()) {
	case DragEvent.ACTION_DRAG_STARTED: {
	//ドラッグ開始時に呼び出し
	Log.i("DragSample", "Drag started, event=" + event);
	result = true;
	} break;

	case DragEvent.ACTION_DRAG_ENDED: {
	//ドラッグ終了時に呼び出し
	Log.i("DragSample", "Drag ended.");
	} break;

	case DragEvent.ACTION_DRAG_LOCATION: {
	//ドラッグ中に呼び出し
	Log.i("DragSample", "... seeing drag locations ...");
	result = true;
	} break;

	case DragEvent.ACTION_DROP: {
	//ドロップ時に呼び出し
	Log.i("DragSample", "Got a drop! =" + this + " event=" + event);
	result = true;
	} break;

	case DragEvent.ACTION_DRAG_ENTERED: {
	//ドラッグ開始直後に呼び出し
	Log.i("DragSample", "Entered  " + this);
	result = true;
	} break;

	case DragEvent.ACTION_DRAG_EXITED: {
	//ドラッグ終了直前に呼び出し
	Log.i("DragSample", "Exited  " + this);
	result = true;
	} break;

	default:

	Log.i("DragSample", "other drag event: " + event);
	result = true;
	break;
	}
	return result;
	}

*/
}


text:
## How to read barcode from live video cam in C# with ByteScout BarCode Reader SDK

### How to code in C# to read barcode from live video cam with this step-by-step tutorial

These sample source codes on this page below are demonstrating how to read barcode from live video cam in C#. ByteScout BarCode Reader SDK can read barcode from live video cam. It can be used from C#. ByteScout BarCode Reader SDK is the barcode decoder with support for code 39, code 128, QR Code, Datamatrix, GS1, PDF417 and all other popular barcodes. Can read barcodes from images, pdf, tiff documents and live web camera. Supports noisy and damaged documents, can split and merge pdf and tiff documents based on barcodes. Can export barcode decoder results to XML, JSON, CSV and into custom data structures.

C# code samples for C# developers help to speed up coding of your application when using ByteScout BarCode Reader SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Use of ByteScout BarCode Reader SDK in C# is also explained in the documentation included along with the product.

Free trial version of ByteScout BarCode Reader SDK is available for download from our website. Get it to try other source code samples for C#.

## REQUEST FREE TECH SUPPORT

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20BarCode%20Reader%20SDK%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20BarCode%20Reader%20SDK%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore SDK Docs](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=EARSPJFIJMU](https://www.youtube.com/watch?v=EARSPJFIJMU)

<!-- code block begin -->

##### ****MainForm.Designer.cs:**

```
namespace ReadFromVideoCamera
{
    partial class MainForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
			this.lblFoundBarcodes = new System.Windows.Forms.Label();
			this.pictureBoxPreview = new System.Windows.Forms.PictureBox();
			this.btnStop = new System.Windows.Forms.Button();
			this.btnStart = new System.Windows.Forms.Button();
			this.rtbFoundBarcodes = new System.Windows.Forms.RichTextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.cmbCamera = new System.Windows.Forms.ComboBox();
			this.btnExit = new System.Windows.Forms.Button();
			this.label3 = new System.Windows.Forms.Label();
			this.cmbBarcodeType = new System.Windows.Forms.ComboBox();
			this.lblScanning = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.tbCameraWidth = new System.Windows.Forms.TextBox();
			this.tbCameraHeight = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.cbStopOnFirstBarcode = new System.Windows.Forms.CheckBox();
			this.btnUpdateCameraImageDimensions = new System.Windows.Forms.Button();
			this.btnCameraProperties = new System.Windows.Forms.Button();
			((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).BeginInit();
			this.SuspendLayout();
			//
			// lblFoundBarcodes
			//
			this.lblFoundBarcodes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.lblFoundBarcodes.AutoSize = true;
			this.lblFoundBarcodes.Location = new System.Drawing.Point(12, 600);
			this.lblFoundBarcodes.Name = "lblFoundBarcodes";
			this.lblFoundBarcodes.Size = new System.Drawing.Size(93, 13);
			this.lblFoundBarcodes.TabIndex = 5;
			this.lblFoundBarcodes.Text = "Found 0 barcodes";
			//
			// pictureBoxPreview
			//
			this.pictureBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
			this.pictureBoxPreview.BackColor = System.Drawing.Color.White;
			this.pictureBoxPreview.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.pictureBoxPreview.Location = new System.Drawing.Point(12, 117);
			this.pictureBoxPreview.Name = "pictureBoxPreview";
			this.pictureBoxPreview.Size = new System.Drawing.Size(640, 480);
			this.pictureBoxPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
			this.pictureBoxPreview.TabIndex = 8;
			this.pictureBoxPreview.TabStop = false;
			//
			// btnStop
			//
			this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnStop.Enabled = false;
			this.btnStop.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
			this.btnStop.Location = new System.Drawing.Point(98, 690);
			this.btnStop.Name = "btnStop";
			this.btnStop.Size = new System.Drawing.Size(80, 26);
			this.btnStop.TabIndex = 7;
			this.btnStop.Text = "Stop";
			this.btnStop.UseVisualStyleBackColor = true;
			this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
			//
			// btnStart
			//
			this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnStart.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
			this.btnStart.Location = new System.Drawing.Point(12, 690);
			this.btnStart.Name = "btnStart";
			this.btnStart.Size = new System.Drawing.Size(80, 26);
			this.btnStart.TabIndex = 6;
			this.btnStart.Text = "Start";
			this.btnStart.UseVisualStyleBackColor = true;
			this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
			//
			// rtbFoundBarcodes
			//
			this.rtbFoundBarcodes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
			this.rtbFoundBarcodes.Location = new System.Drawing.Point(12, 616);
			this.rtbFoundBarcodes.Name = "rtbFoundBarcodes";
			this.rtbFoundBarcodes.Size = new System.Drawing.Size(640, 68);
			this.rtbFoundBarcodes.TabIndex = 5;
			this.rtbFoundBarcodes.Text = "";
			//
			// label1
			//
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(9, 42);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(80, 13);
			this.label1.TabIndex = 20;
			this.label1.Text = "Camera Device";
			//
			// cmbCamera
			//
			this.cmbCamera.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cmbCamera.FormattingEnabled = true;
			this.cmbCamera.Location = new System.Drawing.Point(163, 39);
			this.cmbCamera.Name = "cmbCamera";
			this.cmbCamera.Size = new System.Drawing.Size(245, 21);
			this.cmbCamera.TabIndex = 1;
			this.cmbCamera.SelectedIndexChanged += new System.EventHandler(this.cmbCamera_SelectedIndexChanged);
			//
			// btnExit
			//
			this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnExit.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
			this.btnExit.Location = new System.Drawing.Point(562, 690);
			this.btnExit.Name = "btnExit";
			this.btnExit.Size = new System.Drawing.Size(90, 26);
			this.btnExit.TabIndex = 8;
			this.btnExit.Text = "Exit";
			this.btnExit.UseVisualStyleBackColor = true;
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			//
			// label3
			//
			this.label3.AutoSize = true;
			this.label3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
			this.label3.Location = new System.Drawing.Point(9, 15);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(131, 13);
			this.label3.TabIndex = 23;
			this.label3.Text = "Barcode Type To Scan";
			//
			// cmbBarcodeType
			//
			this.cmbBarcodeType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cmbBarcodeType.FormattingEnabled = true;
			this.cmbBarcodeType.Location = new System.Drawing.Point(163, 12);
			this.cmbBarcodeType.Name = "cmbBarcodeType";
			this.cmbBarcodeType.Size = new System.Drawing.Size(245, 21);
			this.cmbBarcodeType.Sorted = true;
			this.cmbBarcodeType.TabIndex = 0;
			//
			// lblScanning
			//
			this.lblScanning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this.lblScanning.AutoSize = true;
			this.lblScanning.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
			this.lblScanning.Location = new System.Drawing.Point(580, 600);
			this.lblScanning.Name = "lblScanning";
			this.lblScanning.Size = new System.Drawing.Size(67, 13);
			this.lblScanning.TabIndex = 24;
			this.lblScanning.Text = "Scanning...";
			this.lblScanning.Visible = false;
			//
			// label2
			//
			this.label2.AutoSize = true;
			this.label2.Location = new System.Drawing.Point(9, 69);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(132, 13);
			this.label2.TabIndex = 26;
			this.label2.Text = "Camera Image Dimensions";
			//
			// tbCameraWidth
			//
			this.tbCameraWidth.Location = new System.Drawing.Point(163, 66);
			this.tbCameraWidth.Name = "tbCameraWidth";
			this.tbCameraWidth.Size = new System.Drawing.Size(35, 20);
			this.tbCameraWidth.TabIndex = 2;
			this.tbCameraWidth.Text = "640";
			//
			// tbCameraHeight
			//
			this.tbCameraHeight.Location = new System.Drawing.Point(222, 66);
			this.tbCameraHeight.Name = "tbCameraHeight";
			this.tbCameraHeight.Size = new System.Drawing.Size(35, 20);
			this.tbCameraHeight.TabIndex = 3;
			this.tbCameraHeight.Text = "480";
			//
			// label4
			//
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(204, 69);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(12, 13);
			this.label4.TabIndex = 29;
			this.label4.Text = "x";
			//
			// cbStopOnFirstBarcode
			//
			this.cbStopOnFirstBarcode.AutoSize = true;
			this.cbStopOnFirstBarcode.Location = new System.Drawing.Point(12, 94);
			this.cbStopOnFirstBarcode.Name = "cbStopOnFirstBarcode";
			this.cbStopOnFirstBarcode.Size = new System.Drawing.Size(154, 17);
			this.cbStopOnFirstBarcode.TabIndex = 30;
			this.cbStopOnFirstBarcode.Text = "Stop on first barcode found";
			this.cbStopOnFirstBarcode.UseVisualStyleBackColor = true;
			//
			// btnUpdateCameraImageDimensions
			//
			this.btnUpdateCameraImageDimensions.Location = new System.Drawing.Point(263, 64);
			this.btnUpdateCameraImageDimensions.Name = "btnUpdateCameraImageDimensions";
			this.btnUpdateCameraImageDimensions.Size = new System.Drawing.Size(71, 24);
			this.btnUpdateCameraImageDimensions.TabIndex = 4;
			this.btnUpdateCameraImageDimensions.Text = "Update";
			this.btnUpdateCameraImageDimensions.UseVisualStyleBackColor = true;
			this.btnUpdateCameraImageDimensions.Click += new System.EventHandler(this.btnUpdateCameraImageDimensions_Click);
			//
			// btnCameraProperties
			//
			this.btnCameraProperties.Location = new System.Drawing.Point(414, 38);
			this.btnCameraProperties.Name = "btnCameraProperties";
			this.btnCameraProperties.Size = new System.Drawing.Size(131, 23);
			this.btnCameraProperties.TabIndex = 31;
			this.btnCameraProperties.Text = "Camera Properties";
			this.btnCameraProperties.UseVisualStyleBackColor = true;
			this.btnCameraProperties.Click += new System.EventHandler(this.btnCameraProperties_Click);
			//
			// MainForm
			//
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.CancelButton = this.btnExit;
			this.ClientSize = new System.Drawing.Size(664, 728);
			this.Controls.Add(this.btnCameraProperties);
			this.Controls.Add(this.btnUpdateCameraImageDimensions);
			this.Controls.Add(this.cbStopOnFirstBarcode);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.tbCameraHeight);
			this.Controls.Add(this.tbCameraWidth);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.lblScanning);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.cmbBarcodeType);
			this.Controls.Add(this.btnExit);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.cmbCamera);
			this.Controls.Add(this.rtbFoundBarcodes);
			this.Controls.Add(this.btnStop);
			this.Controls.Add(this.btnStart);
			this.Controls.Add(this.pictureBoxPreview);
			this.Controls.Add(this.lblFoundBarcodes);
			this.Name = "MainForm";
			this.ShowIcon = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Barcode Scanner";
			this.Load += new System.EventHandler(this.Form_Load);
			((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).EndInit();
			this.ResumeLayout(false);
			this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label lblFoundBarcodes;
        private System.Windows.Forms.PictureBox pictureBoxPreview;
        private System.Windows.Forms.Button btnStop;
        private System.Windows.Forms.Button btnStart;
        private System.Windows.Forms.RichTextBox rtbFoundBarcodes;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ComboBox cmbCamera;
        private System.Windows.Forms.Button btnExit;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.ComboBox cmbBarcodeType;
        private System.Windows.Forms.Label lblScanning;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox tbCameraWidth;
        private System.Windows.Forms.TextBox tbCameraHeight;
        private System.Windows.Forms.Label label4;
		private System.Windows.Forms.CheckBox cbStopOnFirstBarcode;
        private System.Windows.Forms.Button btnUpdateCameraImageDimensions;
		private System.Windows.Forms.Button btnCameraProperties;
	}
}

```

<!-- code block end -->

<!-- code block begin -->

##### ****MainForm.cs:**

```
using System;
using System.ComponentModel;
using System.Drawing;
using System.Media;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using Bytescout.BarCodeReader;
using TouchlessLib;

namespace ReadFromVideoCamera
{
    public partial class MainForm: Form
    {
		// Scan delay, ms.
		const int SCAN_DELAY = 1500; // scan barcodes every 1.5 sec

		// Touchless SDK library manager (to use it you should have TouchlessLib.dll referenced and WebCamLib.dll in the build output directory)
	    readonly TouchlessMgr _touchlessLibManager;

        // Background thread for barcode scanning
        readonly BackgroundWorker _backgroundWorker = new BackgroundWorker();
		// Synchronization event
	    readonly AutoResetEvent _synchronizationEvent = new AutoResetEvent(false);

		// Form constructor
		public MainForm()
        {
            InitializeComponent();

            // Create Touchless library manager
            _touchlessLibManager = new TouchlessMgr();

			// Setup background worker
            _backgroundWorker.WorkerSupportsCancellation = true;
			_backgroundWorker.DoWork += BackgroundWorker_DoWork;
			_backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
		}

	    // On form loading
        private void Form_Load(object sender, EventArgs e)
        {
            // Fill devices combobox with available video cameras
            foreach (Camera camera in _touchlessLibManager.Cameras)
                cmbCamera.Items.Add(camera);

            // Select the first available camera. See also cmbCamera_SelectedIndexChanged event handler.
	        if (_touchlessLibManager.Cameras.Count > 0)
		        cmbCamera.SelectedItem = _touchlessLibManager.Cameras[0];
	        else
		        MessageBox.Show("No video camera available. Please connect the camera.");

	        // Populate barcode types combobox
            PopulateBarcodeTypesCombobox();
			// Select some default barcode type
			cmbBarcodeType.SelectedItem = "QRCode";
        }

	    protected void PopulateBarcodeTypesCombobox()
	    {
		    cmbBarcodeType.Items.Clear();

		    foreach (PropertyInfo propertyInfo in typeof(BarcodeTypeSelector).GetProperties())
			    cmbBarcodeType.Items.Add(propertyInfo.Name);
	    }

		// On camera selected
        private void cmbCamera_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_touchlessLibManager.CurrentCamera != null)
                _touchlessLibManager.CurrentCamera.OnImageCaptured -= CurrentCamera_OnImageCaptured;

			if (cmbCamera.SelectedIndex != -1)
			{
				Camera camera = _touchlessLibManager.Cameras[cmbCamera.SelectedIndex];

				if (camera != null)
				{
					// Set camera output image dimensions
					camera.CaptureWidth = int.Parse(tbCameraWidth.Text);
					camera.CaptureHeight = int.Parse(tbCameraHeight.Text);

					camera.OnImageCaptured += CurrentCamera_OnImageCaptured;

					// Select the camera
					_touchlessLibManager.CurrentCamera = camera;
				}
			}
        }

		private void btnUpdateCameraImageDimensions_Click(object sender, EventArgs e)
        {
            if (_touchlessLibManager.CurrentCamera != null)
            {
                // Update camera's output image dimensions
                _touchlessLibManager.CurrentCamera.CaptureWidth = int.Parse(tbCameraWidth.Text);
                _touchlessLibManager.CurrentCamera.CaptureHeight = int.Parse(tbCameraHeight.Text);
            }
        }

        public void StartDecoding()
        {
            if (cmbCamera.SelectedIndex == -1)
                return;

            // Clear the output text box
            rtbFoundBarcodes.Clear();

            // Check if we have camera selected
            if (cmbCamera.SelectedIndex != -1)
            {
				// Start the decoding in the background thread
	            BarcodeTypeSelector barcodeTypesToFind = GetBarcodeTypeFromCombobox();
	            _backgroundWorker.RunWorkerAsync(barcodeTypesToFind);

				UpdateControls(true);
			}
			else
            {
                MessageBox.Show("Please select the camera first!");
            }
        }

        private void StopDecoding()
        {
	        _backgroundWorker.CancelAsync();

			// Wait until BackgroundWorker finished
	        if (_backgroundWorker.IsBusy)
		        _synchronizationEvent.WaitOne();

	        UpdateControls(false);
        }

	    void UpdateControls(bool started)
	    {
		    if (started)
		    {
				btnStart.Enabled = false;
				btnStop.Enabled = true;
				cmbBarcodeType.Enabled = false;
				cmbCamera.Enabled = false;
			    tbCameraHeight.Enabled = false;
			    tbCameraWidth.Enabled = false;
			    btnUpdateCameraImageDimensions.Enabled = false;
			    cbStopOnFirstBarcode.Enabled = false;
			    lblScanning.Visible = true;
			    lblScanning.Text = "Scanning...";
		    }
		    else
		    {
				btnStart.Enabled = true;
				btnStop.Enabled = false;
				cmbBarcodeType.Enabled = true;
				cmbCamera.Enabled = true;
				cbStopOnFirstBarcode.Enabled = true;
				tbCameraHeight.Enabled = true;
				tbCameraWidth.Enabled = true;
				btnUpdateCameraImageDimensions.Enabled = true;
				lblScanning.Visible = true;
			}
	    }

        void CurrentCamera_OnImageCaptured(object sender, CameraEventArgs e)
        {
			pictureBoxPreview.Image = e.Image;
        }

	    private void btnStart_Click(object sender, EventArgs e)
        {
            StartDecoding();
        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            StopDecoding();
        }

        // Background thread procedure used by BackgroundWorker
		public void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
		{
			BackgroundWorker worker = (BackgroundWorker) sender;
			BarcodeTypeSelector barcodeTypesToFind = (BarcodeTypeSelector) e.Argument;

            // Create and setup barcode reader instance
			using (Reader reader = new Reader())
			{
				reader.RegistrationName = "demo";
				reader.RegistrationKey = "demo";

				reader.BarcodeTypesToFind = barcodeTypesToFind;

				// Work while not canceled
				while (true)
				{
					// Check cancellation
					if (worker.CancellationPending)
					{
						e.Cancel = true;
						_synchronizationEvent.Set();
						return;
					}

					// Get image from camera by invoking method from UI thread
					Bitmap bitmap = (Bitmap) Invoke(new GetCameraImageDelegate(GetCameraImage));
					if (bitmap == null)
					{
						e.Result = null;
						return;
					}

					/* -----------------------------------------------------------------------
					NOTE: We can read barcodes from specific page to increase performance.
					For sample please refer to "Decoding barcodes from PDF by pages" program.
					----------------------------------------------------------------------- */

					// Search the image for barcodes
					FoundBarcode[] result = reader.ReadFrom(bitmap);

					// Update UI asynchronously
					BeginInvoke(new Action<FoundBarcode[]>(UpdateStatus), new object[] { result });

					// Pause
					Thread.Sleep(SCAN_DELAY);
				}
			}
		}

		delegate Bitmap GetCameraImageDelegate();

	    Bitmap GetCameraImage()
	    {
			if (!IsDisposed && !Disposing && _touchlessLibManager.CurrentCamera != null)
				return _touchlessLibManager.CurrentCamera.GetCurrentImage();

		    return null;
	    }

		// Update UI with found barcodes information
		void UpdateStatus(FoundBarcode[] foundBarcodes)
	    {
			if (foundBarcodes != null && foundBarcodes.Length > 0)
			{
				// Play sound if we found any barcode
				SystemSounds.Beep.Play();

				StringBuilder stringBuilder = new StringBuilder();

				stringBuilder.AppendFormat("Time: {0:HH:mm:ss:tt}", DateTime.Now);
				stringBuilder.AppendLine();

				// Display found barcodes in the output text box
				foreach (FoundBarcode barcode in foundBarcodes)
				{
					stringBuilder.AppendFormat("Found barcode: {0} {1}", barcode.Type, barcode.Value);
					stringBuilder.AppendLine();
				}

				rtbFoundBarcodes.Text = stringBuilder.ToString();

				// Update status text with number of found barcodes
				lblFoundBarcodes.Text = string.Format("Found {0} barcodes:", foundBarcodes.Length);
			}

			// Make "Scanning..." label flicker.
			lblScanning.Visible = !lblScanning.Visible;
			lblScanning.Refresh();

			// Check if we need to stop on first barcode found
			if (cbStopOnFirstBarcode.Checked && foundBarcodes != null && foundBarcodes.Length > 0)
			{
				StopDecoding();
			}
		}

		// Background thread is finished
	    private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	    {
			// Update UI asynchronously
			BeginInvoke(new Action<RunWorkerCompletedEventArgs>(OnBackgroundWorkerFinished), new object[] { e });
	    }

	    void OnBackgroundWorkerFinished(RunWorkerCompletedEventArgs completedEventArgs)
	    {
			if (completedEventArgs.Cancelled)
			{
				lblScanning.Text = "Stopped";
			}
			else if (completedEventArgs.Error != null)
			{
				lblScanning.Text = "Error: " + completedEventArgs.Error.Message;
			}
			else
			{
				lblScanning.Text = "Done!";
			}

			UpdateControls(false);
		}

		// Gets selected barcode type
		private BarcodeTypeSelector GetBarcodeTypeFromCombobox()
		{
			BarcodeTypeSelector result = new BarcodeTypeSelector();

			string selectedBarcodeTypeName = (string) cmbBarcodeType.SelectedItem;

	        PropertyInfo propertyInfo = typeof(BarcodeTypeSelector).GetProperty(selectedBarcodeTypeName);
			propertyInfo.SetValue(result, true, null);

			return result;
        }

	    protected override void OnClosing(CancelEventArgs e)
        {
			StopDecoding();

			_touchlessLibManager.Dispose();

			base.OnClosing(e);
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
			DialogResult = DialogResult.OK;
            Close();
        }

		private void btnCameraProperties_Click(object sender, EventArgs e)
		{
			try
			{
				if (_touchlessLibManager.CurrentCamera != null)
					_touchlessLibManager.CurrentCamera.ShowPropertiesDialog(Handle);
			}
			catch (Exception exception)
			{
				MessageBox.Show(exception.Message);
			}
		}
    }
}

```

<!-- code block end -->

<!-- code block begin -->

##### ****Program.cs:**

```
using System;
using System.Windows.Forms;

namespace ReadFromVideoCamera
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MainForm dlg = new MainForm();
            dlg.ShowDialog();
        }
    }
}

```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2005.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net2.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2008.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net2.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2010.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net4.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2012.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net4.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2013.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net4.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****ReadFromVideoCamera.VS2015.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9EACD999-022B-495A-BCDF-BB82C2534522}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>ReadFromVideoCamera</RootNamespace>
    <AssemblyName>ReadFromVideoCamera</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject>ReadFromVideoCamera.Program</StartupObject>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.BarCodeReader, Version=8.20.0.1340, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files\Bytescout BarCode Reader SDK\net4.00\Bytescout.BarCodeReader.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="TouchlessLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MainForm.Designer.cs">
      <DependentUpon>MainForm.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Content Include="TouchlessLib.dll">
    </Content>
    <Content Include="WebCamLib.dll">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->


text:
package browsing

import (
	"github.com/kubernetes-incubator/service-catalog/cmd/svcat/command"
	"github.com/kubernetes-incubator/service-catalog/cmd/svcat/output"
	"github.com/kubernetes-incubator/service-catalog/pkg/svcat/service-catalog"
	"github.com/spf13/cobra"
)

// MarketplaceCmd contains the information needed to query the marketplace of
// services available to the user
type MarketplaceCmd struct {
	*command.Namespaced
	*command.Formatted
}

// NewMarketplaceCmd builds a "svcat marketplace" command
func NewMarketplaceCmd(cxt *command.Context) *cobra.Command {
	mpCmd := &MarketplaceCmd{
		Namespaced: command.NewNamespaced(cxt),
		Formatted:  command.NewFormatted(),
	}
	cmd := &cobra.Command{
		Use:     "marketplace",
		Aliases: []string{"marketplace", "mp"},
		Short:   "List available service offerings",
		Example: command.NormalizeExamples(`
  svcat marketplace
	svcat marketplace --namespace dev
`),
		PreRunE: command.PreRunE(mpCmd),
		RunE:    command.RunE(mpCmd),
	}

	mpCmd.AddOutputFlags(cmd.Flags())
	mpCmd.AddNamespaceFlags(cmd.Flags(), true)
	return cmd
}

// Validate always returns true, there are no args to validate
func (c *MarketplaceCmd) Validate(args []string) error {
	return nil
}

// Run retrieves all service classes visible in the current namespace,
// retrieves the plans belonging to those classes, and then displays
// that to the user
func (c *MarketplaceCmd) Run() error {
	opts := servicecatalog.ScopeOptions{
		Namespace: c.Namespace,
		Scope:     servicecatalog.AllScope,
	}
	classes, err := c.App.RetrieveClasses(opts)
	if err != nil {
		return err
	}
	plans := make([][]servicecatalog.Plan, len(classes))
	classPlans, err := c.App.RetrievePlans("", opts)
	if err != nil {
		return err
	}
	for i, class := range classes {
		for _, plan := range classPlans {
			if plan.GetClassID() == class.GetName() {
				plans[i] = append(plans[i], plan)
			}
		}
	}
	output.WriteClassAndPlanDetails(c.Output, classes, plans)
	return nil
}


text:
/**
 * Preloader
 *
 * @constructor
 */
function Preloader() {
    this.paths = [];
    this.assets = {};
}

Preloader.prototype.add = function(path) {
    this.paths.push(path);
    console.log("Queued " + path);
};

Preloader.prototype.load = function(callback) {
    this.todo = this.paths.length;
    var loader = this;

    function loaded() {
        console.log("Loaded " + this.src);
        loader.todo--;
        if (loader.todo === 0) {
            callback();
        }
    }

    for (var i = 0; i < this.paths.length; i++) {
        var path = this.paths[i];
        var img = document.createElement("img");

        img.onload = loaded;
        loader.assets[path] = img;

        img.src = path;
    }

};

Preloader.prototype.get = function(path) {
    return this.assets[path];
};


text:
import './utils/console-wrapper.js';
import './utils/qunit-utils.js';

//src
import './src/constants.tests';
import './src/utils.tests';

//src/animation
import './src/animation/AnimationAction.tests';
import './src/animation/AnimationClip.tests';
import './src/animation/AnimationMixer.tests';
import './src/animation/AnimationObjectGroup.tests';
import './src/animation/AnimationUtils.tests';
import './src/animation/KeyframeTrack.tests';
import './src/animation/PropertyBinding.tests';
import './src/animation/PropertyMixer.tests';

//src/animation/tracks
import './src/animation/tracks/BooleanKeyframeTrack.tests';
import './src/animation/tracks/ColorKeyframeTrack.tests';
import './src/animation/tracks/NumberKeyframeTrack.tests';
import './src/animation/tracks/QuaternionKeyframeTrack.tests';
import './src/animation/tracks/StringKeyframeTrack.tests';
import './src/animation/tracks/VectorKeyframeTrack.tests';

//src/audio
import './src/audio/Audio.tests';
import './src/audio/AudioAnalyser.tests';
import './src/audio/AudioContext.tests';
import './src/audio/AudioListener.tests';
import './src/audio/PositionalAudio.tests';

//src/cameras
import './src/cameras/ArrayCamera.tests';
import './src/cameras/Camera.tests';
import './src/cameras/CubeCamera.tests';
import './src/cameras/OrthographicCamera.tests';
import './src/cameras/PerspectiveCamera.tests';
import './src/cameras/StereoCamera.tests';

//src/core
import './src/core/BufferAttribute.tests';
import './src/core/BufferGeometry.tests';
import './src/core/Clock.tests';
import './src/core/EventDispatcher.tests';
import './src/core/InstancedBufferAttribute.tests';
import './src/core/InstancedBufferGeometry.tests';
import './src/core/InstancedInterleavedBuffer.tests';
import './src/core/InterleavedBuffer.tests';
import './src/core/InterleavedBufferAttribute.tests';
import './src/core/Layers.tests';
import './src/core/Object3D.tests';
import './src/core/Raycaster.tests';
import './src/core/Uniform.tests';

//src/extras
import './src/extras/ShapeUtils.tests';

//src/extras/core
import './src/extras/core/Curve.tests';
import './src/extras/core/CurvePath.tests';
import './src/extras/core/Font.tests';
import './src/extras/core/Interpolations.tests';
import './src/extras/core/Path.tests';
import './src/extras/core/Shape.tests';
import './src/extras/core/ShapePath.tests';

//src/extras/curves
import './src/extras/curves/ArcCurve.tests';
import './src/extras/curves/CatmullRomCurve3.tests';
import './src/extras/curves/CubicBezierCurve.tests';
import './src/extras/curves/CubicBezierCurve3.tests';
import './src/extras/curves/EllipseCurve.tests';
import './src/extras/curves/LineCurve.tests';
import './src/extras/curves/LineCurve3.tests';
import './src/extras/curves/QuadraticBezierCurve.tests';
import './src/extras/curves/QuadraticBezierCurve3.tests';
import './src/extras/curves/SplineCurve.tests';

//src/extras/objects
import './src/extras/objects/ImmediateRenderObject.tests';

//src/geometries
import './src/geometries/BoxGeometry.tests';
import './src/geometries/CircleGeometry.tests';
import './src/geometries/ConeGeometry.tests';
import './src/geometries/CylinderGeometry.tests';
import './src/geometries/DodecahedronGeometry.tests';
import './src/geometries/EdgesGeometry.tests';
import './src/geometries/ExtrudeGeometry.tests';
import './src/geometries/IcosahedronGeometry.tests';
import './src/geometries/LatheGeometry.tests';
import './src/geometries/OctahedronGeometry.tests';
import './src/geometries/ParametricGeometry.tests';
import './src/geometries/PlaneGeometry.tests';
import './src/geometries/PolyhedronGeometry.tests';
import './src/geometries/RingGeometry.tests';
import './src/geometries/ShapeGeometry.tests';
import './src/geometries/SphereGeometry.tests';
import './src/geometries/TetrahedronGeometry.tests';
import './src/geometries/TextGeometry.tests';
import './src/geometries/TorusGeometry.tests';
import './src/geometries/TorusKnotGeometry.tests';
import './src/geometries/TubeGeometry.tests';
import './src/geometries/WireframeGeometry.tests';

//src/helpers
import './src/helpers/ArrowHelper.tests';
import './src/helpers/AxesHelper.tests';
import './src/helpers/Box3Helper.tests';
import './src/helpers/BoxHelper.tests';
import './src/helpers/CameraHelper.tests';
import './src/helpers/DirectionalLightHelper.tests';
import './src/helpers/GridHelper.tests';
import './src/helpers/HemisphereLightHelper.tests';
import './src/helpers/PlaneHelper.tests';
import './src/helpers/PointLightHelper.tests';
import './src/helpers/PolarGridHelper.tests';
import './src/helpers/SkeletonHelper.tests';
import './src/helpers/SpotLightHelper.tests';

//src/lights
import './src/lights/AmbientLight.tests';
import './src/lights/DirectionalLight.tests';
import './src/lights/DirectionalLightShadow.tests';
import './src/lights/HemisphereLight.tests';
import './src/lights/Light.tests';
import './src/lights/LightShadow.tests';
import './src/lights/PointLight.tests';
import './src/lights/RectAreaLight.tests';
import './src/lights/SpotLight.tests';
import './src/lights/SpotLightShadow.tests';

//src/loaders
import './src/loaders/AnimationLoader.tests';
import './src/loaders/AudioLoader.tests';
import './src/loaders/BufferGeometryLoader.tests';
import './src/loaders/Cache.tests';
import './src/loaders/CompressedTextureLoader.tests';
import './src/loaders/CubeTextureLoader.tests';
import './src/loaders/DataTextureLoader.tests';
import './src/loaders/FileLoader.tests';
import './src/loaders/FontLoader.tests';
import './src/loaders/ImageLoader.tests';
import './src/loaders/Loader.tests';
import './src/loaders/LoaderUtils.tests';
import './src/loaders/LoadingManager.tests';
import './src/loaders/MaterialLoader.tests';
import './src/loaders/ObjectLoader.tests';
import './src/loaders/TextureLoader.tests';

//src/materials
import './src/materials/LineBasicMaterial.tests';
import './src/materials/LineDashedMaterial.tests';
import './src/materials/Material.tests';
import './src/materials/MeshBasicMaterial.tests';
import './src/materials/MeshDepthMaterial.tests';
import './src/materials/MeshDistanceMaterial.tests';
import './src/materials/MeshLambertMaterial.tests';
import './src/materials/MeshNormalMaterial.tests';
import './src/materials/MeshPhongMaterial.tests';
import './src/materials/MeshPhysicalMaterial.tests';
import './src/materials/MeshStandardMaterial.tests';
import './src/materials/MeshToonMaterial.tests';
import './src/materials/PointsMaterial.tests';
import './src/materials/RawShaderMaterial.tests';
import './src/materials/ShaderMaterial.tests';
import './src/materials/ShadowMaterial.tests';
import './src/materials/SpriteMaterial.tests';

//src/math
import './src/math/Box2.tests';
import './src/math/Box3.tests';
import './src/math/Color.tests';
import './src/math/Cylindrical.tests';
import './src/math/Euler.tests';
import './src/math/Frustum.tests';
import './src/math/Interpolant.tests';
import './src/math/Line3.tests';
import './src/math/MathUtils.tests';
import './src/math/Matrix3.tests';
import './src/math/Matrix4.tests';
import './src/math/Plane.tests';
import './src/math/Quaternion.tests';
import './src/math/Ray.tests';
import './src/math/Sphere.tests';
import './src/math/Spherical.tests';
import './src/math/Triangle.tests';
import './src/math/Vector2.tests';
import './src/math/Vector3.tests';
import './src/math/Vector4.tests';

//src/math/interpolants
import './src/math/interpolants/CubicInterpolant.tests';
import './src/math/interpolants/DiscreteInterpolant.tests';
import './src/math/interpolants/LinearInterpolant.tests';
import './src/math/interpolants/QuaternionLinearInterpolant.tests';

//src/objects
import './src/objects/Bone.tests';
import './src/objects/Group.tests';
import './src/objects/Line.tests';
import './src/objects/LineLoop.tests';
import './src/objects/LineSegments.tests';
import './src/objects/LOD.tests';
import './src/objects/Mesh.tests';
import './src/objects/Points.tests';
import './src/objects/Skeleton.tests';
import './src/objects/SkinnedMesh.tests';
import './src/objects/Sprite.tests';

//src/renderers
import './src/renderers/WebGLRenderer.tests';
import './src/renderers/WebGLRenderTarget.tests';
import './src/renderers/WebGLCubeRenderTarget.tests';

//src/renderers/shaders
import './src/renderers/shaders/ShaderChunk.tests';
import './src/renderers/shaders/ShaderLib.tests';
import './src/renderers/shaders/UniformsLib.tests';
import './src/renderers/shaders/UniformsUtils.tests';

//src/renderers/webgl
import './src/renderers/webgl/WebGLAttributes.tests';
import './src/renderers/webgl/WebGLBackground.tests';
import './src/renderers/webgl/WebGLBufferRenderer.tests';
import './src/renderers/webgl/WebGLCapabilities.tests';
import './src/renderers/webgl/WebGLClipping.tests';
import './src/renderers/webgl/WebGLExtensions.tests';
import './src/renderers/webgl/WebGLGeometries.tests';
import './src/renderers/webgl/WebGLIndexedBufferRenderer.tests';
import './src/renderers/webgl/WebGLLights.tests';
import './src/renderers/webgl/WebGLMorphtargets.tests';
import './src/renderers/webgl/WebGLObjects.tests';
import './src/renderers/webgl/WebGLProgram.tests';
import './src/renderers/webgl/WebGLPrograms.tests';
import './src/renderers/webgl/WebGLProperties.tests';
import './src/renderers/webgl/WebGLRenderLists.tests';
import './src/renderers/webgl/WebGLShader.tests';
import './src/renderers/webgl/WebGLShadowMap.tests';
import './src/renderers/webgl/WebGLState.tests';
import './src/renderers/webgl/WebGLTextures.tests';
import './src/renderers/webgl/WebGLUniforms.tests';
import './src/renderers/webgl/WebGLUtils.tests';

//src/scenes
import './src/scenes/Fog.tests';
import './src/scenes/FogExp2.tests';
import './src/scenes/Scene.tests';

//src/textures
import './src/textures/CanvasTexture.tests';
import './src/textures/CompressedTexture.tests';
import './src/textures/CubeTexture.tests';
import './src/textures/DataTexture.tests';
import './src/textures/DepthTexture.tests';
import './src/textures/Texture.tests';
import './src/textures/VideoTexture.tests';


text:
namespace ph
{

const LogSender& LogSender::DEFAULT()
{
	static const LogSender defaultSender("PR");
	return defaultSender;
}

LogSender::LogSender(const std::string& senderName) :
	m_senderName(senderName)
{

}

const std::string& LogSender::getSenderName() const
{
	return m_senderName;
}

}// end namespace ph


text:
export { default } from "./toolbar-button";
export * from "./toolbar-button";


text:
title: "2017-08-08 Add new script to NSClient++ for Nagios"
date: 2017-08-08
tags: [PowerShell,Nagios,NSClient++]
---

# Add-NscWrappedScript
Here is a function to add a new script to NSClient++ for Nagios on a local or remote computer.

It copies your script to Script directory and creates a new entry in nsc.ini or nsclient.ini under [Wrapped Scripts].

```powershell
Function Add-NscWrappedScript {
    param(
        [parameter(Mandatory = $true)]
        [ValidateNotNullorEmpty()]
        $CommandLine,
        [ValidateScript( {Test-Path $_ })]
        $PathToScript,
        [parameter()]
        [ValidateNotNullorEmpty()]
        $ScriptName,
        [switch]$BackupIniFile,
        [parameter(ValueFromPipeline)]
        [ValidateNotNullorEmpty()]
        [String[]]$ComputerName,
        $NscFolder = "$env:ProgramFiles\NSClient*",
        [switch]$Force
    )
    BEGIN {
        if ($PathToScript) {
            $ScriptContent = Get-Content $PathToScript
            Write-Debug "Script content: `n$($ScriptContent | out-string)"
            if (!$ScriptName) {
                $ScriptName = Split-Path $PathToScript -Leaf
            }
            Write-Debug "Script name $ScriptName"
        }
        $patternWS = "[\[|[\/settings\/external scripts\/][w|W]rapped [s|S]cripts\]"
        $NSCini = "nsc.ini", "nsclient.ini"
        $NSCiniBackup = "nsc_$(get-date -Format "yyyyMMdd_HHmm")`.ini"
		$VerboseSwitch = $PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent
        $ScriptBlock = {
            try {
                if ($using:NscFolder) {
                    if ($using:VerboseSwitch){
                      $VerbosePreference = "continue"
                    }
                    Write-Verbose "Running remote on $env:computername"
                    $NscFolder = $using:NscFolder
                    $BackupIniFile = $using:BackupIniFile
                    $ScriptContent = $using:ScriptContent
                    $ScriptName = $using:ScriptName
                    $NSCini = $using:NSCini
                    $NSCiniBackup = $using:NSCiniBackup
                    $patternWS = $using:patternWS
                    $CommandLine = $using:CommandLine
                }
            }
            catch {
                Write-Verbose "Running local"
            }
            #find NSC folder
            $Folders = Get-ChildItem "$NSCFolder"
            Write-Verbose "Folders found $($folders.count)"
            Write-Debug "$($folders | out-string)"
            foreach ($folder in $Folders) {
                try {
                    $NscIniPath = "$($folder.FullName)\$($NSCini[0])"
                    if (!(Test-Path $NscIniPath)) {
                        $NscIniPath = "$($folder.FullName)\$($NSCini[1])"
                        if (!(Test-Path $NscIniPath)) {
                            Write-Error "$NscIniPath missing"
                        }
                    }
                    #if command is missing add it
                    $CommandLineRegexEscaped = [regex]::Escape($($CommandLine -replace "^;"))
                    $testCommand = Select-String -Path $NscIniPath -pattern ($CommandLineRegexEscaped)
                    if (!($testCommand) -or $force) {
                        if ($PathToScript) {
                            $ScriptContent | out-file  "$($folder.FullName)\scripts\$ScriptName" -Force
                            Write-Verbose "    Script $ScriptName saved in $($folder.FullName)\scripts\"
                        }
                        #backup switch present then backup file as NSC_yyyyMMdd_HHmm.ini
                        if ($BackupIniFile) {
                            Copy-Item $NscIniPath $($nscinipath.Replace($(Split-Path $NscIniPath -Leaf), $NSCiniBackup)) -Force
                            Write-Verbose "    NSC ini file backed up as $($nscinipath.Replace($NSCini,$NSCiniBackup))"
                        }
                        if ((Select-String -Path $NscIniPath -pattern ($CommandLineRegexEscaped))) {
                            Write-Verbose "    Replace command in ini file"
                            (Get-Content $NscIniPath) | Foreach-Object {
                                if ($_ -match $CommandLineRegexEscaped) {
                                    Write-Verbose "    Replace `"$_`" with `"$CommandLine`""
                                    $CommandLine
                                }
                                else {
                                    $_
                                }
                            } | Set-Content $NscIniPath
                        }
                        else {
                            #get content of ini file
                            (Get-Content $NscIniPath) | Foreach-Object {
                                $_ # send the current line to output
                                if ($_ -match $patternWS) {
                                    #Add Lines after the selected pattern
                                    $CommandLine
                                    Write-Verbose "    New command inserted $CommandLine"
                                }
                            } | Set-Content $NscIniPath
                        }
                    }
                    else {
                        Write-warning "    Command already present in $NscIniPath.`n$($testCommand.Line | out-string)`nUse -Force switch to overwrite."
                    }
                }
                catch {
                    $error[0]
                    return $false
                }
            }
            return $true
        }
    }
    PROCESS {
        if ($ComputerName) {
            Invoke-Command -ScriptBlock $scriptblock -ComputerName $ComputerName
        }
        else {
            & $ScriptBlock
        }
    }
}
```

## EXAMPLE 1
Copy new script from C:\temp\test.ps1 to "PC1" and "PC2" and add new command "check_test=test.ps1" under Wrapped Scripts in ini file.

Backup ini file before changes.

Show verbose output.
```powershell
    PS > $params = @{
	        ComputerName = "PC1", "PC2"
	        PathToScript = "C:\temp\test.ps1"
	        CommandLine = "check_test=test.ps1"
	        BackupIniFile = $true
	        Verbose = $true
        }
    PS > Add-NscWrappedScript @params
    VERBOSE: Running remote on PC1
    VERBOSE: Folders found 1
    VERBOSE:     Script test.ps1 saved in C:\Program Files\NSClient++\scripts\
    VERBOSE:     NSC ini file backed up as C:\Program Files\NSClient++\nsc_20170519_2220.ini
    VERBOSE:     New command inserted check_test=test.ps1
    True
    VERBOSE: Running remote on PC2
    VERBOSE: Folders found 1
    VERBOSE:     Script test.ps1 saved in C:\Program Files\NSClient++\scripts\
    VERBOSE:     NSC ini file backed up as C:\Program Files\NSClient++\nsc_20170519_2220.ini
    VERBOSE:     New command inserted check_test=test.ps1
    True
```
## EXAMPLE 2
Try to add command "check_test_ps1=check_test.ps1 arg1 arg2" and copy file from "C:\temp\test.ps1" and save it in NSClient++ as check_test.ps1.
```powershell
    PS > 	$params = @{
			PathToScript = "C:\temp\test.ps1"
			CommandLine = "check_test_ps1=check_test.ps1 arg1 arg2"
			ScriptName = "check_test.ps1"
			Verbose = $true
		}
    PS > Add-NscWrappedScript @params
    VERBOSE: Running local
    VERBOSE: Folders found 1
    WARNING:     Command already present.
    ;check_test_ps1=check_test.ps1 arg1 arg2
    Use -Force switch to overwrite.
    False
Command ends with a warning because command is already present in ini file.
```

## EXAMPLE 3
Use of Force switch to overwrite and existing line in ini file.
```powershell
Replacing ";check_test_ps1=check_test.ps1 arg1 arg2" with "check_test_ps1=check_test.ps1 arg1 arg2" - the command will now be enabled.
      PS > $params = @{
        PathToScript = "C:\temp\test.ps1"
        CommandLine = "check_test_ps1=check_test.ps1 arg1 arg2"
        ScriptName = "check_test.ps1"
        Verbose = $true
        Force = $true
      }
      PS > Add-NscWrappedScript
      VERBOSE: Running local
      VERBOSE: Folders found 1
      VERBOSE:     Script check_test.ps1 saved in C:\Program Files\NSClient++-0.3.9-x64-\scripts\
      VERBOSE:     Replace command in ini file
      VERBOSE:     Replace ";check_test_ps1=check_test.ps1 arg1 arg2" with "check_test_ps1=check_test.ps1 arg1 arg2"
      True
```

[GitHub source code](https://github.com/amnich/Add-NscWrappedScript)


text:
This is sort of a living document of the current design philosophies and rules. I am by no means a UI designer, so this is meant to both remind me and explain the choices made so far.

## Data

**Caching**: data should be cached aggressively, with the user expectation that they know they are seeing a cached copy if there was no loading pause. If they know they need the latest data, they can always refresh the view. Metadata is cached longer than issue data.

**Lazy Loading**: data is fetched as late as possible to prevent up front loading of things they will not use. Questions are also asked as late as possible.

## Interactions

**Keyboard Shortcuts**: shortcuts are generally vim-like by default, but configurable. `hjkl` for navigation, `enter` for selection, `/` for inline-searching, `escape` to close modals, etc.

**Paging**: `less`-like. `ctrl+f`/`ctrl+b` for pages. `j`/`k` for lines. `g`/`G` for top/bottom.

**Composable**: again, like vim. leader, verb then noun:

- `,ct` - change title
- `,cs` - change status
- `,fs` - filter by status

`t` is title everywhere whenever a verb is accepted.

**Instant**: Always let the user know they have done something. Show a loading indicator right away, and if possible, prepare the next view and embed the indicator there. Never punish a fast typer.

**Consistency**: Every widget should use the same hotkeys. Every widget should be searchable. Every widget should be have the same way. Don't introduce a change/feature in one place only.

**Editing**: Let the user fill in complex forms or data in their tool of choice.

## Visuals

**Content First**: The UI should get out of the way. Obviousy with text-only this is easier, but no permanent menus should be shown. Color code important things.


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.CodeAnalysis.CSharp.Syntax
{
    public partial class AnonymousFunctionExpressionSyntax
    {
        /// <summary>
        /// Either the <see cref="Block"/> if it is not <c>null</c> or the
        /// <see cref="ExpressionBody"/> otherwise.
        /// </summary>
        public CSharpSyntaxNode Body => Block ?? (CSharpSyntaxNode)ExpressionBody!;

        public AnonymousFunctionExpressionSyntax WithBody(CSharpSyntaxNode body)
            => body is BlockSyntax block
                ? WithBlock(block).WithExpressionBody(null)
                : WithExpressionBody((ExpressionSyntax)body).WithBlock(null);

        public abstract SyntaxToken AsyncKeyword { get; }

        public AnonymousFunctionExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword)
            => WithAsyncKeywordCore(asyncKeyword);

        internal abstract AnonymousFunctionExpressionSyntax WithAsyncKeywordCore(SyntaxToken asyncKeyword);
    }
}


text:
package org.gillius.jfxutils.examples;

import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.XYChart;
import javafx.scene.control.Label;
import javafx.scene.control.Slider;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
import org.gillius.jfxutils.JFXUtil;
import org.gillius.jfxutils.chart.ChartPanManager;
import org.gillius.jfxutils.chart.FixedFormatTickFormatter;
import org.gillius.jfxutils.chart.JFXChartUtil;
import org.gillius.jfxutils.chart.StableTicksAxis;

import java.text.SimpleDateFormat;
import java.util.TimeZone;

public class Charting extends Application {
	public static void main( String[] args ) {
		launch( args );
	}

	@FXML
	private LineChart<Number, Number> chart;

	@FXML
	private Slider valueSlider;

	@FXML
	private Label outputLabel;

	private XYChart.Series<Number, Number> series;

	private long startTime;

	private Timeline addDataTimeline;

	@FXML
	void addSample() {
		series.getData().add( new XYChart.Data<Number, Number>( System.currentTimeMillis() - startTime,
		                                                        valueSlider.getValue() ) );
	}

	@FXML
	void autoZoom() {
		chart.getXAxis().setAutoRanging( true );
		chart.getYAxis().setAutoRanging( true );
	}

	@FXML
	void toggleAdd() {
		switch ( addDataTimeline.getStatus() ) {
			case PAUSED:
			case STOPPED:
				addDataTimeline.play();
				chart.getXAxis().setAutoRanging( true );
				chart.getYAxis().setAutoRanging( true );
				//Animation looks horrible if we're updating a lot
				chart.setAnimated( false );
				chart.getXAxis().setAnimated( false );
				chart.getYAxis().setAnimated( false );
				break;
			case RUNNING:
				addDataTimeline.stop();
				//Return the animation since we're not updating a lot
				chart.setAnimated( true );
				chart.getXAxis().setAnimated( true );
				chart.getYAxis().setAnimated( true );
				break;

			default:
				throw new AssertionError( "Unknown status" );
		}
	}

	@Override
	public void start( Stage stage ) throws Exception {
		FXMLLoader loader = new FXMLLoader( getClass().getResource( "Charting.fxml" ) );
		Region contentRootRegion = (Region) loader.load();

		StackPane root = JFXUtil.createScalePane( contentRootRegion, 960, 540, false );
		Scene scene = new Scene( root, root.getPrefWidth(), root.getPrefHeight() );
		stage.setScene( scene );
		stage.setTitle( "Charting Example" );
		stage.show();
	}

	@FXML
	void initialize() {
		startTime = System.currentTimeMillis();

		//Set chart to format dates on the X axis
		SimpleDateFormat format = new SimpleDateFormat( "HH:mm:ss" );
		format.setTimeZone( TimeZone.getTimeZone( "GMT" ) );
		((StableTicksAxis) chart.getXAxis()).setAxisTickFormatter(
				new FixedFormatTickFormatter( format ) );

		series = new XYChart.Series<Number, Number>();
		series.setName( "Data" );

		chart.getData().add( series );

		addDataTimeline = new Timeline( new KeyFrame(
				Duration.millis( 250 ),
				new EventHandler<ActionEvent>() {
					@Override
					public void handle( ActionEvent actionEvent ) {
						addSample();
					}
				}
		));
		addDataTimeline.setCycleCount( Animation.INDEFINITE );

		chart.setOnMouseMoved( new EventHandler<MouseEvent>() {
			@Override
			public void handle( MouseEvent mouseEvent ) {
				double xStart = chart.getXAxis().getLocalToParentTransform().getTx();
				double axisXRelativeMousePosition = mouseEvent.getX() - xStart;
				outputLabel.setText( String.format(
						"%d, %d (%d, %d); %d - %d",
						(int) mouseEvent.getSceneX(), (int) mouseEvent.getSceneY(),
						(int) mouseEvent.getX(), (int) mouseEvent.getY(),
						(int) xStart,
						chart.getXAxis().getValueForDisplay( axisXRelativeMousePosition ).intValue()
				) );
			}
		} );

		//Panning works via either secondary (right) mouse or primary with ctrl held down
		ChartPanManager panner = new ChartPanManager( chart );
		panner.setMouseFilter( new EventHandler<MouseEvent>() {
			@Override
			public void handle( MouseEvent mouseEvent ) {
				if ( mouseEvent.getButton() == MouseButton.SECONDARY ||
						 ( mouseEvent.getButton() == MouseButton.PRIMARY &&
						   mouseEvent.isShortcutDown() ) ) {
					//let it through
				} else {
					mouseEvent.consume();
				}
			}
		} );
		panner.start();

		//Zooming works only via primary mouse button without ctrl held down
		JFXChartUtil.setupZooming( chart, new EventHandler<MouseEvent>() {
			@Override
			public void handle( MouseEvent mouseEvent ) {
				if ( mouseEvent.getButton() != MouseButton.PRIMARY ||
				     mouseEvent.isShortcutDown() )
					mouseEvent.consume();
			}
		} );

		JFXChartUtil.addDoublePrimaryClickAutoRangeHandler( chart );
	}
}


text:
pub mod error;

use std::collections::BTreeMap;
use serde_json::Value;

#[derive(Default)]
pub struct Metadata {
    contents: BTreeMap<String, Value>,
}

impl Metadata {
    pub fn new() -> Metadata {
        Metadata::default()
    }

    pub fn string(mut self, key: &str, value: &str) -> Metadata {
        self.contents.insert(key.to_string(), json!(value.to_string()));
        self
    }

    pub fn number(mut self, key: &str, value: isize) -> Metadata {
        self.contents.insert(key.to_string(), json!(value));
        self
    }

    pub fn boolean(mut self, key: &str, value: bool) -> Metadata {
        self.contents.insert(key.to_string(), json!(value));
        self
    }

    pub fn build(self) -> BTreeMap<String, Value> {
        self.contents
    }
}


text:
package org.suren.autotest.web.framework.data;

import org.springframework.stereotype.Component;

/**
 * 系统参数配置
 * @author linuxsuren
 */
@Component
public class SystemParamDynamicData extends PropertiesDynamicData
{
	@Override
	public String getType()
	{
		return "system";
	}

	@Override
	public String getPath()
	{
		return "system.data.properties";
	}

}