public StoryTreeManager(StackPanel storyBucket, DragonObjectCollection doc, DragonTextEditor tb1, DragonTextEditor tb2)
 {
     this.storyBucket = storyBucket;
     this.doc         = doc;
     this.tb1         = tb1;
     this.tb2         = tb2;
     Initial();
 }
 public void InitializeTextEditor()
 {
     DragonTextEditor[] editors = new DragonTextEditor[] { TE_Area1, TE_Area2 };
     for (int i = 0; i < 2; i++)
     {
         editors[i].IsReadOnly      = i == 0 ? true : false;
         editors[i].ShowLineNumbers = true;
         editors[i].Width           = double.NaN;
         editors[i].Height          = double.NaN;
         editors[i].WordWrap        = true;
         editors[i].FontSize        = 20;
         G_Main.Children.Add(editors[i]);
         Grid.SetRow(editors[i], i * 2);
         Grid.SetColumn(editors[i], 2);
     }
 }
Пример #3
0
 public StoryButton(DragonObject drgObj, bool isWriter, StoryTreeManager stm, DragonTextEditor tb1, DragonTextEditor tb2)
 {
     this.drgObj                = drgObj;
     this.isWriter              = isWriter;
     this.stm                   = stm;
     this.tb1                   = tb1;
     this.tb2                   = tb2;
     Content                    = isWriter ? drgObj.writer : drgObj.storyName;
     HorizontalAlignment        = HorizontalAlignment.Right;
     HorizontalContentAlignment = HorizontalAlignment.Left;
     Background                 = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00DDDDDD"));
     BorderBrush                = new SolidColorBrush(Color.FromRgb(255, 255, 255));
     Foreground                 = new SolidColorBrush(Color.FromRgb(255, 255, 255));
     FontWeight                 = FontWeights.Bold;
     FontSize                   = 20;
     Height     = isWriter ? 36 : 0;
     Visibility = isWriter ? Visibility.Visible : Visibility.Hidden;
     Width      = isWriter ? 320 : 300;
     Margin     = new Thickness(0, 0, 0, 0);
     Click     += StoryButton_Click;
 }