private static void LoadParameters(string filename, WPFTouchButton2 touchButton)
 {
     try
     {
         WPFTouchButtonData data = WPFTouchButtonData.Deserialize(filename);
         touchButton.ThresholdCheck            = data.ThresholdCheck;
         touchButton.ThresholdTouch            = data.ThresholdTouch;
         touchButton.ThresholdDifferentPixel   = data.ThresholdDifferentPixel;
         touchButton.ThresholdUnderAsShadow1ch = data.ThresholdUnderAsShadow1ch;
     }
     catch (IOException e)
     {
         MessageBox.Show(e.Message, "タッチボタン設定読み込み失敗", MessageBoxButton.OK);
     }
 }
 private static void SaveParameters(string filename, WPFTouchButton2 touchButton)
 {
     try
     {
         WPFTouchButtonData data = new WPFTouchButtonData();
         data.ThresholdCheck            = touchButton.ThresholdCheck;
         data.ThresholdTouch            = touchButton.ThresholdTouch;
         data.ThresholdDifferentPixel   = touchButton.ThresholdDifferentPixel;
         data.ThresholdUnderAsShadow1ch = touchButton.ThresholdUnderAsShadow1ch;
         data.Serialize(filename);
     }
     catch (IOException e)
     {
         MessageBox.Show(e.Message, "タッチボタン設定書き込み失敗", MessageBoxButton.OK);
     }
 }