private void animatePanelOut_Click(object sender, EventArgs ev)
{
if (!m_animator.IsAnimating) {
Control panelOut = (sender == takePictureBackButton ? takePicturePanel : infoPanel);
if (m_takePictureWithPreviewAsync != null) {
WebcamWithPreview camp = confWebcam.SelectedItem as WebcamWithPreview;
if (camp != null) {
camp.TakePictureEnd();
}
}
confPanel.Location = new Point(-ClientRectangle.Width, 0);
confPanel.Visible = true;
confPanel.Focus();
m_animator.Run((EventHandler<AnimationEventArgs>)delegate(object sendr, AnimationEventArgs e) {
Invoke((MethodInvoker)delegate() {
int newLeft = (int)(Math.Min(e.PercentRemaining * e.PercentRemaining * e.PercentRemaining, 1) * -ClientRectangle.Width);
confPanel.Left = newLeft;
panelOut.Left = newLeft + ClientRectangle.Width;
if (e.IsLastCall) {
Text = Application.ProductName + " - " + Language.FormatString(Language.LanguageString.MainForm_Configuration_Title);
panelOut.Visible = false;
}
});
});
}
}