Forex_Strategy_Builder.Instrument_Editor.Instrument_Editor_FormClosing C# (CSharp) Метод

Instrument_Editor_FormClosing() приватный Метод

Check whether the restart is necessary.
private Instrument_Editor_FormClosing ( object sender, FormClosingEventArgs e ) : void
sender object
e System.Windows.Forms.FormClosingEventArgs
Результат void
        void Instrument_Editor_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (bNeedReset)
            {
                Dictionary<String, Instrument_Properties> temp = new Dictionary<string, Instrument_Properties>(Instruments.InstrumentList.Count);

                foreach (KeyValuePair<String, Instrument_Properties> kvp in Instruments.InstrumentList)
                    temp.Add(kvp.Key, kvp.Value.Clone());

                Instruments.InstrumentList.Clear();

                foreach (string symbol in lbxInstruments.Items)
                    Instruments.InstrumentList.Add(symbol, temp[symbol].Clone());
            }

            return;
        }