public RenameWindow(MainWindow main, MidLevelLogic midLevelLogic)
        {
            m_MidLevelLogic = midLevelLogic;
            Resources       = main.Resources;
            InitializeComponent();

            m_Config = IoC.FindMonkey <IConfig>();

            textBoxRename.Text = m_Config.RenameFormat;
            InitComboFormatType();
        }
Пример #2
0
        public void RenameReplay()
        {
            MidLevelLogic midLevelLogic = new MidLevelLogic(m_Main, this);

            if (!m_Config.AutoRename)
            {
                RenameWindow renameWindow = new RenameWindow(m_Main, midLevelLogic);
                renameWindow.Owner = m_Main;
                renameWindow.ShowDialog();
            }
            else
            {
                String newReplayName = String.Empty;
                if (midLevelLogic.GenerateNewName(out newReplayName))
                {
                    if (!String.IsNullOrEmpty(newReplayName))
                    {
                        RelocateReplay(Path.GetDirectoryName(m_CurrentData.ReplayPath) + "\\" + newReplayName + ".sc2replay");
                    }
                }
            }
        }