Ejemplo n.º 1
0
        /// <summary>
        /// Keeps user from renaming multiple asset labels.
        /// </summary>
        private void RenameNewLabelTextBox_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                // Check for invalid characters in the new name
                if (MOG_ControllerSystem.InvalidMOGCharactersCheck(RenameNewLabelTextBox.Text, true))
                {
                    RenameNewLabelTextBox.Text = MOG_ControllerSystem.ReplaceInvalidCharacters(RenameNewLabelTextBox.Text);
                }

                // For Rename Label, we only need to worry about one asset...
                if (mFullFilename != null)
                {
                    MOG_Filename currentFilename = new MOG_Filename(this.mFullFilename);
                    string       targetName      = GetTargetName(currentFilename, RenameNewClassNameTextBox.Text,
                                                                 RenameNewPlatformComboBox.Text, RenameNewLabelTextBox.Text);

                    ChangeAssetFilenameInListView(targetName);

                    // Update the imported files column
                    if (RenameFiles.Checked && bInitialized)
                    {
                        ChangeAssetImportnameInListView(RenameNewLabelTextBox.Text);
                    }
                }
            }
            // Eat any errors we get
            catch (Exception ex)
            {
                MOG_Prompt.PromptMessage("Error With Value", ex.Message, ex.StackTrace, MOG_ALERT_LEVEL.ALERT);
            }
        }
Ejemplo n.º 2
0
        private void RenameNewPlatformComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            try
            {
                // Check for invalid characters in the new name
                if (MOG_ControllerSystem.InvalidMOGCharactersCheck(RenameNewPlatformComboBox.Text, true))
                {
                    RenameNewPlatformComboBox.Text = MOG_ControllerSystem.ReplaceInvalidCharacters(RenameNewPlatformComboBox.Text);
                }

                ChangeAssetFilenamesInListView();
            }
            // Eat any errors we get
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString());
            }
        }
Ejemplo n.º 3
0
        private void RenameNewClassNameTextBox_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                // Ignore the '*' because it is always set that way when there are multiple assets spanning multiple classifications
                if (RenameNewClassNameTextBox.Text != "*")
                {
                    // Check for invalid characters in the new name
                    if (MOG_ControllerSystem.InvalidMOGCharactersCheck(RenameNewClassNameTextBox.Text, true))
                    {
                        RenameNewClassNameTextBox.Text = MOG_ControllerSystem.ReplaceInvalidCharacters(RenameNewClassNameTextBox.Text);
                    }
                }

                ChangeAssetFilenamesInListView();
            }
            // Eat any errors we get
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString());
            }
        }