Appendix A Programkod

Size: px
Start display at page:

Download "Appendix A Programkod"

Transcription

1 Appendix A Programkod ProgramForm.cs using System; using System.Text; using System.Windows.Forms; using System.Net; using System.IO; using System.Text.RegularExpressions; using System.Collections.Generic; using System.Drawing; using System.Diagnostics; using System.Collections; namespace ProcessManager public partial class ProgramWindow : Form string NewLine = System.Environment.NewLine; ProcessGroup[] MyGroup = new ProcessGroup[25]; string configuration = ""; bool groupassigned; Hashtable cache = new Hashtable(); public ProgramWindow() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) //displayhelp(); cache.add("processmanager", "This is me!"+newline+"process Manager is made by Johan Svensson."+NewLine+"For feedback mail: processmanagersurvey@gmail.com"); private void ProcessBox_SelectedIndexChanged(object sender, EventArgs e) getinfo(); private void scanbutton_click(object sender, EventArgs e) private void savebutton_click(object sender, EventArgs e) //Write the configuration string to a TXT-file. SaveFileDialog SaveFile = new SaveFileDialog(); SaveFile.Filter = "PM text configuration file(*.cfg) *.cfg"; if (SaveFile.ShowDialog() == DialogResult.OK) //WriteAllText writes then closes the file. File.WriteAllText(SaveFile.FileName,configuration); private void loadbutton_click(object sender, EventArgs e)

2 //Read a configuration from TXT-file into string configuration. OpenFileDialog OpenFile = new OpenFileDialog(); OpenFile.Filter = "PM text configuration file(*.cfg) *.cfg"; if (OpenFile.ShowDialog() == DialogResult.OK) //ReadAllText Opens,reads then closes the file configuration = File.ReadAllText(OpenFile.FileName); //destroy previous configuration int i = 1; while (MyGroup[i]!= null) MyGroup[i] = null; private void referencesbutton_click(object sender, EventArgs e) string references = null; references = string.join(newline, MyGroup[MyGroupBox.SelectedIndex].getRefProcessesInGroup().ToArray()); InfoBox.Text = "Group "+MyGroup[MyGroupBox.SelectedIndex].getName()+" contains"+newline+"the following process references: "+NewLine+references; private void groupbutton_click(object sender, EventArgs e) InputForm MyInputForm = new InputForm(); InputForm. DialogResult dr = MyInputForm.ShowDialog(this); if (dr == DialogResult.OK) groupassigned = false; int i = 0; //Find unassigned slot in MyGroup, create new object with name from while (!groupassigned) if (MyGroup[i] == null) MyGroup[i] = new ProcessGroup(); MyGroup[i].setName("#"+MyInputForm.GroupName); groupassigned = true; private void MyGroupBox_SelectedIndexChanged(object sender, EventArgs e) //Display the processes in selected group. MyProcessBox.DataSource = MyGroup[MyGroupBox.SelectedIndex].getLiveProcessesInGroup(); processlabel.text = "Processes in group: " + MyGroup[MyGroupBox.SelectedIndex].getLiveNumberofprocesses(); private void MyProcessBox_MouseDown(object sender, MouseEventArgs e)

