Esempio n. 1
0
        private Button LockButtonLayout(int index, out Image theLock)
        {
            Button lockButton = new Button();

            lockButton.Name                = "lockButton" + index;
            theLock                        = new Image();
            lockButton.Tag                 = 0;
            theLock.Source                 = LayoutController.GetImage("/Resources/App icons/un_lock.png");
            lockButton.Content             = theLock;
            lockButton.Width               = 20;
            lockButton.Height              = 20;
            lockButton.HorizontalAlignment = HorizontalAlignment.Left;
            lockButton.Margin              = new Thickness(26, 0, 0, 0);
            return(lockButton);
        }
Esempio n. 2
0
        private Button SpeakerButtonLayout(int index)
        {
            Button speakerButton = new Button();

            speakerButton.Name = "speakerButton" + index;
            Image speakerImage = new Image();

            speakerButton.Tag                 = 0;
            speakerImage.Source               = LayoutController.GetImage(@"/Resources/App icons/field-speaker.gif");
            speakerButton.Content             = speakerImage;
            speakerButton.Width               = 20;
            speakerButton.Height              = 20;
            speakerButton.HorizontalAlignment = HorizontalAlignment.Left;
            speakerButton.Margin              = new Thickness(3, 0, 0, 0);
            return(speakerButton);
        }
Esempio n. 3
0
 private void Select_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (isSelectionMode1 == false)
         {
             isSelectionMode1   = true;
             selectImage.Source = LayoutController.GetImage("/Resources/App icons/scbtpalm.png");
             Select.ToolTip     = "Selection I";
         }
         else
         {
             isSelectionMode1   = false;
             selectImage.Source = LayoutController.GetImage("/Resources/App icons/scbtarrow.png");
             Select.ToolTip     = "Selection II";
         }
     }
     catch (Exception)
     {
     }
 }
Esempio n. 4
0
        private Button LockButtonSetup(int index, CheckBox selectCheckBox)
        {
            Image  theLock;
            Button lockButton = LockButtonLayout(index, out theLock);

            lockButton.Click += delegate
            {
                ScoreStaffs ss = (ScoreStaffs)fieldGrid.Children[borderTags[index] + 1];
                if ((int)lockButton.Tag == 0)  // If it's unlocked.
                {
                    theLock.Source = LayoutController.GetImage("/Resources/App icons/lock.png");
                    if (selectCheckBox.IsChecked == true)
                    {
                        ss.borderStaff.BorderBrush = Brushes.Magenta;
                    }
                    else
                    {
                        ss.borderStaff.BorderBrush = Brushes.Blue;
                    }
                    lockButton.Tag = 1;
                    lockTag        = true;
                }
                else  // If it's locked.
                {
                    theLock.Source = LayoutController.GetImage("/Resources/App icons/un_lock.png");
                    if (selectCheckBox.IsChecked == true)
                    {
                        ss.borderStaff.BorderBrush = Brushes.Red;
                    }
                    else
                    {
                        ss.borderStaff.BorderBrush = Brushes.Black;
                    }
                    lockButton.Tag = 0;
                    lockTag        = false;
                }
            };

            return(lockButton);
        }