コード例 #1
0
 private void RestoreDefaultConfig()
 {
     using (var memoryStream = new MemoryStream(Encoding.Unicode.GetBytes(Properties.Resources.ApplicationDefaultDocks)))
     {
         MainDockPanel.Restore(memoryStream, m_DeserializeDockContent);
         memoryStream.Close();
     }
 }
コード例 #2
0
        private void RestoreAppConfiguration()
        {
            if (!File.Exists(AppConfigFile))
            {
                RestoreDefaultConfig();
                return;
            }

            var fs = new FileStream(AppConfigFile, FileMode.Open, FileAccess.Read);

            try
            {
                MainDockPanel.Restore(fs, m_DeserializeDockContent);
            }
            finally
            {
                fs.Close();
            }
        }