3 //getinfo getinfo(); //Initiate dragdrop-event. int indexofitem = MyProcessBox.IndexFromPoint(e.X, e.y); if (indexofitem >= 0 && indexofitem < MyProcessBox.Items.Count) //check we clicked down on a string MyProcessBox.DoDragDrop(MyProcessBox.Items[indexOfItem], DragDropEffects.Copy); private void MyGroupBox_DragEnter(object sender, DragEventArgs e) //Allow moving Strings, not pics and so and set appropriate effect. if (e.data.getdatapresent(dataformats.stringformat) && (e.allowedeffect == DragDropEffects.Copy e.allowedeffect == DragDropEffects.Move)) e.effect = DragDropEffects.Copy; else e.effect = DragDropEffects.Move; //eller None? private void MyGroupBox_DragDrop(object sender, DragEventArgs e) //Determine where process will be dropped. int indexofitemundermousetodrop = MyGroupBox.IndexFromPoint(MyGroupBox.PointToClient(new Point(e.X, e.y))); //Do not allow process to be dropped outside any groups or the ungrouped group(0). if (indexofitemundermousetodrop > 0 && indexofitemundermousetodrop < MyGroupBox.Items.Count) if (e.data.getdatapresent(dataformats.stringformat)) // Confirm that dropped item is still a string. string name = string.empty); MyGroup[MyGroupBox.SelectedIndex].removeRefProcess(name); MyGroup[indexOfItemUnderMouseToDrop].addRefProcess(name); private void deletebutton_click(object sender, EventArgs e) //destroy group. int i = 0; if (MyGroupBox.SelectedIndex!= 0) while (MyGroup[MyGroupBox.SelectedIndex + i + 1]!= null) MyGroup[MyGroupBox.SelectedIndex + i] = MyGroup[MyGroupBox.SelectedIndex + i + 1]; MyGroup[MyGroupBox.SelectedIndex + i] = null; else InfoBox.Text = "You can not delete the default group.";

4 private void helpbutton_click(object sender, EventArgs e) displayhelp(); private void configparser() //Parse file, create groups and add predefined processes (references) to their respective processlist. Regex _confparse = new Regex(@"^#\w*"); //MySystemProcesses.scanForProcesses(); Process[] processlist = Process.GetProcesses(); List<string> list = new List<string>(); foreach (Process theprocess in processlist) list.add(theprocess.processname); //Create default processes group for processlisting. MyGroup[0] = new ProcessGroup(); MyGroup[0].setName("Ungrouped Processes"); MyGroup[0].setRefProcess("\'Ungrouped Processes\' never contains any references."); string[] array = Regex.Split(configuration, NewLine); int i = 1; foreach (string name in array) Match match = _confparse.match(name); if (match.success) MyGroup[i] = new ProcessGroup(); MyGroup[i].setName(name); else MyGroup[i - 1].addRefProcess(name); while (list.contains(name)) foreach (Process theprocess in processlist) if (theprocess.processname == name) MyGroup[i - 1].addLiveProcess(theprocess.ProcessName + "\t(" + theprocess.id + ")"); list.remove(name); foreach (string name in list) MyGroup[0].addLiveProcess(name); //Group objects and reference processlists created. The process with Id has been set for all LiveProcesses. //Iterates over MyGroup's and create a list for MyGroupBox datasource. List<string> grouplist = new List<string>();

5 for (int listitem = 0; listitem < i; listitem++) grouplist.add(mygroup[listitem].getname()); //Set DataSource. MyGroupBox.DataSource = grouplist; private void updateconfig() configuration = ""; int i = 1; while (MyGroup[i]!= null) configuration += MyGroup[i].getName() + NewLine; configuration += string.join(newline, MyGroup[i].getRefProcessesInGroup().ToArray()); configuration += NewLine; configuration = configuration.trim(); private void getinfo() //Format processname, removing ID and converting to lowercase. string formatedname = string.empty); //Check Hash. if (cache.containskey(formatedname)) InfoBox.Text = cache[formatedname].tostring(); else //Code for fetching webpage to string string url = " + formatedname; string result = null; WebResponse response = null; StreamReader reader = null; try HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.method = "GET"; response = request.getresponse(); reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8); result = reader.readtoend(); //Format result with class for HTML-tags removal. It is optimized for speed. //Then removes junk i.e. whitespaces and useless information. Run through precompiled regexp. result = HtmlRemoval.StripTagsCharArray(result); result = HtmlRemoval.StripJunkRegexCompiled(result); //result = name).*(?=make sure you always use an updated antivirus and run a full scan)").value; catch (Exception ex) // Show error message result = formatedname + " could not be found in the database." + NewLine

