Adding first draft of our text application.
This is most useful for testing stuff without MediaPortal.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/IdwTest/App.config Mon Apr 21 12:02:38 2014 +0200
1.3 @@ -0,0 +1,6 @@
1.4 +<?xml version="1.0" encoding="utf-8" ?>
1.5 +<configuration>
1.6 + <startup>
1.7 + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
1.8 + </startup>
1.9 +</configuration>
1.10 \ No newline at end of file
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/IdwTest/Idw.cs Mon Apr 21 12:02:38 2014 +0200
2.3 @@ -0,0 +1,358 @@
2.4 +using System;
2.5 +using System.Collections.Generic;
2.6 +using System.Linq;
2.7 +using System.Text;
2.8 +using System.Threading.Tasks;
2.9 +using System.Runtime.InteropServices;
2.10 +
2.11 +namespace iMON
2.12 +{
2.13 + class Display
2.14 + {
2.15 + public string StatusMessage { get; set; }
2.16 + public DSPType Type { get; set; }
2.17 + public bool IsLcd() { return Type == DSPType.DSPN_DSP_LCD; }
2.18 + public bool IsVfd() { return Type == DSPType.DSPN_DSP_VFD; }
2.19 + public string Name()
2.20 + {
2.21 + if (Type == DSPType.DSPN_DSP_VFD)
2.22 + {
2.23 + return "SoundGraph iMON VFD";
2.24 + }
2.25 + else if (Type == DSPType.DSPN_DSP_LCD)
2.26 + {
2.27 + return "SoundGraph iMON LCD";
2.28 + }
2.29 + else //(DisplayType == DSPType.DSPN_DSP_NONE)
2.30 + {
2.31 + return "No display";
2.32 + }
2.33 + }
2.34 +
2.35 + /// <summary>
2.36 + /// Do display initialization.
2.37 + /// Returns true on success
2.38 + /// </summary>
2.39 + public bool DoInit()
2.40 + {
2.41 + IDW_INITRESULT initResult = new IDW_INITRESULT();
2.42 + DSPResult ret = IDW_Init(initResult);
2.43 + //Check the API call worked
2.44 + if (ret != DSPResult.DSP_SUCCEEDED)
2.45 + {
2.46 + StatusMessage = DSPResult2String(ret);
2.47 + return false;
2.48 + }
2.49 + //Check that the initialization was carried out properly
2.50 + else if (initResult.iInitResult != DSPNInitResult.DSPN_SUCCEEDED)
2.51 + {
2.52 + StatusMessage = DSPNResult2String(initResult.iInitResult);
2.53 + return false;
2.54 + }
2.55 + //Check we that we have a display
2.56 + else if (initResult.iDspType == DSPType.DSPN_DSP_NONE)
2.57 + {
2.58 + StatusMessage = "Unsupported device";
2.59 + return false;
2.60 + }
2.61 +
2.62 + Type = initResult.iDspType;
2.63 + return true;
2.64 + }
2.65 +
2.66 + /// <summary>
2.67 + /// Do display de-initialization.
2.68 + /// Returns true on success
2.69 + /// </summary>
2.70 + public void DoUninit()
2.71 + {
2.72 + Type = DSPType.DSPN_DSP_NONE;
2.73 + IDW_Uninit();
2.74 + }
2.75 +
2.76 +
2.77 + /// <summary>
2.78 + /// Provide a string corresponding to the given DSPResult.
2.79 + /// </summary>
2.80 + protected string DSPResult2String(DSPResult result)
2.81 + {
2.82 + switch (result)
2.83 + {
2.84 + case DSPResult.DSP_SUCCEEDED:
2.85 + return "Success";
2.86 + case DSPResult.DSP_E_FAIL:
2.87 + return "An unknown error occurred";
2.88 + case DSPResult.DSP_E_OUTOFMEMORY:
2.89 + return "Out of memory";
2.90 + case DSPResult.DSP_E_INVALIDARG:
2.91 + return "One or more arguments are invalid";
2.92 + case DSPResult.DSP_E_NOT_INITED:
2.93 + return "API is not initialized";
2.94 + case DSPResult.DSP_E_POINTER:
2.95 + return "Pointer is invalid";
2.96 + default:
2.97 + return "An unknown error occurred";
2.98 + }
2.99 + }
2.100 +
2.101 + /// <summary>
2.102 + /// Provide a string corresponding to the given DSPNInitResult.
2.103 + /// </summary>
2.104 + protected string DSPNResult2String(DSPNInitResult result)
2.105 + {
2.106 + switch (result)
2.107 + {
2.108 + case DSPNInitResult.DSPN_SUCCEEDED:
2.109 + return "Success";
2.110 + case DSPNInitResult.DSPN_ERR_IN_USE:
2.111 + return "Display plug-in is already used by another application";
2.112 + case DSPNInitResult.DSPN_ERR_HW_DISCONNECTED:
2.113 + return "iMON hardware is not connected";
2.114 + case DSPNInitResult.DSPN_ERR_NOT_SUPPORTED_HW:
2.115 + return "The connected hardware does not support the plug-in mode";
2.116 + case DSPNInitResult.DSPN_ERR_PLUGIN_DISABLED:
2.117 + return "The plug-in mode option is disabled";
2.118 + case DSPNInitResult.DSPN_ERR_IMON_NO_REPLY:
2.119 + return "The latest iMON is not installed or iMON is not running";
2.120 + default:
2.121 + return "An unknown error occurred";
2.122 + }
2.123 + }
2.124 +
2.125 + //Possible return values from iMON Display APIs
2.126 + public enum DSPResult : int
2.127 + {
2.128 + DSP_SUCCEEDED = 0,
2.129 + DSP_E_FAIL = 1,
2.130 + DSP_E_OUTOFMEMORY = 2,
2.131 + DSP_E_INVALIDARG = 3,
2.132 + DSP_E_NOT_INITED = 4,
2.133 + DSP_E_POINTER = 5,
2.134 + DSP_S_INITED = 0x1000,
2.135 + DSP_S_NOT_INITED = 0x1001,
2.136 + DSP_S_IN_PLUGIN_MODE = 0x1002,
2.137 + DSP_S_NOT_IN_PLUGIN_MODE = 0x1003
2.138 + }
2.139 +
2.140 + //Possible results from display initialization
2.141 + public enum DSPNInitResult : int
2.142 + {
2.143 + DSPN_SUCCEEDED = 0,
2.144 + DSPN_ERR_IN_USE = 0x0100,
2.145 + DSPN_ERR_HW_DISCONNECTED = 0x0101,
2.146 + DSPN_ERR_NOT_SUPPORTED_HW = 0x0102,
2.147 + DSPN_ERR_PLUGIN_DISABLED = 0x0103,
2.148 + DSPN_ERR_IMON_NO_REPLY = 0x0104,
2.149 + DSPN_ERR_UNKNOWN = 0x0200
2.150 + }
2.151 +
2.152 + //Type of display
2.153 + public enum DSPType : int
2.154 + {
2.155 + DSPN_DSP_NONE = 0,
2.156 + DSPN_DSP_VFD = 0x01,
2.157 + DSPN_DSP_LCD = 0x02
2.158 + };
2.159 +
2.160 + //Notification code
2.161 + public enum DSPNotifyCode : int
2.162 + {
2.163 + DSPNM_PLUGIN_SUCCEED = 0,
2.164 + DSPNM_PLUGIN_FAILED,
2.165 + DSPNM_IMON_RESTARTED,
2.166 + DSPNM_IMON_CLOSED,
2.167 + DSPNM_HW_CONNECTED,
2.168 + DSPNM_HW_DISCONNECTED,
2.169 + DSPNM_LCD_TEXT_SCROLL_DONE = 0x1000
2.170 + };
2.171 +
2.172 + [Flags]
2.173 + public enum OrangeDiskPieces : byte
2.174 + {
2.175 + Piece1 = 0x80, // top piece
2.176 + Piece2 = 0x40, // next piece counter-clockwise
2.177 + Piece3 = 0x20, // and so on...
2.178 + Piece4 = 0x10,
2.179 + Piece5 = 0x8,
2.180 + Piece6 = 0x4,
2.181 + Piece7 = 0x2,
2.182 + Piece8 = 0x1,
2.183 + None = 0x0
2.184 + }
2.185 +
2.186 + public enum OrangeDiskIcon : byte
2.187 + {
2.188 + On = 0x80,
2.189 + Off = 0x0
2.190 + }
2.191 +
2.192 + [Flags]
2.193 + public enum MediaTypes : byte
2.194 + {
2.195 + Music = 0x80,
2.196 + Movie = 0x40,
2.197 + Photo = 0x20,
2.198 + Cd_Dvd = 0x10,
2.199 + Tv = 0x8,
2.200 + WebCasting = 0x4,
2.201 + News_Weather = 0x2,
2.202 + None = 0x0
2.203 + }
2.204 +
2.205 + [Flags]
2.206 + public enum Speakers : byte
2.207 + {
2.208 + L = 0x80,
2.209 + C = 0x40,
2.210 + R = 0x20,
2.211 + SL = 0x10,
2.212 + LFE = 0x8,
2.213 + SR = 0x4,
2.214 + RL = 0x2,
2.215 + SPDIF = 0x1,
2.216 + None = 0x0
2.217 + }
2.218 +
2.219 + public enum SpeakersRR : byte
2.220 + {
2.221 + RR = 0x80,
2.222 + Off = 0x0
2.223 + }
2.224 +
2.225 + [Flags]
2.226 + public enum VideoCodecs : byte
2.227 + {
2.228 + MPG = 0x80,
2.229 + DIVX = 0x40,
2.230 + XVID = 0x20,
2.231 + WMV = 0x10,
2.232 + MPG2 = 0x8,
2.233 + AC3 = 0x4,
2.234 + DTS = 0x2,
2.235 + WMA = 0x1,
2.236 + None = 0x0
2.237 + }
2.238 +
2.239 + [Flags]
2.240 + public enum AudioCodecs : byte
2.241 + {
2.242 + MP3 = 0x80,
2.243 + OGG = 0x40,
2.244 + WMA = 0x20,
2.245 + WAV = 0x10,
2.246 + None = 0x0
2.247 + }
2.248 +
2.249 + [Flags]
2.250 + public enum AspectRatios : byte
2.251 + {
2.252 + SRC = 0x80,
2.253 + FIT = 0x40,
2.254 + TV = 0x20,
2.255 + HDTV = 0x10,
2.256 + SCR1 = 0x8,
2.257 + SCR2 = 0x4,
2.258 + None = 0x0
2.259 + }
2.260 +
2.261 + [Flags]
2.262 + public enum EtcIcons : byte
2.263 + {
2.264 + Repeat = 0x80,
2.265 + Shuffle = 0x40,
2.266 + Alarm = 0x20,
2.267 + Recording = 0x10,
2.268 + Volume = 0x8,
2.269 + Time = 0x4,
2.270 + None = 0x0
2.271 + }
2.272 +
2.273 + //Provide results from our iMON Display initialization
2.274 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 8)]
2.275 + protected class IDW_INITRESULT
2.276 + {
2.277 + [MarshalAs(UnmanagedType.U4)]
2.278 + public DSPNotifyCode iNotification;
2.279 + [MarshalAs(UnmanagedType.U4)]
2.280 + public DSPNInitResult iInitResult;
2.281 + [MarshalAs(UnmanagedType.U4)]
2.282 + public DSPType iDspType;
2.283 + }
2.284 +
2.285 + //Provide result for our status query
2.286 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 8)]
2.287 + protected class IDW_STATUS
2.288 + {
2.289 + [MarshalAs(UnmanagedType.U4)]
2.290 + public DSPNotifyCode iNotification;
2.291 + }
2.292 +
2.293 + //Declare a struct to pass our EqData
2.294 + [StructLayout(LayoutKind.Sequential)]
2.295 + public class DSPEQDATA
2.296 + {
2.297 + public DSPEQDATA()
2.298 + {
2.299 + BandData = new int[16];
2.300 + }
2.301 +
2.302 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
2.303 + public readonly int[] BandData;
2.304 + }
2.305 +
2.306 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.307 + protected static extern DSPResult IDW_Init(IDW_INITRESULT initResult);
2.308 +
2.309 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.310 + protected static extern DSPResult IDW_Uninit();
2.311 +
2.312 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.313 + protected static extern DSPResult IDW_IsInitialized();
2.314 +
2.315 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.316 + protected static extern DSPResult IDW_GetStatus(IDW_STATUS status);
2.317 +
2.318 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.319 + public static extern DSPResult IDW_SetVfdText([MarshalAs(UnmanagedType.LPWStr)] string line1, [MarshalAs(UnmanagedType.LPWStr)] string line2);
2.320 +
2.321 + //Import function to set VFD EQDATA
2.322 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.323 + public static extern int IDW_SetVfdEqData(DSPEQDATA EqData);
2.324 +
2.325 + //Import function to set LCD EQDATA
2.326 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.327 + public static extern int IDW_SetLcdEqData(DSPEQDATA EqDataLeft, DSPEQDATA EqDataRight);
2.328 +
2.329 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.330 + public static extern DSPResult IDW_SetLcdText([MarshalAs(UnmanagedType.LPWStr)] string line);
2.331 +
2.332 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.333 + public static extern DSPResult IDW_SetLcdAllIcons([MarshalAs(UnmanagedType.Bool)] bool on);
2.334 +
2.335 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.336 + public static extern DSPResult IDW_SetLcdOrangeIcon(byte iconData1, byte iconData2);
2.337 +
2.338 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.339 + public static extern DSPResult IDW_SetLcdMediaTypeIcon(byte iconData);
2.340 +
2.341 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.342 + public static extern DSPResult IDW_SetLcdSpeakerIcon(byte iconData1, byte iconData2);
2.343 +
2.344 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.345 + public static extern DSPResult IDW_SetLcdVideoCodecIcon(byte iconData);
2.346 +
2.347 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.348 + public static extern DSPResult IDW_SetLcdAudioCodecIcon(byte iconData);
2.349 +
2.350 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.351 + public static extern DSPResult IDW_SetLcdAspectRatioIcon(byte iconData);
2.352 +
2.353 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.354 + public static extern DSPResult IDW_SetLcdEtcIcon(byte iconData);
2.355 +
2.356 + [DllImport("iMONDisplayWrapper.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
2.357 + public static extern DSPResult IDW_SetLcdProgress(int currentPosition, int total);
2.358 +
2.359 +
2.360 + }
2.361 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/IdwTest/IdwTest.csproj Mon Apr 21 12:02:38 2014 +0200
3.3 @@ -0,0 +1,89 @@
3.4 +<?xml version="1.0" encoding="utf-8"?>
3.5 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3.6 + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3.7 + <PropertyGroup>
3.8 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
3.9 + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
3.10 + <ProjectGuid>{8E8FEBA2-486D-450F-84A1-09EB7E28F499}</ProjectGuid>
3.11 + <OutputType>WinExe</OutputType>
3.12 + <AppDesignerFolder>Properties</AppDesignerFolder>
3.13 + <RootNamespace>IdwTest</RootNamespace>
3.14 + <AssemblyName>IdwTest</AssemblyName>
3.15 + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
3.16 + <FileAlignment>512</FileAlignment>
3.17 + </PropertyGroup>
3.18 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3.19 + <PlatformTarget>AnyCPU</PlatformTarget>
3.20 + <DebugSymbols>true</DebugSymbols>
3.21 + <DebugType>full</DebugType>
3.22 + <Optimize>false</Optimize>
3.23 + <OutputPath>bin\Debug\</OutputPath>
3.24 + <DefineConstants>DEBUG;TRACE</DefineConstants>
3.25 + <ErrorReport>prompt</ErrorReport>
3.26 + <WarningLevel>4</WarningLevel>
3.27 + </PropertyGroup>
3.28 + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3.29 + <PlatformTarget>AnyCPU</PlatformTarget>
3.30 + <DebugType>pdbonly</DebugType>
3.31 + <Optimize>true</Optimize>
3.32 + <OutputPath>bin\Release\</OutputPath>
3.33 + <DefineConstants>TRACE</DefineConstants>
3.34 + <ErrorReport>prompt</ErrorReport>
3.35 + <WarningLevel>4</WarningLevel>
3.36 + </PropertyGroup>
3.37 + <ItemGroup>
3.38 + <Reference Include="System" />
3.39 + <Reference Include="System.Core" />
3.40 + <Reference Include="System.Xml.Linq" />
3.41 + <Reference Include="System.Data.DataSetExtensions" />
3.42 + <Reference Include="Microsoft.CSharp" />
3.43 + <Reference Include="System.Data" />
3.44 + <Reference Include="System.Deployment" />
3.45 + <Reference Include="System.Drawing" />
3.46 + <Reference Include="System.Windows.Forms" />
3.47 + <Reference Include="System.Xml" />
3.48 + </ItemGroup>
3.49 + <ItemGroup>
3.50 + <Compile Include="Idw.cs" />
3.51 + <Compile Include="MainForm.cs">
3.52 + <SubType>Form</SubType>
3.53 + </Compile>
3.54 + <Compile Include="MainForm.Designer.cs">
3.55 + <DependentUpon>MainForm.cs</DependentUpon>
3.56 + </Compile>
3.57 + <Compile Include="Program.cs" />
3.58 + <Compile Include="Properties\AssemblyInfo.cs" />
3.59 + <EmbeddedResource Include="MainForm.resx">
3.60 + <DependentUpon>MainForm.cs</DependentUpon>
3.61 + </EmbeddedResource>
3.62 + <EmbeddedResource Include="Properties\Resources.resx">
3.63 + <Generator>ResXFileCodeGenerator</Generator>
3.64 + <LastGenOutput>Resources.Designer.cs</LastGenOutput>
3.65 + <SubType>Designer</SubType>
3.66 + </EmbeddedResource>
3.67 + <Compile Include="Properties\Resources.Designer.cs">
3.68 + <AutoGen>True</AutoGen>
3.69 + <DependentUpon>Resources.resx</DependentUpon>
3.70 + </Compile>
3.71 + <None Include="Properties\Settings.settings">
3.72 + <Generator>SettingsSingleFileGenerator</Generator>
3.73 + <LastGenOutput>Settings.Designer.cs</LastGenOutput>
3.74 + </None>
3.75 + <Compile Include="Properties\Settings.Designer.cs">
3.76 + <AutoGen>True</AutoGen>
3.77 + <DependentUpon>Settings.settings</DependentUpon>
3.78 + <DesignTimeSharedInput>True</DesignTimeSharedInput>
3.79 + </Compile>
3.80 + </ItemGroup>
3.81 + <ItemGroup>
3.82 + <None Include="App.config" />
3.83 + </ItemGroup>
3.84 + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
3.85 + <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
3.86 + Other similar extension points exist, see Microsoft.Common.targets.
3.87 + <Target Name="BeforeBuild">
3.88 + </Target>
3.89 + <Target Name="AfterBuild">
3.90 + </Target>
3.91 + -->
3.92 +</Project>
3.93 \ No newline at end of file
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/IdwTest/IdwTest.sln Mon Apr 21 12:02:38 2014 +0200
4.3 @@ -0,0 +1,20 @@
4.4 +
4.5 +Microsoft Visual Studio Solution File, Format Version 12.00
4.6 +# Visual Studio 2012
4.7 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdwTest", "IdwTest.csproj", "{8E8FEBA2-486D-450F-84A1-09EB7E28F499}"
4.8 +EndProject
4.9 +Global
4.10 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
4.11 + Debug|Any CPU = Debug|Any CPU
4.12 + Release|Any CPU = Release|Any CPU
4.13 + EndGlobalSection
4.14 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
4.15 + {8E8FEBA2-486D-450F-84A1-09EB7E28F499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4.16 + {8E8FEBA2-486D-450F-84A1-09EB7E28F499}.Debug|Any CPU.Build.0 = Debug|Any CPU
4.17 + {8E8FEBA2-486D-450F-84A1-09EB7E28F499}.Release|Any CPU.ActiveCfg = Release|Any CPU
4.18 + {8E8FEBA2-486D-450F-84A1-09EB7E28F499}.Release|Any CPU.Build.0 = Release|Any CPU
4.19 + EndGlobalSection
4.20 + GlobalSection(SolutionProperties) = preSolution
4.21 + HideSolutionNode = FALSE
4.22 + EndGlobalSection
4.23 +EndGlobal
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/IdwTest/MainForm.Designer.cs Mon Apr 21 12:02:38 2014 +0200
5.3 @@ -0,0 +1,290 @@
5.4 +namespace IdwTest
5.5 +{
5.6 + partial class MainForm
5.7 + {
5.8 + /// <summary>
5.9 + /// Required designer variable.
5.10 + /// </summary>
5.11 + private System.ComponentModel.IContainer components = null;
5.12 +
5.13 + /// <summary>
5.14 + /// Clean up any resources being used.
5.15 + /// </summary>
5.16 + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
5.17 + protected override void Dispose(bool disposing)
5.18 + {
5.19 + if (disposing && (components != null))
5.20 + {
5.21 + components.Dispose();
5.22 + }
5.23 + base.Dispose(disposing);
5.24 + }
5.25 +
5.26 + #region Windows Form Designer generated code
5.27 +
5.28 + /// <summary>
5.29 + /// Required method for Designer support - do not modify
5.30 + /// the contents of this method with the code editor.
5.31 + /// </summary>
5.32 + private void InitializeComponent()
5.33 + {
5.34 + this.buttonInit = new System.Windows.Forms.Button();
5.35 + this.buttonUninit = new System.Windows.Forms.Button();
5.36 + this.labelStatus = new System.Windows.Forms.Label();
5.37 + this.textBoxVfdTop = new System.Windows.Forms.TextBox();
5.38 + this.textBoxVfdBottom = new System.Windows.Forms.TextBox();
5.39 + this.groupBoxVfd = new System.Windows.Forms.GroupBox();
5.40 + this.label2 = new System.Windows.Forms.Label();
5.41 + this.label1 = new System.Windows.Forms.Label();
5.42 + this.buttonSetVfdText = new System.Windows.Forms.Button();
5.43 + this.groupBoxLcd = new System.Windows.Forms.GroupBox();
5.44 + this.textBoxLcd = new System.Windows.Forms.TextBox();
5.45 + this.buttonSetLcdText = new System.Windows.Forms.Button();
5.46 + this.label3 = new System.Windows.Forms.Label();
5.47 + this.buttonToggleTimer = new System.Windows.Forms.Button();
5.48 + this.groupBoxTimer = new System.Windows.Forms.GroupBox();
5.49 + this.label4 = new System.Windows.Forms.Label();
5.50 + this.numericTimerInterval = new System.Windows.Forms.NumericUpDown();
5.51 + this.checkBoxRandomEq = new System.Windows.Forms.CheckBox();
5.52 + this.groupBoxVfd.SuspendLayout();
5.53 + this.groupBoxLcd.SuspendLayout();
5.54 + this.groupBoxTimer.SuspendLayout();
5.55 + ((System.ComponentModel.ISupportInitialize)(this.numericTimerInterval)).BeginInit();
5.56 + this.SuspendLayout();
5.57 + //
5.58 + // buttonInit
5.59 + //
5.60 + this.buttonInit.Location = new System.Drawing.Point(12, 12);
5.61 + this.buttonInit.Name = "buttonInit";
5.62 + this.buttonInit.Size = new System.Drawing.Size(75, 23);
5.63 + this.buttonInit.TabIndex = 0;
5.64 + this.buttonInit.Text = "Init";
5.65 + this.buttonInit.UseVisualStyleBackColor = true;
5.66 + this.buttonInit.Click += new System.EventHandler(this.buttonInit_Click);
5.67 + //
5.68 + // buttonUninit
5.69 + //
5.70 + this.buttonUninit.Location = new System.Drawing.Point(93, 12);
5.71 + this.buttonUninit.Name = "buttonUninit";
5.72 + this.buttonUninit.Size = new System.Drawing.Size(75, 23);
5.73 + this.buttonUninit.TabIndex = 1;
5.74 + this.buttonUninit.Text = "Uninit";
5.75 + this.buttonUninit.UseVisualStyleBackColor = true;
5.76 + this.buttonUninit.Click += new System.EventHandler(this.buttonUninit_Click);
5.77 + //
5.78 + // labelStatus
5.79 + //
5.80 + this.labelStatus.AutoSize = true;
5.81 + this.labelStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
5.82 + this.labelStatus.Location = new System.Drawing.Point(174, 15);
5.83 + this.labelStatus.Name = "labelStatus";
5.84 + this.labelStatus.Size = new System.Drawing.Size(113, 20);
5.85 + this.labelStatus.TabIndex = 2;
5.86 + this.labelStatus.Text = "Not connected";
5.87 + //
5.88 + // textBoxVfdTop
5.89 + //
5.90 + this.textBoxVfdTop.Location = new System.Drawing.Point(94, 19);
5.91 + this.textBoxVfdTop.MaxLength = 16;
5.92 + this.textBoxVfdTop.Name = "textBoxVfdTop";
5.93 + this.textBoxVfdTop.Size = new System.Drawing.Size(100, 20);
5.94 + this.textBoxVfdTop.TabIndex = 3;
5.95 + //
5.96 + // textBoxVfdBottom
5.97 + //
5.98 + this.textBoxVfdBottom.Location = new System.Drawing.Point(94, 45);
5.99 + this.textBoxVfdBottom.Name = "textBoxVfdBottom";
5.100 + this.textBoxVfdBottom.Size = new System.Drawing.Size(100, 20);
5.101 + this.textBoxVfdBottom.TabIndex = 4;
5.102 + //
5.103 + // groupBoxVfd
5.104 + //
5.105 + this.groupBoxVfd.Controls.Add(this.label2);
5.106 + this.groupBoxVfd.Controls.Add(this.label1);
5.107 + this.groupBoxVfd.Controls.Add(this.buttonSetVfdText);
5.108 + this.groupBoxVfd.Controls.Add(this.textBoxVfdTop);
5.109 + this.groupBoxVfd.Controls.Add(this.textBoxVfdBottom);
5.110 + this.groupBoxVfd.Location = new System.Drawing.Point(12, 41);
5.111 + this.groupBoxVfd.Name = "groupBoxVfd";
5.112 + this.groupBoxVfd.Size = new System.Drawing.Size(200, 100);
5.113 + this.groupBoxVfd.TabIndex = 5;
5.114 + this.groupBoxVfd.TabStop = false;
5.115 + this.groupBoxVfd.Text = "VFD";
5.116 + //
5.117 + // label2
5.118 + //
5.119 + this.label2.AutoSize = true;
5.120 + this.label2.Location = new System.Drawing.Point(7, 48);
5.121 + this.label2.Name = "label2";
5.122 + this.label2.Size = new System.Drawing.Size(85, 13);
5.123 + this.label2.TabIndex = 7;
5.124 + this.label2.Text = "Text bottom line:";
5.125 + //
5.126 + // label1
5.127 + //
5.128 + this.label1.AutoSize = true;
5.129 + this.label1.Location = new System.Drawing.Point(7, 22);
5.130 + this.label1.Name = "label1";
5.131 + this.label1.Size = new System.Drawing.Size(68, 13);
5.132 + this.label1.TabIndex = 6;
5.133 + this.label1.Text = "Text top line:";
5.134 + //
5.135 + // buttonSetVfdText
5.136 + //
5.137 + this.buttonSetVfdText.Location = new System.Drawing.Point(119, 71);
5.138 + this.buttonSetVfdText.Name = "buttonSetVfdText";
5.139 + this.buttonSetVfdText.Size = new System.Drawing.Size(75, 23);
5.140 + this.buttonSetVfdText.TabIndex = 5;
5.141 + this.buttonSetVfdText.Text = "Update";
5.142 + this.buttonSetVfdText.UseVisualStyleBackColor = true;
5.143 + //
5.144 + // groupBoxLcd
5.145 + //
5.146 + this.groupBoxLcd.Controls.Add(this.textBoxLcd);
5.147 + this.groupBoxLcd.Controls.Add(this.buttonSetLcdText);
5.148 + this.groupBoxLcd.Controls.Add(this.label3);
5.149 + this.groupBoxLcd.Location = new System.Drawing.Point(218, 41);
5.150 + this.groupBoxLcd.Name = "groupBoxLcd";
5.151 + this.groupBoxLcd.Size = new System.Drawing.Size(200, 100);
5.152 + this.groupBoxLcd.TabIndex = 6;
5.153 + this.groupBoxLcd.TabStop = false;
5.154 + this.groupBoxLcd.Text = "LCD";
5.155 + //
5.156 + // textBoxLcd
5.157 + //
5.158 + this.textBoxLcd.Location = new System.Drawing.Point(94, 19);
5.159 + this.textBoxLcd.Name = "textBoxLcd";
5.160 + this.textBoxLcd.Size = new System.Drawing.Size(100, 20);
5.161 + this.textBoxLcd.TabIndex = 2;
5.162 + //
5.163 + // buttonSetLcdText
5.164 + //
5.165 + this.buttonSetLcdText.Location = new System.Drawing.Point(119, 71);
5.166 + this.buttonSetLcdText.Name = "buttonSetLcdText";
5.167 + this.buttonSetLcdText.Size = new System.Drawing.Size(75, 23);
5.168 + this.buttonSetLcdText.TabIndex = 1;
5.169 + this.buttonSetLcdText.Text = "Update";
5.170 + this.buttonSetLcdText.UseVisualStyleBackColor = true;
5.171 + this.buttonSetLcdText.Click += new System.EventHandler(this.buttonSetLcdText_Click);
5.172 + //
5.173 + // label3
5.174 + //
5.175 + this.label3.AutoSize = true;
5.176 + this.label3.Location = new System.Drawing.Point(6, 22);
5.177 + this.label3.Name = "label3";
5.178 + this.label3.Size = new System.Drawing.Size(28, 13);
5.179 + this.label3.TabIndex = 0;
5.180 + this.label3.Text = "Text";
5.181 + //
5.182 + // buttonToggleTimer
5.183 + //
5.184 + this.buttonToggleTimer.Location = new System.Drawing.Point(119, 71);
5.185 + this.buttonToggleTimer.Name = "buttonToggleTimer";
5.186 + this.buttonToggleTimer.Size = new System.Drawing.Size(75, 23);
5.187 + this.buttonToggleTimer.TabIndex = 3;
5.188 + this.buttonToggleTimer.Text = "Start";
5.189 + this.buttonToggleTimer.UseVisualStyleBackColor = true;
5.190 + this.buttonToggleTimer.Click += new System.EventHandler(this.buttonToggleTimer_Click);
5.191 + //
5.192 + // groupBoxTimer
5.193 + //
5.194 + this.groupBoxTimer.Controls.Add(this.checkBoxRandomEq);
5.195 + this.groupBoxTimer.Controls.Add(this.numericTimerInterval);
5.196 + this.groupBoxTimer.Controls.Add(this.label4);
5.197 + this.groupBoxTimer.Controls.Add(this.buttonToggleTimer);
5.198 + this.groupBoxTimer.Location = new System.Drawing.Point(12, 147);
5.199 + this.groupBoxTimer.Name = "groupBoxTimer";
5.200 + this.groupBoxTimer.Size = new System.Drawing.Size(200, 100);
5.201 + this.groupBoxTimer.TabIndex = 7;
5.202 + this.groupBoxTimer.TabStop = false;
5.203 + this.groupBoxTimer.Text = "Timer";
5.204 + //
5.205 + // label4
5.206 + //
5.207 + this.label4.AutoSize = true;
5.208 + this.label4.Location = new System.Drawing.Point(7, 20);
5.209 + this.label4.Name = "label4";
5.210 + this.label4.Size = new System.Drawing.Size(67, 13);
5.211 + this.label4.TabIndex = 4;
5.212 + this.label4.Text = "Interval (ms):";
5.213 + //
5.214 + // numericTimerInterval
5.215 + //
5.216 + this.numericTimerInterval.Location = new System.Drawing.Point(74, 18);
5.217 + this.numericTimerInterval.Maximum = new decimal(new int[] {
5.218 + 10000,
5.219 + 0,
5.220 + 0,
5.221 + 0});
5.222 + this.numericTimerInterval.Minimum = new decimal(new int[] {
5.223 + 1,
5.224 + 0,
5.225 + 0,
5.226 + 0});
5.227 + this.numericTimerInterval.Name = "numericTimerInterval";
5.228 + this.numericTimerInterval.Size = new System.Drawing.Size(120, 20);
5.229 + this.numericTimerInterval.TabIndex = 8;
5.230 + this.numericTimerInterval.Value = new decimal(new int[] {
5.231 + 250,
5.232 + 0,
5.233 + 0,
5.234 + 0});
5.235 + //
5.236 + // checkBoxRandomEq
5.237 + //
5.238 + this.checkBoxRandomEq.AutoSize = true;
5.239 + this.checkBoxRandomEq.Location = new System.Drawing.Point(10, 46);
5.240 + this.checkBoxRandomEq.Name = "checkBoxRandomEq";
5.241 + this.checkBoxRandomEq.Size = new System.Drawing.Size(84, 17);
5.242 + this.checkBoxRandomEq.TabIndex = 9;
5.243 + this.checkBoxRandomEq.Text = "Random EQ";
5.244 + this.checkBoxRandomEq.UseVisualStyleBackColor = true;
5.245 + //
5.246 + // MainForm
5.247 + //
5.248 + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
5.249 + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
5.250 + this.ClientSize = new System.Drawing.Size(741, 454);
5.251 + this.Controls.Add(this.groupBoxTimer);
5.252 + this.Controls.Add(this.groupBoxLcd);
5.253 + this.Controls.Add(this.groupBoxVfd);
5.254 + this.Controls.Add(this.labelStatus);
5.255 + this.Controls.Add(this.buttonUninit);
5.256 + this.Controls.Add(this.buttonInit);
5.257 + this.Name = "MainForm";
5.258 + this.Text = "iMON Display Wrapper test";
5.259 + this.groupBoxVfd.ResumeLayout(false);
5.260 + this.groupBoxVfd.PerformLayout();
5.261 + this.groupBoxLcd.ResumeLayout(false);
5.262 + this.groupBoxLcd.PerformLayout();
5.263 + this.groupBoxTimer.ResumeLayout(false);
5.264 + this.groupBoxTimer.PerformLayout();
5.265 + ((System.ComponentModel.ISupportInitialize)(this.numericTimerInterval)).EndInit();
5.266 + this.ResumeLayout(false);
5.267 + this.PerformLayout();
5.268 +
5.269 + }
5.270 +
5.271 + #endregion
5.272 +
5.273 + private System.Windows.Forms.Button buttonInit;
5.274 + private System.Windows.Forms.Button buttonUninit;
5.275 + private System.Windows.Forms.Label labelStatus;
5.276 + private System.Windows.Forms.TextBox textBoxVfdTop;
5.277 + private System.Windows.Forms.TextBox textBoxVfdBottom;
5.278 + private System.Windows.Forms.GroupBox groupBoxVfd;
5.279 + private System.Windows.Forms.Label label2;
5.280 + private System.Windows.Forms.Label label1;
5.281 + private System.Windows.Forms.Button buttonSetVfdText;
5.282 + private System.Windows.Forms.GroupBox groupBoxLcd;
5.283 + private System.Windows.Forms.TextBox textBoxLcd;
5.284 + private System.Windows.Forms.Button buttonSetLcdText;
5.285 + private System.Windows.Forms.Label label3;
5.286 + private System.Windows.Forms.Button buttonToggleTimer;
5.287 + private System.Windows.Forms.GroupBox groupBoxTimer;
5.288 + private System.Windows.Forms.NumericUpDown numericTimerInterval;
5.289 + private System.Windows.Forms.Label label4;
5.290 + private System.Windows.Forms.CheckBox checkBoxRandomEq;
5.291 + }
5.292 +}
5.293 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/IdwTest/MainForm.cs Mon Apr 21 12:02:38 2014 +0200
6.3 @@ -0,0 +1,106 @@
6.4 +using System;
6.5 +using System.Collections.Generic;
6.6 +using System.ComponentModel;
6.7 +using System.Data;
6.8 +using System.Drawing;
6.9 +using System.Linq;
6.10 +using System.Text;
6.11 +using System.Threading.Tasks;
6.12 +using System.Windows.Forms;
6.13 +using System.Timers;
6.14 +using System.Runtime.InteropServices;
6.15 +
6.16 +namespace IdwTest
6.17 +{
6.18 + public partial class MainForm : Form
6.19 + {
6.20 + iMON.Display iDisplay;
6.21 + System.Timers.Timer iTimer;
6.22 + int iFrameCount = 0;
6.23 +
6.24 + iMON.Display.DSPEQDATA iEqLeft;
6.25 + iMON.Display.DSPEQDATA iEqRight;
6.26 + iMON.Display.DSPEQDATA iEqMono;
6.27 +
6.28 + Random iRandom;
6.29 +
6.30 + public MainForm()
6.31 + {
6.32 + iDisplay = new iMON.Display();
6.33 + InitializeComponent();
6.34 + iTimer = new System.Timers.Timer(500); // Set up the timer for N ms
6.35 + iTimer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
6.36 + iTimer.Enabled = false; // Enable it
6.37 + //
6.38 + iEqLeft =new iMON.Display.DSPEQDATA();
6.39 + iEqRight = new iMON.Display.DSPEQDATA();
6.40 + iEqMono = new iMON.Display.DSPEQDATA();
6.41 + //
6.42 + iRandom = new Random();
6.43 + }
6.44 +
6.45 + private void buttonInit_Click(object sender, EventArgs e)
6.46 + {
6.47 + if (!iDisplay.DoInit())
6.48 + {
6.49 + labelStatus.Text = iDisplay.StatusMessage;
6.50 + }
6.51 + else
6.52 + {
6.53 + labelStatus.Text = iDisplay.Name();
6.54 + }
6.55 + }
6.56 +
6.57 + private void buttonUninit_Click(object sender, EventArgs e)
6.58 + {
6.59 + iDisplay.DoUninit();
6.60 + }
6.61 +
6.62 + private void buttonSetLcdText_Click(object sender, EventArgs e)
6.63 + {
6.64 + iMON.Display.IDW_SetLcdText(textBoxLcd.Text);
6.65 + }
6.66 +
6.67 + private void timer_Elapsed(object sender, ElapsedEventArgs e)
6.68 + {
6.69 + if (iDisplay.IsLcd())
6.70 + {
6.71 + if (!checkBoxRandomEq.Checked)
6.72 + {
6.73 + iMON.Display.IDW_SetLcdText(iFrameCount.ToString());
6.74 + iFrameCount++;
6.75 + }
6.76 + else
6.77 + {
6.78 + for (int i = 0; i < 16; i++)
6.79 + {
6.80 + iEqLeft.BandData[i] = iRandom.Next(0,101);
6.81 + iEqRight.BandData[i] = iRandom.Next(0, 101);
6.82 + }
6.83 +
6.84 + iMON.Display.IDW_SetLcdEqData(iEqLeft, iEqRight);
6.85 + iFrameCount++;
6.86 + }
6.87 + }
6.88 + }
6.89 +
6.90 + private void buttonToggleTimer_Click(object sender, EventArgs e)
6.91 + {
6.92 + if (iTimer.Enabled)
6.93 + {
6.94 + //Stop our timer
6.95 + iTimer.Enabled = false;
6.96 + buttonToggleTimer.Text = "Start";
6.97 + }
6.98 + else
6.99 + {
6.100 + iFrameCount = 0;
6.101 + //Start our timer
6.102 + iTimer.Interval = (double)numericTimerInterval.Value;
6.103 + iTimer.Enabled = true;
6.104 + buttonToggleTimer.Text = "Stop";
6.105 + }
6.106 + }
6.107 +
6.108 + }
6.109 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/IdwTest/MainForm.resx Mon Apr 21 12:02:38 2014 +0200
7.3 @@ -0,0 +1,120 @@
7.4 +<?xml version="1.0" encoding="utf-8"?>
7.5 +<root>
7.6 + <!--
7.7 + Microsoft ResX Schema
7.8 +
7.9 + Version 2.0
7.10 +
7.11 + The primary goals of this format is to allow a simple XML format
7.12 + that is mostly human readable. The generation and parsing of the
7.13 + various data types are done through the TypeConverter classes
7.14 + associated with the data types.
7.15 +
7.16 + Example:
7.17 +
7.18 + ... ado.net/XML headers & schema ...
7.19 + <resheader name="resmimetype">text/microsoft-resx</resheader>
7.20 + <resheader name="version">2.0</resheader>
7.21 + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
7.22 + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
7.23 + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
7.24 + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
7.25 + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
7.26 + <value>[base64 mime encoded serialized .NET Framework object]</value>
7.27 + </data>
7.28 + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
7.29 + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
7.30 + <comment>This is a comment</comment>
7.31 + </data>
7.32 +
7.33 + There are any number of "resheader" rows that contain simple
7.34 + name/value pairs.
7.35 +
7.36 + Each data row contains a name, and value. The row also contains a
7.37 + type or mimetype. Type corresponds to a .NET class that support
7.38 + text/value conversion through the TypeConverter architecture.
7.39 + Classes that don't support this are serialized and stored with the
7.40 + mimetype set.
7.41 +
7.42 + The mimetype is used for serialized objects, and tells the
7.43 + ResXResourceReader how to depersist the object. This is currently not
7.44 + extensible. For a given mimetype the value must be set accordingly:
7.45 +
7.46 + Note - application/x-microsoft.net.object.binary.base64 is the format
7.47 + that the ResXResourceWriter will generate, however the reader can
7.48 + read any of the formats listed below.
7.49 +
7.50 + mimetype: application/x-microsoft.net.object.binary.base64
7.51 + value : The object must be serialized with
7.52 + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
7.53 + : and then encoded with base64 encoding.
7.54 +
7.55 + mimetype: application/x-microsoft.net.object.soap.base64
7.56 + value : The object must be serialized with
7.57 + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
7.58 + : and then encoded with base64 encoding.
7.59 +
7.60 + mimetype: application/x-microsoft.net.object.bytearray.base64
7.61 + value : The object must be serialized into a byte array
7.62 + : using a System.ComponentModel.TypeConverter
7.63 + : and then encoded with base64 encoding.
7.64 + -->
7.65 + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
7.66 + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
7.67 + <xsd:element name="root" msdata:IsDataSet="true">
7.68 + <xsd:complexType>
7.69 + <xsd:choice maxOccurs="unbounded">
7.70 + <xsd:element name="metadata">
7.71 + <xsd:complexType>
7.72 + <xsd:sequence>
7.73 + <xsd:element name="value" type="xsd:string" minOccurs="0" />
7.74 + </xsd:sequence>
7.75 + <xsd:attribute name="name" use="required" type="xsd:string" />
7.76 + <xsd:attribute name="type" type="xsd:string" />
7.77 + <xsd:attribute name="mimetype" type="xsd:string" />
7.78 + <xsd:attribute ref="xml:space" />
7.79 + </xsd:complexType>
7.80 + </xsd:element>
7.81 + <xsd:element name="assembly">
7.82 + <xsd:complexType>
7.83 + <xsd:attribute name="alias" type="xsd:string" />
7.84 + <xsd:attribute name="name" type="xsd:string" />
7.85 + </xsd:complexType>
7.86 + </xsd:element>
7.87 + <xsd:element name="data">
7.88 + <xsd:complexType>
7.89 + <xsd:sequence>
7.90 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
7.91 + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
7.92 + </xsd:sequence>
7.93 + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
7.94 + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
7.95 + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
7.96 + <xsd:attribute ref="xml:space" />
7.97 + </xsd:complexType>
7.98 + </xsd:element>
7.99 + <xsd:element name="resheader">
7.100 + <xsd:complexType>
7.101 + <xsd:sequence>
7.102 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
7.103 + </xsd:sequence>
7.104 + <xsd:attribute name="name" type="xsd:string" use="required" />
7.105 + </xsd:complexType>
7.106 + </xsd:element>
7.107 + </xsd:choice>
7.108 + </xsd:complexType>
7.109 + </xsd:element>
7.110 + </xsd:schema>
7.111 + <resheader name="resmimetype">
7.112 + <value>text/microsoft-resx</value>
7.113 + </resheader>
7.114 + <resheader name="version">
7.115 + <value>2.0</value>
7.116 + </resheader>
7.117 + <resheader name="reader">
7.118 + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
7.119 + </resheader>
7.120 + <resheader name="writer">
7.121 + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
7.122 + </resheader>
7.123 +</root>
7.124 \ No newline at end of file
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/IdwTest/Program.cs Mon Apr 21 12:02:38 2014 +0200
8.3 @@ -0,0 +1,23 @@
8.4 +using System;
8.5 +using System.Collections.Generic;
8.6 +using System.Linq;
8.7 +using System.Threading.Tasks;
8.8 +using System.Windows.Forms;
8.9 +
8.10 +namespace IdwTest
8.11 +{
8.12 + static class Program
8.13 + {
8.14 + /// <summary>
8.15 + /// The main entry point for the application.
8.16 + /// </summary>
8.17 + [STAThread]
8.18 + static void Main()
8.19 + {
8.20 + Application.EnableVisualStyles();
8.21 + Application.SetCompatibleTextRenderingDefault(false);
8.22 + Application.Run(new MainForm());
8.23 + }
8.24 + }
8.25 +
8.26 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/IdwTest/Properties/AssemblyInfo.cs Mon Apr 21 12:02:38 2014 +0200
9.3 @@ -0,0 +1,36 @@
9.4 +using System.Reflection;
9.5 +using System.Runtime.CompilerServices;
9.6 +using System.Runtime.InteropServices;
9.7 +
9.8 +// General Information about an assembly is controlled through the following
9.9 +// set of attributes. Change these attribute values to modify the information
9.10 +// associated with an assembly.
9.11 +[assembly: AssemblyTitle("IdwTest")]
9.12 +[assembly: AssemblyDescription("")]
9.13 +[assembly: AssemblyConfiguration("")]
9.14 +[assembly: AssemblyCompany("")]
9.15 +[assembly: AssemblyProduct("IdwTest")]
9.16 +[assembly: AssemblyCopyright("Copyright © 2014")]
9.17 +[assembly: AssemblyTrademark("")]
9.18 +[assembly: AssemblyCulture("")]
9.19 +
9.20 +// Setting ComVisible to false makes the types in this assembly not visible
9.21 +// to COM components. If you need to access a type in this assembly from
9.22 +// COM, set the ComVisible attribute to true on that type.
9.23 +[assembly: ComVisible(false)]
9.24 +
9.25 +// The following GUID is for the ID of the typelib if this project is exposed to COM
9.26 +[assembly: Guid("6f39d385-7aa6-4675-af66-10a9cb0768d8")]
9.27 +
9.28 +// Version information for an assembly consists of the following four values:
9.29 +//
9.30 +// Major Version
9.31 +// Minor Version
9.32 +// Build Number
9.33 +// Revision
9.34 +//
9.35 +// You can specify all the values or you can default the Build and Revision Numbers
9.36 +// by using the '*' as shown below:
9.37 +// [assembly: AssemblyVersion("1.0.*")]
9.38 +[assembly: AssemblyVersion("1.0.0.0")]
9.39 +[assembly: AssemblyFileVersion("1.0.0.0")]
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/IdwTest/Properties/Resources.Designer.cs Mon Apr 21 12:02:38 2014 +0200
10.3 @@ -0,0 +1,71 @@
10.4 +//------------------------------------------------------------------------------
10.5 +// <auto-generated>
10.6 +// This code was generated by a tool.
10.7 +// Runtime Version:4.0.30319.18444
10.8 +//
10.9 +// Changes to this file may cause incorrect behavior and will be lost if
10.10 +// the code is regenerated.
10.11 +// </auto-generated>
10.12 +//------------------------------------------------------------------------------
10.13 +
10.14 +namespace IdwTest.Properties
10.15 +{
10.16 +
10.17 +
10.18 + /// <summary>
10.19 + /// A strongly-typed resource class, for looking up localized strings, etc.
10.20 + /// </summary>
10.21 + // This class was auto-generated by the StronglyTypedResourceBuilder
10.22 + // class via a tool like ResGen or Visual Studio.
10.23 + // To add or remove a member, edit your .ResX file then rerun ResGen
10.24 + // with the /str option, or rebuild your VS project.
10.25 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
10.26 + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
10.27 + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
10.28 + internal class Resources
10.29 + {
10.30 +
10.31 + private static global::System.Resources.ResourceManager resourceMan;
10.32 +
10.33 + private static global::System.Globalization.CultureInfo resourceCulture;
10.34 +
10.35 + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
10.36 + internal Resources()
10.37 + {
10.38 + }
10.39 +
10.40 + /// <summary>
10.41 + /// Returns the cached ResourceManager instance used by this class.
10.42 + /// </summary>
10.43 + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
10.44 + internal static global::System.Resources.ResourceManager ResourceManager
10.45 + {
10.46 + get
10.47 + {
10.48 + if ((resourceMan == null))
10.49 + {
10.50 + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IdwTest.Properties.Resources", typeof(Resources).Assembly);
10.51 + resourceMan = temp;
10.52 + }
10.53 + return resourceMan;
10.54 + }
10.55 + }
10.56 +
10.57 + /// <summary>
10.58 + /// Overrides the current thread's CurrentUICulture property for all
10.59 + /// resource lookups using this strongly typed resource class.
10.60 + /// </summary>
10.61 + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
10.62 + internal static global::System.Globalization.CultureInfo Culture
10.63 + {
10.64 + get
10.65 + {
10.66 + return resourceCulture;
10.67 + }
10.68 + set
10.69 + {
10.70 + resourceCulture = value;
10.71 + }
10.72 + }
10.73 + }
10.74 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/IdwTest/Properties/Resources.resx Mon Apr 21 12:02:38 2014 +0200
11.3 @@ -0,0 +1,117 @@
11.4 +<?xml version="1.0" encoding="utf-8"?>
11.5 +<root>
11.6 + <!--
11.7 + Microsoft ResX Schema
11.8 +
11.9 + Version 2.0
11.10 +
11.11 + The primary goals of this format is to allow a simple XML format
11.12 + that is mostly human readable. The generation and parsing of the
11.13 + various data types are done through the TypeConverter classes
11.14 + associated with the data types.
11.15 +
11.16 + Example:
11.17 +
11.18 + ... ado.net/XML headers & schema ...
11.19 + <resheader name="resmimetype">text/microsoft-resx</resheader>
11.20 + <resheader name="version">2.0</resheader>
11.21 + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
11.22 + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
11.23 + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
11.24 + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
11.25 + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
11.26 + <value>[base64 mime encoded serialized .NET Framework object]</value>
11.27 + </data>
11.28 + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
11.29 + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
11.30 + <comment>This is a comment</comment>
11.31 + </data>
11.32 +
11.33 + There are any number of "resheader" rows that contain simple
11.34 + name/value pairs.
11.35 +
11.36 + Each data row contains a name, and value. The row also contains a
11.37 + type or mimetype. Type corresponds to a .NET class that support
11.38 + text/value conversion through the TypeConverter architecture.
11.39 + Classes that don't support this are serialized and stored with the
11.40 + mimetype set.
11.41 +
11.42 + The mimetype is used for serialized objects, and tells the
11.43 + ResXResourceReader how to depersist the object. This is currently not
11.44 + extensible. For a given mimetype the value must be set accordingly:
11.45 +
11.46 + Note - application/x-microsoft.net.object.binary.base64 is the format
11.47 + that the ResXResourceWriter will generate, however the reader can
11.48 + read any of the formats listed below.
11.49 +
11.50 + mimetype: application/x-microsoft.net.object.binary.base64
11.51 + value : The object must be serialized with
11.52 + : System.Serialization.Formatters.Binary.BinaryFormatter
11.53 + : and then encoded with base64 encoding.
11.54 +
11.55 + mimetype: application/x-microsoft.net.object.soap.base64
11.56 + value : The object must be serialized with
11.57 + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
11.58 + : and then encoded with base64 encoding.
11.59 +
11.60 + mimetype: application/x-microsoft.net.object.bytearray.base64
11.61 + value : The object must be serialized into a byte array
11.62 + : using a System.ComponentModel.TypeConverter
11.63 + : and then encoded with base64 encoding.
11.64 + -->
11.65 + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
11.66 + <xsd:element name="root" msdata:IsDataSet="true">
11.67 + <xsd:complexType>
11.68 + <xsd:choice maxOccurs="unbounded">
11.69 + <xsd:element name="metadata">
11.70 + <xsd:complexType>
11.71 + <xsd:sequence>
11.72 + <xsd:element name="value" type="xsd:string" minOccurs="0" />
11.73 + </xsd:sequence>
11.74 + <xsd:attribute name="name" type="xsd:string" />
11.75 + <xsd:attribute name="type" type="xsd:string" />
11.76 + <xsd:attribute name="mimetype" type="xsd:string" />
11.77 + </xsd:complexType>
11.78 + </xsd:element>
11.79 + <xsd:element name="assembly">
11.80 + <xsd:complexType>
11.81 + <xsd:attribute name="alias" type="xsd:string" />
11.82 + <xsd:attribute name="name" type="xsd:string" />
11.83 + </xsd:complexType>
11.84 + </xsd:element>
11.85 + <xsd:element name="data">
11.86 + <xsd:complexType>
11.87 + <xsd:sequence>
11.88 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
11.89 + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
11.90 + </xsd:sequence>
11.91 + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
11.92 + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
11.93 + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
11.94 + </xsd:complexType>
11.95 + </xsd:element>
11.96 + <xsd:element name="resheader">
11.97 + <xsd:complexType>
11.98 + <xsd:sequence>
11.99 + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
11.100 + </xsd:sequence>
11.101 + <xsd:attribute name="name" type="xsd:string" use="required" />
11.102 + </xsd:complexType>
11.103 + </xsd:element>
11.104 + </xsd:choice>
11.105 + </xsd:complexType>
11.106 + </xsd:element>
11.107 + </xsd:schema>
11.108 + <resheader name="resmimetype">
11.109 + <value>text/microsoft-resx</value>
11.110 + </resheader>
11.111 + <resheader name="version">
11.112 + <value>2.0</value>
11.113 + </resheader>
11.114 + <resheader name="reader">
11.115 + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
11.116 + </resheader>
11.117 + <resheader name="writer">
11.118 + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
11.119 + </resheader>
11.120 +</root>
11.121 \ No newline at end of file
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/IdwTest/Properties/Settings.Designer.cs Mon Apr 21 12:02:38 2014 +0200
12.3 @@ -0,0 +1,30 @@
12.4 +//------------------------------------------------------------------------------
12.5 +// <auto-generated>
12.6 +// This code was generated by a tool.
12.7 +// Runtime Version:4.0.30319.18444
12.8 +//
12.9 +// Changes to this file may cause incorrect behavior and will be lost if
12.10 +// the code is regenerated.
12.11 +// </auto-generated>
12.12 +//------------------------------------------------------------------------------
12.13 +
12.14 +namespace IdwTest.Properties
12.15 +{
12.16 +
12.17 +
12.18 + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
12.19 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
12.20 + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
12.21 + {
12.22 +
12.23 + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
12.24 +
12.25 + public static Settings Default
12.26 + {
12.27 + get
12.28 + {
12.29 + return defaultInstance;
12.30 + }
12.31 + }
12.32 + }
12.33 +}
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/IdwTest/Properties/Settings.settings Mon Apr 21 12:02:38 2014 +0200
13.3 @@ -0,0 +1,7 @@
13.4 +<?xml version='1.0' encoding='utf-8'?>
13.5 +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
13.6 + <Profiles>
13.7 + <Profile Name="(Default)" />
13.8 + </Profiles>
13.9 + <Settings />
13.10 +</SettingsFile>