Exemplo n.º 1
0
 public AddNewVerilog(SchematixCore core)
 {
     this.core = core;
     InitializeComponent();
     EntityDrawning = new Verilog_EntityDrawning(this.Font);
     PortList       = new List <Verilog_Port>();
 }
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="core"></param>
 public ProjectExplorerControl(SchematixCore core)
 {
     this.core     = core;
     selectedItems = new ObservableCollection <TreeViewItem>();
     CreateCommands();
     InitializeComponent();
 }
Exemplo n.º 3
0
 public StartPagePanel(SchematixCore core)
 {
     InitializeComponent();
     this.core       = core;
     this.IconSource = new BitmapImage(new Uri("Images/StartPage.png", UriKind.Relative));
     Title           = "Start Page";
     InitHandlers();
 }
Exemplo n.º 4
0
        public TextSearcher(SchematixCore core, Schematix.Windows.Code.Code code)
        {
            this.core = core;

            searcher           = new SimpleSearcher(string.Empty, string.Empty, 0);
            solutionFiles      = new List <SearchSource>();
            curProjFiles       = new List <SearchSource>();
            allOpenedDocuments = new List <SearchSource>();
        }
Exemplo n.º 5
0
        public Code(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
            : base(projectElement, core)
        {
            InitializeComponent();
            zoomSlider.Value = textEditor.FontSize;

            LoadText(ProjectElement);
            LoadOptions();
            textEditor.Focus();
        }
Exemplo n.º 6
0
        public static ProjectExplorer.Schema_File CreateEmptyScheme(string p, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
        {
            string path = System.IO.Path.Combine(projectFolder.Path, string.Concat(p, ".csx"));
            string name = p;

            ProjectExplorer.Schema_File     newFile = new ProjectExplorer.Schema_File(path, projectFolder);
            Schematix.Windows.Schema.Schema schema  = new Windows.Schema.Schema(newFile);
            schema.Save();
            projectFolder.AddElement(newFile);
            core.SaveSolution();
            core.UpdateExplorerPanel();
            return(newFile);
        }
Exemplo n.º 7
0
        internal static ProjectExplorer.EDR_File CreateEmptyEDRFile(string p, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
        {
            string path = System.IO.Path.Combine(projectFolder.Path, string.Concat(p, ".edr"));

            EntityDrawning.EntityDrawningCore edr_core = new EntityDrawning.EntityDrawningCore(null);
            edr_core.Picture.SaveProject(path);

            ProjectExplorer.EDR_File newFile = new ProjectExplorer.EDR_File(path, projectFolder);
            projectFolder.AddElement(newFile);
            core.SaveSolution();
            core.UpdateExplorerPanel();

            return(newFile);
        }
Exemplo n.º 8
0
        internal static Schematix.ProjectExplorer.FSM_File CreateWizardFSM(string p, SchematixCore schematixCore, Verilog_Module verilog_Module, FSM_OptionsHelper fSM_OptionsHelper, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
        {
            string           path = System.IO.Path.Combine(projectFolder.Path, string.Concat(p, ".fsm"));
            Constructor_Core cc   = new Constructor_Core(null);

            Schematix.Windows.FSM.FSM_Utils.InitVerilogData(fSM_OptionsHelper, verilog_Module, cc);
            cc.SaveToFile(path);

            Schematix.ProjectExplorer.FSM_File fsm = new ProjectExplorer.FSM_File(path, projectFolder);
            projectFolder.AddElement(fsm);

            core.SaveSolution();
            core.UpdateExplorerPanel();
            return(fsm);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="projectElement"></param>
        /// <param name="core"></param>
        public SchematixBaseWindow(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
        {
            this.core                       = core;
            this.projectElement             = projectElement;
            this.Title                      = projectElement.Caption;
            this.IconSource                 = new System.Windows.Media.Imaging.BitmapImage(new Uri(projectElement.Icon, UriKind.Relative));
            projectElement.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(projectElement_PropertyChanged);
            Closing         += new EventHandler <System.ComponentModel.CancelEventArgs>(SchematixBaseWindow_Closing);
            IsActiveChanged += new EventHandler(SchematixBaseWindow_IsActiveChanged);

            dispatcherTimer          = new DispatcherTimer();
            dispatcherTimer.Interval = TimeSpan.FromSeconds(1);
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Start();
        }
Exemplo n.º 10
0
 public FSM(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
     : base(projectElement, core)
 {
     InitializeComponent();
     constructor1.core.UpdateHistory += new Schematix.FSM.Constructor_Core.UpdateHistoryDelegate(core_UpdateHistory);
     constructorCore = constructor1.core;
     try
     {
         constructor1.core.OpenFile(projectElement.AbsolutePath);
     }
     catch (Exception ex)
     {
         //Не удалось открыть файл
         Schematix.Core.Logger.Log.Error(string.Format("Could not open FSM file: {0}", projectElement.Path), ex);
         MessageBox.Show(string.Format("Could not open FSM file: {0}", projectElement.AbsolutePath), "Could not open file", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Exemplo n.º 11
0
 public Schema(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
     : base(projectElement, core)
 {
     InitializeComponent();
     schemaUserControl.file.name = projectElement.AbsolutePath;
     try
     {
         schemaUserControl.Open(projectElement.AbsolutePath);
     }
     catch (Exception ex)
     {
         //Не удалось открыть файл
         Schematix.Core.Logger.Log.Error(string.Format("Could not open CSX file: {0}", projectElement.Path), ex);
         MessageBox.Show(string.Format("Could not open CSX file: {0}", projectElement.AbsolutePath), "Could not open file", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     schemaUserControl.history.RegisterSave();
 }
Exemplo n.º 12
0
        public EntityDrawning(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
            : base(projectElement, core)
        {
            InitializeComponent();
            this.core = entityDrawningForm.core;
            try
            {
                this.core.Picture.openProject(projectElement.Path);
            }
            catch (Exception ex)
            {
                //Не удалось открыть файл
                Schematix.Core.Logger.Log.Error(string.Format("Could not open EDR file: {0}", projectElement.Path), ex);
                MessageBox.Show(string.Format("Could not open EDR file: {0}", projectElement.Path), "Could not open file", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            //zoomSlider.Value = textEditor.FontSize;

            //LoadText(ProjectElement);
            //LoadOptions();
        }
Exemplo n.º 13
0
 public DesignBrowserPanel(SchematixCore core)
 {
     InitializeComponent();
     this.Title      = "Design Browser";
     this.IconSource = new BitmapImage(new Uri("Images/Design/chip.png", UriKind.Relative));
 }
Exemplo n.º 14
0
 public Waveform(ProjectExplorer.ProjectElement projectElement, SchematixCore core)
     : base(projectElement, core)
 {
     InitializeComponent();
     waveformUserControl1.LoadVCDFile(projectElement.Path);
 }
Exemplo n.º 15
0
 public DesignBrowserTree(SchematixCore core)
 {
     this.core = core;
     InitializeComponent();
     CreateCommands();
 }
Exemplo n.º 16
0
 internal static ProjectExplorer.Verilog_Code_File CreateWizardVerilogCodeFile(string p, string text, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
 {
     ProjectExplorer.Verilog_Code_File newFile = ProjectExplorer.Verilog_Code_File.CreateFile(p, text, projectFolder);
     core.SaveSolution();
     core.UpdateExplorerPanel();
     return(newFile);
 }
Exemplo n.º 17
0
        internal static Schematix.ProjectExplorer.FSM_File CreateEmptyFSM(string p, FSM_Language fSM_Language, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
        {
            string           path  = System.IO.Path.Combine(projectFolder.Path, string.Concat(p, ".fsm"));
            string           name  = p;
            Constructor_Core cc    = new Constructor_Core(null);
            My_Graph         graph = cc.Graph;

            if (fSM_Language == FSM_Language.VHDL)
            {
                graph.VHDLModule = new VHDL_Module()
                {
                    ArchitectureName = name, EntityName = name
                }
            }
            ;
            if (fSM_Language == FSM_Language.Verilog)
            {
                graph.VerilogModule = new Verilog_Module()
                {
                    ModuleName = name
                }
            }
            ;
            graph.Language = fSM_Language;
            cc.SaveToFile(path);

            Schematix.ProjectExplorer.FSM_File fsm = new ProjectExplorer.FSM_File(path, projectFolder);
            projectFolder.AddElement(fsm);

            core.SaveSolution();
            core.UpdateExplorerPanel();
            return(fsm);
        }
Exemplo n.º 18
0
 public ProjectExplorerPanel(SchematixCore core)
 {
     InitializeComponent();
     this.core       = core;
     this.IconSource = new BitmapImage(new Uri("Images/OpenProject.png", UriKind.Relative));
 }
Exemplo n.º 19
0
 internal static ProjectExplorer.VHDL_Code_File CreateEmptyVHDLCodeFile(string p, SchematixCore core, ProjectExplorer.ProjectFolder projectFolder)
 {
     ProjectExplorer.VHDL_Code_File newFile = ProjectExplorer.VHDL_Code_File.CreateFile(p, string.Empty, projectFolder);
     core.SaveSolution();
     core.UpdateExplorerPanel();
     return(newFile);
 }