6 + ex.message; finally if (reader!= null) reader.close(); if (response!= null) response.close(); cache.add(formatedname, result); InfoBox.Text = result; private void displayhelp() InfoBox.Text = "Welcome to the Process Manager!" + NewLine + "\'save/load configuration\' saves the current configuration to a file or loads a file of predefined groupings as the current configuration." + NewLine + "Press 'Scan for new processes' to update the list of currently running processes." + NewLine + "\'References for group\' displays the predefined processes for the selected group." + NewLine + NewLine + "Drag and drop processes from the process list onto a group to group your processes."; ProcessGroup.cs using System.Collections.Generic; namespace ProcessManager class ProcessGroup //Members, groupname is used for groupbox display create list for storing processes. string groupname; public List<string> MyRefProcessList = new List<string>(); public List<string> MyLiveProcessList = new List<string>(); public void setname(string name) groupname = name; public string getname() return groupname; //Set all processes for group, may be used when instantiated. public void setrefprocesses(list<string> list) MyRefProcessList = list; //Add single process to reference processlist. public void addrefprocess(string name) MyRefProcessList.Add(name); //Remove single process from reference processlist. public void removerefprocess(string name) MyRefProcessList.Remove(name);

7 //set reference processlist to single string. public void setrefprocess(string name) MyRefProcessList.Clear(); MyRefProcessList.Add(name); //Add single process to running processes processlist. public void addliveprocess(string name) MyLiveProcessList.Add(name); //Returns the actual running processes for the group. public List<string> getliveprocessesingroup() return MyLiveProcessList; //Returns the predefined processes for the group. public List<string> getrefprocessesingroup() return MyRefProcessList; //Get the number of processes actually running in the group. public int getlivenumberofprocesses() return MyLiveProcessList.Count; //Get the number of processes defined in the group. public int getrefnumberofprocesses() return MyRefProcessList.Count; HtmlRemoval.cs using System.Text.RegularExpressions; namespace ProcessManager // Methods to remove HTML from strings. public static class HtmlRemoval // Compiled regular expression for performance, // strips junk from stripped webpage i.e. multiple whitespace and links. static Regex _cutbeginning = new Regex(@"^(. \s)*?(?=(process name\: Application))", RegexOptions.Compiled); static Regex _cutjunk = new Regex(@"(Recommended\: Scan your system for registry errors As most applications store data in your system.*registry to identify hidden errors now\. Uninstalling applications can leave registry keys that bloat your registry\. We recommend you scan your registry for fragmented and obsolete entries\. Check Windows.*now to identify removable processes that are slowing down your computer\.)+", RegexOptions.Compiled); static Regex _cutwhitespaces = new Regex(@"[\t,\r,\n]+", RegexOptions.Compiled); static Regex _cutend = new Regex(@"(Is.*CPU intensive\?(. \s)*)", RegexOptions.Compiled); /// Remove HTML from string with compiled Regex. public static string StripJunkRegexCompiled(string source)

8 source = _cutbeginning.replace(source, string.empty); source = _cutend.replace(source, string.empty); source = _cutjunk.replace(source, string.empty); return source = _cutwhitespaces.replace(source, System.Environment.NewLine); // Remove HTML tags from string using char array. public static string StripTagsCharArray(string source) char[] array = new char[source.length]; int arrayindex = 0; bool inside = false; for (int i = 0; i < source.length; i++) char let = source[i]; if (let == '<') inside = true; continue; if (let == '>') inside = false; continue; if (!inside) array[arrayindex] = let; arrayindex++; return new string(array, 0, arrayindex);

CALCULATOR APPLICATION

CALCULATOR APPLICATION CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;

More information

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version

More information

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding // Program 2 - Extra Credit // CIS 200-01 // Spring 2015 // Due: 3/11/2015 // By: Andrew L. Wright //Edited by : Ben Spalding // File: Prog2Form.cs // This class creates the main GUI for Program 2. It

More information

CSIS 1624 CLASS TEST 6

CSIS 1624 CLASS TEST 6 CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed

More information

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

// Precondition: None // Postcondition: The address' name has been set to the // specified value set; // File: Address.cs // This classes stores a typical US address consisting of name, // two address lines, city, state, and 5 digit zip code. using System; using System.Collections.Generic; using System.Linq;

More information

You can call the project anything you like I will be calling this one project slide show.

You can call the project anything you like I will be calling this one project slide show. C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise

More information

