示例#1
0
            public void StopRenaming(bool save)
            {
                if (m_textBox != null)
                {
                    if (m_textBox.Text != PermanentText)
                    {
                        if (save)
                        {
                            var newPath = File.Parent.FullName + Path.DirectorySeparatorChar + m_textBox.Text;
                            Rename(File, newPath);
                        }
                    }

                    m_textBox.Dispose();
                    m_textBox = null;
                }
            }
示例#2
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         m_textBox.Dispose();
     }
     if (disposing && (components != null))
     {
         components.Dispose();
     }
     base.Dispose(disposing);
 }
示例#3
0
        void ReleaseDesignerOutlets()
        {
            if (MyTextBox != null)
            {
                MyTextBox.Dispose();
                MyTextBox = null;
            }

            if (PhoneNumber != null)
            {
                PhoneNumber.Dispose();
                PhoneNumber = null;
            }
        }