Beispiel #1
0
        public Form1()
        {
            InitializeComponent();
            TreeNodeManager.TreeView = tvConnections;

            BlockStudioProjectService.BlockStudioSettings = BlockStudioSettings.Load();

            if (BlockStudioProjectService.BlockStudioSettings.RecentProjects.Any())
            {
                var lastProject = BlockStudioProjectService.BlockStudioSettings.RecentProjects.LastOrDefault();
                BlockStudioProjectService.BlockStudioProject = BlockStudioProject.LoadFromPath(lastProject);
                LoadProject();
            }
            else
            {
                //NewProjectDialog();
            }

            tvConnections.NodeMouseClick       += TvConnections_Click;
            tvConnections.NodeMouseDoubleClick += TvConnections_NodeMouseDoubleClick;
            tvConnections.BeforeExpand         += TvConnections_BeforeExpand;
            tvConnections.KeyDown += TvConnections_KeyDown;


            HtmlTabManager.HtmlEditorTextBox = txtHtmlEditor;
        }
Beispiel #2
0
        public BlockStudioProjectService(TreeView treeview, FlowLayoutPanel fpAbi, TextBox txtEstimatedGas, TextBox txtConsoleOut)
        {
            _txtEstimatedGas = txtEstimatedGas;
            _fpAbi           = fpAbi;
            _fileTreeView    = treeview;
            _txtConsoleOut   = txtConsoleOut;

            SolcOutputPath = string.Format(@"{0}contract", BlockStudioProject.SaveFolder);
            if (!Directory.Exists(SolcOutputPath))
            {
                Directory.CreateDirectory(SolcOutputPath);
            }

            var watcher = new FileSystemWatcher(SolcOutputPath);

            watcher.Created            += Watcher_Created;
            watcher.EnableRaisingEvents = true;

            BlockStudioSettings = BlockStudioSettings.Load();
        }