Using Template Bookmarks for Automating Microsoft Word Reports

Using Template Bookmarks for Automating Microsoft Word Reports Using Template Bookmarks for Automating Microsoft Word Reports Darryl Bryk U.S. Army RDECOM-TARDEC Warren, MI 48397 Disclaimer: Reference herein to any specific commercial company, product, process, or

More information

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below. APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 12 Visual Basic/C# Programming (330) REGIONAL 2017 Production Portion: Program 1: Calendar Analysis (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores

More information

UNIT-3. Prepared by R.VINODINI 1

UNIT-3. Prepared by R.VINODINI 1 Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI

More information

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at: This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface

More information

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Eyes of the Dragon - XNA Part 37 Map Editor Revisited Eyes of the Dragon - XNA Part 37 Map Editor Revisited I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported operating systems

More information

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Create your own Meme Maker in C#

Create your own Meme Maker in C# Create your own Meme Maker in C# This tutorial will show how to create a meme maker in visual studio 2010 using C#. Now we are using Visual Studio 2010 version you can use any and still get the same result.

More information

Quick Start. SLNG Basic API Instruction for Version 5.5 שרה אמנו 39/21 מודיעין I טל' I פקס

Quick Start. SLNG Basic API Instruction for  Version 5.5 שרה אמנו 39/21 מודיעין I טל' I פקס Quick Start SLNG Basic API Instruction for Email Version 5.5 1 Contents Introduction... 4 Sending Email using HTTP JSON Post Interface... 5 Sending Email JSON format... 5 Fields Description Request...

More information

Starting with FRITZ!OS 5.50 a session ID is also required in all three cases.

Starting with FRITZ!OS 5.50 a session ID is also required in all three cases. Login to the FRITZ!Box Web Interface Login Procedure and Session IDs in the FRITZ!Box Web Interface Login to a FRITZ!Box can take place in three basic ways: With user name and password With just a passport

More information

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued XNA 4.0 RPG Tutorials Part 24 Level Editor Continued I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials

More information

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 11 Data Files McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives Store and retrieve data in files using streams Save the values from a list box and reload

More information

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler

More information

User Guide for IntegralUI ListBox v3.0

User Guide for IntegralUI ListBox v3.0 User Guide for IntegralUI ListBox v3.0 2013 Lidor Systems. All rights reserved 1 Table of contents Introduction 4 Architecture 5 Object Model 5 Event Model 6 Editor 7 Appearance 8 Working with styles 8

More information

Object oriented lab /second year / review/lecturer: yasmin maki

Object oriented lab /second year / review/lecturer: yasmin maki 1) Examples of method (function): Note: the declaration of any method is : method name ( parameters list ).. Method body.. Access modifier : public,protected, private. Return

More information

Inheriting Windows Forms with Visual C#.NET

Inheriting Windows Forms with Visual C#.NET Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes

More information

Chapter 6 Dialogs. Creating a Dialog Style Form

Chapter 6 Dialogs. Creating a Dialog Style Form Chapter 6 Dialogs We all know the importance of dialogs in Windows applications. Dialogs using the.net FCL are very easy to implement if you already know how to use basic controls on forms. A dialog is

More information

Answer on Question# Programming, C#

Answer on Question# Programming, C# Answer on Question#38723 - Programming, C# 1. The development team of SoftSols Inc. has revamped the software according to the requirements of FlyHigh Airlines and is in the process of testing the software.

More information

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

if (say==0) { k.commandtext = Insert into kullanici(k_adi,sifre) values(' + textbox3.text + ',' + textbox4.text + '); k. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient;

More information

Class Test 5. Create a simple paint program that conforms to the following requirements.

Class Test 5. Create a simple paint program that conforms to the following requirements. Class Test 5 Question 1 Use visual studio 2012 ultimate to create a C# windows forms application. Create a simple paint program that conforms to the following requirements. The control box is disabled

More information

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0. Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:

More information

Writing Your First Autodesk Revit Model Review Plug-In

Writing Your First Autodesk Revit Model Review Plug-In Writing Your First Autodesk Revit Model Review Plug-In R. Robert Bell Sparling CP5880 The Revit Model Review plug-in is a great tool for checking a Revit model for matching the standards your company has

More information

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox] C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open

