コード例 #1
0
ファイル: iPhoneList.cs プロジェクト: exaphaser/iphonelist
 public iPhoneList()
 {
     /// TODO: Add ability to Edit and Delete Links
     InitializeComponent();
     SetObjectSizes();
     SetStatus();
     toolsMain.Location = new Point(0, 0);
     toolsFileView.Location = new Point(203, 0);
     //ToolStripManager.Renderer = new Office2007Renderer();
     //myPhone.Connect += new ConnectEventHandler(Connecting);
     //myPhone.Disconnect += new ConnectEventHandler(Connecting);
     prefs = new UserPrefs();
     links = new LinkNodes();
     ipItems = new ItemProperties();
     ipItems.Phone = myPhone;
     try {
         LoadUserPreferences();
         LoadConfig();
     }
     catch (Exception err) {
         Console.WriteLine(err.Message);
     }
     ipItems.Phone = myPhone;
     splitFilesViewer.Panel2Collapsed = true;
     if (prefs.Preview.TabSpaces == 0) {
         prefs.Preview.TabSpaces = 4;
     }
     previewTextBox.Tag = "empty";
     timerMain.Enabled = true;
 }
コード例 #2
0
ファイル: iPhoneList.cs プロジェクト: exaphaser/iphonelist
 private void LoadUserPreferences()
 {
     String fullPath = Application.UserAppDataPath + "iPhoneList.config";
     if (File.Exists(fullPath)) {
         XmlSerializer xmlConfig = new XmlSerializer(typeof(UserPrefs));
         using (TextReader prefsFile = new StreamReader(fullPath)) {
             prefs = (UserPrefs)xmlConfig.Deserialize(prefsFile);
         }
         splitFilesViewer.Panel2Collapsed = !prefs.Window.previewOn;
         SetItemLocation(this, prefs.Window.Main);
         SetItemLocation(toolsMain, prefs.Window.MainToolBar);
         SetItemLocation(toolsFileView, prefs.Window.FileToolBar);
     }
 }