Beispiel #1
0
        static ControlService()
        {
            string appdir = ConfigurationManager.AppSettings["ProWriteFontFile"];

            if (appdir.IndexOf(@":") == -1)
            {
                appdir = Application.StartupPath + @"\" + appdir;
            }
            else
            {
                appdir = ConfigurationManager.AppSettings["ProWriteFontFile"];
            }

            FontManager.Initialize(appdir);

            _libraryTree      = new LibraryTree();
            _signCombo        = new SignRepositoryItemLookUpEdit();
            _propertyGrid     = new PropertyGridControl();
            _effectTree       = new EffectTreeControl();
            _toolBox          = new ToolBoxControl();
            _timeSliceControl = new TimeSliceGroupControl();
            _signImage        = new SignImage();
            _signStatus       = new SignStatus();

            _barButtonPosition = new BarButtonItem();
            //_barButtonPosition.CategoryGuid = new System.Guid("77795bb7-9bc5-4dd2-a297-cc758682e23d");
            //_barButtonPosition.Id = 0;
            //_barButtonPosition.Name = "siPosition";

            _statusBar            = new RibbonStatusBar();
            _currentClip          = new CurrentClip();
            _spellChecker         = new DevExpress.XtraSpellChecker.SpellChecker();
            _signStorageIndicator = new SignStorageIndicator();

            _pictureBox = new PictureEdit();
            _pictureBox.Properties.ShowMenu = false;
            _pictureBox.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;

            if (_libraryTree != null)
            {
                _libraryTree.Controller.RemoveLibraryItemEvent += new EventHandler <RemoveLibraryEventArgs>(Controller_RemoveLibraryItemEvent);
            }
            _fonts         = new List <PWFont>();
            _fontsBitMap   = new List <PWFont>();
            _fontsTrueType = new List <PWFont>();

            spellCheckTask = Task.Create((p) =>
            {
                CultureInfo engCulture = new CultureInfo("En-us");
                dictionary             = new SpellCheckerISpellDictionary(DemoUtils.GetRelativePath("american.xlg"), DemoUtils.GetRelativePath("english.aff"), engCulture);

                dictionary.AlphabetPath = DemoUtils.GetRelativePath("EnglishAlphabet.txt");
                customDictorary         = new SpellCheckerCustomDictionary();
                customDictorary.Culture = engCulture;

                SpellCheckerList.Load();
                customDictorary.AddWords(ServiceManager.Get <SpellCheckerList>());
            });
        }
        private void CreateThingsToolbox()
        {
            this.thingsToolbox = new ToolBoxControl("Things", Orientation.Horizontal);
            this.thingsToolbox.AddToolBoxItem(ToolBoxItem.Class, this);
            this.thingsToolbox.AddToolBoxItem(ToolBoxItem.Interface, this);

            ToolBoxPanel.Children.Add(this.thingsToolbox);
        }
        private void CreateRelationShipsToolbox()
        {
            this.relationshipsToolbox = new ToolBoxControl("Relationships", Orientation.Vertical);
            this.relationshipsToolbox.AddToolBoxItem(ToolBoxItem.Generalization, this);
            this.relationshipsToolbox.AddToolBoxItem(ToolBoxItem.Composition, this);
            this.relationshipsToolbox.AddToolBoxItem(ToolBoxItem.Aggregation, this);
            this.relationshipsToolbox.AddToolBoxItem(ToolBoxItem.Association, this);
            this.relationshipsToolbox.AddToolBoxItem(ToolBoxItem.Dependency, this);

            ToolBoxPanel.Children.Add(this.relationshipsToolbox);
        }
 private void Dock(ToolBoxControl control)
 {
     ToolBoxUndockedPanel.Children.Remove(control);
     if (ToolBoxUndockedPanel.Children.Count == 0)
     {
         ToolBoxUndockedViewer.Visibility = System.Windows.Visibility.Collapsed;
     }
     if (ToolBoxPanel.Children.Contains(control) == false)
     {
         ToolBoxPanel.Children.Add(control);
         ToolBoxViewer.Visibility   = System.Windows.Visibility.Visible;
         ToolBoxSplitter.Visibility = System.Windows.Visibility.Visible;
         ToolBoxColumn.Width        = GridLength.Auto;
         control.IsDocked           = true;
     }
 }
Beispiel #5
0
 public void Initialize()
 {
     ToolBoxControl.InitializeToolbox();
 }
Beispiel #6
0
 public void AddTab(string tabName, Type[] itemTypes)
 {
     ToolBoxControl.AddTab(tabName, itemTypes);
 }