More information

emkt Browserless Coding For C#.Net and Excel

emkt Browserless Coding For C#.Net and Excel emkt Browserless Coding For C#.Net and Excel Browserless Basic Instructions and Sample Code 7/23/2013 Table of Contents Using Excel... 3 Configuring Excel for sending XML to emkt... 3 Sandbox instructions

More information

In-Class Worksheet #4

In-Class Worksheet #4 CSE 459.24 Programming in C# Richard Kidwell In-Class Worksheet #4 Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open. 1. Create a new Project either from the

More information

Computer measurement and control

Computer measurement and control Computer measurement and control Instructors: András Magyarkuti, Zoltán Kovács-Krausz BME TTK, Department of Physics 2017/2018 spring semester Copyright 2008-2018 András Magyarkuti, Attila Geresdi, András

More information

IBSDK Quick Start Tutorial for C# 2010

IBSDK Quick Start Tutorial for C# 2010 IB-SDK-00003 Ver. 3.0.0 2012-04-04 IBSDK Quick Start Tutorial for C# 2010 Copyright @2012, lntegrated Biometrics LLC. All Rights Reserved 1 QuickStart Project C# 2010 Example Follow these steps to setup

More information

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011 Hands-On Lab Lab: Client Object Model Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: RETRIEVING LISTS... 4 EXERCISE 2: PRINTING A LIST... 8 EXERCISE 3: USING ADO.NET DATA

More information

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using 1 using System; 2 using System.Diagnostics; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Data; 6 using System.Drawing; 7 using System.Text; 8 using System.Windows.Forms;

More information

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Before you start - download the game assets from above or on MOOICT.COM to

More information

SMITE API Developer Guide TABLE OF CONTENTS

SMITE API Developer Guide TABLE OF CONTENTS SMITE API Developer Guide TABLE OF CONTENTS TABLE OF CONTENTS DOCUMENT CHANGE HISTORY GETTING STARTED Introduction Registration Credentials Sessions API Access Limits API METHODS & PARAMETERS APIs Connectivity

More information

2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project

2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project 1. Introduction GDS Google Map is a Desktop.Net User Control, which can be embedded in Windows Forms Applications or hosted in WPF Applications. It integrates an interactive Google Map into your desktop

More information

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format); using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI;

More information

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO.Ports; using Microsoft.FlightSimulator.SimConnect;

More information

XNA 4.0 RPG Tutorials. Part 11b. Game Editors

XNA 4.0 RPG Tutorials. Part 11b. Game Editors XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on

More information

R2Library.com Links: Note that the link into R2library.com cannot be placed on a public page or you will give access to

R2Library.com Links: Note that the link into R2library.com cannot be placed on a public page or you will give access to R2 LIBRARY TRUSTED AUTHENTICATION CONFIGURATION Document Purpose: This document defines the basic configuration and client coding for creating an access link from a secure internal intranet page to R2libary.com

More information

Step 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content

Step 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content Step 1: Start a GUI Project Start->New Project->Visual C# ->Windows Forms Application Name: Wack-A-Gopher Step 2: Add Content Download the Content folder (content.zip) from Canvas and unzip in a location

More information

Form Properties Window

Form Properties Window C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click

More information

UNIVERSITY OF THE FREE STATE MAIN & QWA-QWA CAMPUS RIS 124 DEPARTMENT: COMPUTER SCIENCE AND INFORMATICS CONTACT NUMBER:

UNIVERSITY OF THE FREE STATE MAIN & QWA-QWA CAMPUS RIS 124 DEPARTMENT: COMPUTER SCIENCE AND INFORMATICS CONTACT NUMBER: UNIVERSITY OF THE FREE STATE MAIN & QWA-QWA CAMPUS RIS 124 DEPARTMENT: COMPUTER SCIENCE AND INFORMATICS CONTACT NUMBER: 4012754 EXAMINATION: Main End-of-year Examination 2013 PAPER 1 ASSESSORS: Prof. P.J.

