コード例 #1
0
 // Check if the replace textbox text exist in checked files
 private void ReplaceTxtShowWarning()
 {
     if (!ReplaceTxt.IsEmpty() && ReplaceTxt.EditMode && FilesDG.Items.Count > 0 && !ContainsString(ReplaceTxt.Text))
     {
         ReplaceTxt.ShowWarning(true);
     }
     else
     {
         ReplaceTxt.ShowWarning(false);
     }
 }
コード例 #2
0
 // Set the rename buttons enabled state
 private void RenameBtnsEnabled()
 {
     if (RenameBtn.IsChecked == true)
     {
         if (!RenameTxt.IsEmpty() && RenameTxt.EditMode)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = false;
         }
     }
     else
     {
         if (!ReplaceTxt.IsEmpty() && ReplaceTxt.EditMode)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else if (!ReplaceTxt.IsEmpty() && ReplaceTxt.EditMode && !WithTxt.IsEmpty() && WithTxt.EditMode)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else if (!PrefixTxt.IsEmpty() && PrefixTxt.EditMode)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else if (!SuffixTxt.IsEmpty() && SuffixTxt.EditMode)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else if (TrimStartSpn.NumValue > 0 || TrimEndSpn.NumValue > 0)
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = true;
         }
         else
         {
             RenameSelBtn.IsEnabled = RenameAllBtn.IsEnabled = false;
         }
     }
 }