コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: brnle/481kiosk
 //Function used to resize all the tab items
 private void resize(ItemCollection items)
 {
     //Iterates through each tab item and changes the size according to the number of tab items available
     for (int index = 0; index < items.Count; index++)
     {
         TabItem tab = (TabItem) items.GetItemAt(index);
         tab.Width = (tabControl.ActualWidth - 6) / items.Count;
     }
 }
コード例 #2
0
 public static void GenBatFile(ItemCollection history)
 {
     using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoDOS.bat", false))
     {
         file.WriteLine("AMIDEDOS/ SK " + "\"" + DEFAULT_SM_SKU + "\"");            
     }
     using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoEFI.nsh", false))
     {
         file.WriteLine("AMIDEEFIx64/ SK " + "\"" + DEFAULT_SM_SKU + "\"");
     }
     using (System.IO.StreamWriter file = new System.IO.StreamWriter("SKUNoWin.bat", false))
     {
         file.WriteLine("AMIDEWINx64/ SK " + "\"" + DEFAULT_SM_SKU + "\"");
     }
     using (System.IO.StreamWriter file = new System.IO.StreamWriter("Config.txt", false))
     {
         for (int i = 0; i < history.Count; i += 2)
             file.WriteLine(history.GetItemAt(i).ToString().Replace("Q" + (i / 2 + 1).ToString() + ":", "").Replace("?", "") + history.GetItemAt(i + 1).ToString().Replace("A:", ": "));
     }
 }