More information

Click on the empty form and apply the following options to the properties Windows.

Click on the empty form and apply the following options to the properties Windows. Start New Project In Visual Studio Choose C# Windows Form Application Name it SpaceInvaders and Click OK. Click on the empty form and apply the following options to the properties Windows. This is the

More information

BULK HTTP API DOCUMENTATION

BULK HTTP API DOCUMENTATION BULK HTTP API DOCUMENTATION Version 1.4 Sending Message Via HTTP API INTRODUCTION This HTTP API document will help you use the push platform to send SMS messages through Query String over HTTP/HTTPS. The

More information

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project. C# Tutorial - Create a Batman Gravity Run Game Start a new project in visual studio and call it gravityrun It should be a windows form application with C# Click OK Change the size of the to 800,300 and

More information

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

Lecture 8 Building an MDI Application

Lecture 8 Building an MDI Application Lecture 8 Building an MDI Application Introduction The MDI (Multiple Document Interface) provides a way to display multiple (child) windows forms inside a single main(parent) windows form. In this example

More information

Chapter 8 Advanced GUI Features

Chapter 8 Advanced GUI Features 159 Chapter 8 Advanced GUI Features There are many other features we can easily add to a Windows C# application. We must be able to have menus and dialogs along with many other controls. One workhorse

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

More information

05/31/2009. Data Files

05/31/2009. Data Files Data Files Store and retrieve data in files using streams Save the values from a list box and reload for the next program run Check for the end of file Test whether a file exists Display the standard Open

More information

Huw Talliss Data Structures and Variables. Variables

Huw Talliss Data Structures and Variables. Variables Data Structures and Variables Variables The Regex class represents a read-only regular expression. It also contains static methods that allow use of other regular expression classes without explicitly

More information

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

string spath; string sedifile = 277_005010X228.X12; string sseffile = 277_005010X228.SemRef.EVAL0.SEF; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI; 1 namespace

More information

II. Programming Technologies

II. Programming Technologies II. Programming Technologies II.1 The machine code program Code of algorithm steps + memory addresses: MOV AX,1234h ;0B8h 34h 12h - number (1234h) to AX register MUL WORD PTR [5678h] ;0F7h 26h 78h 56h

More information

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock. C# Tutorial - Create a YouTube Alarm Clock in Visual Studio In this tutorial we will create a simple yet elegant YouTube alarm clock in Visual Studio using C# programming language. The main idea for this

More information

string signature = CreateSignature(secretKey, messagerepresentation); // hwce6v2ka0kkb0gbbik0gsw5qacs3+vj+m+wn/8k9ee=

string signature = CreateSignature(secretKey, messagerepresentation); // hwce6v2ka0kkb0gbbik0gsw5qacs3+vj+m+wn/8k9ee= Code Examples See also this tutorial for more information about using the ASP.NET web API client libraries. Making a GET request Let's read orders created after a particular date. For security reasons,

More information

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this. A - 1 LISTING PROGRAM 1. Form Menu Utama using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; namespace KompresiCitra / / Description of MainForm.

More information

Silverlight memory board ( Part 2 )

Silverlight memory board ( Part 2 ) Silverlight memory board ( Part 2 ) In the first part this tutorial we created a new Silverlight project and designed the user interface. In this part, we will add some code to the project to make the

More information

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky Brian Kiser November 2010 Vigilant C# 2.5 Commonwealth of Kentucky Frankfort, Kentucky Table of Contents 1.0 Work Sample Description Page 3 2.0 Skills Demonstrated 2.1 Software development competency using

More information

The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer.

The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer. Web Services Product version: 4.50 Document version: 1.0 Document creation date: 04-05-2005 Purpose The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further

More information

Representing Recursive Relationships Using REP++ TreeView

Representing Recursive Relationships Using REP++ TreeView Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved. Representing Recursive

More information

Consuming SAIT API via ITS ESB from web / desktop application

Consuming SAIT API via ITS ESB from web / desktop application Consuming SAIT API via ITS ESB from web / desktop application 1. Configuration Requirements: To be able to test / consume API via ITS ESB the following steps must be addressed: a. The certificate should

