コード例 #1
0
ファイル: GridControl.cs プロジェクト: itai-m/MovingBox
 // Use this for initialization
 void Start()
 {
     renamePanel = renamePanelObj.GetComponent <RenamePanel>();
     if (!loadMap())
     {
         if (RefManager.Instance.mapEditorCol != 0 && RefManager.Instance.mapEditorRow != 0)
         {
             InitDimansionsFromRefManager();
         }
         AddEmptyButtonsToGrid();
     }
 }
コード例 #2
0
        private void rename_Click(object sender, RoutedEventArgs e)
        {
            if (sideRight.SelectedElement != null)
            {
                selectedSite = SelectedSide.right;
            }
            else
            {
                selectedSite = SelectedSide.left;
            }
            DiscElement presentElement = selectedSite == SelectedSide.left ? sideLeft.SelectedElement : sideRight.SelectedElement;
            string      path           = selectedSite == SelectedSide.left ? sideLeft.SelectedElement.Path : sideRight.SelectedElement.Path;
            string      sourcePath     = selectedSite == SelectedSide.left ? sideLeft.mainPath.Text : sideRight.mainPath.Text;

            string fileName = selectedSite == SelectedSide.left ? sideLeft.SelectedElement.getName() : sideRight.SelectedElement.getName();
            var    dialog   = new RenamePanel(path, sourcePath, presentElement.isFile(), fileName);

            dialog.Show();
            dialog.RenameObject += RefreshAllList;
        }