home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / CMCD1104.ISO / Software / Shareware / Programare / skincraft / SkinCrafter_v1.4.12_Demo.msi / _49E29CB9A65AABBF653C1037E1AA74B6 / _E5EE402B953F4E06BD0775DB24546651 < prev    next >
Encoding:
Text File  |  2004-09-16  |  33.6 KB  |  821 lines

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7. using SKINCRAFTERLib;
  8. using Microsoft.Win32;
  9. using System.IO;
  10.  
  11.  
  12.  
  13. namespace WindowsApplication1
  14. {
  15.     /// <summary>
  16.     /// Summary description for Form1.
  17.     /// </summary>
  18.     ///
  19.  
  20.     public class Form1 : System.Windows.Forms.Form
  21.     {
  22.         private System.Windows.Forms.MainMenu mainMenu1;
  23.         private System.Windows.Forms.MenuItem menuItem1;
  24.         private System.Windows.Forms.MenuItem menuItem2;
  25.         private System.Windows.Forms.MenuItem menuItem3;
  26.         private System.Windows.Forms.MenuItem menuItem4;
  27.         private System.Windows.Forms.TextBox textBox1;
  28.         private System.Windows.Forms.Label label1;
  29.         private System.Windows.Forms.GroupBox groupBox1;
  30.         private System.Windows.Forms.CheckBox checkBox1;
  31.         private System.Windows.Forms.RadioButton radioButton1;
  32.         private System.Windows.Forms.ListView listView1;
  33.         private System.Windows.Forms.TreeView treeView1;
  34.         private System.Windows.Forms.VScrollBar vScrollBar1;
  35.         private System.Windows.Forms.ListBox listBox1;
  36.         private System.Windows.Forms.ComboBox comboBox1;
  37.         private System.Windows.Forms.HScrollBar hScrollBar1;
  38.         private System.Windows.Forms.MenuItem menuItem5;
  39.         private System.Windows.Forms.OpenFileDialog openFileDialog1;
  40.         
  41.         public SKINCRAFTERLib.SCSkinClass SkinOb;
  42.         public System.Drawing.Bitmap mBitmap;
  43.         public System.Drawing.Image mImage;
  44.         public System.Windows.Forms.FolderBrowserDialog foldDial;
  45.         public Microsoft.Win32.Registry regist;
  46.  
  47.         private System.Windows.Forms.ComboBox comboBox2;
  48.         private System.Windows.Forms.TabControl tabControl1;
  49.         private System.Windows.Forms.TabPage tabPage1;
  50.         private System.Windows.Forms.TabPage tabPage2;
  51.         private System.Windows.Forms.TabPage tabPage3;
  52.         private System.Windows.Forms.TabPage tabPage4;
  53.         private System.Windows.Forms.TabPage tabPage5;
  54.         private System.Windows.Forms.RadioButton radioButton2;
  55.         private System.Windows.Forms.CheckBox checkBox2;
  56.         private System.Windows.Forms.TextBox textBox3;
  57.         private System.Windows.Forms.ProgressBar progressBar1;
  58.         private System.Windows.Forms.TrackBar trackBar1;
  59.         private System.Windows.Forms.ComboBox comboBox3;
  60.         private System.Windows.Forms.PictureBox pictureBox1;
  61.         private System.Windows.Forms.Button button1;
  62.         private System.Windows.Forms.Button button2;
  63.         private System.Windows.Forms.Label label2;
  64.         private System.Windows.Forms.Label label3;
  65.         private System.Windows.Forms.Button button3;
  66.         private System.Windows.Forms.GroupBox groupBox2;
  67.         private System.Windows.Forms.Button button4;
  68.  
  69.         private System.String SkinFolder;
  70.         private System.Windows.Forms.TextBox textBoxSkinPath;
  71.         private System.Windows.Forms.ComboBox comboBoxSkins;
  72.         /// <summary>
  73.         /// Required designer variable.
  74.         /// </summary>
  75.         private System.ComponentModel.Container components = null;
  76.  
  77.         public Form1()
  78.         {
  79.             //
  80.             // Required for Windows Form Designer support
  81.             //
  82.             InitializeComponent();
  83.  
  84.             //
  85.             // TODO: Add any constructor code after InitializeComponent call
  86.             //
  87.         }
  88.  
  89.         /// <summary>
  90.         /// Clean up any resources being used.
  91.         /// </summary>
  92.         protected override void Dispose( bool disposing )
  93.         {
  94.             if( disposing )
  95.             {
  96.                 if (components != null) 
  97.                 {
  98.                     components.Dispose();
  99.                 }
  100.             }
  101.             base.Dispose( disposing );
  102.         }
  103.  
  104.         #region Windows Form Designer generated code
  105.         /// <summary>
  106.         /// Required method for Designer support - do not modify
  107.         /// the contents of this method with the code editor.
  108.         /// </summary>
  109.         private void InitializeComponent()
  110.         {
  111.             System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
  112.                                                                                                                      "Skincrafter0"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  113.             System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
  114.                                                                                                                      "Skincrafter1"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  115.             System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(new string[] {
  116.                                                                                                                      "Skincrafter2"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  117.             System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem(new string[] {
  118.                                                                                                                      "Skincrafter3"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  119.             System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem(new string[] {
  120.                                                                                                                      "Skincrafter4"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  121.             System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem(new string[] {
  122.                                                                                                                      "Skincrafter5"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  123.             System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem(new string[] {
  124.                                                                                                                      "Skincrafter6"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  125.             System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem(new string[] {
  126.                                                                                                                      "Skincrafter7"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  127.             System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem(new string[] {
  128.                                                                                                                      "Skincrafter8"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  129.             System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem(new string[] {
  130.                                                                                                                       "Skincrafter9"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  131.             System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem(new string[] {
  132.                                                                                                                       "Skincrafter10"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  133.             System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem(new string[] {
  134.                                                                                                                       "Skincrafter11"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  135.             System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem(new string[] {
  136.                                                                                                                       "Skincrafter12"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  137.             System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem(new string[] {
  138.                                                                                                                       "Skincrafter13"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  139.             System.Windows.Forms.ListViewItem listViewItem15 = new System.Windows.Forms.ListViewItem(new string[] {
  140.                                                                                                                       "Skincrafter14"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))));
  141.             System.Windows.Forms.ListViewItem listViewItem16 = new System.Windows.Forms.ListViewItem("Skincrafter15");
  142.             System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem("Skincrafter16");
  143.             System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("Skincrafter17");
  144.             System.Windows.Forms.ListViewItem listViewItem19 = new System.Windows.Forms.ListViewItem("Skincrafter18");
  145.             System.Windows.Forms.ListViewItem listViewItem20 = new System.Windows.Forms.ListViewItem("Skincrafter19");
  146.             System.Windows.Forms.ListViewItem listViewItem21 = new System.Windows.Forms.ListViewItem("Skincrafter20");
  147.             System.Windows.Forms.ListViewItem listViewItem22 = new System.Windows.Forms.ListViewItem("Skincrafter21");
  148.             System.Windows.Forms.ListViewItem listViewItem23 = new System.Windows.Forms.ListViewItem("Skincrafter22");
  149.             System.Windows.Forms.ListViewItem listViewItem24 = new System.Windows.Forms.ListViewItem("Skincrafter23");
  150.             System.Windows.Forms.ListViewItem listViewItem25 = new System.Windows.Forms.ListViewItem("Skincrafter24");
  151.             System.Windows.Forms.ListViewItem listViewItem26 = new System.Windows.Forms.ListViewItem("Skincrafter25");
  152.             System.Windows.Forms.ListViewItem listViewItem27 = new System.Windows.Forms.ListViewItem("Skincrafter26");
  153.             System.Windows.Forms.ListViewItem listViewItem28 = new System.Windows.Forms.ListViewItem("Skincrafter27");
  154.             System.Windows.Forms.ListViewItem listViewItem29 = new System.Windows.Forms.ListViewItem("Skincrafter28");
  155.             System.Windows.Forms.ListViewItem listViewItem30 = new System.Windows.Forms.ListViewItem("Skincrafter29");
  156.             System.Windows.Forms.ListViewItem listViewItem31 = new System.Windows.Forms.ListViewItem("Skincrafter30");
  157.             System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
  158.             this.mainMenu1 = new System.Windows.Forms.MainMenu();
  159.             this.menuItem1 = new System.Windows.Forms.MenuItem();
  160.             this.menuItem2 = new System.Windows.Forms.MenuItem();
  161.             this.menuItem5 = new System.Windows.Forms.MenuItem();
  162.             this.menuItem3 = new System.Windows.Forms.MenuItem();
  163.             this.menuItem4 = new System.Windows.Forms.MenuItem();
  164.             this.textBox1 = new System.Windows.Forms.TextBox();
  165.             this.label1 = new System.Windows.Forms.Label();
  166.             this.groupBox1 = new System.Windows.Forms.GroupBox();
  167.             this.checkBox2 = new System.Windows.Forms.CheckBox();
  168.             this.radioButton2 = new System.Windows.Forms.RadioButton();
  169.             this.radioButton1 = new System.Windows.Forms.RadioButton();
  170.             this.checkBox1 = new System.Windows.Forms.CheckBox();
  171.             this.listView1 = new System.Windows.Forms.ListView();
  172.             this.treeView1 = new System.Windows.Forms.TreeView();
  173.             this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
  174.             this.listBox1 = new System.Windows.Forms.ListBox();
  175.             this.comboBox1 = new System.Windows.Forms.ComboBox();
  176.             this.hScrollBar1 = new System.Windows.Forms.HScrollBar();
  177.             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
  178.             this.comboBox2 = new System.Windows.Forms.ComboBox();
  179.             this.tabControl1 = new System.Windows.Forms.TabControl();
  180.             this.tabPage1 = new System.Windows.Forms.TabPage();
  181.             this.textBox3 = new System.Windows.Forms.TextBox();
  182.             this.tabPage2 = new System.Windows.Forms.TabPage();
  183.             this.tabPage3 = new System.Windows.Forms.TabPage();
  184.             this.pictureBox1 = new System.Windows.Forms.PictureBox();
  185.             this.tabPage4 = new System.Windows.Forms.TabPage();
  186.             this.label3 = new System.Windows.Forms.Label();
  187.             this.label2 = new System.Windows.Forms.Label();
  188.             this.tabPage5 = new System.Windows.Forms.TabPage();
  189.             this.progressBar1 = new System.Windows.Forms.ProgressBar();
  190.             this.trackBar1 = new System.Windows.Forms.TrackBar();
  191.             this.comboBox3 = new System.Windows.Forms.ComboBox();
  192.             this.button1 = new System.Windows.Forms.Button();
  193.             this.button2 = new System.Windows.Forms.Button();
  194.             this.button3 = new System.Windows.Forms.Button();
  195.             this.groupBox2 = new System.Windows.Forms.GroupBox();
  196.             this.button4 = new System.Windows.Forms.Button();
  197.             this.textBoxSkinPath = new System.Windows.Forms.TextBox();
  198.             this.comboBoxSkins = new System.Windows.Forms.ComboBox();
  199.             this.groupBox1.SuspendLayout();
  200.             this.tabControl1.SuspendLayout();
  201.             this.tabPage1.SuspendLayout();
  202.             this.tabPage2.SuspendLayout();
  203.             this.tabPage3.SuspendLayout();
  204.             this.tabPage4.SuspendLayout();
  205.             ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
  206.             this.groupBox2.SuspendLayout();
  207.             this.SuspendLayout();
  208.             // 
  209.             // mainMenu1
  210.             // 
  211.             this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  212.                                                                                       this.menuItem1,
  213.                                                                                       this.menuItem3});
  214.             // 
  215.             // menuItem1
  216.             // 
  217.             this.menuItem1.Index = 0;
  218.             this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  219.                                                                                       this.menuItem2,
  220.                                                                                       this.menuItem5});
  221.             this.menuItem1.Text = "File";
  222.             this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
  223.             // 
  224.             // menuItem2
  225.             // 
  226.             this.menuItem2.Index = 0;
  227.             this.menuItem2.Text = "Open";
  228.             this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
  229.             // 
  230.             // menuItem5
  231.             // 
  232.             this.menuItem5.Index = 1;
  233.             this.menuItem5.Text = "Exit";
  234.             this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
  235.             // 
  236.             // menuItem3
  237.             // 
  238.             this.menuItem3.Index = 1;
  239.             this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  240.                                                                                       this.menuItem4});
  241.             this.menuItem3.Text = "Help";
  242.             // 
  243.             // menuItem4
  244.             // 
  245.             this.menuItem4.Index = 0;
  246.             this.menuItem4.Text = "About";
  247.             this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
  248.             // 
  249.             // textBox1
  250.             // 
  251.             this.textBox1.Location = new System.Drawing.Point(64, 8);
  252.             this.textBox1.Name = "textBox1";
  253.             this.textBox1.Size = new System.Drawing.Size(136, 20);
  254.             this.textBox1.TabIndex = 1;
  255.             this.textBox1.Text = "textBox1";
  256.             // 
  257.             // label1
  258.             // 
  259.             this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
  260.             this.label1.Location = new System.Drawing.Point(8, 8);
  261.             this.label1.Name = "label1";
  262.             this.label1.Size = new System.Drawing.Size(48, 16);
  263.             this.label1.TabIndex = 2;
  264.             this.label1.Text = "Label";
  265.             // 
  266.             // groupBox1
  267.             // 
  268.             this.groupBox1.Controls.Add(this.checkBox2);
  269.             this.groupBox1.Controls.Add(this.radioButton2);
  270.             this.groupBox1.Controls.Add(this.radioButton1);
  271.             this.groupBox1.Controls.Add(this.checkBox1);
  272.             this.groupBox1.Location = new System.Drawing.Point(8, 32);
  273.             this.groupBox1.Name = "groupBox1";
  274.             this.groupBox1.Size = new System.Drawing.Size(192, 64);
  275.             this.groupBox1.TabIndex = 3;
  276.             this.groupBox1.TabStop = false;
  277.             this.groupBox1.Text = "RadioButton";
  278.             // 
  279.             // checkBox2
  280.             // 
  281.             this.checkBox2.Location = new System.Drawing.Point(8, 40);
  282.             this.checkBox2.Name = "checkBox2";
  283.             this.checkBox2.Size = new System.Drawing.Size(80, 16);
  284.             this.checkBox2.TabIndex = 3;
  285.             this.checkBox2.Text = "checkBox2";
  286.             // 
  287.             // radioButton2
  288.             // 
  289.             this.radioButton2.Location = new System.Drawing.Point(96, 16);
  290.             this.radioButton2.Name = "radioButton2";
  291.             this.radioButton2.Size = new System.Drawing.Size(88, 16);
  292.             this.radioButton2.TabIndex = 2;
  293.             this.radioButton2.Text = "radioButton2";
  294.             // 
  295.             // radioButton1
  296.             // 
  297.             this.radioButton1.Location = new System.Drawing.Point(96, 40);
  298.             this.radioButton1.Name = "radioButton1";
  299.             this.radioButton1.Size = new System.Drawing.Size(88, 16);
  300.             this.radioButton1.TabIndex = 1;
  301.             this.radioButton1.Text = "radioButton1";
  302.             // 
  303.             // checkBox1
  304.             // 
  305.             this.checkBox1.Location = new System.Drawing.Point(8, 16);
  306.             this.checkBox1.Name = "checkBox1";
  307.             this.checkBox1.Size = new System.Drawing.Size(88, 16);
  308.             this.checkBox1.TabIndex = 0;
  309.             this.checkBox1.Text = "checkBox1";
  310.             // 
  311.             // listView1
  312.             // 
  313.             this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
  314.                                                                                       listViewItem1,
  315.                                                                                       listViewItem2,
  316.                                                                                       listViewItem3,
  317.                                                                                       listViewItem4,
  318.                                                                                       listViewItem5,
  319.                                                                                       listViewItem6,
  320.                                                                                       listViewItem7,
  321.                                                                                       listViewItem8,
  322.                                                                                       listViewItem9,
  323.                                                                                       listViewItem10,
  324.                                                                                       listViewItem11,
  325.                                                                                       listViewItem12,
  326.                                                                                       listViewItem13,
  327.                                                                                       listViewItem14,
  328.                                                                                       listViewItem15,
  329.                                                                                       listViewItem16,
  330.                                                                                       listViewItem17,
  331.                                                                                       listViewItem18,
  332.                                                                                       listViewItem19,
  333.                                                                                       listViewItem20,
  334.                                                                                       listViewItem21,
  335.                                                                                       listViewItem22,
  336.                                                                                       listViewItem23,
  337.                                                                                       listViewItem24,
  338.                                                                                       listViewItem25,
  339.                                                                                       listViewItem26,
  340.                                                                                       listViewItem27,
  341.                                                                                       listViewItem28,
  342.                                                                                       listViewItem29,
  343.                                                                                       listViewItem30,
  344.                                                                                       listViewItem31});
  345.             this.listView1.Location = new System.Drawing.Point(8, 8);
  346.             this.listView1.Name = "listView1";
  347.             this.listView1.Size = new System.Drawing.Size(328, 144);
  348.             this.listView1.TabIndex = 4;
  349.             this.listView1.View = System.Windows.Forms.View.List;
  350.             // 
  351.             // treeView1
  352.             // 
  353.             this.treeView1.ImageIndex = -1;
  354.             this.treeView1.Location = new System.Drawing.Point(8, 104);
  355.             this.treeView1.Name = "treeView1";
  356.             this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
  357.                                                                                   new System.Windows.Forms.TreeNode("Scincrafter 0", new System.Windows.Forms.TreeNode[] {
  358.                                                                                                                                                                              new System.Windows.Forms.TreeNode("Skincrafter 1")}),
  359.                                                                                   new System.Windows.Forms.TreeNode("Skincrafter 1", new System.Windows.Forms.TreeNode[] {
  360.                                                                                                                                                                              new System.Windows.Forms.TreeNode("Skincrafter 2")})});
  361.             this.treeView1.SelectedImageIndex = -1;
  362.             this.treeView1.Size = new System.Drawing.Size(112, 96);
  363.             this.treeView1.TabIndex = 5;
  364.             // 
  365.             // vScrollBar1
  366.             // 
  367.             this.vScrollBar1.Location = new System.Drawing.Point(128, 104);
  368.             this.vScrollBar1.Name = "vScrollBar1";
  369.             this.vScrollBar1.Size = new System.Drawing.Size(16, 96);
  370.             this.vScrollBar1.TabIndex = 6;
  371.             // 
  372.             // listBox1
  373.             // 
  374.             this.listBox1.Items.AddRange(new object[] {
  375.                                                           "SkinCrafter 0",
  376.                                                           "SkinCrafter 1",
  377.                                                           "SkinCrafter 2",
  378.                                                           "SkinCrafter 3",
  379.                                                           "SkinCrafter 4",
  380.                                                           "SkinCrafter 5",
  381.                                                           "SkinCrafter 6",
  382.                                                           "SkinCrafter 7",
  383.                                                           "SkinCrafter 8",
  384.                                                           "SkinCrafter 9",
  385.                                                           "SkinCrafter 10",
  386.                                                           "SkinCrafter 11",
  387.                                                           "SkinCrafter 12",
  388.                                                           "SkinCrafter 13",
  389.                                                           "SkinCrafter 14",
  390.                                                           "SkinCrafter 15"});
  391.             this.listBox1.Location = new System.Drawing.Point(208, 8);
  392.             this.listBox1.Name = "listBox1";
  393.             this.listBox1.Size = new System.Drawing.Size(144, 82);
  394.             this.listBox1.TabIndex = 8;
  395.             // 
  396.             // comboBox1
  397.             // 
  398.             this.comboBox1.Items.AddRange(new object[] {
  399.                                                            "SkinCrafter 0",
  400.                                                            "SkinCrafter 1",
  401.                                                            "SkinCrafter 2",
  402.                                                            "SkinCrafter 3",
  403.                                                            "SkinCrafter 4",
  404.                                                            "SkinCrafter 5",
  405.                                                            "SkinCrafter 6",
  406.                                                            "SkinCrafter 7",
  407.                                                            "SkinCrafter 8",
  408.                                                            "SkinCrafter 9",
  409.                                                            "SkinCrafter 10"});
  410.             this.comboBox1.Location = new System.Drawing.Point(152, 104);
  411.             this.comboBox1.Name = "comboBox1";
  412.             this.comboBox1.Size = new System.Drawing.Size(96, 21);
  413.             this.comboBox1.TabIndex = 9;
  414.             this.comboBox1.Text = "comboBox1";
  415.             // 
  416.             // hScrollBar1
  417.             // 
  418.             this.hScrollBar1.Location = new System.Drawing.Point(256, 264);
  419.             this.hScrollBar1.Name = "hScrollBar1";
  420.             this.hScrollBar1.Size = new System.Drawing.Size(96, 16);
  421.             this.hScrollBar1.TabIndex = 10;
  422.             this.hScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar1_Scroll);
  423.             // 
  424.             // openFileDialog1
  425.             // 
  426.             this.openFileDialog1.Filter = "SkinCrafter files (*.skf)|*.skf";
  427.             // 
  428.             // comboBox2
  429.             // 
  430.             this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  431.             this.comboBox2.Items.AddRange(new object[] {
  432.                                                            "SkinCrafter 0",
  433.                                                            "SkinCrafter 1",
  434.                                                            "SkinCrafter 2",
  435.                                                            "SkinCrafter 3",
  436.                                                            "SkinCrafter 4",
  437.                                                            "SkinCrafter 5",
  438.                                                            "SkinCrafter 6",
  439.                                                            "SkinCrafter 7",
  440.                                                            "SkinCrafter 8",
  441.                                                            "SkinCrafter 9",
  442.                                                            "SkinCrafter 10"});
  443.             this.comboBox2.Location = new System.Drawing.Point(152, 136);
  444.             this.comboBox2.Name = "comboBox2";
  445.             this.comboBox2.Size = new System.Drawing.Size(96, 21);
  446.             this.comboBox2.TabIndex = 11;
  447.             // 
  448.             // tabControl1
  449.             // 
  450.             this.tabControl1.Controls.Add(this.tabPage1);
  451.             this.tabControl1.Controls.Add(this.tabPage2);
  452.             this.tabControl1.Controls.Add(this.tabPage3);
  453.             this.tabControl1.Controls.Add(this.tabPage4);
  454.             this.tabControl1.Controls.Add(this.tabPage5);
  455.             this.tabControl1.Location = new System.Drawing.Point(8, 288);
  456.             this.tabControl1.Name = "tabControl1";
  457.             this.tabControl1.SelectedIndex = 0;
  458.             this.tabControl1.Size = new System.Drawing.Size(352, 184);
  459.             this.tabControl1.TabIndex = 12;
  460.             // 
  461.             // tabPage1
  462.             // 
  463.             this.tabPage1.Controls.Add(this.textBox3);
  464.             this.tabPage1.Location = new System.Drawing.Point(4, 22);
  465.             this.tabPage1.Name = "tabPage1";
  466.             this.tabPage1.Size = new System.Drawing.Size(344, 158);
  467.             this.tabPage1.TabIndex = 0;
  468.             this.tabPage1.Text = "Tab 0";
  469.             // 
  470.             // textBox3
  471.             // 
  472.             this.textBox3.Location = new System.Drawing.Point(8, 8);
  473.             this.textBox3.Multiline = true;
  474.             this.textBox3.Name = "textBox3";
  475.             this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both;
  476.             this.textBox3.Size = new System.Drawing.Size(328, 144);
  477.             this.textBox3.TabIndex = 0;
  478.             this.textBox3.Text = "textBox3";
  479.             // 
  480.             // tabPage2
  481.             // 
  482.             this.tabPage2.Controls.Add(this.listView1);
  483.             this.tabPage2.Location = new System.Drawing.Point(4, 22);
  484.             this.tabPage2.Name = "tabPage2";
  485.             this.tabPage2.Size = new System.Drawing.Size(344, 158);
  486.             this.tabPage2.TabIndex = 1;
  487.             this.tabPage2.Text = "Tab 1";
  488.             // 
  489.             // tabPage3
  490.             // 
  491.             this.tabPage3.Controls.Add(this.pictureBox1);
  492.             this.tabPage3.Location = new System.Drawing.Point(4, 22);
  493.             this.tabPage3.Name = "tabPage3";
  494.             this.tabPage3.Size = new System.Drawing.Size(344, 158);
  495.             this.tabPage3.TabIndex = 2;
  496.             this.tabPage3.Text = "Tab 2";
  497.             // 
  498.             // pictureBox1
  499.             // 
  500.             this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
  501.             this.pictureBox1.Location = new System.Drawing.Point(8, 8);
  502.             this.pictureBox1.Name = "pictureBox1";
  503.             this.pictureBox1.Size = new System.Drawing.Size(328, 144);
  504.             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
  505.             this.pictureBox1.TabIndex = 0;
  506.             this.pictureBox1.TabStop = false;
  507.             // 
  508.             // tabPage4
  509.             // 
  510.             this.tabPage4.Controls.Add(this.label3);
  511.             this.tabPage4.Controls.Add(this.label2);
  512.             this.tabPage4.Location = new System.Drawing.Point(4, 22);
  513.             this.tabPage4.Name = "tabPage4";
  514.             this.tabPage4.Size = new System.Drawing.Size(344, 158);
  515.             this.tabPage4.TabIndex = 3;
  516.             this.tabPage4.Text = "Tab 3";
  517.             // 
  518.             // label3
  519.             // 
  520.             this.label3.Location = new System.Drawing.Point(48, 32);
  521.             this.label3.Name = "label3";
  522.             this.label3.Size = new System.Drawing.Size(56, 16);
  523.             this.label3.TabIndex = 1;
  524.             this.label3.Text = "label3";
  525.             // 
  526.             // label2
  527.             // 
  528.             this.label2.Location = new System.Drawing.Point(216, 64);
  529.             this.label2.Name = "label2";
  530.             this.label2.Size = new System.Drawing.Size(48, 23);
  531.             this.label2.TabIndex = 0;
  532.             this.label2.Text = "label2";
  533.             // 
  534.             // tabPage5
  535.             // 
  536.             this.tabPage5.Location = new System.Drawing.Point(4, 22);
  537.             this.tabPage5.Name = "tabPage5";
  538.             this.tabPage5.Size = new System.Drawing.Size(344, 158);
  539.             this.tabPage5.TabIndex = 4;
  540.             this.tabPage5.Text = "Tab 4";
  541.             // 
  542.             // progressBar1
  543.             // 
  544.             this.progressBar1.Location = new System.Drawing.Point(256, 104);
  545.             this.progressBar1.Name = "progressBar1";
  546.             this.progressBar1.Size = new System.Drawing.Size(96, 16);
  547.             this.progressBar1.TabIndex = 13;
  548.             this.progressBar1.Value = 30;
  549.             // 
  550.             // trackBar1
  551.             // 
  552.             this.trackBar1.Location = new System.Drawing.Point(248, 128);
  553.             this.trackBar1.Name = "trackBar1";
  554.             this.trackBar1.Size = new System.Drawing.Size(112, 34);
  555.             this.trackBar1.TabIndex = 14;
  556.             // 
  557.             // comboBox3
  558.             // 
  559.             this.comboBox3.Enabled = false;
  560.             this.comboBox3.Location = new System.Drawing.Point(152, 168);
  561.             this.comboBox3.Name = "comboBox3";
  562.             this.comboBox3.Size = new System.Drawing.Size(96, 21);
  563.             this.comboBox3.TabIndex = 15;
  564.             this.comboBox3.Text = "comboBox3";
  565.             // 
  566.             // button1
  567.             // 
  568.             this.button1.Location = new System.Drawing.Point(256, 168);
  569.             this.button1.Name = "button1";
  570.             this.button1.Size = new System.Drawing.Size(96, 23);
  571.             this.button1.TabIndex = 16;
  572.             this.button1.Text = "RemoveSkin";
  573.             this.button1.Click += new System.EventHandler(this.button1_Click);
  574.             // 
  575.             // button2
  576.             // 
  577.             this.button2.Location = new System.Drawing.Point(256, 200);
  578.             this.button2.Name = "button2";
  579.             this.button2.Size = new System.Drawing.Size(96, 23);
  580.             this.button2.TabIndex = 17;
  581.             this.button2.Text = "ApplySkin";
  582.             this.button2.Click += new System.EventHandler(this.button2_Click);
  583.             // 
  584.             // button3
  585.             // 
  586.             this.button3.Enabled = false;
  587.             this.button3.Location = new System.Drawing.Point(256, 232);
  588.             this.button3.Name = "button3";
  589.             this.button3.Size = new System.Drawing.Size(96, 24);
  590.             this.button3.TabIndex = 18;
  591.             this.button3.Text = "Disabled button";
  592.             this.button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  593.             this.button3.Click += new System.EventHandler(this.button3_Click);
  594.             // 
  595.             // groupBox2
  596.             // 
  597.             this.groupBox2.Controls.Add(this.button4);
  598.             this.groupBox2.Controls.Add(this.textBoxSkinPath);
  599.             this.groupBox2.Controls.Add(this.comboBoxSkins);
  600.             this.groupBox2.Location = new System.Drawing.Point(8, 200);
  601.             this.groupBox2.Name = "groupBox2";
  602.             this.groupBox2.Size = new System.Drawing.Size(240, 80);
  603.             this.groupBox2.TabIndex = 19;
  604.             this.groupBox2.TabStop = false;
  605.             this.groupBox2.Text = "Skins";
  606.             this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
  607.             // 
  608.             // button4
  609.             // 
  610.             this.button4.Location = new System.Drawing.Point(8, 16);
  611.             this.button4.Name = "button4";
  612.             this.button4.Size = new System.Drawing.Size(120, 24);
  613.             this.button4.TabIndex = 2;
  614.             this.button4.Text = "Set skin directory";
  615.             this.button4.Click += new System.EventHandler(this.button4_Click);
  616.             // 
  617.             // textBoxSkinPath
  618.             // 
  619.             this.textBoxSkinPath.Enabled = false;
  620.             this.textBoxSkinPath.Location = new System.Drawing.Point(8, 48);
  621.             this.textBoxSkinPath.Name = "textBoxSkinPath";
  622.             this.textBoxSkinPath.ReadOnly = true;
  623.             this.textBoxSkinPath.Size = new System.Drawing.Size(224, 20);
  624.             this.textBoxSkinPath.TabIndex = 1;
  625.             this.textBoxSkinPath.Text = "";
  626.             // 
  627.             // comboBoxSkins
  628.             // 
  629.             this.comboBoxSkins.Location = new System.Drawing.Point(136, 16);
  630.             this.comboBoxSkins.Name = "comboBoxSkins";
  631.             this.comboBoxSkins.Size = new System.Drawing.Size(96, 21);
  632.             this.comboBoxSkins.TabIndex = 0;
  633.             this.comboBoxSkins.SelectedIndexChanged += new System.EventHandler(this.comboBoxSkins_SelectedIndexChanged);
  634.             // 
  635.             // Form1
  636.             // 
  637.             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  638.             this.ClientSize = new System.Drawing.Size(368, 471);
  639.             this.Controls.Add(this.groupBox2);
  640.             this.Controls.Add(this.button3);
  641.             this.Controls.Add(this.button2);
  642.             this.Controls.Add(this.button1);
  643.             this.Controls.Add(this.comboBox3);
  644.             this.Controls.Add(this.trackBar1);
  645.             this.Controls.Add(this.progressBar1);
  646.             this.Controls.Add(this.tabControl1);
  647.             this.Controls.Add(this.comboBox2);
  648.             this.Controls.Add(this.hScrollBar1);
  649.             this.Controls.Add(this.comboBox1);
  650.             this.Controls.Add(this.listBox1);
  651.             this.Controls.Add(this.vScrollBar1);
  652.             this.Controls.Add(this.treeView1);
  653.             this.Controls.Add(this.groupBox1);
  654.             this.Controls.Add(this.label1);
  655.             this.Controls.Add(this.textBox1);
  656.             this.Menu = this.mainMenu1;
  657.             this.Name = "Form1";
  658.             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  659.             this.Text = "Form1";
  660.             this.Load += new System.EventHandler(this.Form1_Load);
  661.             this.groupBox1.ResumeLayout(false);
  662.             this.tabControl1.ResumeLayout(false);
  663.             this.tabPage1.ResumeLayout(false);
  664.             this.tabPage2.ResumeLayout(false);
  665.             this.tabPage3.ResumeLayout(false);
  666.             this.tabPage4.ResumeLayout(false);
  667.             ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
  668.             this.groupBox2.ResumeLayout(false);
  669.             this.ResumeLayout(false);
  670.  
  671.         }
  672.         #endregion
  673.  
  674.         /// <summary>
  675.         /// The main entry point for the application.
  676.         /// </summary>
  677.         [STAThread]
  678.         static void Main() 
  679.         {
  680.             Form1 newForm = new Form1();
  681.             
  682.             newForm.SkinOb = new SKINCRAFTERLib.SCSkinClass();
  683.             newForm.SkinOb.InitLicenKeys("0", "SKINCRAFTER", "SKINCRAFTER.COM", "support@skincrafter.com", "DEMOSKINCRAFTERLICENCE");
  684.             newForm.SkinOb.DefineLanguage(1);
  685.  
  686.             newForm.SkinOb.InitDecoration(1);
  687.                         
  688.             string SkinRegPath = newForm.LoadPathFromRegistry();
  689.             newForm.FillSkinCombo(SkinRegPath);
  690.             newForm.textBoxSkinPath.Text = SkinRegPath;
  691.             newForm.SkinFolder = SkinRegPath;
  692.             newForm.SkinOb.ExcludeWnd((int)newForm.pictureBox1.Handle,0);
  693.  
  694.             Application.Run(newForm);
  695.  
  696.             newForm.SkinOb.DeInitDecoration();        
  697.         }
  698.  
  699.         private void menuItem2_Click(object sender, System.EventArgs e)
  700.         {
  701.             if(openFileDialog1.ShowDialog() == DialogResult.OK)
  702.             {
  703.                 try
  704.                 {
  705.                     SkinOb.LoadSkinFromFile(openFileDialog1.FileName);
  706.                     SkinOb.ApplySkin();
  707.                 }
  708.                 catch (Exception exp)
  709.                 {
  710.  
  711.                 }
  712.             }
  713.         }
  714.  
  715.         private void menuItem5_Click(object sender, System.EventArgs e)
  716.         {
  717.             this.Close();
  718.         }
  719.  
  720.         private void Form1_Load(object sender, System.EventArgs e)
  721.         {
  722.         
  723.         }
  724.  
  725.         private void menuItem1_Click(object sender, System.EventArgs e)
  726.         {
  727.         
  728.         }
  729.  
  730.         private void hScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
  731.         {
  732.         
  733.         }
  734.  
  735.         private void button1_Click(object sender, System.EventArgs e)
  736.         {
  737.             SkinOb.RemoveSkin();
  738.         }
  739.  
  740.         private void button2_Click(object sender, System.EventArgs e)
  741.         {
  742.             SkinOb.ApplySkin();
  743.         }
  744.  
  745.         private void menuItem4_Click(object sender, System.EventArgs e)
  746.         {
  747.             SkinOb.AboutSkinCrafter();
  748.         }
  749.  
  750.         private void button3_Click(object sender, System.EventArgs e)
  751.         {
  752.         
  753.         }
  754.  
  755.         private void groupBox2_Enter(object sender, System.EventArgs e)
  756.         {
  757.         
  758.         }
  759.  
  760.         private void button4_Click(object sender, System.EventArgs e)
  761.         {
  762.             foldDial = new FolderBrowserDialog();
  763.             if(SkinFolder == null)
  764.             {
  765.                 foldDial.SelectedPath = LoadPathFromRegistry();
  766.             }
  767.             else
  768.                 foldDial.SelectedPath = SkinFolder;
  769.  
  770.             foldDial.ShowNewFolderButton = false;
  771.             foldDial.ShowDialog(this);
  772.  
  773.             SkinFolder = foldDial.SelectedPath;
  774.  
  775.             this.textBoxSkinPath.Text = SkinFolder;
  776.  
  777.             FillSkinCombo(SkinFolder);
  778.  
  779.         }
  780.  
  781.         private void comboBoxSkins_SelectedIndexChanged(object sender, System.EventArgs e)
  782.         {
  783.             SkinOb.LoadSkinFromFile(SkinFolder+"\\"+this.comboBoxSkins.Text);
  784.             SkinOb.ApplySkin();
  785.             SkinOb.UpdateControl(0);
  786.         }
  787.  
  788.         private string LoadPathFromRegistry()
  789.         {
  790.             RegistryKey rk = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\SkinCrafter\SkinCrafter Demo");
  791.             Object ob = null;
  792.             ob = rk.GetValue("SkinPath");
  793.             if(ob == null)
  794.                 return "";
  795.             else
  796.                 return ob.ToString();
  797.         }
  798.  
  799.         private void FillSkinCombo(string path)
  800.         {
  801.             try
  802.             {
  803.             
  804.                 DirectoryInfo di = new DirectoryInfo(path);
  805.                 FileInfo[] fi = di.GetFiles    ("*.skf");
  806.                 this.comboBoxSkins.Items.Clear();
  807.                 this.comboBoxSkins.Text = "";
  808.                 foreach(FileInfo nxFi in fi)
  809.                 {
  810.                     this.comboBoxSkins.Items.Add(nxFi.Name);
  811.                 }
  812.             }
  813.             catch (Exception e) 
  814.             {
  815.                 
  816.             }
  817.         }
  818.  
  819.     }
  820. }
  821.