More information

Module 8: Building a Windows Forms User Interface

Module 8: Building a Windows Forms User Interface Module 8: Building a Windows Forms User Interface Table of Contents Module Overview 8-1 Lesson 1: Managing Forms and Dialog Boxes 8-2 Lesson 2: Creating Menus and Toolbars 8-13 Lab: Implementing Menus

More information

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them. We are working on Visual Studio 2010 but this project can be remade in any other version of visual studio. Start a new project in Visual Studio, make this a C# Windows Form Application and name it zombieshooter.

More information

Chapter 8 Files. File Streams

Chapter 8 Files. File Streams Chapter 8 Files Few programs are written that don t involve some type of file input/output. Way back in the days when the C language became popular a set of library functions were designed that have been

More information

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } using System using System.Collections.Generic using System.ComponentModel using System.Data using System.Drawing using System.Text using System.Windows.Forms using Edidev.FrameworkEDI 1 namespace csharp_gen277x214

More information

Network Operation System. netstat. ipconfig/tracert/ping. nslookup EEE 448 Computer Networks

Network Operation System. netstat. ipconfig/tracert/ping. nslookup EEE 448 Computer Networks EEE 448 Computer Networks with (Network Programming) Lecture #4 Dept of Electrical and Electronics Engineering Çukurova University Network Operation System When you are on the internet or are working in

More information

namespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components;

namespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components; Exercise 9.3 In Form1.h #pragma once #include "Form2.h" Add to the beginning of Form1.h #include #include For srand() s input parameter namespace Tst_Form using namespace System; using

More information

KWizCom Corporation. imush. Information Management Utilities for SharePoint. Printing Feature. Application Programming Interface (API)

KWizCom Corporation. imush. Information Management Utilities for SharePoint. Printing Feature. Application Programming Interface (API) KWizCom Corporation imush Information Management Utilities for SharePoint Printing Feature Application Programming Interface (API) Copyright 2005-2014 KWizCom Corporation. All rights reserved. Company

More information

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems Excel and C# Overview Introduction to DatabaseSupport Systems Building a Web-Enabled Decision Support System Integrating DSS in Business Curriculum 2 Decision Support Systems (DSS) A decision support system

More information

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. Author: Carlos Kassab Date: July/24/2006 First install BOBS(BaaN Ole Broker Server), you

More information

Creating a Role Playing Game with XNA Game Studio Part 50 Items - Part 4b

Creating a Role Playing Game with XNA Game Studio Part 50 Items - Part 4b Creating a Role Playing Game with XNA Game Studio Part 50 Items - Part 4b To follow along with this tutorial you will have to have read the previous tutorials to understand much of what it going on. You

More information

For this example, we will set up a small program to display a picture menu for a fast food take-away shop.

For this example, we will set up a small program to display a picture menu for a fast food take-away shop. 146 Programming with C#.NET 9 Fast Food This program introduces the technique for uploading picture images to a C# program and storing them in a database table, in a similar way to text or numeric data.

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

PULSE - API. The purpose of this document is to provide example requests and responses for all relevant Pulse services requests

PULSE - API. The purpose of this document is to provide example requests and responses for all relevant Pulse services requests PULSE - API The purpose of this document is to provide example requests and responses for all relevant Pulse services requests Contents Introduction... 4 Getting Started... 4 Anatomy of a ...6

More information

C# Data Manipulation

C# Data Manipulation C# Data Manipulation Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 1 2018/19 H-W. Loidl (Heriot-Watt Univ) F20SC/F21SC

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende: APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende: Interfaz gráfica de wiimocap. Obtención de las variables de los tres acelerómetros. Algoritmos de reconocimiento de posiciones. Inclinación

More information

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, create a new project called Helicopter Game and press OK C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot

More information

C# Data Manipulation

C# Data Manipulation C# Data Manipulation Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 1 2018/19 H-W. Loidl (Heriot-Watt Univ) F20SC/F21SC

More information

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services

More information

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi Turku University of Applied Sciences Degree Programme in Business Information Technology

More information

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

