CamTimer.Language.FormatString C# (CSharp) Method

FormatString() static private method

static private FormatString ( LanguageString stringName ) : string
stringName LanguageString
return string
        internal static string FormatString(LanguageString stringName, params object[] value)
        {
            return string.Format(m_strings[stringName.ToString()], value);
        }

Usage Example

Example #1
0
        internal void TakePicture()
        {
            if ((m_takePictureAsync == null) && (m_cam != null))
            {
                if (m_countdownTimer != null)
                {
                    m_countdownTimer.Abort();
                    m_countdownTimer = null;
                }

                pictureBox.Text    = Language.FormatString(Language.LanguageString.MainForm_TakePicture_TakingPicture);
                m_takePictureAsync = new TakePicture(m_cam.TakePicture);
                m_takePictureAsync.BeginInvoke((AsyncCallback) delegate(IAsyncResult result) {
                    try {
                        pictureBox.DisplayBitmap = m_takePictureAsync.EndInvoke(result);
                        Invoke((MethodInvoker) delegate() {
                            try {
                                Common.SaveJPEG(pictureBox.DisplayBitmap, Path.Combine(Settings.OutputFolder, m_fileName));
                                pictureBox.Text = string.Empty;
                            } catch (Exception) {
                                pictureBox.Text = Language.FormatString(Language.LanguageString.NotifyForm_FailedToSave) + "\r\n" + m_fileName;
                            }
                        });
                    } catch (Exception) {
                        Invoke((MethodInvoker) delegate() {
                            pictureBox.Text = Language.FormatString(Language.LanguageString.NotifyForm_FailedToTakePicture);
                        });
                    } finally {
                        m_takePictureAsync = null;
                        CountdownTimerSetup();
                    }
                }, null);
            }
        }
All Usage Examples Of CamTimer.Language::FormatString