Ejemplo n.º 1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            NameForm dlg = new NameForm();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                MakeNewRoom(dlg.RoomName);
            }
        }
Ejemplo n.º 2
0
        private void btnRename_Click(object sender, EventArgs e)
        {
            NameForm dlg = new NameForm();

            dlg.RoomName = m_ActiveRoom.Name;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string oldPath = Path.Combine(m_strBaseFolder, m_ActiveRoom.Name + ".json");

                File.Delete(oldPath);
                m_ActiveRoom.Name = dlg.RoomName;

                SaveActiveRoom();
            }

            ReloadFiles();
            RefreshRoomData();
        }