private string sconnection = ConfigurationManager.ConnectionStrings[Development].ConnectionString using System; using System.Configuration; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Text; using System.Windows.Forms;

More information

Chapter 12. Tool Strips, Status Strips, and Splitters

Chapter 12. Tool Strips, Status Strips, and Splitters Chapter 12 Tool Strips, Status Strips, and Splitters Tool Strips Usually called tool bars. The new ToolStrip class replaces the older ToolBar class of.net 1.1. Create easily customized, commonly employed

More information

LIPNET OUTBOUND API FORMS DOCUMENTATION

LIPNET OUTBOUND API FORMS DOCUMENTATION LIPNET OUTBOUND API FORMS DOCUMENTATION LEGAL INAKE PROFESSIONALS 2018-03-0926 Contents Description... 2 Requirements:... 2 General Information:... 2 Request/Response Information:... 2 Service Endpoints...

More information

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

} } public void getir() { DataTable dt = vt.dtgetir(select* from stok order by stokadi); Form1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Research and Application of The Web Crawler

Research and Application of The Web Crawler Research and Application of The Web Crawler 1 Su Yu, 2 Yin Wang, 3 Kun Hua and 4 Ghassan M. Azar 1 Assistant Professor, College of Electronic and Electrical Engineering, Shanghai University of Engineering

More information

Project Proposal. GPS Collection Unit

Project Proposal. GPS Collection Unit Project Proposal 24 April 2007 Jerald Sussman, xxxxxxx@ieee.org Aaron Isaki, xxxxxxx@gmail.com Project Abstract This project is a prototype unit of a small Global Positioning System (GPS) collection and

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 9: Generics & generic Collections Lecture Contents 2 Introduction Why generics? Generic methods Overloading generic methods Generic

More information

Introduction to C# Applications

Introduction to C# Applications 1 2 3 Introduction to C# Applications OBJECTIVES To write simple C# applications To write statements that input and output data to the screen. To declare and use data of various types. To write decision-making

More information

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); }

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); } MEMBER PAYMENTS FORM public partial class MemberPaymentsForm : Form public MemberPaymentsForm() private void MemberPaymentsForm_Load(object sender, EventArgs e) // TODO: This line of code loads data into

More information

CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING. Dr. Shady Yehia Elmashad

CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING. Dr. Shady Yehia Elmashad CHAPTER 1.2 INTRODUCTION TO C++ PROGRAMMING Dr. Shady Yehia Elmashad Outline 1. Introduction to C++ Programming 2. Comment 3. Variables and Constants 4. Basic C++ Data Types 5. Simple Program: Printing

More information

JOURNAL OF OBJECT TECHNOLOGY

JOURNAL OF OBJECT TECHNOLOGY JOURNAL OF OBJECT TECHNOLOGY Online at http://www.jot.fm. Published by ETH Zurich, Chair of Software Engineering JOT, 2009 Vol. 8, No. 1, January-February 2009 EDUCATOR S CORNER A Model-View Implementation

More information

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application

More information

An Office Application Using the Ribbon, a Custom Task Pane and Virtual Earth

An Office Application Using the Ribbon, a Custom Task Pane and Virtual Earth An Office Application Using the Ribbon, a Custom Task Pane and Virtual Earth Introduction In this demonstration lab you will build a simple application that uses WCF (the Windows Communication Foundation)

More information

Adapting a Grid to REP++

Adapting a Grid to REP++ Adapting a Grid to REP++ Author: R&D Department Publication date: April 28 2006 2006 Consyst SQL Inc. All rights reserved. Adapting a Grid to REP++ Overview The REP++toolkit for Windows provides a good

More information

Login to the FRITZ!Box Web Interface

Login to the FRITZ!Box Web Interface Login to the FRITZ!Box Web Interface Login Procedure and Session IDs in the FRITZ!Box Web Interface Login to a FRITZ!Box can take place in three basic ways: With user name and password With just a passport

More information

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

private string sconnection = ConfigurationManager.ConnectionStrings[Development].ConnectionString using System; using System.Configuration; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Text; using System.Windows.Forms;

More information