示例#1
0
 private void addLayout(object sender, RoutedEventArgs e)
 {
     if (layouts.Count > 32)
     {
         MessageBox.Show("Only 32 layouts Allowed");
     }
     else
     {
         CreateWindow createWindow = new CreateWindow();
         createWindow.Show();
     }
 }
示例#2
0
        private void editLayoutClicked(object sender, RoutedEventArgs e)
        {
            if (selectedLayoutIndex < 0)
            {
                MessageBox.Show("Please Selecte Layout");
            }
            else
            {
                CreateWindow createWindow = new CreateWindow(true);
                createWindow.layoutNameTextBox.Text = layouts[selectedLayoutIndex].getLayoutName();
                byte R = Convert.ToByte(layouts[selectedLayoutIndex].getR());
                byte G = Convert.ToByte(layouts[selectedLayoutIndex].getG());
                byte B = Convert.ToByte(layouts[selectedLayoutIndex].getB());

                createWindow.colorPicker.SelectedColor = Color.FromRgb(R, G, B);
                createWindow.Show();
            }
        }